annotate stream/freesdp/parser.c @ 35332:d6b957072297

subreader: do not skip the first char of ASS fields. Without this change, fields that can be sometimes empty and sometimes not, such as the Effect field, are counted in an inconsistent way. Since the number of fields is used to find where the text starts, it leads to internal field arriving on the video. Bug reported anonymously on the users mailing list.
author cigaes
date Tue, 20 Nov 2012 19:43:53 +0000
parents 08a90b0e44e1
children
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>
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28884
diff changeset
4
18823
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 /**
33882
08a90b0e44e1 doxygen: drop filename from @file directive
diego
parents: 33345
diff changeset
25 * @file
18823
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 Parsing module implementation.
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 * This file implements the parsing routine <code>fsdp_parse</code>
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
30 * and the <code>fsdp_get_xxxx</code> routines that allow to get the
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
31 * session properties from a session description object build through
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
32 * the application of <code>fsdp_parse</code> to a textual SDP session
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
33 * description.
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
34 **/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
35
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
36 #include "parserpriv.h"
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
37
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
38 /**
21504
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
39 * \brief find the start of the next line
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
40 * \param c pointer to current position in string
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
41 * \return pointer to start of next line or NULL if illegal (i.e.
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
42 * a '\r' is not followed by a '\n'
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
43 */
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
44 static const char *next_line(const char *c) {
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
45 c += strcspn(c, "\n\r");
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
46 if (*c == 0) return c;
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
47 if (*c == '\r') c++;
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
48 if (*c == '\n')
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
49 return c + 1;
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
50 return NULL;
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
51 }
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
52
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
53 /**
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
54 * Moves the <code>c<code> pointer up to the beginning of the next
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
55 * line.
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 * @param c char pointer to pointer
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
58 * @retval FSDPE_ILLEGAL_CHARACTER, when an illegal '\r' character
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
59 * (not followed by a '\n') is found, returns
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
60 */
21504
06fe68e8049a Simplify NEXT_LINE macro and put most of it in a separate function.
reimar
parents: 21503
diff changeset
61 #define NEXT_LINE(c) do { if (!(c = next_line(c))) return FSDPE_ILLEGAL_CHARACTER; } while (0);
18823
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 fsdp_error_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
64 fsdp_parse (const char *text_description, fsdp_description_t * dsc)
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 fsdp_error_t result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
67 const char *p = text_description, *p2;
33345
c6b4a486c108 Remove unused variable.
reimar
parents: 32537
diff changeset
68 unsigned int j;
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
69 /* temps for sscanf */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
70 const unsigned int TEMPCHARS = 6;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
71 char fsdp_buf[TEMPCHARS][MAXSHORTFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
72 char longfsdp_buf[MAXLONGFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
73 const unsigned int TEMPINTS = 2;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
74 unsigned long int wuint[TEMPINTS];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
75
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
76 if ((NULL == text_description) || (NULL == dsc))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
77 return FSDPE_INVALID_PARAMETER;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
78
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 /* A) parse session-level description */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
81 /***************************************************************************/
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 /* `v=' line (protocol version) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
84 /* according to the RFC, only `v=0' is valid */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
85 if (sscanf (p, "v=%1lu", &wuint[0]))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
86 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
87 if (wuint[0] != 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
88 return FSDPE_INVALID_VERSION;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
89 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
90 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
91 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
92 return FSDPE_MISSING_VERSION;
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 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
95
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
96 /* `o=' line (owner/creator and session identifier) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
97 /* o=<username> <session id> <version> <network type> <address type>
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
98 <address> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
99 if (!strncmp (p, "o=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
100 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
101 p += 2;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
102 /* note that the following max lengths may vary in the future and
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
103 are quite arbitary */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
104 if (sscanf
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
105 (p,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
106 "%" MSFLENS "[\x21-\xFF] %" MSFLENS "[0-9] %" MSFLENS
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
107 "[0-9] %2s %3s %" MSFLENS "s", fsdp_buf[0], fsdp_buf[1],
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
108 fsdp_buf[2], fsdp_buf[3], fsdp_buf[4], fsdp_buf[5]) != 6)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
109 return FSDPE_INVALID_OWNER;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
110 dsc->o_username = strdup (fsdp_buf[0]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
111 dsc->o_session_id = strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
112 dsc->o_announcement_version = strdup (fsdp_buf[2]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
113 if (!strncmp (fsdp_buf[3], "IN", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
114 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
115 dsc->o_network_type = FSDP_NETWORK_TYPE_INET;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
116 if (!strncmp (fsdp_buf[4], "IP4", 3))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
117 dsc->o_address_type = FSDP_ADDRESS_TYPE_IPV4;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
118 else if (!strncmp (fsdp_buf[4], "IP6", 3))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
119 dsc->o_address_type = FSDP_ADDRESS_TYPE_IPV6;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
120 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
121 return FSDPE_INVALID_OWNER;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
122 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
123 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
124 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
125 return FSDPE_INVALID_OWNER;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
126 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
127 /* TODO? check valid unicast address/FQDN */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
128 dsc->o_address = strdup (fsdp_buf[5]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
129 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
130 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
131 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
132 return FSDPE_MISSING_OWNER;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
133 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
134 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
135
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
136 /* `s=' line (session name) -note that the name string cannot be empty */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
137 /* s=<session name> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
138 if (!strncmp (p, "s=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
139 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
140 if (sscanf (p, "s=%" MLFLENS "[^\r\n]", longfsdp_buf) < 1)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
141 return FSDPE_EMPTY_NAME;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
142 dsc->s_name = strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
143 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
144 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
145 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
146 return FSDPE_MISSING_NAME;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
147 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
148 NEXT_LINE (p);
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 /* `i=' line (session information) [optional] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
151 /* i=<session description> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
152 if (!strncmp (p, "i=", 2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
153 && sscanf (p, "i=%" MLFLENS "[^\r\n]", longfsdp_buf))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
154 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
155 dsc->i_information = strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
156 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
157 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
158 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
159 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
160 /* (optional) information absent */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
161 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
162
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
163 /* `u=' line (URI of description) [optional] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
164 /* u=<URI> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
165 if (!strncmp (p, "u=", 2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
166 && sscanf (p, "u=%" MLFLENS "[^\r\n]", longfsdp_buf))
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 /* TODO? check valid uri */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
169 dsc->u_uri = strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
170 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
171 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
172 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
173 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
174 /* (optional) uri absent */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
175 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
176
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
177 /* `e=' lines (email address) [zero or more] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
178 /* e=<email address> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
179 p2 = p;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
180 j = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
181 while (!strncmp (p2, "e=", 2))
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 /* First, count how many emails are there */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
184 j++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
185 NEXT_LINE (p2);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
186 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
187 dsc->emails_count = j;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
188 if (dsc->emails_count > 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
189 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
190 /* Then, build the array of emails */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
191 dsc->emails = calloc (j, sizeof (const char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
192 for (j = 0; j < dsc->emails_count; j++)
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 sscanf (p, "e=%" MLFLENS "[^\r\n]", longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
195 /* TODO? check valid email-address. */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
196 dsc->emails[j] = strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
197 NEXT_LINE (p);
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
200
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
201 /* `p=' lines (phone number) [zero or more] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
202 /* p=<phone number> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
203 j = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
204 /* assert ( p2 == p ); */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
205 while (!strncmp (p2, "p=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
206 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
207 j++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
208 NEXT_LINE (p2);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
209 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
210 dsc->phones_count = j;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
211 if (dsc->phones_count > 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
212 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
213 dsc->phones = calloc (j, sizeof (const char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
214 for (j = 0; j < dsc->phones_count; j++)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
215 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
216 sscanf (p, "p=%" MLFLENS "[^\r\n]", longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
217 /* TODO? check valid phone-number. */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
218 dsc->phones[j] = strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
219 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
220 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
221 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
222
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
223 /* `c=' line (connection information - not required if included in all media) [optional] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
224 /* c=<network type> <address type> <connection address> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
225 result = fsdp_parse_c (&p, &(dsc->c_network_type), &(dsc->c_address_type),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
226 &(dsc->c_address));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
227 if (FSDPE_OK != result)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
228 return result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
229
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
230 /* `b=' lines (bandwidth information) [optional] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
231 /* b=<modifier>:<bandwidth-value> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
232 result =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
233 fsdp_parse_b (&p, &(dsc->bw_modifiers), &(dsc->bw_modifiers_count));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
234 if (FSDPE_OK != result)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
235 return result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
236
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
237 /* A.1) Time descriptions: */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
238
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
239 /* `t=' lines (time the session is active) [1 or more] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
240 /* t=<start time> <stop time> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
241 j = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
242 p2 = p;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
243 while (!strncmp (p2, "t=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
244 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
245 j++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
246 NEXT_LINE (p2);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
247 while (!strncmp (p2, "r=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
248 NEXT_LINE (p2);
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 dsc->time_periods_count = j;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
251 if (dsc->time_periods_count == 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
252 return FSDPE_MISSING_TIME;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
253 dsc->time_periods = calloc (dsc->time_periods_count,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
254 sizeof (fsdp_time_period_t *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
255 for (j = 0; j < dsc->time_periods_count; j++)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
256 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
257 unsigned int h = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
258 if (sscanf (p, "t=%10lu %10lu", &wuint[0], &wuint[1]) != 2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
259 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
260 /* not all periods have been successfully parsed */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
261 dsc->time_periods_count = j;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
262 return FSDPE_INVALID_TIME;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
263 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
264 dsc->time_periods[j] = calloc (1, sizeof (fsdp_time_period_t));
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 /* convert from NTP to time_t time */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
267 if (wuint[0] != 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
268 wuint[0] -= NTP_EPOCH_OFFSET;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
269 if (wuint[1] != 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
270 wuint[1] -= NTP_EPOCH_OFFSET;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
271 dsc->time_periods[j]->start = wuint[0];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
272 dsc->time_periods[j]->stop = wuint[1];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
273 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
274
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
275 /* `r' lines [zero or more repeat times for each t=] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
276 /*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
277 start-time> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
278 p2 = p;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
279 while (!strncmp (p2, "r=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
280 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
281 h++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
282 NEXT_LINE (p2);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
283 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
284 dsc->time_periods[j]->repeats_count = h;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
285 if (h > 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
286 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
287 unsigned int index2 = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
288 dsc->time_periods[j]->repeats =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
289 calloc (h, sizeof (fsdp_repeat_t *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
290 for (h = 0; h < dsc->time_periods[j]->repeats_count; h++)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
291 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
292 /*
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
293 get_repeat_values(p,&(dsc->time_periods[index].repeats[index2]));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
294 fsdp_error_t get_repeat_values (const char *r, fsdp_repeat_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
295 *repeat);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
296 */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
297 if (sscanf (p, "r=%10s %10s %" MLFLENS "[^\r\n]",
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
298 fsdp_buf[0], fsdp_buf[1], longfsdp_buf) == 3)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
299 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
300 fsdp_repeat_t *repeat;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
301 dsc->time_periods[j]->repeats[h] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
302 calloc (1, sizeof (fsdp_repeat_t));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
303 repeat = dsc->time_periods[j]->repeats[h];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
304 /* get interval, duration and list of offsets */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
305 result =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
306 fsdp_repeat_time_to_uint (fsdp_buf[0],
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
307 &(repeat->interval));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
308 if (result == FSDPE_OK)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
309 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
310 result =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
311 fsdp_repeat_time_to_uint (fsdp_buf[1],
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
312 &(repeat->duration));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
313 if (result == FSDPE_OK)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
314 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
315 unsigned int k = 1;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
316 const char *i = longfsdp_buf;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
317 while (NULL != (i = strchr (i, ' ')))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
318 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
319 k++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
320 if (NULL != i)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
321 i++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
322 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
323 repeat->offsets_count = k;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
324 repeat->offsets = calloc (k, sizeof (time_t));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
325 i = longfsdp_buf;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
326 for (k = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
327 (k < repeat->offsets_count)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
328 && (result == FSDPE_OK); k++)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
329 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
330 result =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
331 fsdp_repeat_time_to_uint (i,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
332 &(repeat->
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
333 offsets[k]));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
334 i = strchr (i, ' ');
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
335 if (NULL != i)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
336 i++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
337 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
338 if (k < repeat->offsets_count)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
339 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
340 /* there where invalid repeat offsets */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
341 dsc->time_periods[j]->repeats_count = k;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
342 return FSDPE_INVALID_REPEAT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
343 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
344 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
345 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
346 if (result != FSDPE_OK)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
347 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
348 /* not all repeats have been succesfully parsed */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
349 dsc->time_periods[j]->repeats_count = h;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
350 return FSDPE_INVALID_REPEAT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
351 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
352 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
353 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
354 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
355 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
356 /* not all repeats have been succesfully parsed */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
357 dsc->time_periods[j]->repeats_count = h;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
358 return FSDPE_INVALID_REPEAT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
359 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
360 index2++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
361 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
362 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
363 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
364
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
365 /* `z=' line (time zone adjustments) [zero or more] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
366 /* 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
367 if (!strncmp (p, "z=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
368 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
369 if (sscanf (p, "z=%" MLFLENS "[^\r\n]", longfsdp_buf))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
370 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
371 /* TODO: guess how many pairs are there and process them */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
372 dsc->timezone_adj = strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
373 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
374 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
375 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
376 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
377 return FSDPE_INVALID_TIMEZONE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
378 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
379 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
380
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
381 /* `k=' line (encryption key) [optional] */
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28884
diff changeset
382 /* k=<method>
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
383 k=<method>:<encryption key> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
384 result = fsdp_parse_k (&p, &(dsc->k_encryption_method),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
385 &(dsc->k_encryption_content));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
386 if (result != FSDPE_OK)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
387 return result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
388
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
389 /* A.2) Attributes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
390 /* `a=' lines (session attribute) [0 or more] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
391 /* a=<attribute>
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
392 a=<attribute>:<value> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
393 while (!strncmp (p, "a=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
394 {
24595
85f669a84e7a cosmetics: misc typo fixes
diego
parents: 22189
diff changeset
395 /* The "9" length specifier of the first string is subject to
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
396 changes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
397 if (sscanf
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
398 (p, "a=%9[^:\r\n]:%" MSFLENS "[^\r\n]", fsdp_buf[0],
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
399 fsdp_buf[1]) == 2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
400 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
401 /* session-level value attributes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
402 if (!strncmp (fsdp_buf[0], "cat", 3))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
403 dsc->a_category = strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
404 else if (!strncmp (fsdp_buf[0], "keywds", 6))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
405 dsc->a_keywords = strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
406 else if (!strncmp (fsdp_buf[0], "tool", 4))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
407 dsc->a_keywords = strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
408 else if (!strncmp (fsdp_buf[0], "rtpmap", 6))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
409 fsdp_parse_rtpmap (&(dsc->a_rtpmaps),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
410 &(dsc->a_rtpmaps_count), fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
411 else if (!strncmp (fsdp_buf[0], "type", 4))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
412 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
413 if (!strncmp (fsdp_buf[1], "broadcast", 9))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
414 dsc->a_type = FSDP_SESSION_TYPE_BROADCAST;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
415 else if (!strncmp (fsdp_buf[1], "meeting", 7))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
416 dsc->a_type = FSDP_SESSION_TYPE_MEETING;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
417 else if (!strncmp (fsdp_buf[1], "moderated", 9))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
418 dsc->a_type = FSDP_SESSION_TYPE_MODERATED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
419 else if (!strncmp (fsdp_buf[1], "test", 4))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
420 dsc->a_type = FSDP_SESSION_TYPE_TEST;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
421 else if (!strncmp (fsdp_buf[1], "H332", 4))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
422 dsc->a_type = FSDP_SESSION_TYPE_H332;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
423 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
424 return FSDPE_INVALID_SESSION_TYPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
425 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
426 else if (!strncmp (fsdp_buf[0], "charset", 7))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
427 dsc->a_charset = strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
428 else if (!strncmp (fsdp_buf[0], "sdplang", 7))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
429 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
430 if (NULL == dsc->a_sdplangs)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
431 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
432 dsc->a_sdplangs_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
433 dsc->a_sdplangs =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
434 calloc (SDPLANGS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
435 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
436 if (dsc->a_sdplangs_count < SDPLANGS_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
437 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
438 dsc->a_sdplangs[dsc->a_sdplangs_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
439 strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
440 dsc->a_sdplangs_count++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
441 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
442 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
443 else if (!strncmp (fsdp_buf[0], "lang", 4))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
444 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
445 if (NULL == dsc->a_langs)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
446 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
447 dsc->a_langs_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
448 dsc->a_langs = calloc (SDPLANGS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
449 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
450 if (dsc->a_langs_count < SDPLANGS_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
451 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
452 dsc->a_langs[dsc->a_langs_count] = strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
453 dsc->a_langs_count++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
454 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
455 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
456 else if (!strncmp (fsdp_buf[0], "control", 7))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
457 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
458 if (NULL == dsc->a_controls)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
459 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
460 dsc->a_controls_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
461 dsc->a_controls =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
462 calloc (SDPCONTROLS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
463 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
464 if (dsc->a_controls_count < SDPCONTROLS_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
465 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
466 dsc->a_controls[dsc->a_controls_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
467 strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
468 dsc->a_controls_count++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
469 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
470 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
471 else if (!strncmp (fsdp_buf[0], "range", 5))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
472 {
32537
8fa2f43cb760 Remove most of the NULL pointer check before free all over the code
cboesch
parents: 30739
diff changeset
473 free (dsc->a_range);
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
474 dsc->a_range = strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
475 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
476 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
477 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
478 /* ignore unknown attributes, but provide access to them */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
479 *longfsdp_buf = '\0';
22189
6b84fac921eb More strncat() misuses.
rtogni
parents: 22188
diff changeset
480 strncat (longfsdp_buf, fsdp_buf[0], MAXLONGFIELDLEN-1);
6b84fac921eb More strncat() misuses.
rtogni
parents: 22188
diff changeset
481 strncat (longfsdp_buf, ":", MAXLONGFIELDLEN-strlen(longfsdp_buf)-1);
6b84fac921eb More strncat() misuses.
rtogni
parents: 22188
diff changeset
482 strncat (longfsdp_buf, fsdp_buf[1], MAXLONGFIELDLEN-strlen(longfsdp_buf)-1);
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
483 if (NULL == dsc->unidentified_attributes)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
484 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
485 dsc->unidentified_attributes_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
486 dsc->unidentified_attributes =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
487 calloc (UNIDENTIFIED_ATTRIBUTES_MAX_COUNT,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
488 sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
489 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
490 if (dsc->unidentified_attributes_count <
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
491 UNIDENTIFIED_ATTRIBUTES_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
492 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
493 dsc->unidentified_attributes
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
494 [dsc->unidentified_attributes_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
495 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
496 dsc->unidentified_attributes_count++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
497 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
498 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
499 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
500 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
501 else if (sscanf (p, "a=%20s", fsdp_buf[0]) == 1)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
502 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
503 /* session-level property attributes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
504 if (!strncmp (fsdp_buf[0], "recvonly", 8))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
505 dsc->a_sendrecv_mode = FSDP_SENDRECV_RECVONLY;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
506 else if (!strncmp (fsdp_buf[0], "sendonly", 8))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
507 dsc->a_sendrecv_mode = FSDP_SENDRECV_SENDONLY;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
508 else if (!strncmp (fsdp_buf[0], "inactive", 8))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
509 dsc->a_sendrecv_mode = FSDP_SENDRECV_INACTIVE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
510 else if (!strncmp (fsdp_buf[0], "sendrecv", 8))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
511 dsc->a_sendrecv_mode = FSDP_SENDRECV_SENDRECV;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
512 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
513 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
514 /* ignore unknown attributes, but provide access to them */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
515 *longfsdp_buf = '\0';
22189
6b84fac921eb More strncat() misuses.
rtogni
parents: 22188
diff changeset
516 strncat (longfsdp_buf, fsdp_buf[0], MAXLONGFIELDLEN-1);
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
517 if (NULL == dsc->unidentified_attributes)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
518 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
519 dsc->unidentified_attributes_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
520 dsc->unidentified_attributes =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
521 calloc (UNIDENTIFIED_ATTRIBUTES_MAX_COUNT,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
522 sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
523 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
524 if (dsc->unidentified_attributes_count <
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
525 UNIDENTIFIED_ATTRIBUTES_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
526 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
527 dsc->unidentified_attributes
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
528 [dsc->unidentified_attributes_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
529 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
530 dsc->unidentified_attributes_count++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
531 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
532 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
533 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
534 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
535 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
536 return FSDPE_INVALID_ATTRIBUTE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
537 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
538
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
539 /***************************************************************************/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
540 /* B) parse media-level descriptions */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
541 /***************************************************************************/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
542 p2 = p;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
543 j = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
544 while ((*p2 != '\0') && !strncmp (p2, "m=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
545 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
546 char c;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
547 j++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
548 NEXT_LINE (p2);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
549 while (sscanf (p2, "%c=", &c) == 1)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
550 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
551 if (c == 'i' || c == 'c' || c == 'b' || c == 'k' || c == 'a')
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
552 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
553 NEXT_LINE (p2);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
554 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
555 else if (c == 'm')
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
556 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
557 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
558 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
559 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
560 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
561 return FSDPE_INVALID_LINE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
562 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
563 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
564 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
565 dsc->media_announcements_count = j;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
566 if (dsc->media_announcements_count == 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
567 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
568 ;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
569 /*return FSDPE_MISSING_MEDIA; */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
570 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
571 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
572 { /* dsc->media_announcements_count > 0 */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
573 dsc->media_announcements =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
574 calloc (j, sizeof (fsdp_media_announcement_t *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
575 for (j = 0; j < dsc->media_announcements_count; j++)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
576 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
577 fsdp_media_announcement_t *media = NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
578 /* `m=' line (media name, transport address and format list) */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
579 /* m=<media> <port> <transport> <fmt list> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
580 /* The max. string lengths are subject to change */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
581 if (sscanf (p, "m=%11s %8s %7s %" MLFLENS "[^\r\n]",
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
582 fsdp_buf[0], fsdp_buf[1], fsdp_buf[2],
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
583 longfsdp_buf) != 4)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
584 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
585 return FSDPE_INVALID_MEDIA;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
586 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
587 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
588 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
589 dsc->media_announcements[j] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
590 calloc (1, sizeof (fsdp_media_announcement_t));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
591 media = dsc->media_announcements[j];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
592 if (!strncmp (fsdp_buf[0], "audio", 5))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
593 media->media_type = FSDP_MEDIA_AUDIO;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
594 else if (!strncmp (fsdp_buf[0], "video", 5))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
595 media->media_type = FSDP_MEDIA_VIDEO;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
596 else if (!strncmp (fsdp_buf[0], "application", 11))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
597 media->media_type = FSDP_MEDIA_APPLICATION;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
598 else if (!strncmp (fsdp_buf[0], "data", 4))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
599 media->media_type = FSDP_MEDIA_DATA;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
600 else if (!strncmp (fsdp_buf[0], "control", 7))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
601 media->media_type = FSDP_MEDIA_CONTROL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
602 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
603 return FSDPE_UNKNOWN_MEDIA_TYPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
604 { /* try to get port specification as port/number */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
605 char *slash;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
606 if ((slash = strchr (fsdp_buf[1], '/')))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
607 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
608 *slash = '\0';
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
609 slash++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
610 media->port = strtol (fsdp_buf[1], NULL, 10);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
611 media->port_count = strtol (slash, NULL, 10);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
612 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
613 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
614 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
615 media->port = strtol (fsdp_buf[1], NULL, 10);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
616 media->port_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
617 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
618 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
619 if (!strncmp (fsdp_buf[2], "RTP/AVP", 7))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
620 media->transport = FSDP_TP_RTP_AVP;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
621 else if (!strncmp (fsdp_buf[2], "udp", 3))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
622 media->transport = FSDP_TP_UDP;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
623 else if (!strncmp (fsdp_buf[2], "TCP", 3))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
624 media->transport = FSDP_TP_TCP;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
625 else if (!strncmp (fsdp_buf[2], "UDPTL", 5))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
626 media->transport = FSDP_TP_UDPTL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
627 else if (!strncmp (fsdp_buf[2], "vat", 3))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
628 media->transport = FSDP_TP_VAT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
629 else if (!strncmp (fsdp_buf[2], "rtp", 3))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
630 media->transport = FSDP_TP_OLD_RTP;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
631 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
632 return FSDPE_UNKNOWN_MEDIA_TRANSPORT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
633 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
634 unsigned int k = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
635 char *s = longfsdp_buf;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
636 while (NULL != (s = strchr (s, ' ')))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
637 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
638 k++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
639 if (NULL != s)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
640 s++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
641 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
642 k++; /* when there is no space left, count the last format */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
643 media->formats_count = k;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
644 media->formats = calloc (k, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
645 s = longfsdp_buf;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
646 for (k = 0; k < media->formats_count; k++)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
647 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
648 char *space = strchr (s, ' ');
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
649 if (NULL != space)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
650 *space = '\0';
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
651 media->formats[k] = strdup (s);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
652 s = space + 1;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
653 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
654 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
655 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
656 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
657
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
658 /* `i=' line (media title) [optional] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
659 /* i=<media title> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
660 if (!strncmp (p, "i=", 2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
661 && sscanf (p, "i=%" MLFLENS "[^\r\n]", longfsdp_buf))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
662 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
663 media->i_title = strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
664 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
665 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
666 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
667 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
668 /* (optional) information absent */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
669 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
670
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
671 /* `c=' line (connection information - overrides session-level
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
672 line) [optional if provided at session-level] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
673 /* c=<network type> <address type> <connection address> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
674 result = fsdp_parse_c (&p, &(media->c_network_type),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
675 &(media->c_address_type),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
676 &(media->c_address));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
677 if (result != FSDPE_OK)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
678 return result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
679
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
680 /* `b=' lines (bandwidth information) [optional] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
681 /* b=<modifier>:<bandwidth-value> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
682 result = fsdp_parse_b (&p, &(media->bw_modifiers),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
683 &(media->bw_modifiers_count));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
684 if (FSDPE_OK != result)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
685 return result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
686
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
687 /* `k=' line (encryption key) [optional] */
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28884
diff changeset
688 /* k=<method>
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
689 k=<method>:<encryption key> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
690 result = fsdp_parse_k (&p, &(media->k_encryption_method),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
691 &(media->k_encryption_content));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
692 if (result != FSDPE_OK)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
693 return result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
694
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
695 /* B.1) Attributes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
696
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
697 /* `a=' lines (zero or more media attribute lines) [optional] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
698 /* a=<attribute>
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
699 a=<attribute>:<value> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
700 while (!strncmp (p, "a=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
701 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
702 if (sscanf
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
703 (p, "a=%9[^:\r\n]:%" MLFLENS "[^\r\n]", fsdp_buf[0],
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
704 longfsdp_buf) == 2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
705 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
706 /* media-level value attributes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
707 if (!strncmp (fsdp_buf[0], "ptime", 5))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
708 media->a_ptime = strtoul (longfsdp_buf, NULL, 10);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
709 else if (!strncmp (fsdp_buf[0], "maxptime", 8))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
710 media->a_maxptime = strtoul (longfsdp_buf, NULL, 10);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
711 else if (!strncmp (fsdp_buf[0], "rtpmap", 6))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
712 fsdp_parse_rtpmap (&(media->a_rtpmaps),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
713 &(media->a_rtpmaps_count),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
714 longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
715 else if (!strncmp (fsdp_buf[0], "orient", 6))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
716 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
717 if (!strncmp (longfsdp_buf, "portrait", 8))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
718 media->a_orient = FSDP_ORIENT_PORTRAIT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
719 else if (!strncmp (longfsdp_buf, "landscape", 9))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
720 media->a_orient = FSDP_ORIENT_LANDSCAPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
721 else if (!strncmp (longfsdp_buf, "seascape", 9))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
722 media->a_orient = FSDP_ORIENT_SEASCAPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
723 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
724 else if (!strncmp (fsdp_buf[0], "sdplang", 7))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
725 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
726 if (NULL == dsc->a_sdplangs)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
727 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
728 media->a_sdplangs_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
729 media->a_sdplangs =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
730 calloc (SDPLANGS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
731 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
732 if (media->a_sdplangs_count < SDPLANGS_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
733 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
734 media->a_sdplangs[dsc->a_sdplangs_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
735 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
736 media->a_sdplangs_count++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
737 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
738 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
739 else if (!strncmp (fsdp_buf[0], "lang", 4))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
740 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
741 if (NULL == dsc->a_langs)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
742 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
743 media->a_langs_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
744 media->a_langs =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
745 calloc (SDPLANGS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
746 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
747 if (media->a_langs_count < SDPLANGS_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
748 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
749 media->a_langs[dsc->a_langs_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
750 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
751 media->a_langs_count++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
752 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
753 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
754 else if (!strncmp (fsdp_buf[0], "control", 7))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
755 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
756 if (NULL == media->a_controls)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
757 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
758 media->a_controls_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
759 media->a_controls =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
760 calloc (SDPCONTROLS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
761 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
762 if (media->a_controls_count < SDPCONTROLS_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
763 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
764 media->a_controls[media->a_controls_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
765 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
766 media->a_controls_count++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
767 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
768 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
769 else if (!strncmp (fsdp_buf[0], "range", 5))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
770 {
32537
8fa2f43cb760 Remove most of the NULL pointer check before free all over the code
cboesch
parents: 30739
diff changeset
771 free (media->a_range);
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
772 media->a_range = strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
773 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
774 else if (!strncmp (fsdp_buf[0], "framerate", 9))
19202
af9b014311a5 The C99 function strtof is unavailable in some BSD variants.
diego
parents: 18823
diff changeset
775 media->a_framerate = strtod (longfsdp_buf, NULL);
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
776 else if (!strncmp (fsdp_buf[0], "fmtp", 4))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
777 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
778 if (NULL == media->a_fmtps)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
779 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
780 media->a_fmtps_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
781 media->a_fmtps =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
782 calloc (SDPLANGS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
783 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
784 if (media->a_fmtps_count < SDPLANGS_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
785 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
786 media->a_fmtps[media->a_fmtps_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
787 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
788 media->a_fmtps_count++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
789 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
790 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
791 else if (!strncmp (fsdp_buf[0], "rtcp", 4))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
792 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
793 int opts = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
794 /* rtcp attribute: a=rtcp:<port> <nettype> <addrtype> <address> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
795 opts =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
796 sscanf (longfsdp_buf, "%lu %2s %3s %" MSFLENS "s",
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
797 &wuint[0], fsdp_buf[0], fsdp_buf[1],
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
798 fsdp_buf[2]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
799 if (opts >= 1)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
800 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
801 media->a_rtcp_port = wuint[0];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
802 if (opts >= 2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
803 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
804 if (!strncmp (fsdp_buf[0], "IN", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
805 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
806 media->a_rtcp_network_type =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
807 FSDP_NETWORK_TYPE_INET;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
808 } /* else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
809 ; TODO: define error code? */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
810 if (opts >= 3)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
811 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
812 if (!strncmp (fsdp_buf[1], "IP4", 3))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
813 media->a_rtcp_address_type =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
814 FSDP_ADDRESS_TYPE_IPV4;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
815 else if (!strncmp (fsdp_buf[1], "IP6", 3))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
816 media->a_rtcp_address_type =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
817 FSDP_ADDRESS_TYPE_IPV6;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
818 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
819 return FSDPE_INVALID_CONNECTION_NETTYPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
820 /*add specific code? */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
821 if (opts >= 4)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
822 media->a_rtcp_address =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
823 strdup (fsdp_buf[2]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
824 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
825 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
826 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
827 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
828 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
829 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
830 /* ignore unknown attributes, but provide access to them */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
831 *fsdp_buf[1] = '\0';
22188
b9fa8b0ddab9 strncat() misuses, may have been exploitable.
rtogni
parents: 21504
diff changeset
832 strncat (fsdp_buf[1], fsdp_buf[0], MAXSHORTFIELDLEN-1);
b9fa8b0ddab9 strncat() misuses, may have been exploitable.
rtogni
parents: 21504
diff changeset
833 strncat (fsdp_buf[1], ":", MAXSHORTFIELDLEN-strlen(fsdp_buf[1])-1);
b9fa8b0ddab9 strncat() misuses, may have been exploitable.
rtogni
parents: 21504
diff changeset
834 strncat (fsdp_buf[1], longfsdp_buf, MAXSHORTFIELDLEN-strlen(fsdp_buf[1])-1);
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
835 if (NULL == media->unidentified_attributes)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
836 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
837 media->unidentified_attributes_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
838 media->unidentified_attributes =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
839 calloc (UNIDENTIFIED_ATTRIBUTES_MAX_COUNT,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
840 sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
841 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
842 if (media->unidentified_attributes_count <
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
843 UNIDENTIFIED_ATTRIBUTES_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
844 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
845 media->unidentified_attributes
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
846 [media->unidentified_attributes_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
847 strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
848 media->unidentified_attributes_count++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
849 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
850 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
851 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
852 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
853 else if (sscanf (p, "a=%8s", fsdp_buf[0]) == 1)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
854 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
855 /* media-level property attributes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
856 if (!strncmp (fsdp_buf[0], "recvonly", 8))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
857 media->a_sendrecv_mode = FSDP_SENDRECV_RECVONLY;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
858 else if (!strncmp (fsdp_buf[0], "sendonly", 8))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
859 media->a_sendrecv_mode = FSDP_SENDRECV_SENDONLY;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
860 else if (!strncmp (fsdp_buf[0], "inactive", 8))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
861 media->a_sendrecv_mode = FSDP_SENDRECV_INACTIVE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
862 else if (!strncmp (fsdp_buf[0], "sendrecv", 8))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
863 media->a_sendrecv_mode = FSDP_SENDRECV_SENDRECV;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
864 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
865 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
866 /* ignore unknown attributes, but provide access to them */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
867 *longfsdp_buf = '\0';
22189
6b84fac921eb More strncat() misuses.
rtogni
parents: 22188
diff changeset
868 strncat (longfsdp_buf, fsdp_buf[0], MAXLONGFIELDLEN-1);
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
869 if (NULL == media->unidentified_attributes)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
870 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
871 media->unidentified_attributes_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
872 media->unidentified_attributes =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
873 calloc (UNIDENTIFIED_ATTRIBUTES_MAX_COUNT,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
874 sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
875 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
876 if (media->unidentified_attributes_count <
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
877 UNIDENTIFIED_ATTRIBUTES_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
878 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
879 media->unidentified_attributes
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
880 [media->unidentified_attributes_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
881 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
882 media->unidentified_attributes_count++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
883 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
884 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
885 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
886 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
887 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
888 return FSDPE_INVALID_ATTRIBUTE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
889 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
890 } /* end of for */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
891 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
892
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
893 /* Check c= has been given at session level or at media level for
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
894 all media */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
895 if (NULL == dsc->c_address.address)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
896 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
897 unsigned int c;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
898 for (c = 0; c < dsc->media_announcements_count; c++)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
899 if (NULL == dsc->media_announcements[c]->c_address.address)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
900 return FSDPE_MISSING_CONNECTION_INFO;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
901 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
902
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
903 /* finish */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
904 if (*p == '\0')
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
905 return FSDPE_OK;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
906 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
907 return FSDPE_OVERFILLED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
908 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
909
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
910 static fsdp_error_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
911 fsdp_parse_c (const char **p, fsdp_network_type_t * ntype,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
912 fsdp_address_type_t * atype,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
913 fsdp_connection_address_t * address)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
914 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
915 const unsigned int TEMPCHARS = 3;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
916 char fsdp_buf[TEMPCHARS][MAXSHORTFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
917
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
918 if (!strncmp (*p, "c=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
919 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
920 if (sscanf (*p, "c=%2s %3s %" MSFLENS "s",
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
921 fsdp_buf[0], fsdp_buf[1], fsdp_buf[2]))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
922 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
923 if (!strncmp (fsdp_buf[0], "IN", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
924 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
925 *ntype = FSDP_NETWORK_TYPE_INET;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
926 if (!strncmp (fsdp_buf[1], "IP4", 3))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
927 *atype = FSDP_ADDRESS_TYPE_IPV4;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
928 else if (!strncmp (fsdp_buf[1], "IP6", 3))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
929 *atype = FSDP_ADDRESS_TYPE_IPV6;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
930 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
931 return FSDPE_INVALID_CONNECTION_NETTYPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
932 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
933 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
934 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
935 return FSDPE_INVALID_CONNECTION_ADDRTYPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
936 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
937 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
938 char *slash = strchr (fsdp_buf[2], '/');
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
939 if (NULL == slash)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
940 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
941 address->address = strdup (fsdp_buf[2]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
942 address->address_ttl = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
943 address->address_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
944 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
945 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
946 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
947 /* address is IP4 multicast */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
948 char *slash2;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
949 *slash = '\0';
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
950 slash++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
951 address->address = strdup (fsdp_buf[2]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
952 slash2 = strchr (slash + 1, '/');
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
953 if (NULL == slash2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
954 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
955 address->address_ttl = strtol (slash, NULL, 10);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
956 address->address_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
957 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
958 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
959 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
960 *slash2 = '\0';
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
961 slash2++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
962 address->address_ttl = strtol (slash, NULL, 10);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
963 address->address_count = strtol (slash2, NULL, 10);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
964 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
965 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
966 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
967 NEXT_LINE (*p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
968 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
969 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
970 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
971 return FSDPE_INVALID_CONNECTION;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
972 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
973 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
974 return FSDPE_OK;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
975 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
976
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
977 static fsdp_error_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
978 fsdp_parse_b (const char **p, fsdp_bw_modifier_t ** bw_modifiers,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
979 unsigned int *bw_modifiers_count)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
980 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
981 char fsdp_buf[MAXSHORTFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
982 unsigned long int wuint;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
983 unsigned int i = 0;
21503
f9a95c04844a remove useless and incorrect const-removing cast
reimar
parents: 21202
diff changeset
984 const char *lp = *p;
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
985
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
986 /* count b= lines */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
987 while (!strncmp (lp, "b=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
988 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
989 NEXT_LINE (lp);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
990 i++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
991 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
992 *bw_modifiers = calloc (i, sizeof (fsdp_bw_modifier_t));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
993 *bw_modifiers_count = i;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
994
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
995 while (i > 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
996 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
997 unsigned int index = *bw_modifiers_count - i;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
998 if (2 == sscanf (*p, "b=%20[^:\r\n]:%lu", fsdp_buf, &wuint))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
999 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1000 if (!strncmp (fsdp_buf, "CT", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1001 (*bw_modifiers)[index].b_mod_type =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1002 FSDP_BW_MOD_TYPE_CONFERENCE_TOTAL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1003 else if (!strncmp (fsdp_buf, "AS", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1004 (*bw_modifiers)[index].b_mod_type =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1005 FSDP_BW_MOD_TYPE_APPLICATION_SPECIFIC;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1006 else if (!strncmp (fsdp_buf, "RS", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1007 (*bw_modifiers)[index].b_mod_type = FSDP_BW_MOD_TYPE_RTCP_SENDERS;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1008 else if (!strncmp (fsdp_buf, "RR", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1009 (*bw_modifiers)[index].b_mod_type =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1010 FSDP_BW_MOD_TYPE_RTCP_RECEIVERS;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1011 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1012 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1013 (*bw_modifiers)[index].b_mod_type = FSDP_BW_MOD_TYPE_UNKNOWN;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1014 (*bw_modifiers)[index].b_unknown_bw_modt =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1015 (char *) strdup (fsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1016 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1017 (*bw_modifiers)[index].b_value = wuint;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1018 NEXT_LINE (*p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1019 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1020 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1021 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1022 *bw_modifiers_count -= i;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1023 return FSDPE_INVALID_BANDWIDTH;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1024 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1025 i--;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1026 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1027 return FSDPE_OK;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1028 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1029
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1030 static fsdp_error_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1031 fsdp_parse_k (const char **p, fsdp_encryption_method_t * method,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1032 char **content)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1033 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1034 char fsdp_buf[MAXSHORTFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1035 char longfsdp_buf[MAXLONGFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1036
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1037 if (!strncmp (*p, "k=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1038 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1039 if (sscanf (*p, "k=prompt"))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1040 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1041 *method = FSDP_ENCRYPTION_METHOD_PROMPT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1042 *content = NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1043 NEXT_LINE (*p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1044 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1045 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1046 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1047 if (sscanf
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1048 (*p, "k=%6[^:\r\n]:%" MLFLENS "s", fsdp_buf, longfsdp_buf))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1049 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1050 if (!strncmp (fsdp_buf, "clear", 5))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1051 *method = FSDP_ENCRYPTION_METHOD_CLEAR;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1052 else if (!strncmp (fsdp_buf, "base64", 6))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1053 *method = FSDP_ENCRYPTION_METHOD_BASE64;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1054 else if (!strncmp (fsdp_buf, "uri", 3))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1055 *method = FSDP_ENCRYPTION_METHOD_URI;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1056 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1057 return FSDPE_INVALID_ENCRYPTION_METHOD;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1058 *content = strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1059 NEXT_LINE (*p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1060 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1061 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1062 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1063 return FSDPE_OK;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1064 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1065
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1066 static fsdp_error_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1067 fsdp_parse_rtpmap (fsdp_rtpmap_t *** rtpmap, unsigned int *counter,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1068 const char *value)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1069 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1070 fsdp_error_t result = FSDPE_OK;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1071
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1072 if (0 == *counter)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1073 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1074 *counter = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1075 *rtpmap = calloc (MEDIA_RTPMAPS_MAX_COUNT, sizeof (fsdp_rtpmap_t *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1076 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1077 if (*counter < MEDIA_RTPMAPS_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1078 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1079 unsigned int c = *counter;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1080 fsdp_rtpmap_t **map = *rtpmap;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1081 char fsdp_buf[MAXSHORTFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1082 char longfsdp_buf[MAXLONGFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1083 map[c] = calloc (1, sizeof (fsdp_rtpmap_t));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1084
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1085 /* a=rtpmap:<payload type> <encoding name>/<clock rate>[/<encoding
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1086 parameters]> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1087 if (2 == sscanf (value, "%s %s", fsdp_buf, longfsdp_buf))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1088 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1089 char *slash1;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1090 map[c]->pt = strdup (fsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1091 /* parse <encoding name>/<clock rate>[/<encoding parameters>] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1092 slash1 = strchr (longfsdp_buf, '/');
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1093 if (NULL == slash1)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1094 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1095 result = FSDPE_INVALID_ATTRIBUTE_RTPMAP;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1096 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1097 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1098 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1099 char *slash2;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1100 *slash1 = '\0';
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1101 slash1++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1102 map[c]->encoding_name = strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1103 slash2 = strchr (slash1, '/');
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1104 if (NULL != slash2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1105 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1106 *slash2 = '\0';
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1107 slash2++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1108 map[c]->parameters = strdup (slash2);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1109 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1110 map[c]->clock_rate = strtol (slash1, NULL, 10);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1111 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1112 (*counter)++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1113 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1114 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1115 return result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1116 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1117
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1118 static fsdp_error_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1119 fsdp_repeat_time_to_uint (const char *time, unsigned long int *seconds)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1120 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1121 const unsigned long SECONDS_PER_DAY = 86400;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1122 const unsigned long SECONDS_PER_HOUR = 3600;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1123 const unsigned long SECONDS_PER_MINUTE = 60;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1124 char c;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1125 unsigned long int wuint;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1126
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1127 if (sscanf (time, "%lu%c", &wuint, &c) == 2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1128 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1129 /* time with unit specification character */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1130 switch (c)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1131 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1132 case 'd':
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1133 *seconds = wuint * SECONDS_PER_DAY;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1134 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1135 case 'h':
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1136 *seconds = wuint * SECONDS_PER_HOUR;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1137 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1138 case 'm':
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1139 *seconds = wuint * SECONDS_PER_MINUTE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1140 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1141 case 's':
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1142 *seconds = wuint;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1143 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1144 default:
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1145 return FSDPE_INVALID_REPEAT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1146 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1147 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1148 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1149 else if (sscanf (time, "%lu", &wuint) == 1)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1150 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1151 /* time without unit specification character */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1152 *seconds = wuint;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1153 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1154 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1155 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1156 return FSDPE_INVALID_REPEAT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1157 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1158 return FSDPE_OK;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1159 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1160
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1161 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1162 fsdp_get_version (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1163 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1164 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1165 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1166 return dsc->version;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1167 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1168
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1169 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1170 fsdp_get_owner_username (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1171 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1172 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1173 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1174 return dsc->o_username;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1175 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1176
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1177 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1178 fsdp_get_session_id (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1179 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1180 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1181 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1182 return dsc->o_session_id;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1183 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1184
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1185 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1186 fsdp_get_announcement_version (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1187 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1188 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1189 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1190 return dsc->o_announcement_version;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1191 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1192
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1193 fsdp_network_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1194 fsdp_get_owner_network_type (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1195 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1196 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1197 return FSDP_NETWORK_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1198 return dsc->o_network_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1199 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1200
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1201 fsdp_address_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1202 fsdp_get_owner_address_type (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1203 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1204 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1205 return FSDP_ADDRESS_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1206 return dsc->o_address_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1207 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1208
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1209 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1210 fsdp_get_owner_address (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1211 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1212 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1213 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1214 return dsc->o_address;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1215 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1216
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1217 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1218 fsdp_get_name (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1219 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1220 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1221 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1222 return dsc->s_name;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1223 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1224
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1225 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1226 fsdp_get_information (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1227 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1228 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1229 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1230 return dsc->i_information;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1231 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1232
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1233 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1234 fsdp_get_uri (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1235 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1236 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1237 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1238 return dsc->u_uri;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1239 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1240
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1241 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1242 fsdp_get_emails_count (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1243 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1244 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1245 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1246 return dsc->emails_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1247 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1248
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1249 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1250 fsdp_get_email (const fsdp_description_t * dsc, unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1251 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1252 if ((!dsc) || (index >= dsc->emails_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1253 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1254 return dsc->emails[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1255 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1256
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1257 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1258 fsdp_get_phones_count (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1259 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1260 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1261 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1262 return dsc->phones_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1263 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1264
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1265 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1266 fsdp_get_phone (const fsdp_description_t * dsc, unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1267 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1268 if ((!dsc) || (index >= dsc->phones_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1269 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1270 return dsc->phones[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1271 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1272
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1273 fsdp_network_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1274 fsdp_get_global_conn_network_type (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1275 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1276 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1277 return FSDP_NETWORK_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1278 return dsc->c_network_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1279 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1280
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1281 fsdp_address_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1282 fsdp_get_global_conn_address_type (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1283 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1284 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1285 return FSDP_ADDRESS_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1286 return dsc->c_address_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1287 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1288
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1289 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1290 fsdp_get_global_conn_address (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1291 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1292 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1293 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1294 return dsc->c_address.address;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1295 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1296
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1297 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1298 fsdp_get_global_conn_address_ttl (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1299 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1300 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1301 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1302 return dsc->c_address.address_ttl;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1303 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1304
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1305 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1306 fsdp_get_global_conn_address_count (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1307 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1308 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1309 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1310 return dsc->c_address.address_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1311 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1312
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1313 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1314 fsdp_get_bw_modifier_count (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1315 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1316 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1317 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1318 return dsc->bw_modifiers_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1319 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1320
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1321 fsdp_bw_modifier_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1322 fsdp_get_bw_modifier_type (const fsdp_description_t * dsc, unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1323 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1324 if ((!dsc) || (index >= dsc->bw_modifiers_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1325 return FSDP_BW_MOD_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1326 return dsc->bw_modifiers[index].b_mod_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1327 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1328
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1329 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1330 fsdp_get_bw_modifier_type_unknown (const fsdp_description_t * dsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1331 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1332 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1333 if ((!dsc) || (index >= dsc->bw_modifiers_count) ||
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1334 (dsc->bw_modifiers[index].b_mod_type != FSDP_BW_MOD_TYPE_UNKNOWN))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1335 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1336 return dsc->bw_modifiers[index].b_unknown_bw_modt;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1337 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1338
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1339 unsigned long int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1340 fsdp_get_bw_value (const fsdp_description_t * dsc, unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1341 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1342 if ((!dsc) || (index >= dsc->bw_modifiers_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1343 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1344 return dsc->bw_modifiers[index].b_value;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1345 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1346
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1347 time_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1348 fsdp_get_period_start (const fsdp_description_t * dsc, unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1349 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1350 if ((!dsc) || (index >= dsc->time_periods_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1351 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1352 return dsc->time_periods[index]->start;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1353 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1354
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1355 time_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1356 fsdp_get_period_stop (const fsdp_description_t * dsc, unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1357 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1358 if ((!dsc) || (index >= dsc->time_periods_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1359 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1360 return dsc->time_periods[index]->stop;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1361 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1362
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1363 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1364 fsdp_get_period_repeats_count (const fsdp_description_t * dsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1365 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1366 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1367 if ((!dsc) || (index >= dsc->time_periods_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1368 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1369 return dsc->time_periods[index]->repeats_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1370 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1371
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1372 unsigned long int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1373 fsdp_get_period_repeat_interval (const fsdp_description_t * dsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1374 unsigned int index, unsigned int rindex)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1375 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1376 if ((!dsc) || (index >= dsc->time_periods_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1377 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1378 return dsc->time_periods[index]->repeats[rindex]->interval;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1379 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1380
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1381 unsigned long int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1382 fsdp_get_period_repeat_duration (const fsdp_description_t * dsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1383 unsigned int index, unsigned int rindex)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1384 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1385 if ((!dsc) || (index >= dsc->time_periods_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1386 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1387 return dsc->time_periods[index]->repeats[rindex]->duration;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1388 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1389
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1390 const unsigned long int *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1391 fsdp_get_period_repeat_offsets (const fsdp_description_t * dsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1392 unsigned int index, unsigned int rindex)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1393 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1394 if ((!dsc) || (index >= dsc->time_periods_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1395 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1396 return dsc->time_periods[index]->repeats[rindex]->offsets;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1397 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1398
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1399 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1400 fsdp_get_timezone_adj (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1401 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1402 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1403 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1404 return dsc->timezone_adj;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1405 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1406
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1407 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1408 fsdp_get_unidentified_attribute_count (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1409 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1410 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1411 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1412 return dsc->unidentified_attributes_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1413 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1414
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1415 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1416 fsdp_get_unidentified_attribute (const fsdp_description_t * dsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1417 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1418 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1419 if (!dsc || (index < dsc->unidentified_attributes_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1420 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1421 return dsc->unidentified_attributes[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1422 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1423
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1424 fsdp_encryption_method_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1425 fsdp_get_encryption_method (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1426 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1427 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1428 return FSDP_ENCRYPTION_METHOD_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1429 return dsc->k_encryption_method;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1430 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1431
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1432 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1433 fsdp_get_encryption_content (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1434 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1435 if (!dsc || (dsc->k_encryption_method == FSDP_ENCRYPTION_METHOD_UNDEFINED))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1436 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1437 return dsc->k_encryption_content;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1438 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1439
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1440 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1441 fsdp_get_str_att (const fsdp_description_t * dsc, fsdp_session_str_att_t att)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1442 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1443 /*TODO: change these individual attributes with a table, thus
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1444 avoiding this slow switch */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1445 char *result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1446
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1447 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1448 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1449
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1450 switch (att)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1451 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1452 case FSDP_SESSION_STR_ATT_CATEGORY:
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1453 result = dsc->a_category;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1454 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1455 case FSDP_SESSION_STR_ATT_KEYWORDS:
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1456 result = dsc->a_keywords;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1457 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1458 case FSDP_SESSION_STR_ATT_TOOL:
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1459 result = dsc->a_tool;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1460 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1461 case FSDP_SESSION_STR_ATT_CHARSET:
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1462 result = dsc->a_charset;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1463 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1464 default:
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1465 result = NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1466 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1467 return result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1468 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1469
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1470 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1471 fsdp_get_sdplang_count (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1472 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1473 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1474 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1475 return dsc->a_sdplangs_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1476 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1477
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1478 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1479 fsdp_get_sdplang (const fsdp_description_t * dsc, unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1480 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1481 if ((!dsc) || (index >= dsc->a_sdplangs_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1482 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1483 return dsc->a_sdplangs[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1484 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1485
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1486 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1487 fsdp_get_control_count (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1488 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1489 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1490 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1491 return dsc->a_controls_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1492 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1493
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1494 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1495 fsdp_get_control (const fsdp_description_t * dsc, unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1496 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1497 if ((!dsc) || (index >= dsc->a_controls_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1498 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1499 return dsc->a_controls[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1500 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1501
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1502 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1503 fsdp_get_range (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1504 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1505 return dsc->a_range;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1506 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1507
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1508 fsdp_sendrecv_mode_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1509 fsdp_get_sendrecv_mode (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1510 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1511 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1512 return FSDP_SENDRECV_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1513 return dsc->a_sendrecv_mode;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1514 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1515
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1516 fsdp_session_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1517 fsdp_get_session_type (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1518 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1519 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1520 return FSDP_SESSION_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1521 return dsc->a_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1522 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1523
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1524 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1525 fsdp_get_media_count (const fsdp_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1526 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1527 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1528 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1529 return dsc->media_announcements_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1530 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1531
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1532 const fsdp_media_description_t *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1533 fsdp_get_media (const fsdp_description_t * dsc, unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1534 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1535 if ((index >= dsc->media_announcements_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1536 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1537 return dsc->media_announcements[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1538 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1539
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1540 fsdp_media_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1541 fsdp_get_media_type (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1542 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1543 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1544 return FSDP_MEDIA_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1545 return dsc->media_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1546 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1547
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1548 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1549 fsdp_get_media_port (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1550 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1551 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1552 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1553 return dsc->port;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1554 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1555
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1556 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1557 fsdp_get_media_port_count (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1558 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1559 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1560 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1561 return dsc->port_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1562 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1563
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1564 fsdp_transport_protocol_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1565 fsdp_get_media_transport_protocol (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1566 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1567 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1568 return FSDP_TP_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1569 return dsc->transport;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1570 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1571
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1572 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1573 fsdp_get_media_formats_count (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1574 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1575 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1576 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1577 return dsc->formats_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1578 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1579
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1580 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1581 fsdp_get_media_format (const fsdp_media_description_t * dsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1582 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1583 {
28884
304ee75ca7ae The first valid index is total count - 1 (usually 0)
ben
parents: 28319
diff changeset
1584 if (!dsc || (index < dsc->formats_count - 1))
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1585 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1586 return dsc->formats[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1587 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1588
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1589 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1590 fsdp_get_media_title (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1591 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1592 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1593 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1594 return dsc->i_title;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1595 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1596
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1597 fsdp_network_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1598 fsdp_get_media_network_type (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1599 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1600 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1601 return FSDP_NETWORK_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1602 return dsc->c_network_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1603 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1604
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1605 fsdp_address_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1606 fsdp_get_media_address_type (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1607 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1608 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1609 return FSDP_ADDRESS_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1610 return dsc->c_address_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1611 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1612
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1613 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1614 fsdp_get_media_address (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1615 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1616 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1617 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1618 return dsc->c_address.address;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1619 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1620
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1621 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1622 fsdp_get_media_address_ttl (const fsdp_media_description_t * mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1623 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1624 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1625 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1626 return mdsc->c_address.address_ttl;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1627 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1628
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1629 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1630 fsdp_get_media_address_count (const fsdp_media_description_t * mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1631 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1632 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1633 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1634 return mdsc->c_address.address_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1635 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1636
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1637 fsdp_bw_modifier_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1638 fsdp_get_media_bw_modifier_type (const fsdp_media_description_t * dsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1639 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1640 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1641 if (!dsc || (index >= dsc->bw_modifiers_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1642 return FSDP_BW_MOD_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1643 return dsc->bw_modifiers[index].b_mod_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1644 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1645
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1646 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1647 fsdp_get_media_bw_modifier_type_unknown (const fsdp_media_description_t * dsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1648 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1649 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1650 if (!dsc || (index >= dsc->bw_modifiers_count) ||
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1651 (FSDP_BW_MOD_TYPE_UNKNOWN != dsc->bw_modifiers[index].b_mod_type))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1652 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1653 return dsc->bw_modifiers[index].b_unknown_bw_modt;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1654 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1655
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1656 unsigned long int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1657 fsdp_get_media_bw_value (const fsdp_media_description_t * dsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1658 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1659 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1660 if (!dsc || (index >= dsc->bw_modifiers_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1661 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1662 return dsc->bw_modifiers[index].b_value;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1663 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1664
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1665 fsdp_encryption_method_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1666 fsdp_get_media_encryption_method (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1667 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1668 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1669 return FSDP_ENCRYPTION_METHOD_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1670 return dsc->k_encryption_method;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1671 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1672
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1673 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1674 fsdp_get_media_encryption_content (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1675 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1676 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1677 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1678 return dsc->k_encryption_content;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1679 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1680
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1681 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1682 fsdp_get_media_ptime (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1683 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1684 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1685 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1686 return dsc->a_ptime;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1687 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1688
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1689 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1690 fsdp_get_media_maxptime (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1691 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1692 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1693 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1694 return dsc->a_maxptime;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1695 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1696
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1697 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1698 fsdp_get_media_rtpmap_count (const fsdp_media_description_t * mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1699 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1700 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1701 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1702 return mdsc->a_rtpmaps_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1703 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1704
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1705 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1706 fsdp_get_media_rtpmap_payload_type (const fsdp_media_description_t * mdsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1707 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1708 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1709 if (!mdsc || (index >= mdsc->a_rtpmaps_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1710 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1711 return mdsc->a_rtpmaps[index]->pt;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1712 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1713
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1714 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1715 fsdp_get_media_rtpmap_encoding_name (const fsdp_media_description_t * mdsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1716 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1717 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1718 if (!mdsc || (index >= mdsc->a_rtpmaps_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1719 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1720 return mdsc->a_rtpmaps[index]->encoding_name;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1721 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1722
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1723 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1724 fsdp_get_media_rtpmap_clock_rate (const fsdp_media_description_t * mdsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1725 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1726 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1727 if (!mdsc || (index >= mdsc->a_rtpmaps_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1728 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1729 return mdsc->a_rtpmaps[index]->clock_rate;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1730 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1731
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1732 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1733 fsdp_get_media_rtpmap_encoding_parameters (const fsdp_description_t * mdsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1734 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1735 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1736 if (!mdsc || (index >= mdsc->a_rtpmaps_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1737 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1738 return mdsc->a_rtpmaps[index]->parameters;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1739 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1740
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1741 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1742 fsdp_get_media_sdplang_count (const fsdp_media_description_t * mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1743 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1744 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1745 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1746 return mdsc->a_sdplangs_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1747 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1748
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1749 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1750 fsdp_get_media_sdplang (const fsdp_media_description_t * mdsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1751 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1752 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1753 if (!mdsc || (index >= mdsc->a_sdplangs_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1754 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1755 return mdsc->a_sdplangs[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1756 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1757
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1758 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1759 fsdp_get_media_lang_count (const fsdp_media_description_t * mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1760 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1761 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1762 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1763 return mdsc->a_langs_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1764 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1765
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1766 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1767 fsdp_get_media_lang (const fsdp_media_description_t * mdsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1768 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1769 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1770 if (!mdsc || (index >= mdsc->a_langs_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1771 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1772 return mdsc->a_langs[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1773 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1774
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1775 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1776 fsdp_get_media_control_count (const fsdp_media_description_t * mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1777 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1778 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1779 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1780 return mdsc->a_controls_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1781 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1782
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1783 char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1784 fsdp_get_media_control (const fsdp_media_description_t * mdsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1785 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1786 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1787 if (!mdsc || (index >= mdsc->a_controls_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1788 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1789 return mdsc->a_controls[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1790 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1791
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1792 char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1793 fsdp_get_media_range (const fsdp_media_description_t * mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1794 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1795 return mdsc->a_range;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1796 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1797
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1798 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1799 fsdp_get_media_fmtp_count (const fsdp_media_description_t * mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1800 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1801 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1802 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1803 return mdsc->a_fmtps_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1804 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1805
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1806 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1807 fsdp_get_media_fmtp (const fsdp_media_description_t * mdsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1808 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1809 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1810 if (!mdsc || (index >= mdsc->a_fmtps_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1811 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1812 return mdsc->a_fmtps[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1813 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1814
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1815 fsdp_orient_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1816 fsdp_get_media_orient (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1817 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1818 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1819 return FSDP_ORIENT_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1820 return dsc->a_orient;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1821 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1822
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1823 fsdp_sendrecv_mode_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1824 fsdp_get_media_sendrecv (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1825 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1826 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1827 return FSDP_SENDRECV_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1828 return dsc->a_sendrecv_mode;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1829 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1830
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1831 float
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1832 fsdp_get_media_framerate (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1833 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1834 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1835 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1836 return dsc->a_framerate;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1837 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1838
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1839 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1840 fsdp_get_media_quality (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1841 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1842 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1843 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1844 return dsc->a_quality;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1845 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1846
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1847 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1848 fsdp_get_media_rtcp_port (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1849 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1850 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1851 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1852 return dsc->a_rtcp_port;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1853 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1854
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1855 fsdp_network_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1856 fsdp_get_media_rtcp_network_type (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1857 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1858 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1859 return FSDP_NETWORK_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1860 return dsc->a_rtcp_network_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1861 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1862
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1863 fsdp_address_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1864 fsdp_get_media_rtcp_address_type (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1865 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1866 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1867 return FSDP_ADDRESS_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1868 return dsc->a_rtcp_address_type;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1869 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1870
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1871 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1872 fsdp_get_media_rtcp_address (const fsdp_media_description_t * dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1873 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1874 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1875 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1876 return dsc->a_rtcp_address;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1877 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1878
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1879 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1880 fsdp_get_media_unidentified_attribute_count (const fsdp_media_description_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1881 * mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1882 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1883 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1884 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1885 return mdsc->unidentified_attributes_count;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1886 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1887
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1888 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1889 fsdp_get_media_unidentified_attribute (const fsdp_media_description_t * mdsc,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1890 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1891 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1892 if (!mdsc || (index < mdsc->unidentified_attributes_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1893 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1894 return mdsc->unidentified_attributes[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1895 }