28 #ifndef FREERDP_CHANNEL_TSMF_CLIENT_MEDIA_H
29 #define FREERDP_CHANNEL_TSMF_CLIENT_MEDIA_H
31 #include <freerdp/freerdp.h>
33 typedef struct S_TSMF_PRESENTATION TSMF_PRESENTATION;
35 typedef struct S_TSMF_STREAM TSMF_STREAM;
37 typedef struct S_TSMF_SAMPLE TSMF_SAMPLE;
39 TSMF_PRESENTATION* tsmf_presentation_new(
const BYTE* guid,
40 IWTSVirtualChannelCallback* pChannelCallback);
41 TSMF_PRESENTATION* tsmf_presentation_find_by_id(
const BYTE* guid);
42 BOOL tsmf_presentation_start(TSMF_PRESENTATION* presentation);
43 BOOL tsmf_presentation_stop(TSMF_PRESENTATION* presentation);
44 UINT tsmf_presentation_sync(TSMF_PRESENTATION* presentation);
45 BOOL tsmf_presentation_paused(TSMF_PRESENTATION* presentation);
46 BOOL tsmf_presentation_restarted(TSMF_PRESENTATION* presentation);
47 BOOL tsmf_presentation_volume_changed(TSMF_PRESENTATION* presentation, UINT32 newVolume,
49 BOOL tsmf_presentation_set_geometry_info(TSMF_PRESENTATION* presentation, UINT32 x, UINT32 y,
50 UINT32 width, UINT32 height, UINT32 num_rects,
52 void tsmf_presentation_set_audio_device(TSMF_PRESENTATION* presentation,
const char* name,
54 void tsmf_presentation_free(TSMF_PRESENTATION* presentation);
56 TSMF_STREAM* tsmf_stream_new(TSMF_PRESENTATION* presentation, UINT32 stream_id,
57 rdpContext* rdpcontext);
58 TSMF_STREAM* tsmf_stream_find_by_id(TSMF_PRESENTATION* presentation, UINT32 stream_id);
59 BOOL tsmf_stream_set_format(TSMF_STREAM* stream,
const char* name,
wStream* s);
60 void tsmf_stream_end(TSMF_STREAM* stream, UINT32 message_id,
61 IWTSVirtualChannelCallback* pChannelCallback);
62 void tsmf_stream_free(TSMF_STREAM* stream);
63 BOOL tsmf_stream_flush(TSMF_STREAM* stream);
65 BOOL tsmf_stream_push_sample(TSMF_STREAM* stream, IWTSVirtualChannelCallback* pChannelCallback,
66 UINT32 sample_id, UINT64 start_time, UINT64 end_time, UINT64 duration,
67 UINT32 extensions, UINT32 data_size, BYTE* data);
69 BOOL tsmf_media_init(
void);
70 void tsmf_stream_start_threads(TSMF_STREAM* stream);