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
979f5cc2
Commit
979f5cc2
authored
Sep 15, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Announce API simplification
parent
d2121795
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
35 deletions
+10
-35
include/vlc_sout.h
include/vlc_sout.h
+1
-2
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+2
-3
modules/stream_out/standard.c
modules/stream_out/standard.c
+0
-3
src/libvlc.sym
src/libvlc.sym
+0
-1
src/stream_output/announce.c
src/stream_output/announce.c
+7
-26
No files found.
include/vlc_sout.h
View file @
979f5cc2
...
...
@@ -208,12 +208,11 @@ static inline int sout_StreamIdSend( sout_stream_t *s, sout_stream_id_t *id, blo
}
/****************************************************************************
* Announce handler
mess
* Announce handler
****************************************************************************/
VLC_EXPORT
(
session_descriptor_t
*
,
sout_AnnounceRegisterSDP
,
(
sout_instance_t
*
,
const
char
*
,
const
char
*
,
const
char
*
,
announce_method_t
*
)
);
VLC_EXPORT
(
int
,
sout_AnnounceUnRegister
,
(
sout_instance_t
*
,
session_descriptor_t
*
)
);
VLC_EXPORT
(
void
,
sout_AnnounceSessionDestroy
,
(
session_descriptor_t
*
)
);
VLC_EXPORT
(
announce_method_t
*
,
sout_SAPMethod
,
(
void
)
);
VLC_EXPORT
(
void
,
sout_MethodRelease
,
(
announce_method_t
*
)
);
...
...
modules/stream_out/rtp.c
View file @
979f5cc2
...
...
@@ -1196,25 +1196,24 @@ static int SapSetup( sout_stream_t *p_stream )
{
sout_stream_sys_t
*
p_sys
=
p_stream
->
p_sys
;
sout_instance_t
*
p_sout
=
p_stream
->
p_sout
;
announce_method_t
*
p_method
=
sout_SAPMethod
();
/* Remove the previous session */
if
(
p_sys
->
p_session
!=
NULL
)
{
sout_AnnounceUnRegister
(
p_sout
,
p_sys
->
p_session
);
sout_AnnounceSessionDestroy
(
p_sys
->
p_session
);
p_sys
->
p_session
=
NULL
;
}
if
(
(
p_sys
->
i_es
>
0
||
p_sys
->
p_mux
)
&&
p_sys
->
psz_sdp
&&
*
p_sys
->
psz_sdp
)
{
announce_method_t
*
p_method
=
sout_SAPMethod
();
p_sys
->
p_session
=
sout_AnnounceRegisterSDP
(
p_sout
,
SOUT_CFG_PREFIX
,
p_sys
->
psz_sdp
,
p_sys
->
psz_destination
,
p_method
);
sout_MethodRelease
(
p_method
);
}
sout_MethodRelease
(
p_method
);
return
VLC_SUCCESS
;
}
...
...
modules/stream_out/standard.c
View file @
979f5cc2
...
...
@@ -408,10 +408,7 @@ static void Close( vlc_object_t * p_this )
sout_access_out_t
*
p_access
=
p_sys
->
p_mux
->
p_access
;
if
(
p_sys
->
p_session
!=
NULL
)
{
sout_AnnounceUnRegister
(
p_stream
->
p_sout
,
p_sys
->
p_session
);
sout_AnnounceSessionDestroy
(
p_sys
->
p_session
);
}
sout_MuxDelete
(
p_sys
->
p_mux
);
sout_AccessOutDelete
(
p_access
);
...
...
src/libvlc.sym
View file @
979f5cc2
...
...
@@ -265,7 +265,6 @@ sout_AccessOutRead
sout_AccessOutSeek
sout_AccessOutWrite
sout_AnnounceRegisterSDP
sout_AnnounceSessionDestroy
sout_AnnounceUnRegister
sout_MuxAddStream
sout_MuxDelete
...
...
src/stream_output/announce.c
View file @
979f5cc2
...
...
@@ -46,29 +46,18 @@ struct announce_method_t
* Sout-side functions
****************************************************************************/
/**
* Create and initialize a session descriptor
*
* \return a new session descriptor
*/
static
session_descriptor_t
*
sout_AnnounceSessionCreate
(
vlc_object_t
*
obj
,
const
char
*
cfgpref
)
{
return
calloc
(
1
,
sizeof
(
session_descriptor_t
));
}
/**
* Register a new session with the announce handler, using a pregenerated SDP
*
* \param p_sout a sout instance structure
* \param psz_sdp the SDP to register
* \param psz_
uri
session address (needed for SAP address auto detection)
* \param psz_
dst
session address (needed for SAP address auto detection)
* \param p_method an announce method descriptor
* \return the new session descriptor structure
*/
session_descriptor_t
*
sout_AnnounceRegisterSDP
(
sout_instance_t
*
p_sout
,
const
char
*
cfgpref
,
const
char
*
psz_sdp
,
const
char
*
psz_
uri
,
const
char
*
psz_sdp
,
const
char
*
psz_
dst
,
announce_method_t
*
p_method
)
{
session_descriptor_t
*
p_session
;
...
...
@@ -88,12 +77,13 @@ sout_AnnounceRegisterSDP( sout_instance_t *p_sout, const char *cfgpref,
vlc_object_yield
(
p_announce
);
}
p_session
=
sout_AnnounceSessionCreate
(
VLC_OBJECT
(
p_sout
),
cfgpref
);
p_session
=
malloc
(
sizeof
(
*
p_session
)
);
memset
(
p_session
,
0
,
sizeof
(
*
p_session
)
);
p_session
->
psz_sdp
=
strdup
(
psz_sdp
);
/* GRUIK. We should not convert back-and-forth from string to numbers */
struct
addrinfo
*
res
;
if
(
vlc_getaddrinfo
(
VLC_OBJECT
(
p_sout
),
psz_
uri
,
0
,
NULL
,
&
res
)
==
0
)
if
(
vlc_getaddrinfo
(
VLC_OBJECT
(
p_sout
),
psz_
dst
,
0
,
NULL
,
&
res
)
==
0
)
{
if
(
res
->
ai_addrlen
<=
sizeof
(
p_session
->
addr
))
memcpy
(
&
p_session
->
addr
,
res
->
ai_addr
,
...
...
@@ -128,23 +118,14 @@ int sout_AnnounceUnRegister( sout_instance_t *p_sout,
return
VLC_ENOOBJ
;
}
i_ret
=
announce_UnRegister
(
p_announce
,
p_session
);
if
(
i_ret
==
0
)
free
(
p_session
);
vlc_object_release
(
p_announce
);
return
i_ret
;
}
/**
* Destroy a session descriptor and free all
*
* \param p_session the session to destroy
* \return Nothing
*/
void
sout_AnnounceSessionDestroy
(
session_descriptor_t
*
p_session
)
{
free
(
p_session
);
}
/**
* \return the SAP announce method
*/
...
...
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