Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
792ed4d6
Commit
792ed4d6
authored
Feb 12, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix SAP TCP/RTP support
parent
6413b119
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
14 deletions
+36
-14
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+36
-14
No files found.
modules/services_discovery/sap.c
View file @
792ed4d6
...
...
@@ -182,7 +182,7 @@ struct sdp_media_t
/* The structure that contains sdp information */
struct
sdp_t
{
char
*
psz_sdp
;
c
onst
c
har
*
psz_sdp
;
/* o field */
char
username
[
64
];
...
...
@@ -829,6 +829,17 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
return
p_sap
;
}
static
const
char
*
FindAttribute
(
const
sdp_t
*
sdp
,
unsigned
media
,
const
char
*
name
)
{
/* Look for media attribute, and fallback to session */
return
GetAttribute
(
sdp
->
mediav
[
media
].
pp_attributes
,
sdp
->
mediav
[
media
].
i_attributes
,
name
)
?:
GetAttribute
(
sdp
->
pp_attributes
,
sdp
->
i_attributes
,
name
);
}
/* Fill p_sdp->psz_uri */
static
int
ParseConnection
(
vlc_object_t
*
p_obj
,
sdp_t
*
p_sdp
)
{
...
...
@@ -872,12 +883,14 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
if
(
p_sdp
->
i_media_type
==
0
)
p_sdp
->
i_media_type
=
33
;
/* RTP protocol, nul, VLC shortcut, nul, flags byte as follow:
* 0x1: Connection-Oriented media. */
static
const
char
proto_match
[]
=
"udp
\0
"
"udp
\0
"
"RTP/AVP
\0
"
"rtp
\0
"
"UDPLite/RTP/AVP
\0
"
"udplite
\0
"
"DCCP/RTP/AVP
\0
"
"dccp
\0
"
"TCP/RTP/AVP
\0
"
"
tcp
\0
"
"udp
\0
"
"udp
\0
\0
"
"RTP/AVP
\0
"
"rtp
\0
\0
"
"UDPLite/RTP/AVP
\0
"
"udplite
\0
\0
"
"DCCP/RTP/AVP
\0
"
"dccp
\0
\1
"
"TCP/RTP/AVP
\0
"
"
rtptcp
\0\1
"
"
\0
"
;
const
char
*
vlc_proto
=
NULL
;
...
...
@@ -886,10 +899,25 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
if
(
strcasecmp
(
proto
,
sdp_proto
))
{
vlc_proto
=
proto
+
strlen
(
proto
)
+
1
;
if
(
vlc_proto
[
strlen
(
vlc_proto
)
+
1
]
&
1
)
{
/* COMEDIA check */
const
char
*
setup
=
FindAttribute
(
p_sdp
,
0
,
"setup"
);
if
(
setup
==
NULL
)
setup
=
"active"
;
/* default value */
if
(
strcmp
(
setup
,
"actpass"
)
&&
strcmp
(
setup
,
"passive"
))
{
msg_Dbg
(
p_obj
,
"unsupported COMEDIA mode: %s"
,
setup
);
free
(
sdp_proto
);
return
VLC_EGENERIC
;
}
}
break
;
}
proto
+=
strlen
(
proto
)
+
1
;
proto
+=
strlen
(
proto
)
+
1
;
proto
+=
strlen
(
proto
)
+
2
;
}
free
(
sdp_proto
);
...
...
@@ -901,13 +929,7 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
}
/* handle SSM case */
const
char
*
sfilter
=
GetAttribute
(
p_sdp
->
mediav
[
0
].
pp_attributes
,
p_sdp
->
mediav
[
0
].
i_attributes
,
"source-filter"
);
if
(
sfilter
==
NULL
)
sfilter
=
GetAttribute
(
p_sdp
->
pp_attributes
,
p_sdp
->
i_attributes
,
"source-filter"
);
const
char
*
sfilter
=
FindAttribute
(
p_sdp
,
0
,
"source-filter"
);
char
psz_source
[
258
]
=
""
;
if
(
sfilter
!=
NULL
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment