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
02859f76
Commit
02859f76
authored
Feb 10, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Repair SAP + SSM
parent
fe1670bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
19 deletions
+15
-19
src/stream_output/sap.c
src/stream_output/sap.c
+2
-15
src/stream_output/sdp.c
src/stream_output/sdp.c
+12
-3
src/stream_output/stream_output.h
src/stream_output/stream_output.h
+1
-1
No files found.
src/stream_output/sap.c
View file @
02859f76
...
...
@@ -321,7 +321,6 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
ipv4
=
0xe0027ffe
;
}
/* FIXME FIXME FIXME */
if
(
ipv4
==
0
)
{
msg_Err
(
p_sap
,
"Out-of-scope multicast address "
...
...
@@ -600,7 +599,7 @@ static char *SDPGenerate( sap_handler_t *p_sap,
char
*
psz_group
,
*
psz_name
,
*
psz_sdp
;
char
*
head
=
StartSDP
(
p_session
->
psz_name
,
p_session
->
description
,
p_session
->
url
,
p_session
->
email
,
p_session
->
phone
,
p_session
->
url
,
p_session
->
email
,
p_session
->
phone
,
b_ssm
,
(
const
struct
sockaddr
*
)
&
p_session
->
orig
,
p_session
->
origlen
,
(
const
struct
sockaddr
*
)
&
p_session
->
addr
,
p_session
->
addrlen
);
if
(
head
==
NULL
)
...
...
@@ -614,32 +613,20 @@ static char *SDPGenerate( sap_handler_t *p_sap,
||
(
asprintf
(
&
plgroup
,
"a=x-plgroup:%s
\r\n
"
,
psz_group
)
==
-
1
))
plgroup
=
NULL
;
char
*
sfilter
;
#if 0
if ((!b_ssm)
|| (asprintf (&sfilter, "a=source-filter: incl IN IP%c * %s\r\n",
ipv, p_addr->psz_machine) == -1))
#else
# warning FIXME: repair Source Specific Multicast
#endif
sfilter
=
NULL
;
const
char
*
comedia
=
NULL
;
if
(
!
strncasecmp
(
p_session
->
sdpformat
,
"DCCP"
,
4
)
||
!
strncasecmp
(
p_session
->
sdpformat
,
"TCP"
,
3
))
comedia
=
"a=setup:passive
\r\n
"
"a=connection:new
\r\n
"
;
int
res
=
asprintf
(
&
psz_sdp
,
"%s"
"%s"
"%s"
"%s"
int
res
=
asprintf
(
&
psz_sdp
,
"%s"
"%s"
"%s"
"m=video %d %s
\r\n
"
,
head
,
plgroup
?:
""
,
sfilter
?:
""
,
comedia
?:
""
,
net_GetPort
((
const
struct
sockaddr
*
)
&
p_session
->
addr
),
p_session
->
sdpformat
);
free
(
plgroup
);
free
(
sfilter
);
if
(
res
==
-
1
)
return
NULL
;
...
...
src/stream_output/sdp.c
View file @
02859f76
...
...
@@ -85,12 +85,13 @@ static vlc_bool_t IsSDPString (const char *str)
char
*
StartSDP
(
const
char
*
name
,
const
char
*
description
,
const
char
*
url
,
const
char
*
email
,
const
char
*
phone
,
const
char
*
email
,
const
char
*
phone
,
vlc_bool_t
ssm
,
const
struct
sockaddr
*
orig
,
socklen_t
origlen
,
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
)
{
uint64_t
t
=
NTPtime64
();
char
*
sdp
,
machine
[
MAXSDPADDRESS
],
conn
[
MAXSDPADDRESS
];
char
*
sdp
,
machine
[
MAXSDPADDRESS
],
conn
[
MAXSDPADDRESS
],
sfilter
[
MAXSDPADDRESS
+
sizeof
(
"
\r\n
a=source-filter: incl * "
)];
const
char
*
preurl
=
"
\r\n
u="
,
*
premail
=
"
\r\n
e="
,
*
prephone
=
"
\r\n
p="
;
if
(
name
==
NULL
)
...
...
@@ -110,6 +111,12 @@ char *StartSDP (const char *name, const char *description, const char *url,
||
(
AddressToSDP
((
struct
sockaddr
*
)
addr
,
addrlen
,
conn
)
==
NULL
))
return
NULL
;
if
(
ssm
)
sprintf
(
sfilter
,
"
\r\n
a=source-filter: incl IN IP%c * %s"
,
machine
[
5
],
machine
+
7
);
else
*
sfilter
=
'\0'
;
if
(
asprintf
(
&
sdp
,
"v=0"
"
\r\n
o=- "
I64Fu
" "
I64Fu
" %s"
"
\r\n
s=%s"
...
...
@@ -127,6 +134,7 @@ char *StartSDP (const char *name, const char *description, const char *url,
"
\r\n
a=recvonly"
"
\r\n
a=type:broadcast"
"
\r\n
a=charset:UTF-8"
"%s"
// optional source filter
"
\r\n
"
,
/* o= */
t
,
t
,
machine
,
/* s= */
name
,
...
...
@@ -134,7 +142,8 @@ char *StartSDP (const char *name, const char *description, const char *url,
/* u= */
preurl
,
url
,
/* e= */
premail
,
email
,
/* p= */
prephone
,
phone
,
/* c= */
conn
)
==
-
1
)
/* c= */
conn
,
/* source-filter */
sfilter
)
==
-
1
)
return
NULL
;
return
sdp
;
}
...
...
src/stream_output/stream_output.h
View file @
02859f76
...
...
@@ -111,7 +111,7 @@ sap_handler_t *announce_SAPHandlerCreate( announce_handler_t *p_announce );
void
announce_SAPHandlerDestroy
(
sap_handler_t
*
p_sap
);
char
*
StartSDP
(
const
char
*
name
,
const
char
*
description
,
const
char
*
url
,
const
char
*
email
,
const
char
*
phone
,
const
char
*
email
,
const
char
*
phone
,
vlc_bool_t
ssm
,
const
struct
sockaddr
*
orig
,
socklen_t
origlen
,
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
);
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