]> sjero.net Git - linphone/blob - linphone/mediastreamer2/include/mediastreamer2/rfc3984.h
remote ortp and add it as a submodule instead.
[linphone] / linphone / mediastreamer2 / include / mediastreamer2 / rfc3984.h
1 /*
2 mediastreamer2 library - modular sound and video processing and streaming
3 Copyright (C) 2006  Simon MORLAT (simon.morlat@linphone.org)
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 */
19
20 #ifndef rfc3984_h
21 #define rfc3984_h
22
23 #include "mediastreamer2/mscommon.h"
24 #include "mediastreamer2/msqueue.h"
25
26 #ifdef __cplusplus
27 extern "C"{
28 #endif
29
30 typedef struct Rfc3984Context{
31         MSQueue q;
32         mblk_t *m;
33         int maxsz;
34         uint32_t last_ts;
35         uint8_t mode;
36         bool_t stap_a_allowed;
37         uint8_t reserved;
38 } Rfc3984Context;
39
40 void rfc3984_init(Rfc3984Context *ctx);
41
42 void rfc3984_set_mode(Rfc3984Context *ctx, int mode);
43
44 /* some stupid phones don't decode STAP-A packets ...*/
45 void rfc3984_enable_stap_a(Rfc3984Context *ctx, bool_t yesno);
46
47 /*process NALUs and pack them into rtp payloads */
48 void rfc3984_pack(Rfc3984Context *ctx, MSQueue *naluq, MSQueue *rtpq, uint32_t ts);
49
50 /*process incoming rtp data and output NALUs, whenever possible*/
51 void rfc3984_unpack(Rfc3984Context *ctx, mblk_t *im, MSQueue *naluq);
52
53 void rfc3984_uninit(Rfc3984Context *ctx);
54
55 #ifdef __cplusplus
56 }
57 #endif
58
59 #endif
60