Commit 677f45de authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove unused factory pattern for SDP announces

parent 9168a4fe
...@@ -249,16 +249,13 @@ VLC_EXPORT( encoder_t *, sout_EncoderCreate, ( vlc_object_t *obj ) ); ...@@ -249,16 +249,13 @@ VLC_EXPORT( encoder_t *, sout_EncoderCreate, ( vlc_object_t *obj ) );
/**************************************************************************** /****************************************************************************
* Announce handler * Announce handler
****************************************************************************/ ****************************************************************************/
VLC_EXPORT(session_descriptor_t*,sout_AnnounceRegisterSDP, ( vlc_object_t *, const char *, const char *, announce_method_t* ) LIBVLC_USED ); VLC_EXPORT(session_descriptor_t*,sout_AnnounceRegisterSDP, ( vlc_object_t *, const char *, const char * ) LIBVLC_USED );
VLC_EXPORT( int, sout_AnnounceUnRegister, (vlc_object_t *,session_descriptor_t* ) ); VLC_EXPORT( int, sout_AnnounceUnRegister, (vlc_object_t *,session_descriptor_t* ) );
#define sout_AnnounceRegisterSDP(o, sdp, addr, m) \ #define sout_AnnounceRegisterSDP(o, sdp, addr) \
sout_AnnounceRegisterSDP(VLC_OBJECT (o), sdp, addr, m) sout_AnnounceRegisterSDP(VLC_OBJECT (o), sdp, addr)
#define sout_AnnounceUnRegister(o, a) \ #define sout_AnnounceUnRegister(o, a) \
sout_AnnounceUnRegister(VLC_OBJECT (o), a) sout_AnnounceUnRegister(VLC_OBJECT (o), a)
VLC_EXPORT(announce_method_t*, sout_SAPMethod, (void) LIBVLC_USED );
VLC_EXPORT(void, sout_MethodRelease, (announce_method_t *) );
/** SDP */ /** SDP */
struct sockaddr; struct sockaddr;
......
...@@ -1270,14 +1270,9 @@ static int SapSetup( sout_stream_t *p_stream ) ...@@ -1270,14 +1270,9 @@ static int SapSetup( sout_stream_t *p_stream )
} }
if( p_sys->i_es > 0 && p_sys->psz_sdp && *p_sys->psz_sdp ) if( p_sys->i_es > 0 && p_sys->psz_sdp && *p_sys->psz_sdp )
{
announce_method_t *p_method = sout_SAPMethod();
p_sys->p_session = sout_AnnounceRegisterSDP( p_sout, p_sys->p_session = sout_AnnounceRegisterSDP( p_sout,
p_sys->psz_sdp, p_sys->psz_sdp,
p_sys->psz_destination, p_sys->psz_destination );
p_method );
sout_MethodRelease( p_method );
}
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
...@@ -463,12 +463,9 @@ static int Open( vlc_object_t *p_this ) ...@@ -463,12 +463,9 @@ static int Open( vlc_object_t *p_this )
/* Register the SDP with the SAP thread */ /* Register the SDP with the SAP thread */
if (psz_sdp != NULL) if (psz_sdp != NULL)
{ {
announce_method_t *p_method = sout_SAPMethod ();
msg_Dbg (p_stream, "Generated SDP:\n%s", psz_sdp); msg_Dbg (p_stream, "Generated SDP:\n%s", psz_sdp);
p_sys->p_session = p_sys->p_session =
sout_AnnounceRegisterSDP (p_sout, psz_sdp, dhost, p_method); sout_AnnounceRegisterSDP (p_sout, psz_sdp, dhost);
sout_MethodRelease (p_method);
free( psz_sdp ); free( psz_sdp );
} }
free (dhost); free (dhost);
......
...@@ -390,14 +390,12 @@ sout_AccessOutWrite ...@@ -390,14 +390,12 @@ sout_AccessOutWrite
sout_AnnounceRegisterSDP sout_AnnounceRegisterSDP
sout_AnnounceUnRegister sout_AnnounceUnRegister
sout_EncoderCreate sout_EncoderCreate
sout_MethodRelease
sout_MuxAddStream sout_MuxAddStream
sout_MuxDelete sout_MuxDelete
sout_MuxDeleteStream sout_MuxDeleteStream
sout_MuxGetStream sout_MuxGetStream
sout_MuxNew sout_MuxNew
sout_MuxSendBuffer sout_MuxSendBuffer
sout_SAPMethod
sout_StreamChainDelete sout_StreamChainDelete
sout_StreamChainNew sout_StreamChainNew
sout_UpdateStatistic sout_UpdateStatistic
......
...@@ -35,10 +35,6 @@ ...@@ -35,10 +35,6 @@
#include <assert.h> #include <assert.h>
struct announce_method_t
{
} sap_method;
/**************************************************************************** /****************************************************************************
* Sout-side functions * Sout-side functions
****************************************************************************/ ****************************************************************************/
...@@ -58,16 +54,12 @@ static vlc_mutex_t sap_mutex = VLC_STATIC_MUTEX; ...@@ -58,16 +54,12 @@ static vlc_mutex_t sap_mutex = VLC_STATIC_MUTEX;
* \param obj a VLC object * \param obj a VLC object
* \param psz_sdp the SDP to register * \param psz_sdp the SDP to register
* \param psz_dst 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 * \return the new session descriptor structure
*/ */
session_descriptor_t * session_descriptor_t *
sout_AnnounceRegisterSDP( vlc_object_t *obj, const char *psz_sdp, sout_AnnounceRegisterSDP( vlc_object_t *obj, const char *psz_sdp,
const char *psz_dst, announce_method_t *p_method ) const char *psz_dst )
{ {
assert (p_method == &sap_method);
(void) p_method;
session_descriptor_t *p_session = calloc( 1, sizeof (*p_session) ); session_descriptor_t *p_session = calloc( 1, sizeof (*p_session) );
if( !p_session ) if( !p_session )
return NULL; return NULL;
...@@ -134,16 +126,3 @@ int sout_AnnounceUnRegister( vlc_object_t *obj, ...@@ -134,16 +126,3 @@ int sout_AnnounceUnRegister( vlc_object_t *obj,
return 0; return 0;
} }
/**
* \return the SAP announce method
*/
announce_method_t * sout_SAPMethod (void)
{
return &sap_method;
}
void sout_MethodRelease (announce_method_t *m)
{
assert (m == &sap_method);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment