annotate stream/freesdp/parser.c @ 33029:6b6320dcefdf

For a stream without pts values time video frames based on fps value.
author reimar
date Sat, 26 Mar 2011 16:01:00 +0000
parents 8fa2f43cb760
children c6b4a486c108
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 /**
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
25 * @file parser.c
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;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
68 unsigned int index, j;
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 index = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
256 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
257 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
258 unsigned int h = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
259 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
260 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
261 /* 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
262 dsc->time_periods_count = j;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
263 return FSDPE_INVALID_TIME;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
264 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
265 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
266
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
267 /* 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
268 if (wuint[0] != 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
269 wuint[0] -= NTP_EPOCH_OFFSET;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
270 if (wuint[1] != 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
271 wuint[1] -= NTP_EPOCH_OFFSET;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
272 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
273 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
274 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
275
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
276 /* `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
277 /*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
278 start-time> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
279 p2 = p;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
280 while (!strncmp (p2, "r=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
281 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
282 h++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
283 NEXT_LINE (p2);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
284 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
285 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
286 if (h > 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
287 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
288 unsigned int index2 = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
289 dsc->time_periods[j]->repeats =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
290 calloc (h, sizeof (fsdp_repeat_t *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
291 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
292 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
293 /*
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
294 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
295 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
296 *repeat);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
297 */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
298 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
299 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
300 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
301 fsdp_repeat_t *repeat;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
302 dsc->time_periods[j]->repeats[h] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
303 calloc (1, sizeof (fsdp_repeat_t));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
304 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
305 /* 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
306 result =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
307 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
308 &(repeat->interval));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
309 if (result == FSDPE_OK)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
310 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
311 result =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
312 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
313 &(repeat->duration));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
314 if (result == FSDPE_OK)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
315 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
316 unsigned int k = 1;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
317 const char *i = longfsdp_buf;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
318 while (NULL != (i = strchr (i, ' ')))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
319 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
320 k++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
321 if (NULL != i)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
322 i++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
323 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
324 repeat->offsets_count = k;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
325 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
326 i = longfsdp_buf;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
327 for (k = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
328 (k < repeat->offsets_count)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
329 && (result == FSDPE_OK); k++)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
330 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
331 result =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
332 fsdp_repeat_time_to_uint (i,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
333 &(repeat->
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
334 offsets[k]));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
335 i = strchr (i, ' ');
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
336 if (NULL != i)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
337 i++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
338 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
339 if (k < repeat->offsets_count)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
340 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
341 /* there where invalid repeat offsets */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
342 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
343 return FSDPE_INVALID_REPEAT;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
347 if (result != FSDPE_OK)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
348 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
349 /* 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
350 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
351 return FSDPE_INVALID_REPEAT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
352 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
353 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
354 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
355 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
356 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
357 /* 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
358 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
359 return FSDPE_INVALID_REPEAT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
360 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
361 index2++;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
366 /* `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
367 /* 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
368 if (!strncmp (p, "z=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
369 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
370 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
371 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
372 /* 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
373 dsc->timezone_adj = strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
374 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
375 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
376 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
377 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
378 return FSDPE_INVALID_TIMEZONE;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
382 /* `k=' line (encryption key) [optional] */
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28884
diff changeset
383 /* k=<method>
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
384 k=<method>:<encryption key> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
385 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
386 &(dsc->k_encryption_content));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
387 if (result != FSDPE_OK)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
388 return result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
389
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
390 /* A.2) Attributes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
391 /* `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
392 /* a=<attribute>
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
393 a=<attribute>:<value> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
394 while (!strncmp (p, "a=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
395 {
24595
85f669a84e7a cosmetics: misc typo fixes
diego
parents: 22189
diff changeset
396 /* 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
397 changes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
398 if (sscanf
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
399 (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
400 fsdp_buf[1]) == 2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
401 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
402 /* session-level value attributes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
403 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
404 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
405 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
406 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
407 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
408 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
409 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
410 fsdp_parse_rtpmap (&(dsc->a_rtpmaps),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
411 &(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
412 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
413 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
414 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
415 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
416 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
417 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
418 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
419 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
420 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
421 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
422 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
423 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
424 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
425 return FSDPE_INVALID_SESSION_TYPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
426 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
427 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
428 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
429 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
430 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
431 if (NULL == dsc->a_sdplangs)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
432 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
433 dsc->a_sdplangs_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
434 dsc->a_sdplangs =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
435 calloc (SDPLANGS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
436 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
437 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
438 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
439 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
440 strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
441 dsc->a_sdplangs_count++;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
444 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
445 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
446 if (NULL == dsc->a_langs)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
447 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
448 dsc->a_langs_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
449 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
450 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
451 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
452 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
453 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
454 dsc->a_langs_count++;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
457 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
458 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
459 if (NULL == dsc->a_controls)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
460 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
461 dsc->a_controls_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
462 dsc->a_controls =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
463 calloc (SDPCONTROLS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
464 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
465 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
466 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
467 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
468 strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
469 dsc->a_controls_count++;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
472 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
473 {
32537
8fa2f43cb760 Remove most of the NULL pointer check before free all over the code
cboesch
parents: 30739
diff changeset
474 free (dsc->a_range);
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
475 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
476 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
477 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
478 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
479 /* 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
480 *longfsdp_buf = '\0';
22189
6b84fac921eb More strncat() misuses.
rtogni
parents: 22188
diff changeset
481 strncat (longfsdp_buf, fsdp_buf[0], MAXLONGFIELDLEN-1);
6b84fac921eb More strncat() misuses.
rtogni
parents: 22188
diff changeset
482 strncat (longfsdp_buf, ":", MAXLONGFIELDLEN-strlen(longfsdp_buf)-1);
6b84fac921eb More strncat() misuses.
rtogni
parents: 22188
diff changeset
483 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
484 if (NULL == dsc->unidentified_attributes)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
485 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
486 dsc->unidentified_attributes_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
487 dsc->unidentified_attributes =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
488 calloc (UNIDENTIFIED_ATTRIBUTES_MAX_COUNT,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
489 sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
490 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
491 if (dsc->unidentified_attributes_count <
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
492 UNIDENTIFIED_ATTRIBUTES_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
493 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
494 dsc->unidentified_attributes
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
495 [dsc->unidentified_attributes_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
496 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
497 dsc->unidentified_attributes_count++;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
500 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
501 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
502 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
503 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
504 /* session-level property attributes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
505 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
506 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
507 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
508 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
509 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
510 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
511 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
512 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
513 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
514 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
515 /* 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
516 *longfsdp_buf = '\0';
22189
6b84fac921eb More strncat() misuses.
rtogni
parents: 22188
diff changeset
517 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
518 if (NULL == dsc->unidentified_attributes)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
519 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
520 dsc->unidentified_attributes_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
521 dsc->unidentified_attributes =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
522 calloc (UNIDENTIFIED_ATTRIBUTES_MAX_COUNT,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
523 sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
524 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
525 if (dsc->unidentified_attributes_count <
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
526 UNIDENTIFIED_ATTRIBUTES_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
527 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
528 dsc->unidentified_attributes
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
529 [dsc->unidentified_attributes_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
530 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
531 dsc->unidentified_attributes_count++;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
534 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
535 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
536 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
537 return FSDPE_INVALID_ATTRIBUTE;
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 /***************************************************************************/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
541 /* B) parse media-level descriptions */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
542 /***************************************************************************/
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
543 p2 = p;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
544 j = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
545 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
546 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
547 char c;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
548 j++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
549 NEXT_LINE (p2);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
550 while (sscanf (p2, "%c=", &c) == 1)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
551 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
552 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
553 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
554 NEXT_LINE (p2);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
555 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
556 else if (c == 'm')
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
557 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
558 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
559 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
560 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
561 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
562 return FSDPE_INVALID_LINE;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
566 dsc->media_announcements_count = j;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
567 if (dsc->media_announcements_count == 0)
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 ;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
570 /*return FSDPE_MISSING_MEDIA; */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
571 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
572 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
573 { /* dsc->media_announcements_count > 0 */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
574 dsc->media_announcements =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
575 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
576 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
577 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
578 fsdp_media_announcement_t *media = NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
579 /* `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
580 /* m=<media> <port> <transport> <fmt list> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
581 /* 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
582 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
583 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
584 longfsdp_buf) != 4)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
585 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
586 return FSDPE_INVALID_MEDIA;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
587 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
588 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
589 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
590 dsc->media_announcements[j] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
591 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
592 media = dsc->media_announcements[j];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
593 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
594 media->media_type = FSDP_MEDIA_AUDIO;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
595 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
596 media->media_type = FSDP_MEDIA_VIDEO;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
597 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
598 media->media_type = FSDP_MEDIA_APPLICATION;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
599 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
600 media->media_type = FSDP_MEDIA_DATA;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
601 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
602 media->media_type = FSDP_MEDIA_CONTROL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
603 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
604 return FSDPE_UNKNOWN_MEDIA_TYPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
605 { /* 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
606 char *slash;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
607 if ((slash = strchr (fsdp_buf[1], '/')))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
608 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
609 *slash = '\0';
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
610 slash++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
611 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
612 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
613 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
614 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
615 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
616 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
617 media->port_count = 0;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
620 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
621 media->transport = FSDP_TP_RTP_AVP;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
622 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
623 media->transport = FSDP_TP_UDP;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
624 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
625 media->transport = FSDP_TP_TCP;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
626 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
627 media->transport = FSDP_TP_UDPTL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
628 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
629 media->transport = FSDP_TP_VAT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
630 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
631 media->transport = FSDP_TP_OLD_RTP;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
632 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
633 return FSDPE_UNKNOWN_MEDIA_TRANSPORT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
634 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
635 unsigned int k = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
636 char *s = longfsdp_buf;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
637 while (NULL != (s = strchr (s, ' ')))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
638 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
639 k++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
640 if (NULL != s)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
641 s++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
642 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
643 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
644 media->formats_count = k;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
645 media->formats = calloc (k, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
646 s = longfsdp_buf;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
647 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
648 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
649 char *space = strchr (s, ' ');
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
650 if (NULL != space)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
651 *space = '\0';
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
652 media->formats[k] = strdup (s);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
653 s = space + 1;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
656 NEXT_LINE (p);
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
659 /* `i=' line (media title) [optional] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
660 /* i=<media title> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
661 if (!strncmp (p, "i=", 2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
662 && 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
663 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
664 media->i_title = strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
665 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
666 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
667 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
668 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
669 /* (optional) information absent */
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
672 /* `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
673 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
674 /* 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
675 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
676 &(media->c_address_type),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
677 &(media->c_address));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
678 if (result != FSDPE_OK)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
679 return result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
680
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
681 /* `b=' lines (bandwidth information) [optional] */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
682 /* b=<modifier>:<bandwidth-value> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
683 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
684 &(media->bw_modifiers_count));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
685 if (FSDPE_OK != result)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
686 return result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
687
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
688 /* `k=' line (encryption key) [optional] */
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28884
diff changeset
689 /* k=<method>
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
690 k=<method>:<encryption key> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
691 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
692 &(media->k_encryption_content));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
693 if (result != FSDPE_OK)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
694 return result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
695
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
696 /* B.1) Attributes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
697
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
698 /* `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
699 /* a=<attribute>
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
700 a=<attribute>:<value> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
701 while (!strncmp (p, "a=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
702 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
703 if (sscanf
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
704 (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
705 longfsdp_buf) == 2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
706 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
707 /* media-level value attributes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
708 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
709 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
710 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
711 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
712 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
713 fsdp_parse_rtpmap (&(media->a_rtpmaps),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
714 &(media->a_rtpmaps_count),
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
715 longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
716 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
717 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
718 if (!strncmp (longfsdp_buf, "portrait", 8))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
719 media->a_orient = FSDP_ORIENT_PORTRAIT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
720 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
721 media->a_orient = FSDP_ORIENT_LANDSCAPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
722 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
723 media->a_orient = FSDP_ORIENT_SEASCAPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
724 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
725 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
726 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
727 if (NULL == dsc->a_sdplangs)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
728 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
729 media->a_sdplangs_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
730 media->a_sdplangs =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
731 calloc (SDPLANGS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
732 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
733 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
734 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
735 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
736 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
737 media->a_sdplangs_count++;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
740 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
741 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
742 if (NULL == dsc->a_langs)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
743 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
744 media->a_langs_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
745 media->a_langs =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
746 calloc (SDPLANGS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
747 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
748 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
749 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
750 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
751 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
752 media->a_langs_count++;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
755 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
756 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
757 if (NULL == media->a_controls)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
758 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
759 media->a_controls_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
760 media->a_controls =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
761 calloc (SDPCONTROLS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
762 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
763 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
764 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
765 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
766 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
767 media->a_controls_count++;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
770 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
771 {
32537
8fa2f43cb760 Remove most of the NULL pointer check before free all over the code
cboesch
parents: 30739
diff changeset
772 free (media->a_range);
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
773 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
774 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
775 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
776 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
777 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
778 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
779 if (NULL == media->a_fmtps)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
780 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
781 media->a_fmtps_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
782 media->a_fmtps =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
783 calloc (SDPLANGS_MAX_COUNT, sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
784 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
785 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
786 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
787 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
788 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
789 media->a_fmtps_count++;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
792 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
793 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
794 int opts = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
795 /* 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
796 opts =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
797 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
798 &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
799 fsdp_buf[2]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
800 if (opts >= 1)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
801 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
802 media->a_rtcp_port = wuint[0];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
803 if (opts >= 2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
804 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
805 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
806 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
807 media->a_rtcp_network_type =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
808 FSDP_NETWORK_TYPE_INET;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
809 } /* else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
810 ; TODO: define error code? */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
811 if (opts >= 3)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
812 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
813 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
814 media->a_rtcp_address_type =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
815 FSDP_ADDRESS_TYPE_IPV4;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
816 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
817 media->a_rtcp_address_type =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
818 FSDP_ADDRESS_TYPE_IPV6;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
819 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
820 return FSDPE_INVALID_CONNECTION_NETTYPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
821 /*add specific code? */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
822 if (opts >= 4)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
823 media->a_rtcp_address =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
824 strdup (fsdp_buf[2]);
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
829 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
830 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
831 /* 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
832 *fsdp_buf[1] = '\0';
22188
b9fa8b0ddab9 strncat() misuses, may have been exploitable.
rtogni
parents: 21504
diff changeset
833 strncat (fsdp_buf[1], fsdp_buf[0], MAXSHORTFIELDLEN-1);
b9fa8b0ddab9 strncat() misuses, may have been exploitable.
rtogni
parents: 21504
diff changeset
834 strncat (fsdp_buf[1], ":", MAXSHORTFIELDLEN-strlen(fsdp_buf[1])-1);
b9fa8b0ddab9 strncat() misuses, may have been exploitable.
rtogni
parents: 21504
diff changeset
835 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
836 if (NULL == media->unidentified_attributes)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
837 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
838 media->unidentified_attributes_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
839 media->unidentified_attributes =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
840 calloc (UNIDENTIFIED_ATTRIBUTES_MAX_COUNT,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
841 sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
842 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
843 if (media->unidentified_attributes_count <
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
844 UNIDENTIFIED_ATTRIBUTES_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
845 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
846 media->unidentified_attributes
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
847 [media->unidentified_attributes_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
848 strdup (fsdp_buf[1]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
849 media->unidentified_attributes_count++;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
852 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
853 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
854 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
855 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
856 /* media-level property attributes */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
857 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
858 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
859 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
860 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
861 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
862 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
863 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
864 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
865 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
866 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
867 /* 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
868 *longfsdp_buf = '\0';
22189
6b84fac921eb More strncat() misuses.
rtogni
parents: 22188
diff changeset
869 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
870 if (NULL == media->unidentified_attributes)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
871 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
872 media->unidentified_attributes_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
873 media->unidentified_attributes =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
874 calloc (UNIDENTIFIED_ATTRIBUTES_MAX_COUNT,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
875 sizeof (char *));
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
876 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
877 if (media->unidentified_attributes_count <
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
878 UNIDENTIFIED_ATTRIBUTES_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
879 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
880 media->unidentified_attributes
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
881 [media->unidentified_attributes_count] =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
882 strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
883 media->unidentified_attributes_count++;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
886 NEXT_LINE (p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
887 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
888 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
889 return FSDPE_INVALID_ATTRIBUTE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
890 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
891 } /* end of for */
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
894 /* 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
895 all media */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
896 if (NULL == dsc->c_address.address)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
897 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
898 unsigned int c;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
899 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
900 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
901 return FSDPE_MISSING_CONNECTION_INFO;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
904 /* finish */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
905 if (*p == '\0')
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
906 return FSDPE_OK;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
907 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
908 return FSDPE_OVERFILLED;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
911 static fsdp_error_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
912 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
913 fsdp_address_type_t * atype,
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
914 fsdp_connection_address_t * address)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
915 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
916 const unsigned int TEMPCHARS = 3;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
917 char fsdp_buf[TEMPCHARS][MAXSHORTFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
918
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
919 if (!strncmp (*p, "c=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
920 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
921 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
922 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
923 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
924 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
925 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
926 *ntype = FSDP_NETWORK_TYPE_INET;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
927 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
928 *atype = FSDP_ADDRESS_TYPE_IPV4;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
929 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
930 *atype = FSDP_ADDRESS_TYPE_IPV6;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
931 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
932 return FSDPE_INVALID_CONNECTION_NETTYPE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
933 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
934 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
935 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
936 return FSDPE_INVALID_CONNECTION_ADDRTYPE;
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 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
939 char *slash = strchr (fsdp_buf[2], '/');
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
940 if (NULL == slash)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
941 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
942 address->address = strdup (fsdp_buf[2]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
943 address->address_ttl = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
944 address->address_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
945 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
946 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
947 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
948 /* address is IP4 multicast */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
949 char *slash2;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
950 *slash = '\0';
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
951 slash++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
952 address->address = strdup (fsdp_buf[2]);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
953 slash2 = strchr (slash + 1, '/');
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
954 if (NULL == slash2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
955 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
956 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
957 address->address_count = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
958 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
959 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
960 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
961 *slash2 = '\0';
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
962 slash2++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
963 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
964 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
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
968 NEXT_LINE (*p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
969 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
970 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
971 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
972 return FSDPE_INVALID_CONNECTION;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
975 return FSDPE_OK;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
978 static fsdp_error_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
979 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
980 unsigned int *bw_modifiers_count)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
981 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
982 char fsdp_buf[MAXSHORTFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
983 unsigned long int wuint;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
984 unsigned int i = 0;
21503
f9a95c04844a remove useless and incorrect const-removing cast
reimar
parents: 21202
diff changeset
985 const char *lp = *p;
18823
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
986
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
987 /* count b= lines */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
988 while (!strncmp (lp, "b=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
989 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
990 NEXT_LINE (lp);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
991 i++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
992 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
993 *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
994 *bw_modifiers_count = i;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
995
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
996 while (i > 0)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
997 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
998 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
999 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
1000 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1001 if (!strncmp (fsdp_buf, "CT", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1002 (*bw_modifiers)[index].b_mod_type =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1003 FSDP_BW_MOD_TYPE_CONFERENCE_TOTAL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1004 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
1005 (*bw_modifiers)[index].b_mod_type =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1006 FSDP_BW_MOD_TYPE_APPLICATION_SPECIFIC;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1007 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
1008 (*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
1009 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
1010 (*bw_modifiers)[index].b_mod_type =
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1011 FSDP_BW_MOD_TYPE_RTCP_RECEIVERS;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1012 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1013 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1014 (*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
1015 (*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
1016 (char *) strdup (fsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1017 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1018 (*bw_modifiers)[index].b_value = wuint;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1019 NEXT_LINE (*p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1020 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1021 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1022 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1023 *bw_modifiers_count -= i;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1024 return FSDPE_INVALID_BANDWIDTH;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1025 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1026 i--;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1027 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1028 return FSDPE_OK;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1031 static fsdp_error_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1032 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
1033 char **content)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1034 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1035 char fsdp_buf[MAXSHORTFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1036 char longfsdp_buf[MAXLONGFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1037
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1038 if (!strncmp (*p, "k=", 2))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1039 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1040 if (sscanf (*p, "k=prompt"))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1041 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1042 *method = FSDP_ENCRYPTION_METHOD_PROMPT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1043 *content = NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1044 NEXT_LINE (*p);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1045 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1046 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1047 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1048 if (sscanf
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1049 (*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
1050 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1051 if (!strncmp (fsdp_buf, "clear", 5))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1052 *method = FSDP_ENCRYPTION_METHOD_CLEAR;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1053 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
1054 *method = FSDP_ENCRYPTION_METHOD_BASE64;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1055 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
1056 *method = FSDP_ENCRYPTION_METHOD_URI;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1057 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1058 return FSDPE_INVALID_ENCRYPTION_METHOD;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1059 *content = strdup (longfsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1060 NEXT_LINE (*p);
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1064 return FSDPE_OK;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1067 static fsdp_error_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1068 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
1069 const char *value)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1070 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1071 fsdp_error_t result = FSDPE_OK;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1072
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1073 if (0 == *counter)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1074 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1075 *counter = 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1076 *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
1077 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1078 if (*counter < MEDIA_RTPMAPS_MAX_COUNT)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1079 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1080 unsigned int c = *counter;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1081 fsdp_rtpmap_t **map = *rtpmap;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1082 char fsdp_buf[MAXSHORTFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1083 char longfsdp_buf[MAXLONGFIELDLEN];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1084 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
1085
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1086 /* 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
1087 parameters]> */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1088 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
1089 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1090 char *slash1;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1091 map[c]->pt = strdup (fsdp_buf);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1092 /* 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
1093 slash1 = strchr (longfsdp_buf, '/');
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1094 if (NULL == slash1)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1095 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1096 result = FSDPE_INVALID_ATTRIBUTE_RTPMAP;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1097 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1098 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1099 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1100 char *slash2;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1101 *slash1 = '\0';
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1102 slash1++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1103 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
1104 slash2 = strchr (slash1, '/');
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1105 if (NULL != slash2)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1106 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1107 *slash2 = '\0';
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1108 slash2++;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1109 map[c]->parameters = strdup (slash2);
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1110 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1111 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
1112 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1113 (*counter)++;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1116 return result;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1119 static fsdp_error_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1120 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
1121 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1122 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
1123 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
1124 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
1125 char c;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1126 unsigned long int wuint;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1127
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1128 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
1129 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1130 /* time with unit specification character */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1131 switch (c)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1132 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1133 case 'd':
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1134 *seconds = wuint * SECONDS_PER_DAY;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1135 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1136 case 'h':
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1137 *seconds = wuint * SECONDS_PER_HOUR;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1138 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1139 case 'm':
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1140 *seconds = wuint * SECONDS_PER_MINUTE;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1141 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1142 case 's':
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1143 *seconds = wuint;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1144 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1145 default:
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1146 return FSDPE_INVALID_REPEAT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1147 break;
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 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1150 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
1151 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1152 /* time without unit specification character */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1153 *seconds = wuint;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1154 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1155 else
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1156 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1157 return FSDPE_INVALID_REPEAT;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1158 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1159 return FSDPE_OK;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1162 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1163 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
1164 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1165 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1166 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1167 return dsc->version;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1170 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1171 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
1172 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1173 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1174 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1175 return dsc->o_username;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1178 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1179 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
1180 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1181 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1182 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1183 return dsc->o_session_id;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1186 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1187 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
1188 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1189 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1190 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1191 return dsc->o_announcement_version;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1194 fsdp_network_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1195 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
1196 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1197 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1198 return FSDP_NETWORK_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1199 return dsc->o_network_type;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1202 fsdp_address_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1203 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
1204 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1205 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1206 return FSDP_ADDRESS_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1207 return dsc->o_address_type;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1210 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1211 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
1212 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1213 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1214 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1215 return dsc->o_address;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1218 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1219 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
1220 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1221 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1222 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1223 return dsc->s_name;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1226 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1227 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
1228 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1229 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1230 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1231 return dsc->i_information;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1234 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1235 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
1236 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1237 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1238 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1239 return dsc->u_uri;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1242 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1243 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
1244 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1245 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1246 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1247 return dsc->emails_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1250 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1251 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
1252 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1253 if ((!dsc) || (index >= dsc->emails_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1254 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1255 return dsc->emails[index];
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1258 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1259 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
1260 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1261 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1262 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1263 return dsc->phones_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1266 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1267 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
1268 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1269 if ((!dsc) || (index >= dsc->phones_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1270 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1271 return dsc->phones[index];
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1274 fsdp_network_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1275 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
1276 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1277 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1278 return FSDP_NETWORK_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1279 return dsc->c_network_type;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1282 fsdp_address_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1283 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
1284 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1285 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1286 return FSDP_ADDRESS_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1287 return dsc->c_address_type;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1290 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1291 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
1292 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1293 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1294 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1295 return dsc->c_address.address;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1298 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1299 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
1300 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1301 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1302 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1303 return dsc->c_address.address_ttl;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1306 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1307 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
1308 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1309 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1310 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1311 return dsc->c_address.address_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1314 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1315 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
1316 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1317 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1318 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1319 return dsc->bw_modifiers_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1322 fsdp_bw_modifier_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1323 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
1324 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1325 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
1326 return FSDP_BW_MOD_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1327 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
1328 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1329
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1330 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1331 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
1332 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1333 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1334 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
1335 (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
1336 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1337 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
1338 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1339
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1340 unsigned long int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1341 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
1342 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1343 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
1344 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1345 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
1346 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1347
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1348 time_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1349 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
1350 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1351 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
1352 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1353 return dsc->time_periods[index]->start;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1356 time_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1357 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
1358 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1359 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
1360 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1361 return dsc->time_periods[index]->stop;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1364 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1365 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
1366 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1367 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1368 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
1369 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1370 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
1371 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1372
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1373 unsigned long int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1374 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
1375 unsigned int index, unsigned int rindex)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1376 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1377 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
1378 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1379 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
1380 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1381
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1382 unsigned long int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1383 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
1384 unsigned int index, unsigned int rindex)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1385 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1386 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
1387 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1388 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
1389 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1390
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1391 const unsigned long int *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1392 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
1393 unsigned int index, unsigned int rindex)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1394 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1395 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
1396 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1397 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
1398 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1399
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1400 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1401 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
1402 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1403 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1404 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1405 return dsc->timezone_adj;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1408 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1409 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
1410 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1411 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1412 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1413 return dsc->unidentified_attributes_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1416 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1417 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
1418 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1419 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1420 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
1421 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1422 return dsc->unidentified_attributes[index];
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1425 fsdp_encryption_method_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1426 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
1427 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1428 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1429 return FSDP_ENCRYPTION_METHOD_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1430 return dsc->k_encryption_method;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1433 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1434 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
1435 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1436 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
1437 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1438 return dsc->k_encryption_content;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1441 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1442 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
1443 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1444 /*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
1445 avoiding this slow switch */
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1446 char *result;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1447
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1448 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1449 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1450
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1451 switch (att)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1452 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1453 case FSDP_SESSION_STR_ATT_CATEGORY:
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1454 result = dsc->a_category;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1455 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1456 case FSDP_SESSION_STR_ATT_KEYWORDS:
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1457 result = dsc->a_keywords;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1458 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1459 case FSDP_SESSION_STR_ATT_TOOL:
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1460 result = dsc->a_tool;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1461 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1462 case FSDP_SESSION_STR_ATT_CHARSET:
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1463 result = dsc->a_charset;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1464 break;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1465 default:
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1466 result = NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1467 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1468 return result;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1471 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1472 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
1473 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1474 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1475 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1476 return dsc->a_sdplangs_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1479 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1480 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
1481 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1482 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
1483 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1484 return dsc->a_sdplangs[index];
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1487 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1488 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
1489 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1490 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1491 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1492 return dsc->a_controls_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1495 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1496 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
1497 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1498 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
1499 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1500 return dsc->a_controls[index];
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1503 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1504 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
1505 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1506 return dsc->a_range;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1509 fsdp_sendrecv_mode_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1510 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
1511 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1512 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1513 return FSDP_SENDRECV_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1514 return dsc->a_sendrecv_mode;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1517 fsdp_session_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1518 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
1519 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1520 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1521 return FSDP_SESSION_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1522 return dsc->a_type;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1525 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1526 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
1527 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1528 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1529 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1530 return dsc->media_announcements_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1533 const fsdp_media_description_t *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1534 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
1535 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1536 if ((index >= dsc->media_announcements_count))
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1537 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1538 return dsc->media_announcements[index];
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1541 fsdp_media_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1542 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
1543 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1544 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1545 return FSDP_MEDIA_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1546 return dsc->media_type;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1549 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1550 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
1551 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1552 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1553 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1554 return dsc->port;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1557 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1558 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
1559 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1560 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1561 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1562 return dsc->port_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1565 fsdp_transport_protocol_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1566 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
1567 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1568 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1569 return FSDP_TP_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1570 return dsc->transport;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1573 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1574 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
1575 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1576 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1577 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1578 return dsc->formats_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1581 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1582 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
1583 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1584 {
28884
304ee75ca7ae The first valid index is total count - 1 (usually 0)
ben
parents: 28319
diff changeset
1585 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
1586 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1587 return dsc->formats[index];
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1590 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1591 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
1592 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1593 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1594 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1595 return dsc->i_title;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1598 fsdp_network_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1599 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
1600 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1601 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1602 return FSDP_NETWORK_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1603 return dsc->c_network_type;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1606 fsdp_address_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1607 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
1608 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1609 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1610 return FSDP_ADDRESS_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1611 return dsc->c_address_type;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1614 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1615 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
1616 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1617 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1618 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1619 return dsc->c_address.address;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1622 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1623 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
1624 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1625 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1626 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1627 return mdsc->c_address.address_ttl;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1630 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1631 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
1632 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1633 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1634 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1635 return mdsc->c_address.address_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1638 fsdp_bw_modifier_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1639 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
1640 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1641 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1642 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
1643 return FSDP_BW_MOD_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1644 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
1645 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1646
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1647 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1648 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
1649 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1650 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1651 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
1652 (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
1653 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1654 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
1655 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1656
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1657 unsigned long int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1658 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
1659 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1660 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1661 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
1662 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1663 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
1664 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1665
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1666 fsdp_encryption_method_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1667 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
1668 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1669 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1670 return FSDP_ENCRYPTION_METHOD_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1671 return dsc->k_encryption_method;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1674 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1675 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
1676 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1677 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1678 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1679 return dsc->k_encryption_content;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1682 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1683 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
1684 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1685 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1686 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1687 return dsc->a_ptime;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1690 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1691 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
1692 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1693 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1694 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1695 return dsc->a_maxptime;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1698 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1699 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
1700 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1701 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1702 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1703 return mdsc->a_rtpmaps_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1706 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1707 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
1708 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1709 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1710 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
1711 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1712 return mdsc->a_rtpmaps[index]->pt;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1715 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1716 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
1717 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1718 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1719 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
1720 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1721 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
1722 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1723
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1724 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1725 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
1726 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1727 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1728 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
1729 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1730 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
1731 }
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1732
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1733 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1734 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
1735 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1736 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1737 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
1738 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1739 return mdsc->a_rtpmaps[index]->parameters;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1742 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1743 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
1744 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1745 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1746 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1747 return mdsc->a_sdplangs_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1750 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1751 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
1752 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1753 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1754 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
1755 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1756 return mdsc->a_sdplangs[index];
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1759 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1760 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
1761 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1762 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1763 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1764 return mdsc->a_langs_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1767 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1768 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
1769 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1770 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1771 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
1772 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1773 return mdsc->a_langs[index];
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1776 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1777 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
1778 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1779 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1780 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1781 return mdsc->a_controls_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1784 char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1785 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
1786 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1787 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1788 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
1789 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1790 return mdsc->a_controls[index];
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1793 char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1794 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
1795 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1796 return mdsc->a_range;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1799 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1800 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
1801 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1802 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1803 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1804 return mdsc->a_fmtps_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1807 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1808 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
1809 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1810 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1811 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
1812 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1813 return mdsc->a_fmtps[index];
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1816 fsdp_orient_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1817 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
1818 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1819 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1820 return FSDP_ORIENT_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1821 return dsc->a_orient;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1824 fsdp_sendrecv_mode_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1825 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
1826 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1827 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1828 return FSDP_SENDRECV_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1829 return dsc->a_sendrecv_mode;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1832 float
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1833 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
1834 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1835 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1836 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1837 return dsc->a_framerate;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1840 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1841 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
1842 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1843 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1844 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1845 return dsc->a_quality;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1848 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1849 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
1850 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1851 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1852 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1853 return dsc->a_rtcp_port;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1856 fsdp_network_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1857 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
1858 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1859 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1860 return FSDP_NETWORK_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1861 return dsc->a_rtcp_network_type;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1864 fsdp_address_type_t
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1865 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
1866 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1867 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1868 return FSDP_ADDRESS_TYPE_UNDEFINED;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1869 return dsc->a_rtcp_address_type;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1872 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1873 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
1874 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1875 if (!dsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1876 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1877 return dsc->a_rtcp_address;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1880 unsigned int
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1881 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
1882 * mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1883 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1884 if (!mdsc)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1885 return 0;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1886 return mdsc->unidentified_attributes_count;
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
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1889 const char *
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1890 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
1891 unsigned int index)
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1892 {
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1893 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
1894 return NULL;
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1895 return mdsc->unidentified_attributes[index];
ef667dd373e2 new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff changeset
1896 }