Fix changelog email address
[freerdp-ubuntu-pcb-backport.git] / channels / drdynvc / tsmf / tsmf_media.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol client.
3  * Video Redirection Virtual Channel - Media Container
4  *
5  * Copyright 2010-2011 Vic Lee
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19
20 /**
21  * The media container maintains a global list of presentations, and a list of
22  * streams in each presentation.
23  */
24
25 #ifndef __TSMF_MEDIA_H
26 #define __TSMF_MEDIA_H
27
28 typedef struct _TSMF_PRESENTATION TSMF_PRESENTATION;
29
30 typedef struct _TSMF_STREAM TSMF_STREAM;
31
32 typedef struct _TSMF_SAMPLE TSMF_SAMPLE;
33
34 TSMF_PRESENTATION* tsmf_presentation_new(const uint8* guid, IWTSVirtualChannelCallback* pChannelCallback);
35 TSMF_PRESENTATION* tsmf_presentation_find_by_id(const uint8* guid);
36 void tsmf_presentation_start(TSMF_PRESENTATION* presentation);
37 void tsmf_presentation_stop(TSMF_PRESENTATION* presentation);
38 void tsmf_presentation_set_geometry_info(TSMF_PRESENTATION* presentation,
39         uint32 x, uint32 y, uint32 width, uint32 height,
40         int num_rects, RDP_RECT* rects);
41 void tsmf_presentation_set_audio_device(TSMF_PRESENTATION* presentation,
42         const char* name, const char* device);
43 void tsmf_presentation_flush(TSMF_PRESENTATION* presentation);
44 void tsmf_presentation_free(TSMF_PRESENTATION* presentation);
45
46 TSMF_STREAM* tsmf_stream_new(TSMF_PRESENTATION* presentation, uint32 stream_id);
47 TSMF_STREAM* tsmf_stream_find_by_id(TSMF_PRESENTATION* presentation, uint32 stream_id);
48 void tsmf_stream_set_format(TSMF_STREAM* stream, const char* name, STREAM* s);
49 void tsmf_stream_end(TSMF_STREAM* stream);
50 void tsmf_stream_free(TSMF_STREAM* stream);
51
52 void tsmf_stream_push_sample(TSMF_STREAM* stream, IWTSVirtualChannelCallback* pChannelCallback,
53         uint32 sample_id, uint64 start_time, uint64 end_time, uint64 duration, uint32 extensions,
54         uint32 data_size, uint8* data);
55
56 void tsmf_media_init(void);
57
58 #endif
59