1 /** 2 * FreeRDP: A Remote Desktop Protocol Implementation 3 * Video Redirection Virtual Channel - Media Container 4 * 5 * Copyright 2010-2011 Vic Lee 6 * Copyright 2012 Hewlett-Packard Development Company, L.P. 7 * Copyright 2015 Thincast Technologies GmbH 8 * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com> 9 * 10 * Licensed under the Apache License, Version 2.0 (the "License"); 11 * you may not use this file except in compliance with the License. 12 * You may obtain a copy of the License at 13 * 14 * http://www.apache.org/licenses/LICENSE-2.0 15 * 16 * Unless required by applicable law or agreed to in writing, software 17 * distributed under the License is distributed on an "AS IS" BASIS, 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 * See the License for the specific language governing permissions and 20 * limitations under the License. 21 */ 22 23 /** 24 * The media container maintains a global list of presentations, and a list of 25 * streams in each presentation. 26 */ 27 28 #ifndef FREERDP_CHANNEL_TSMF_CLIENT_MEDIA_H 29 #define FREERDP_CHANNEL_TSMF_CLIENT_MEDIA_H 30 31 #include <freerdp/freerdp.h> 32 33 typedef struct _TSMF_PRESENTATION TSMF_PRESENTATION; 34 35 typedef struct _TSMF_STREAM TSMF_STREAM; 36 37 typedef struct _TSMF_SAMPLE TSMF_SAMPLE; 38 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, 48 UINT32 muted); 49 BOOL tsmf_presentation_set_geometry_info(TSMF_PRESENTATION* presentation, UINT32 x, UINT32 y, 50 UINT32 width, UINT32 height, int num_rects, 51 RDP_RECT* rects); 52 void tsmf_presentation_set_audio_device(TSMF_PRESENTATION* presentation, const char* name, 53 const char* device); 54 void tsmf_presentation_free(TSMF_PRESENTATION* presentation); 55 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); 64 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); 68 69 BOOL tsmf_media_init(void); 70 void tsmf_stream_start_threads(TSMF_STREAM* stream); 71 72 #endif /* FREERDP_CHANNEL_TSMF_CLIENT_MEDIA_H */ 73