annotate stream/freesdp/priv.h @ 29385:f9ae25067fe0

Fix 24bit audio playback. The reordering channels code had reoccurring bug where in switch(samplesize) block the case 3 (3 bytes) doesn't end with break; leading to execution of the next case 4 too. This mangles the already processed data and causes massive memory corruption.
author iive
date Sun, 19 Jul 2009 09:55:29 +0000
parents 0f1b5b68af32
children 08a90b0e44e1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1 /*
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
2 This file is part of FreeSDP
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
3 Copyright (C) 2001,2002,2003 Federico Montesino Pouzols <fedemp@altern.org>
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
4
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
5 FreeSDP is free software; you can redistribute it and/or modify it
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
6 under the terms of the GNU General Public License as published by
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
7 the Free Software Foundation; either version 2 of the License, or
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
8 (at your option) any later version.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
9
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
13 GNU General Public License for more details.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
14
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
16 along with this program; if not, write to the Free Software
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
18
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
19 Benjamin Zores, (C) 2006
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
20 added support in parser for the a=control: lines.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
21 added support in parser for the a=range: lines.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
22 */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
23
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
24 /**
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
25 * @file priv.h
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
26 *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
27 * @short Common private header for both formatting and parsing modules.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
28 **/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
29
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
30 #ifndef FSDP_PRIV_H
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
31 #define FSDP_PRIV_H
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
32
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
33 #include <stdio.h>
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
34 #include <stdlib.h>
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
35 #include <string.h>
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
36
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
37 #include "common.h"
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
38
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
39 #define NTP_EPOCH_OFFSET 2208988800UL
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
40
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
41 #define FSDP_MAX_LENGTH 2000
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
42
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
43 /* Tags for doxygen documentation */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
44
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
45 /**
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
46 * @mainpage FreeSDP Library Reference Manual
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
47 * @section overview Overview (README)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
48 * @verbinclude ../../README
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
49 *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
50 **/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
51
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
52 /**
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
53 * @example formatdemo.c
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 21502
diff changeset
54 *
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
55 * A basic SDP descriptions formatter based on FreeSDP.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
56 **/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
57
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
58 /**
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
59 * @example parsedemo.c
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 21502
diff changeset
60 *
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
61 * A basic SDP descriptions parser based on FreeSDP.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
62 **/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
63
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
64 /* Private routines declarations */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
65
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
66 BEGIN_C_DECLS
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
67 /**
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
68 * @short bandwidth modifier
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
69 *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
70 * Holds type of modifier and value. Also holds the literal bandwidth
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
71 * modifier if unknown.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
72 **/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
73 typedef struct
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
74 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
75 fsdp_bw_modifier_type_t b_mod_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
76 unsigned long int b_value;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
77 char *b_unknown_bw_modt;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
78 } fsdp_bw_modifier_t;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
79
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
80 /**
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
81 * @short a=rtpmap: attribute
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
82 *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
83 * Holds payload type, enconding name, RTP clock rate, and encofing
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
84 * parameters.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
85 **/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
86 typedef struct
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
87 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
88 char *pt;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
89 char *encoding_name;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
90 unsigned int clock_rate;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
91 char *parameters;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
92 } fsdp_rtpmap_t;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
93
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
94 /**
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
95 * @short Connection address specification
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
96 *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
97 * Holds address (unicast or multicast) as well as TTL and number of
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
98 * ports, when it is an IP4 multicast address.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
99 **/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
100 typedef struct fsdp_connection_address_t_s
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
101 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
102 char *address;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
103 unsigned int address_ttl;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
104 unsigned int address_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
105 } fsdp_connection_address_t;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
106
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
107 /**
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
108 * @short Struct for each media in a session description.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
109 **/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
110 struct fsdp_media_description_t_s
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
111 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
112 /* from `m=<media> <port> <transport> <fmt list>' line */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
113 fsdp_media_t media_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
114 unsigned int port;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
115 unsigned int port_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
116 fsdp_transport_protocol_t transport;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
117 char **formats;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
118 unsigned int formats_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
119 /* from i=<media title> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
120 char *i_title;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
121 /* from `c=<network type> <address type> <connection address>' line
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
122 (optional) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
123 fsdp_network_type_t c_network_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
124 fsdp_address_type_t c_address_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
125 fsdp_connection_address_t c_address;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
126 /* from `b=<modifier>:<bandwidth-value>' lines (optional) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
127 fsdp_bw_modifier_t *bw_modifiers;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
128 unsigned int bw_modifiers_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
129 /* from `k=<method>' or `k=<method>:<encryption key>' line
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
130 (optional) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
131 fsdp_encryption_method_t k_encryption_method;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
132 char *k_encryption_content;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
133 /* from `a=<attribute>' or `a=<attribute>:<value>' lines (opt) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
134 unsigned long int a_ptime;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
135 unsigned long int a_maxptime;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
136 /* rtpmap */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
137 fsdp_rtpmap_t **a_rtpmaps;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
138 unsigned int a_rtpmaps_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
139 fsdp_orient_t a_orient;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
140 fsdp_sendrecv_mode_t a_sendrecv_mode;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
141
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
142 char **a_sdplangs;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
143 unsigned int a_sdplangs_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
144 char **a_langs;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
145 unsigned int a_langs_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
146
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
147 char **a_controls;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
148 unsigned int a_controls_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
149
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
150 char *a_range;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
151
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
152 float a_framerate;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
153 unsigned int a_quality;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
154 char **a_fmtps;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
155 unsigned int a_fmtps_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
156 /* rtcp attribute */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
157 unsigned int a_rtcp_port;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
158 fsdp_network_type_t a_rtcp_network_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
159 fsdp_address_type_t a_rtcp_address_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
160 char *a_rtcp_address;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
161 /* media attributes that are not directly supported */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
162 char **unidentified_attributes;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
163 unsigned int unidentified_attributes_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
164 };
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
165
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
166 typedef struct fsdp_media_description_t_s fsdp_media_announcement_t;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
167
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
168 /**
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
169 * @short Information for a repeat (struct for r= lines)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
170 **/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
171 typedef struct
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
172 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
173 /* times in seconds */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
174 unsigned long int interval;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
175 unsigned long int duration;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
176 unsigned long int *offsets;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
177 unsigned int offsets_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
178 } fsdp_repeat_t;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
179
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
180 /**
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
181 * @short Information about a time period
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
182 *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
183 * The start and stop times as well as the information from the r=
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
184 * lines for a t= line are stored in this structures.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
185 **/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
186 typedef struct
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
187 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
188 time_t start;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
189 time_t stop;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
190 fsdp_repeat_t **repeats;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
191 unsigned int repeats_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
192 } fsdp_time_period_t;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
193
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
194 /**
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
195 * @short Struct for session descriptions.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
196 **/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
197 struct fsdp_description_t_s
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
198 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
199 /* from v=... line */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
200 unsigned int version;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
201 /* from o=... line */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
202 char *o_username;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
203 char *o_session_id;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
204 char *o_announcement_version;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
205 fsdp_network_type_t o_network_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
206 fsdp_address_type_t o_address_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
207 char *o_address;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
208 /* from s=... line */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
209 char *s_name;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
210 /* from i=... line (opt) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
211 char *i_information;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
212 /* from u=... line (opt) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
213 char *u_uri;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
214 /* from e=... lines (0 or more) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
215 const char **emails;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
216 unsigned int emails_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
217 /* from p=... lines (0 or more) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
218 const char **phones;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
219 unsigned int phones_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
220 /* from `c=<network type> <address type> <connection address>' line */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
221 fsdp_network_type_t c_network_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
222 fsdp_address_type_t c_address_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
223 fsdp_connection_address_t c_address;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
224 /* from `b=<modifier>:<bandwidth-value>' lines (optional) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
225 fsdp_bw_modifier_t *bw_modifiers;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
226 unsigned int bw_modifiers_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
227 /* from `t=<start time> <stop time>' lines (1 or more) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
228 /* from `r=<repeat interval> <active duration> <list of offsets from
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
229 start-time>' */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
230 fsdp_time_period_t **time_periods;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
231 unsigned int time_periods_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
232 /* from `z=<adjustment time> <offset> <adjustment time> <offset>
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
233 ....' lines */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
234 char *timezone_adj;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
235 /* from `k=<method>' or `k=<method>:<encryption key>' line (opt) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
236 fsdp_encryption_method_t k_encryption_method;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
237 char *k_encryption_content;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
238 /* from `a=<attribute>' or `a=<attribute>:<value>' lines (opt) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
239 char *a_category;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
240 char *a_keywords;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
241 char *a_tool;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
242 char *a_range;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
243 /* rtpmap */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
244 fsdp_rtpmap_t **a_rtpmaps;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
245 unsigned int a_rtpmaps_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
246 fsdp_sendrecv_mode_t a_sendrecv_mode;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
247 fsdp_session_type_t a_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
248 char *a_charset;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
249
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
250 char **a_sdplangs;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
251 unsigned int a_sdplangs_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
252 char **a_langs;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
253 unsigned int a_langs_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
254
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
255 char **a_controls;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
256 unsigned int a_controls_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
257 /* from `m=<media> <port>/<number of ports> <transport> <fmt list>'
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
258 lines [one or more] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
259 fsdp_media_announcement_t **media_announcements;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
260 unsigned int media_announcements_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
261 /* session attributes that are not directly supported */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
262 char **unidentified_attributes;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
263 unsigned int unidentified_attributes_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
264 };
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
265
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
266 #define MEDIA_RTPMAPS_MAX_COUNT 5
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
267 #define SDPLANGS_MAX_COUNT 5
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
268 #define SDPCONTROLS_MAX_COUNT 10
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
269 #define UNIDENTIFIED_ATTRIBUTES_MAX_COUNT 5
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
270
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
271 END_C_DECLS
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
272 #endif /* FSDP_PRIV_H */