Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
728d404a
Commit
728d404a
authored
Nov 06, 2004
by
Yoann Peronneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ported r9191 (group announcing support) from trunk
parent
d1807d80
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
7 deletions
+36
-7
include/stream_output.h
include/stream_output.h
+2
-0
modules/stream_out/standard.c
modules/stream_out/standard.c
+20
-6
src/stream_output/announce.c
src/stream_output/announce.c
+2
-0
src/stream_output/sap.c
src/stream_output/sap.c
+12
-1
No files found.
include/stream_output.h
View file @
728d404a
...
...
@@ -245,6 +245,8 @@ struct session_descriptor_t
int
i_ttl
;
int
i_payload
;
/* SAP Payload type */
char
*
psz_group
;
sap_session_t
*
p_sap
;
/* If we have a sap session, remember it */
char
*
psz_sdp
;
};
...
...
modules/stream_out/standard.c
View file @
728d404a
...
...
@@ -56,6 +56,10 @@
#define NAME_LONGTEXT N_( \
"Name of the session that will be announced with SAP or SLP" )
#define GROUP_TEXT N_("Session groupname")
#define GROUP_LONGTEXT N_( \
"Name of the group that will be announced for the session" )
#define SAP_TEXT N_("SAP announcing")
#define SAP_LONGTEXT N_("Announce this session with SAP")
...
...
@@ -84,8 +88,10 @@ vlc_module_begin();
URL_LONGTEXT
,
VLC_FALSE
);
add_bool
(
SOUT_CFG_PREFIX
"sap"
,
0
,
NULL
,
SAP_TEXT
,
SAP_LONGTEXT
,
VLC_TRUE
);
add_string
(
SOUT_CFG_PREFIX
"name"
,
""
,
NULL
,
NAME_TEXT
,
NAME_LONGTEXT
,
VLC_TRUE
);
add_string
(
SOUT_CFG_PREFIX
"name"
,
""
,
NULL
,
NAME_TEXT
,
NAME_LONGTEXT
,
VLC_TRUE
);
add_string
(
SOUT_CFG_PREFIX
"group"
,
""
,
NULL
,
GROUP_TEXT
,
GROUP_LONGTEXT
,
VLC_TRUE
);
add_bool
(
SOUT_CFG_PREFIX
"sap-ipv6"
,
0
,
NULL
,
SAPv6_TEXT
,
SAPv6_LONGTEXT
,
VLC_TRUE
);
...
...
@@ -100,8 +106,8 @@ vlc_module_end();
*****************************************************************************/
static
const
char
*
ppsz_sout_options
[]
=
{
"access"
,
"mux"
,
"url"
,
"sap"
,
"name"
,
"sap-ipv6"
,
"slp"
,
NULL
"sap"
,
"name"
,
"sap-ipv6"
,
"group"
,
"slp"
,
NULL
};
#define DEFAULT_IPV6_SCOPE '8'
...
...
@@ -325,13 +331,21 @@ static int Open( vlc_object_t *p_this )
var_Get
(
p_stream
,
SOUT_CFG_PREFIX
"name"
,
&
val
);
if
(
*
val
.
psz_string
)
{
p_session
->
psz_name
=
val
.
psz_string
;
p_session
->
psz_name
=
strdup
(
val
.
psz_string
)
;
}
else
{
free
(
val
.
psz_string
);
p_session
->
psz_name
=
strdup
(
psz_url
);
}
free
(
val
.
psz_string
);
var_Get
(
p_stream
,
SOUT_CFG_PREFIX
"group"
,
&
val
);
if
(
*
val
.
psz_string
)
{
p_session
->
psz_group
=
strdup
(
val
.
psz_string
);
}
free
(
val
.
psz_string
);
var_Get
(
p_stream
,
SOUT_CFG_PREFIX
"sap-ipv6"
,
&
val
);
p_method
->
i_ip_version
=
val
.
b_bool
?
6
:
4
;
...
...
src/stream_output/announce.c
View file @
728d404a
...
...
@@ -164,6 +164,7 @@ session_descriptor_t * sout_AnnounceSessionCreate()
p_session
->
psz_name
=
NULL
;
p_session
->
psz_uri
=
NULL
;
p_session
->
i_port
=
0
;
p_session
->
psz_group
=
NULL
;
}
return
p_session
;
...
...
@@ -180,6 +181,7 @@ void sout_AnnounceSessionDestroy( session_descriptor_t *p_session )
if
(
p_session
)
{
FREE
(
p_session
->
psz_name
);
FREE
(
p_session
->
psz_group
);
FREE
(
p_session
->
psz_uri
);
FREE
(
p_session
->
psz_sdp
);
FREE
(
p_session
);
...
...
src/stream_output/sap.c
View file @
728d404a
...
...
@@ -490,7 +490,10 @@ static int SDPGenerate( sap_handler_t *p_sap, session_descriptor_t *p_session )
"a=tool:"
PACKAGE_STRING
"
\r\n
"
"a=type:broadcast
\r\n
"
)
+
strlen
(
p_session
->
psz_name
)
+
strlen
(
p_session
->
psz_uri
)
+
300
);
+
strlen
(
p_session
->
psz_uri
)
+
300
+
(
p_session
->
psz_group
?
strlen
(
p_session
->
psz_group
)
:
0
)
);
if
(
!
p_session
->
psz_sdp
)
{
msg_Err
(
p_sap
,
"out of memory"
);
...
...
@@ -509,6 +512,14 @@ static int SDPGenerate( sap_handler_t *p_sap, session_descriptor_t *p_session )
p_session
->
psz_name
,
p_session
->
psz_uri
,
p_session
->
i_ttl
,
p_session
->
i_port
,
p_session
->
i_payload
);
if
(
p_session
->
psz_group
)
{
sprintf
(
p_session
->
psz_sdp
,
"%sa=x-plgroup:%s
\r\n
"
,
p_session
->
psz_sdp
,
p_session
->
psz_group
);
}
msg_Dbg
(
p_sap
,
"Generated SDP (%i bytes):
\n
%s"
,
strlen
(
p_session
->
psz_sdp
),
p_session
->
psz_sdp
);
return
VLC_SUCCESS
;
...
...
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