FreeRDP
Loading...
Searching...
No Matches
tsmf_platform.h
1/*
2 * FreeRDP: A Remote Desktop Protocol Implementation
3 * Video Redirection Virtual Channel - GStreamer Decoder
4 * platform specific functions
5 *
6 * (C) Copyright 2014 Thincast Technologies GmbH
7 * (C) Copyright 2014 Armin Novak <armin.novak@thincast.com>
8 *
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22#ifndef FREERDP_CHANNEL_TSMF_CLIENT_GST_PLATFORM_H
23#define FREERDP_CHANNEL_TSMF_CLIENT_GST_PLATFORM_H
24
25#include <gst/gst.h>
26#include <tsmf_decoder.h>
27
28typedef struct
29{
30 ITSMFDecoder iface;
31
32 int media_type; /* TSMF_MAJOR_TYPE_AUDIO or TSMF_MAJOR_TYPE_VIDEO */
33
34 gint64 duration;
35
36 GstState state;
37 GstCaps* gst_caps;
38
39 GstElement* pipe;
40 GstElement* src;
41 GstElement* queue;
42 GstElement* outsink;
43 GstElement* volume;
44
45 BOOL ready;
46 BOOL paused;
47 UINT64 last_sample_start_time;
48 UINT64 last_sample_end_time;
49 BOOL seeking;
50 UINT64 seek_offset;
51
52 double gstVolume;
53 BOOL gstMuted;
54
55 int pipeline_start_time_valid; /* We've set the start time and have not reset the pipeline */
56 int shutdown; /* The decoder stream is shutting down */
57
58 void* platform;
59
60 BOOL (*ack_cb)(void*, BOOL);
61 void (*sync_cb)(void*);
62 void* stream;
63
65
66WINPR_ATTR_NODISCARD
67FREERDP_LOCAL const char* tsmf_platform_get_video_sink(void);
68
69WINPR_ATTR_NODISCARD
70FREERDP_LOCAL const char* tsmf_platform_get_audio_sink(void);
71
72WINPR_ATTR_NODISCARD
73FREERDP_LOCAL int tsmf_platform_create(TSMFGstreamerDecoder* decoder);
74
75WINPR_ATTR_NODISCARD
76FREERDP_LOCAL int tsmf_platform_set_format(TSMFGstreamerDecoder* decoder);
77
78WINPR_ATTR_NODISCARD
79FREERDP_LOCAL int tsmf_platform_register_handler(TSMFGstreamerDecoder* decoder);
80
81WINPR_ATTR_NODISCARD
82FREERDP_LOCAL int tsmf_platform_free(TSMFGstreamerDecoder* decoder);
83
84WINPR_ATTR_NODISCARD
85FREERDP_LOCAL int tsmf_window_create(TSMFGstreamerDecoder* decoder);
86
87WINPR_ATTR_NODISCARD
88FREERDP_LOCAL int tsmf_window_resize(TSMFGstreamerDecoder* decoder, int x, int y, int width,
89 int height, int nr_rect, RDP_RECT* visible);
90
91WINPR_ATTR_NODISCARD
92FREERDP_LOCAL int tsmf_window_destroy(TSMFGstreamerDecoder* decoder);
93
94WINPR_ATTR_NODISCARD
95FREERDP_LOCAL int tsmf_window_map(TSMFGstreamerDecoder* decoder);
96
97WINPR_ATTR_NODISCARD
98FREERDP_LOCAL int tsmf_window_unmap(TSMFGstreamerDecoder* decoder);
99
100WINPR_ATTR_NODISCARD
101FREERDP_LOCAL BOOL tsmf_gstreamer_add_pad(TSMFGstreamerDecoder* mdecoder);
102
103FREERDP_LOCAL void tsmf_gstreamer_remove_pad(TSMFGstreamerDecoder* mdecoder);
104
105#endif /* FREERDP_CHANNEL_TSMF_CLIENT_GST_PLATFORM_H */