Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
0b54d9c6
Commit
0b54d9c6
authored
Nov 10, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for disabling SDP source-filter in SAP announces
parent
ab363722
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
22 deletions
+40
-22
src/libvlc.h
src/libvlc.h
+6
-0
src/stream_output/sap.c
src/stream_output/sap.c
+34
-22
No files found.
src/libvlc.h
View file @
0b54d9c6
...
...
@@ -753,6 +753,10 @@ static const char *ppsz_clock_descriptions[] =
"When the SAP flow control is disabled, " \
"this lets you set the fixed interval between SAP announcements." )
#define ANN_SAP_SFILTER_TEXT N_("Use SAP source filter")
#define ANN_SAP_SFILTER_LONGTEXT N_( \
"When this is disabled, SAP announcements do not include a " \
"source-filter parameter and source-specific multicast is not used.")
/*****************************************************************************
* Advanced
...
...
@@ -1553,6 +1557,8 @@ vlc_module_begin();
ANN_SAPCTRL_LONGTEXT
,
VLC_TRUE
);
add_integer
(
"sap-interval"
,
5
,
NULL
,
ANN_SAPINTV_TEXT
,
ANN_SAPINTV_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"sap-source-filter"
,
VLC_TRUE
,
NULL
,
ANN_SAP_SFILTER_TEXT
,
ANN_SAP_SFILTER_LONGTEXT
,
VLC_TRUE
);
set_subcategory
(
SUBCAT_SOUT_VOD
);
/* CPU options */
...
...
src/stream_output/sap.c
View file @
0b54d9c6
...
...
@@ -614,29 +614,41 @@ static char *SDPGenerate( sap_handler_t *p_sap,
else
psz_uri
=
p_session
->
psz_uri
;
char
*
sfilter
=
NULL
;
if
(
var_CreateGetBool
(
p_sap
,
"sap-source-filter"
))
{
if
(
asprintf
(
&
sfilter
,
"a=source-filter: incl IN IP%c * %s
\r\n
"
,
ipv
,
p_addr
->
psz_machine
)
==
-
1
)
return
NULL
;
}
/* see the lists in modules/stream_out/rtp.c for compliance stuff */
if
(
asprintf
(
&
psz_sdp
,
"v=0
\r\n
"
"o=- "
I64Fd
" %d IN IP%c %s
\r\n
"
"s=%s
\r\n
"
"c=IN IP%c %s/%d
\r\n
"
"t=0 0
\r\n
"
"a=tool:"
PACKAGE_STRING
"
\r\n
"
"a=recvonly
\r\n
"
"a=type:broadcast
\n
"
"a=source-filter: incl IN IP%c * %s
\r\n
"
"m=video %d %s %d
\r\n
"
"%s%s%s"
,
i_sdp_id
,
i_sdp_version
,
ipv
,
p_addr
->
psz_machine
,
psz_name
,
ipv
,
psz_uri
,
(
p_session
->
i_ttl
!=
-
1
)
?
p_session
->
i_ttl
:
255
,
ipv
,
p_addr
->
psz_machine
,
p_session
->
i_port
,
p_session
->
b_rtp
?
"RTP/AVP"
:
"udp"
,
p_session
->
i_payload
,
psz_group
?
"a=x-plgroup:"
:
""
,
psz_group
?
psz_group
:
""
,
psz_group
?
"
\r\n
"
:
""
)
==
-
1
)
int
res
=
asprintf
(
&
psz_sdp
,
"v=0
\r\n
"
"o=- "
I64Fd
" %d IN IP%c %s
\r\n
"
"s=%s
\r\n
"
"c=IN IP%c %s/%d
\r\n
"
"t=0 0
\r\n
"
"a=tool:"
PACKAGE_STRING
"
\r\n
"
"a=recvonly
\r\n
"
"a=type:broadcast
\n
"
"%s"
"m=video %d %s %d
\r\n
"
"%s%s%s"
,
i_sdp_id
,
i_sdp_version
,
ipv
,
p_addr
->
psz_machine
,
psz_name
,
ipv
,
psz_uri
,
(
p_session
->
i_ttl
!=
-
1
)
?
p_session
->
i_ttl
:
255
,
(
sfilter
!=
NULL
)
?
sfilter
:
""
,
p_session
->
i_port
,
p_session
->
b_rtp
?
"RTP/AVP"
:
"udp"
,
p_session
->
i_payload
,
psz_group
?
"a=x-plgroup:"
:
""
,
psz_group
?
psz_group
:
""
,
psz_group
?
"
\r\n
"
:
""
);
if
(
sfilter
!=
NULL
)
free
(
sfilter
);
if
(
res
==
-
1
)
return
NULL
;
msg_Dbg
(
p_sap
,
"Generated SDP (%i bytes):
\n
%s"
,
strlen
(
psz_sdp
),
...
...
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