Mercurial > mplayer.hg
annotate stream/freesdp/parser.c @ 27847:28deb37052cd
Add a noicyx:// protocol to allow easier testing for misconfigured servers.
author | reimar |
---|---|
date | Sun, 02 Nov 2008 17:15:14 +0000 |
parents | 85f669a84e7a |
children | 0c7a9144e5f0 |
rev | line source |
---|---|
18823
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1 /* |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
2 This file is part of FreeSDP |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
3 Copyright (C) 2001,2002,2003 Federico Montesino Pouzols <fedemp@altern.org> |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
4 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
5 FreeSDP is free software; you can redistribute it and/or modify it |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
6 under the terms of the GNU General Public License as published by |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
7 the Free Software Foundation; either version 2 of the License, or |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
8 (at your option) any later version. |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
9 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
10 This program is distributed in the hope that it will be useful, |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
13 GNU General Public License for more details. |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
14 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
15 You should have received a copy of the GNU General Public License |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
16 along with this program; if not, write to the Free Software |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
18 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
19 Benjamin Zores, (C) 2006 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
20 added support in parser for the a=control: lines. |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
21 added support in parser for the a=range: lines. |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
22 */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
23 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
24 /** |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
25 * @file 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] */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
383 /* k=<method> |
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 | 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 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
474 if (dsc->a_range) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
475 free (dsc->a_range); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
476 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
|
477 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
478 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
479 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
480 /* 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
|
481 *longfsdp_buf = '\0'; |
22189 | 482 strncat (longfsdp_buf, fsdp_buf[0], MAXLONGFIELDLEN-1); |
483 strncat (longfsdp_buf, ":", MAXLONGFIELDLEN-strlen(longfsdp_buf)-1); | |
484 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
|
485 if (NULL == dsc->unidentified_attributes) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
486 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
487 dsc->unidentified_attributes_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
488 dsc->unidentified_attributes = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
489 calloc (UNIDENTIFIED_ATTRIBUTES_MAX_COUNT, |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
490 sizeof (char *)); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
491 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
492 if (dsc->unidentified_attributes_count < |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
493 UNIDENTIFIED_ATTRIBUTES_MAX_COUNT) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
494 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
495 dsc->unidentified_attributes |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
496 [dsc->unidentified_attributes_count] = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
497 strdup (longfsdp_buf); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
498 dsc->unidentified_attributes_count++; |
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 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
501 NEXT_LINE (p); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
502 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
503 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
|
504 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
505 /* session-level property attributes */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
506 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
|
507 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
|
508 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
|
509 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
|
510 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
|
511 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
|
512 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
|
513 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
|
514 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
515 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
516 /* 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
|
517 *longfsdp_buf = '\0'; |
22189 | 518 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
|
519 if (NULL == dsc->unidentified_attributes) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
520 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
521 dsc->unidentified_attributes_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
522 dsc->unidentified_attributes = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
523 calloc (UNIDENTIFIED_ATTRIBUTES_MAX_COUNT, |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
524 sizeof (char *)); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
525 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
526 if (dsc->unidentified_attributes_count < |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
527 UNIDENTIFIED_ATTRIBUTES_MAX_COUNT) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
528 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
529 dsc->unidentified_attributes |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
530 [dsc->unidentified_attributes_count] = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
531 strdup (longfsdp_buf); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
532 dsc->unidentified_attributes_count++; |
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 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
535 NEXT_LINE (p); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
536 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
537 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
538 return FSDPE_INVALID_ATTRIBUTE; |
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 /***************************************************************************/ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
542 /* B) parse media-level descriptions */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
543 /***************************************************************************/ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
544 p2 = p; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
545 j = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
546 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
|
547 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
548 char c; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
549 j++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
550 NEXT_LINE (p2); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
551 while (sscanf (p2, "%c=", &c) == 1) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
552 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
553 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
|
554 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
555 NEXT_LINE (p2); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
556 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
557 else if (c == 'm') |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
558 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
559 break; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
560 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
561 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
562 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
563 return FSDPE_INVALID_LINE; |
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 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
567 dsc->media_announcements_count = j; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
568 if (dsc->media_announcements_count == 0) |
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 ; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
571 /*return FSDPE_MISSING_MEDIA; */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
572 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
573 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
574 { /* dsc->media_announcements_count > 0 */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
575 dsc->media_announcements = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
576 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
|
577 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
|
578 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
579 fsdp_media_announcement_t *media = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
580 /* `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
|
581 /* m=<media> <port> <transport> <fmt list> */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
582 /* 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
|
583 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
|
584 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
|
585 longfsdp_buf) != 4) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
586 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
587 return FSDPE_INVALID_MEDIA; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
588 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
589 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
590 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
591 dsc->media_announcements[j] = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
592 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
|
593 media = dsc->media_announcements[j]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
594 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
|
595 media->media_type = FSDP_MEDIA_AUDIO; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
596 else if (!strncmp (fsdp_buf[0], "video", 5)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
597 media->media_type = FSDP_MEDIA_VIDEO; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
598 else if (!strncmp (fsdp_buf[0], "application", 11)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
599 media->media_type = FSDP_MEDIA_APPLICATION; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
600 else if (!strncmp (fsdp_buf[0], "data", 4)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
601 media->media_type = FSDP_MEDIA_DATA; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
602 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
|
603 media->media_type = FSDP_MEDIA_CONTROL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
604 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
605 return FSDPE_UNKNOWN_MEDIA_TYPE; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
606 { /* 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
|
607 char *slash; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
608 if ((slash = strchr (fsdp_buf[1], '/'))) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
609 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
610 *slash = '\0'; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
611 slash++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
612 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
|
613 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
|
614 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
615 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
616 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
617 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
|
618 media->port_count = 0; |
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 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
621 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
|
622 media->transport = FSDP_TP_RTP_AVP; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
623 else if (!strncmp (fsdp_buf[2], "udp", 3)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
624 media->transport = FSDP_TP_UDP; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
625 else if (!strncmp (fsdp_buf[2], "TCP", 3)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
626 media->transport = FSDP_TP_TCP; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
627 else if (!strncmp (fsdp_buf[2], "UDPTL", 5)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
628 media->transport = FSDP_TP_UDPTL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
629 else if (!strncmp (fsdp_buf[2], "vat", 3)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
630 media->transport = FSDP_TP_VAT; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
631 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
|
632 media->transport = FSDP_TP_OLD_RTP; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
633 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
634 return FSDPE_UNKNOWN_MEDIA_TRANSPORT; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
635 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
636 unsigned int k = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
637 char *s = longfsdp_buf; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
638 while (NULL != (s = strchr (s, ' '))) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
639 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
640 k++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
641 if (NULL != s) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
642 s++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
643 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
644 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
|
645 media->formats_count = k; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
646 media->formats = calloc (k, sizeof (char *)); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
647 s = longfsdp_buf; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
648 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
|
649 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
650 char *space = strchr (s, ' '); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
651 if (NULL != space) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
652 *space = '\0'; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
653 media->formats[k] = strdup (s); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
654 s = space + 1; |
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 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
657 NEXT_LINE (p); |
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 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
660 /* `i=' line (media title) [optional] */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
661 /* i=<media title> */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
662 if (!strncmp (p, "i=", 2) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
663 && 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
|
664 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
665 media->i_title = strdup (longfsdp_buf); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
666 NEXT_LINE (p); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
667 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
668 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
669 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
670 /* (optional) information absent */ |
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 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
673 /* `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
|
674 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
|
675 /* 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
|
676 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
|
677 &(media->c_address_type), |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
678 &(media->c_address)); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
679 if (result != FSDPE_OK) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
680 return result; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
681 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
682 /* `b=' lines (bandwidth information) [optional] */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
683 /* b=<modifier>:<bandwidth-value> */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
684 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
|
685 &(media->bw_modifiers_count)); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
686 if (FSDPE_OK != result) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
687 return result; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
688 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
689 /* `k=' line (encryption key) [optional] */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
690 /* k=<method> |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
691 k=<method>:<encryption key> */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
692 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
|
693 &(media->k_encryption_content)); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
694 if (result != FSDPE_OK) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
695 return result; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
696 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
697 /* B.1) Attributes */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
698 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
699 /* `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
|
700 /* a=<attribute> |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
701 a=<attribute>:<value> */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
702 while (!strncmp (p, "a=", 2)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
703 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
704 if (sscanf |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
705 (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
|
706 longfsdp_buf) == 2) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
707 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
708 /* media-level value attributes */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
709 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
|
710 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
|
711 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
|
712 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
|
713 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
|
714 fsdp_parse_rtpmap (&(media->a_rtpmaps), |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
715 &(media->a_rtpmaps_count), |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
716 longfsdp_buf); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
717 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
|
718 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
719 if (!strncmp (longfsdp_buf, "portrait", 8)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
720 media->a_orient = FSDP_ORIENT_PORTRAIT; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
721 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
|
722 media->a_orient = FSDP_ORIENT_LANDSCAPE; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
723 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
|
724 media->a_orient = FSDP_ORIENT_SEASCAPE; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
725 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
726 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
|
727 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
728 if (NULL == dsc->a_sdplangs) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
729 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
730 media->a_sdplangs_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
731 media->a_sdplangs = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
732 calloc (SDPLANGS_MAX_COUNT, sizeof (char *)); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
733 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
734 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
|
735 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
736 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
|
737 strdup (longfsdp_buf); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
738 media->a_sdplangs_count++; |
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 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
741 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
|
742 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
743 if (NULL == dsc->a_langs) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
744 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
745 media->a_langs_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
746 media->a_langs = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
747 calloc (SDPLANGS_MAX_COUNT, sizeof (char *)); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
748 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
749 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
|
750 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
751 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
|
752 strdup (longfsdp_buf); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
753 media->a_langs_count++; |
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 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
756 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
|
757 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
758 if (NULL == media->a_controls) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
759 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
760 media->a_controls_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
761 media->a_controls = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
762 calloc (SDPCONTROLS_MAX_COUNT, sizeof (char *)); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
763 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
764 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
|
765 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
766 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
|
767 strdup (longfsdp_buf); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
768 media->a_controls_count++; |
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 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
771 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
|
772 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
773 if (media->a_range) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
774 free (media->a_range); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
775 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
|
776 } |
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], "framerate", 9)) |
19202
af9b014311a5
The C99 function strtof is unavailable in some BSD variants.
diego
parents:
18823
diff
changeset
|
778 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
|
779 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
|
780 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
781 if (NULL == media->a_fmtps) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
782 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
783 media->a_fmtps_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
784 media->a_fmtps = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
785 calloc (SDPLANGS_MAX_COUNT, sizeof (char *)); |
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 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
|
788 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
789 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
|
790 strdup (longfsdp_buf); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
791 media->a_fmtps_count++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
792 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
793 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
794 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
|
795 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
796 int opts = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
797 /* 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
|
798 opts = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
799 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
|
800 &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
|
801 fsdp_buf[2]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
802 if (opts >= 1) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
803 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
804 media->a_rtcp_port = wuint[0]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
805 if (opts >= 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 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
|
808 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
809 media->a_rtcp_network_type = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
810 FSDP_NETWORK_TYPE_INET; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
811 } /* else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
812 ; TODO: define error code? */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
813 if (opts >= 3) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
814 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
815 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
|
816 media->a_rtcp_address_type = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
817 FSDP_ADDRESS_TYPE_IPV4; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
818 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
|
819 media->a_rtcp_address_type = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
820 FSDP_ADDRESS_TYPE_IPV6; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
821 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
822 return FSDPE_INVALID_CONNECTION_NETTYPE; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
823 /*add specific code? */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
824 if (opts >= 4) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
825 media->a_rtcp_address = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
826 strdup (fsdp_buf[2]); |
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 } |
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 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
832 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
833 /* 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
|
834 *fsdp_buf[1] = '\0'; |
22188 | 835 strncat (fsdp_buf[1], fsdp_buf[0], MAXSHORTFIELDLEN-1); |
836 strncat (fsdp_buf[1], ":", MAXSHORTFIELDLEN-strlen(fsdp_buf[1])-1); | |
837 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
|
838 if (NULL == media->unidentified_attributes) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
839 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
840 media->unidentified_attributes_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
841 media->unidentified_attributes = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
842 calloc (UNIDENTIFIED_ATTRIBUTES_MAX_COUNT, |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
843 sizeof (char *)); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
844 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
845 if (media->unidentified_attributes_count < |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
846 UNIDENTIFIED_ATTRIBUTES_MAX_COUNT) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
847 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
848 media->unidentified_attributes |
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 strdup (fsdp_buf[1]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
851 media->unidentified_attributes_count++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
852 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
853 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
854 NEXT_LINE (p); |
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 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
|
857 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
858 /* media-level property attributes */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
859 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
|
860 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
|
861 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
|
862 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
|
863 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
|
864 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
|
865 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
|
866 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
|
867 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
868 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
869 /* 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
|
870 *longfsdp_buf = '\0'; |
22189 | 871 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
|
872 if (NULL == media->unidentified_attributes) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
873 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
874 media->unidentified_attributes_count = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
875 media->unidentified_attributes = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
876 calloc (UNIDENTIFIED_ATTRIBUTES_MAX_COUNT, |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
877 sizeof (char *)); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
878 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
879 if (media->unidentified_attributes_count < |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
880 UNIDENTIFIED_ATTRIBUTES_MAX_COUNT) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
881 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
882 media->unidentified_attributes |
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 strdup (longfsdp_buf); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
885 media->unidentified_attributes_count++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
886 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
887 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
888 NEXT_LINE (p); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
889 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
890 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
891 return FSDPE_INVALID_ATTRIBUTE; |
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 } /* end of for */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
894 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
895 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
896 /* 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
|
897 all media */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
898 if (NULL == dsc->c_address.address) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
899 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
900 unsigned int c; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
901 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
|
902 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
|
903 return FSDPE_MISSING_CONNECTION_INFO; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
904 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
905 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
906 /* finish */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
907 if (*p == '\0') |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
908 return FSDPE_OK; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
909 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
910 return FSDPE_OVERFILLED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
911 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
912 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
913 static fsdp_error_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
914 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
|
915 fsdp_address_type_t * atype, |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
916 fsdp_connection_address_t * address) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
917 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
918 const unsigned int TEMPCHARS = 3; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
919 char fsdp_buf[TEMPCHARS][MAXSHORTFIELDLEN]; |
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 (!strncmp (*p, "c=", 2)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
922 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
923 if (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
|
924 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
|
925 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
926 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
|
927 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
928 *ntype = FSDP_NETWORK_TYPE_INET; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
929 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
|
930 *atype = FSDP_ADDRESS_TYPE_IPV4; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
931 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
|
932 *atype = FSDP_ADDRESS_TYPE_IPV6; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
933 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
934 return FSDPE_INVALID_CONNECTION_NETTYPE; |
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 else |
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 return FSDPE_INVALID_CONNECTION_ADDRTYPE; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
939 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
940 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
941 char *slash = strchr (fsdp_buf[2], '/'); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
942 if (NULL == slash) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
943 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
944 address->address = strdup (fsdp_buf[2]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
945 address->address_ttl = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
946 address->address_count = 0; |
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 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
949 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
950 /* address is IP4 multicast */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
951 char *slash2; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
952 *slash = '\0'; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
953 slash++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
954 address->address = strdup (fsdp_buf[2]); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
955 slash2 = strchr (slash + 1, '/'); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
956 if (NULL == slash2) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
957 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
958 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
|
959 address->address_count = 0; |
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 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
962 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
963 *slash2 = '\0'; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
964 slash2++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
965 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
|
966 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
|
967 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
968 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
969 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
970 NEXT_LINE (*p); |
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 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
973 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
974 return FSDPE_INVALID_CONNECTION; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
975 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
976 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
977 return FSDPE_OK; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
978 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
979 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
980 static fsdp_error_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
981 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
|
982 unsigned int *bw_modifiers_count) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
983 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
984 char fsdp_buf[MAXSHORTFIELDLEN]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
985 unsigned long int wuint; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
986 unsigned int i = 0; |
21503 | 987 const char *lp = *p; |
18823
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
988 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
989 /* count b= lines */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
990 while (!strncmp (lp, "b=", 2)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
991 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
992 NEXT_LINE (lp); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
993 i++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
994 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
995 *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
|
996 *bw_modifiers_count = i; |
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 while (i > 0) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
999 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1000 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
|
1001 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
|
1002 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1003 if (!strncmp (fsdp_buf, "CT", 2)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1004 (*bw_modifiers)[index].b_mod_type = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1005 FSDP_BW_MOD_TYPE_CONFERENCE_TOTAL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1006 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
|
1007 (*bw_modifiers)[index].b_mod_type = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1008 FSDP_BW_MOD_TYPE_APPLICATION_SPECIFIC; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1009 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
|
1010 (*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
|
1011 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
|
1012 (*bw_modifiers)[index].b_mod_type = |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1013 FSDP_BW_MOD_TYPE_RTCP_RECEIVERS; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1014 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1015 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1016 (*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
|
1017 (*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
|
1018 (char *) strdup (fsdp_buf); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1019 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1020 (*bw_modifiers)[index].b_value = wuint; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1021 NEXT_LINE (*p); |
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 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1024 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1025 *bw_modifiers_count -= i; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1026 return FSDPE_INVALID_BANDWIDTH; |
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 i--; |
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 return FSDPE_OK; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1031 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1032 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1033 static fsdp_error_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1034 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
|
1035 char **content) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1036 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1037 char fsdp_buf[MAXSHORTFIELDLEN]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1038 char longfsdp_buf[MAXLONGFIELDLEN]; |
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 (!strncmp (*p, "k=", 2)) |
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 if (sscanf (*p, "k=prompt")) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1043 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1044 *method = FSDP_ENCRYPTION_METHOD_PROMPT; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1045 *content = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1046 NEXT_LINE (*p); |
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 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1049 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1050 if (sscanf |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1051 (*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
|
1052 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1053 if (!strncmp (fsdp_buf, "clear", 5)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1054 *method = FSDP_ENCRYPTION_METHOD_CLEAR; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1055 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
|
1056 *method = FSDP_ENCRYPTION_METHOD_BASE64; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1057 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
|
1058 *method = FSDP_ENCRYPTION_METHOD_URI; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1059 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1060 return FSDPE_INVALID_ENCRYPTION_METHOD; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1061 *content = strdup (longfsdp_buf); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1062 NEXT_LINE (*p); |
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 } |
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 return FSDPE_OK; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1067 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1068 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1069 static fsdp_error_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1070 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
|
1071 const char *value) |
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 fsdp_error_t result = FSDPE_OK; |
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 if (0 == *counter) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1076 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1077 *counter = 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1078 *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
|
1079 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1080 if (*counter < MEDIA_RTPMAPS_MAX_COUNT) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1081 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1082 unsigned int c = *counter; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1083 fsdp_rtpmap_t **map = *rtpmap; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1084 char fsdp_buf[MAXSHORTFIELDLEN]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1085 char longfsdp_buf[MAXLONGFIELDLEN]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1086 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
|
1087 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1088 /* 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
|
1089 parameters]> */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1090 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
|
1091 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1092 char *slash1; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1093 map[c]->pt = strdup (fsdp_buf); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1094 /* 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
|
1095 slash1 = strchr (longfsdp_buf, '/'); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1096 if (NULL == slash1) |
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 result = FSDPE_INVALID_ATTRIBUTE_RTPMAP; |
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 else |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1101 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1102 char *slash2; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1103 *slash1 = '\0'; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1104 slash1++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1105 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
|
1106 slash2 = strchr (slash1, '/'); |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1107 if (NULL != slash2) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1108 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1109 *slash2 = '\0'; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1110 slash2++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1111 map[c]->parameters = strdup (slash2); |
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 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
|
1114 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1115 (*counter)++; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1116 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1117 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1118 return result; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1119 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1120 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1121 static fsdp_error_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1122 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
|
1123 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1124 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
|
1125 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
|
1126 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
|
1127 char c; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1128 unsigned long int wuint; |
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 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
|
1131 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1132 /* time with unit specification character */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1133 switch (c) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1134 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1135 case 'd': |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1136 *seconds = wuint * SECONDS_PER_DAY; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1137 break; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1138 case 'h': |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1139 *seconds = wuint * SECONDS_PER_HOUR; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1140 break; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1141 case 'm': |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1142 *seconds = wuint * SECONDS_PER_MINUTE; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1143 break; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1144 case 's': |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1145 *seconds = wuint; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1146 break; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1147 default: |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1148 return FSDPE_INVALID_REPEAT; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1149 break; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1150 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1151 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1152 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
|
1153 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1154 /* time without unit specification character */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1155 *seconds = wuint; |
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 else |
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_INVALID_REPEAT; |
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 return FSDPE_OK; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1162 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1163 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1164 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1165 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
|
1166 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1167 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1168 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1169 return dsc->version; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1170 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1171 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1172 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1173 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
|
1174 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1175 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1176 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1177 return dsc->o_username; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1178 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1179 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1180 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1181 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
|
1182 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1183 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1184 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1185 return dsc->o_session_id; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1186 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1187 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1188 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1189 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
|
1190 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1191 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1192 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1193 return dsc->o_announcement_version; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1194 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1195 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1196 fsdp_network_type_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1197 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
|
1198 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1199 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1200 return FSDP_NETWORK_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1201 return dsc->o_network_type; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1202 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1203 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1204 fsdp_address_type_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1205 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
|
1206 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1207 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1208 return FSDP_ADDRESS_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1209 return dsc->o_address_type; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1210 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1211 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1212 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1213 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
|
1214 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1215 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1216 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1217 return dsc->o_address; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1218 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1219 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1220 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1221 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
|
1222 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1223 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1224 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1225 return dsc->s_name; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1226 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1227 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1228 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1229 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
|
1230 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1231 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1232 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1233 return dsc->i_information; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1234 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1235 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1236 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1237 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
|
1238 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1239 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1240 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1241 return dsc->u_uri; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1242 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1243 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1244 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1245 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
|
1246 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1247 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1248 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1249 return dsc->emails_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1250 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1251 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1252 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1253 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
|
1254 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1255 if ((!dsc) || (index >= dsc->emails_count)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1256 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1257 return dsc->emails[index]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1258 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1259 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1260 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1261 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
|
1262 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1263 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1264 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1265 return dsc->phones_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1266 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1267 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1268 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1269 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
|
1270 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1271 if ((!dsc) || (index >= dsc->phones_count)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1272 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1273 return dsc->phones[index]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1274 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1275 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1276 fsdp_network_type_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1277 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
|
1278 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1279 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1280 return FSDP_NETWORK_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1281 return dsc->c_network_type; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1282 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1283 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1284 fsdp_address_type_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1285 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
|
1286 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1287 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1288 return FSDP_ADDRESS_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1289 return dsc->c_address_type; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1290 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1291 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1292 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1293 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
|
1294 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1295 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1296 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1297 return dsc->c_address.address; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1298 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1299 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1300 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1301 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
|
1302 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1303 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1304 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1305 return dsc->c_address.address_ttl; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1306 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1307 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1308 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1309 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
|
1310 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1311 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1312 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1313 return dsc->c_address.address_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1314 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1315 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1316 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1317 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
|
1318 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1319 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1320 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1321 return dsc->bw_modifiers_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1322 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1323 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1324 fsdp_bw_modifier_type_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1325 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
|
1326 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1327 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
|
1328 return FSDP_BW_MOD_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1329 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
|
1330 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1331 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1332 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1333 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
|
1334 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1335 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1336 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
|
1337 (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
|
1338 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1339 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
|
1340 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1341 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1342 unsigned long int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1343 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
|
1344 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1345 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
|
1346 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1347 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
|
1348 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1349 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1350 time_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1351 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
|
1352 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1353 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
|
1354 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1355 return dsc->time_periods[index]->start; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1356 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1357 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1358 time_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1359 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
|
1360 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1361 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
|
1362 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1363 return dsc->time_periods[index]->stop; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1364 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1365 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1366 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1367 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
|
1368 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1369 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1370 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
|
1371 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1372 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
|
1373 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1374 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1375 unsigned long int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1376 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
|
1377 unsigned int index, unsigned int rindex) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1378 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1379 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
|
1380 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1381 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
|
1382 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1383 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1384 unsigned long int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1385 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
|
1386 unsigned int index, unsigned int rindex) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1387 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1388 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
|
1389 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1390 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
|
1391 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1392 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1393 const unsigned long int * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1394 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
|
1395 unsigned int index, unsigned int rindex) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1396 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1397 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
|
1398 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1399 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
|
1400 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1401 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1402 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1403 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
|
1404 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1405 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1406 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1407 return dsc->timezone_adj; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1408 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1409 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1410 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1411 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
|
1412 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1413 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1414 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1415 return dsc->unidentified_attributes_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1416 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1417 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1418 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1419 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
|
1420 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1421 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1422 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
|
1423 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1424 return dsc->unidentified_attributes[index]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1425 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1426 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1427 fsdp_encryption_method_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1428 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
|
1429 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1430 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1431 return FSDP_ENCRYPTION_METHOD_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1432 return dsc->k_encryption_method; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1433 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1434 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1435 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1436 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
|
1437 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1438 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
|
1439 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1440 return dsc->k_encryption_content; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1441 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1442 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1443 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1444 fsdp_get_rtpmap_count (const fsdp_description_t * dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1445 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1446 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1447 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1448 return dsc->a_rtpmaps_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1449 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1450 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1451 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1452 fsdp_get_rtpmap_payload_type (const fsdp_description_t * dsc, |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1453 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1454 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1455 if ((!dsc) || (index >= dsc->a_rtpmaps_count)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1456 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1457 return dsc->a_rtpmaps[index]->pt; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1458 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1459 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1460 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1461 fsdp_get_rtpmap_encoding_name (const fsdp_description_t * dsc, |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1462 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1463 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1464 if ((!dsc) || (index >= dsc->a_rtpmaps_count)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1465 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1466 return dsc->a_rtpmaps[index]->encoding_name; |
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 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1469 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1470 fsdp_get_rtpmap_clock_rate (const fsdp_description_t * dsc, |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1471 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1472 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1473 if ((!dsc) || (index >= dsc->a_rtpmaps_count)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1474 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1475 return dsc->a_rtpmaps[index]->clock_rate; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1476 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1477 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1478 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1479 fsdp_get_rtpmap_encoding_parameters (const fsdp_description_t * dsc, |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1480 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_rtpmaps_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_rtpmaps[index]->parameters; |
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 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1488 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
|
1489 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1490 /*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
|
1491 avoiding this slow switch */ |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1492 char *result; |
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 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1495 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1496 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1497 switch (att) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1498 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1499 case FSDP_SESSION_STR_ATT_CATEGORY: |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1500 result = dsc->a_category; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1501 break; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1502 case FSDP_SESSION_STR_ATT_KEYWORDS: |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1503 result = dsc->a_keywords; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1504 break; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1505 case FSDP_SESSION_STR_ATT_TOOL: |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1506 result = dsc->a_tool; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1507 break; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1508 case FSDP_SESSION_STR_ATT_CHARSET: |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1509 result = dsc->a_charset; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1510 break; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1511 default: |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1512 result = NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1513 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1514 return result; |
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 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1518 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
|
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 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1522 return dsc->a_sdplangs_count; |
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 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1526 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
|
1527 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1528 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
|
1529 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1530 return dsc->a_sdplangs[index]; |
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 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1534 fsdp_get_lang_count (const fsdp_description_t * dsc) |
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 (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1537 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1538 return dsc->a_langs_count; |
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 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1542 fsdp_get_lang (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
|
1543 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1544 if ((!dsc) || (index >= dsc->a_langs_count)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1545 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1546 return dsc->a_langs[index]; |
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_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
|
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->a_controls_count; |
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 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1558 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
|
1559 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1560 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
|
1561 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1562 return dsc->a_controls[index]; |
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 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1566 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
|
1567 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1568 return dsc->a_range; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1569 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1570 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1571 fsdp_sendrecv_mode_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1572 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
|
1573 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1574 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1575 return FSDP_SENDRECV_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1576 return dsc->a_sendrecv_mode; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1577 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1578 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1579 fsdp_session_type_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1580 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
|
1581 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1582 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1583 return FSDP_SESSION_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1584 return dsc->a_type; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1585 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1586 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1587 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1588 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
|
1589 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1590 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1591 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1592 return dsc->media_announcements_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1593 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1594 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1595 const fsdp_media_description_t * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1596 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
|
1597 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1598 if ((index >= dsc->media_announcements_count)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1599 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1600 return dsc->media_announcements[index]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1601 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1602 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1603 fsdp_media_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1604 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
|
1605 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1606 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1607 return FSDP_MEDIA_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1608 return dsc->media_type; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1609 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1610 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1611 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1612 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
|
1613 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1614 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1615 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1616 return dsc->port; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1617 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1618 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1619 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1620 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
|
1621 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1622 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1623 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1624 return dsc->port_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1625 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1626 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1627 fsdp_transport_protocol_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1628 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
|
1629 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1630 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1631 return FSDP_TP_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1632 return dsc->transport; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1633 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1634 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1635 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1636 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
|
1637 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1638 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1639 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1640 return dsc->formats_count; |
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 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1643 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1644 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
|
1645 unsigned int index) |
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 if (!dsc && (index < dsc->formats_count)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1648 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1649 return dsc->formats[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 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1652 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1653 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
|
1654 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1655 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1656 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1657 return dsc->i_title; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1658 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1659 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1660 fsdp_network_type_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1661 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
|
1662 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1663 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1664 return FSDP_NETWORK_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1665 return dsc->c_network_type; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1666 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1667 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1668 fsdp_address_type_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1669 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
|
1670 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1671 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1672 return FSDP_ADDRESS_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1673 return dsc->c_address_type; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1674 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1675 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1676 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1677 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
|
1678 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1679 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1680 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1681 return dsc->c_address.address; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1682 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1683 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1684 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1685 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
|
1686 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1687 if (!mdsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1688 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1689 return mdsc->c_address.address_ttl; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1690 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1691 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1692 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1693 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
|
1694 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1695 if (!mdsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1696 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1697 return mdsc->c_address.address_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1698 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1699 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1700 fsdp_bw_modifier_type_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1701 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
|
1702 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1703 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1704 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
|
1705 return FSDP_BW_MOD_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1706 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
|
1707 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1708 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1709 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1710 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
|
1711 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1712 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1713 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
|
1714 (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
|
1715 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1716 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
|
1717 } |
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 unsigned long int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1720 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
|
1721 unsigned int index) |
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 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
|
1724 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1725 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
|
1726 } |
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 fsdp_encryption_method_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1729 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
|
1730 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1731 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1732 return FSDP_ENCRYPTION_METHOD_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1733 return dsc->k_encryption_method; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1734 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1735 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1736 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1737 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
|
1738 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1739 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1740 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1741 return dsc->k_encryption_content; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1742 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1743 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1744 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1745 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
|
1746 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1747 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1748 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1749 return dsc->a_ptime; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1750 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1751 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1752 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1753 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
|
1754 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1755 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1756 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1757 return dsc->a_maxptime; |
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 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1760 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1761 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
|
1762 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1763 if (!mdsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1764 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1765 return mdsc->a_rtpmaps_count; |
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 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1768 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1769 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
|
1770 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1771 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1772 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
|
1773 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1774 return mdsc->a_rtpmaps[index]->pt; |
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 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1777 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1778 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
|
1779 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1780 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1781 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
|
1782 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1783 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
|
1784 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1785 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1786 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1787 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
|
1788 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1789 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1790 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
|
1791 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1792 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
|
1793 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1794 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1795 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1796 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
|
1797 unsigned int index) |
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 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
|
1800 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1801 return mdsc->a_rtpmaps[index]->parameters; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1802 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1803 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1804 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1805 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
|
1806 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1807 if (!mdsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1808 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1809 return mdsc->a_sdplangs_count; |
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 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1812 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1813 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
|
1814 unsigned int index) |
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 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
|
1817 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1818 return mdsc->a_sdplangs[index]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1819 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1820 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1821 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1822 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
|
1823 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1824 if (!mdsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1825 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1826 return mdsc->a_langs_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1827 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1828 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1829 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1830 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
|
1831 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1832 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1833 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
|
1834 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1835 return mdsc->a_langs[index]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1836 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1837 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1838 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1839 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
|
1840 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1841 if (!mdsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1842 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1843 return mdsc->a_controls_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1844 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1845 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1846 char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1847 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
|
1848 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1849 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1850 if (!mdsc || (index >= mdsc->a_controls_count)) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1851 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1852 return mdsc->a_controls[index]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1853 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1854 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1855 char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1856 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
|
1857 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1858 return mdsc->a_range; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1859 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1860 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1861 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1862 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
|
1863 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1864 if (!mdsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1865 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1866 return mdsc->a_fmtps_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1867 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1868 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1869 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1870 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
|
1871 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1872 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1873 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
|
1874 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1875 return mdsc->a_fmtps[index]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1876 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1877 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1878 fsdp_orient_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1879 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
|
1880 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1881 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1882 return FSDP_ORIENT_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1883 return dsc->a_orient; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1884 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1885 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1886 fsdp_sendrecv_mode_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1887 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
|
1888 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1889 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1890 return FSDP_SENDRECV_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1891 return dsc->a_sendrecv_mode; |
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 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1894 float |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1895 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
|
1896 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1897 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1898 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1899 return dsc->a_framerate; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1900 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1901 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1902 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1903 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
|
1904 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1905 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1906 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1907 return dsc->a_quality; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1908 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1909 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1910 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1911 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
|
1912 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1913 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1914 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1915 return dsc->a_rtcp_port; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1916 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1917 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1918 fsdp_network_type_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1919 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
|
1920 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1921 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1922 return FSDP_NETWORK_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1923 return dsc->a_rtcp_network_type; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1924 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1925 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1926 fsdp_address_type_t |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1927 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
|
1928 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1929 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1930 return FSDP_ADDRESS_TYPE_UNDEFINED; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1931 return dsc->a_rtcp_address_type; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1932 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1933 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1934 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1935 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
|
1936 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1937 if (!dsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1938 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1939 return dsc->a_rtcp_address; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1940 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1941 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1942 unsigned int |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1943 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
|
1944 * mdsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1945 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1946 if (!mdsc) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1947 return 0; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1948 return mdsc->unidentified_attributes_count; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1949 } |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1950 |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1951 const char * |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1952 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
|
1953 unsigned int index) |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1954 { |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1955 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
|
1956 return NULL; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1957 return mdsc->unidentified_attributes[index]; |
ef667dd373e2
new imported library in libmpdemux: freesdp (will be used by native rtsp demuxer)
ben
parents:
diff
changeset
|
1958 } |