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 ) );
/****************************************************************************
* 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* ) );
#define sout_AnnounceRegisterSDP(o, sdp, addr, m) \
sout_AnnounceRegisterSDP(VLC_OBJECT (o), sdp, addr, m)
#define sout_AnnounceRegisterSDP(o, sdp, addr) \
sout_AnnounceRegisterSDP(VLC_OBJECT (o), sdp, addr)
#define sout_AnnounceUnRegister(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 */
struct sockaddr;
......
......@@ -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 )
{
announce_method_t *p_method = sout_SAPMethod();
p_sys->p_session = sout_AnnounceRegisterSDP( p_sout,
p_sys->psz_sdp,
p_sys->psz_destination,
p_method );
sout_MethodRelease( p_method );
}
p_sys->psz_destination );
return VLC_SUCCESS;
}
......
......@@ -463,12 +463,9 @@ static int Open( vlc_object_t *p_this )
/* Register the SDP with the SAP thread */
if (psz_sdp != NULL)
{
announce_method_t *p_method = sout_SAPMethod ();
msg_Dbg (p_stream, "Generated SDP:\n%s", psz_sdp);
p_sys->p_session =
sout_AnnounceRegisterSDP (p_sout, psz_sdp, dhost, p_method);
sout_MethodRelease (p_method);
sout_AnnounceRegisterSDP (p_sout, psz_sdp, dhost);
free( psz_sdp );
}
free (dhost);
......
......@@ -390,14 +390,12 @@ sout_AccessOutWrite
sout_AnnounceRegisterSDP
sout_AnnounceUnRegister
sout_EncoderCreate
sout_MethodRelease
sout_MuxAddStream
sout_MuxDelete
sout_MuxDeleteStream
sout_MuxGetStream
sout_MuxNew
sout_MuxSendBuffer
sout_SAPMethod
sout_StreamChainDelete
sout_StreamChainNew
sout_UpdateStatistic
......
......@@ -35,10 +35,6 @@
#include <assert.h>
struct announce_method_t
{
} sap_method;
/****************************************************************************
* Sout-side functions
****************************************************************************/
......@@ -58,16 +54,12 @@ static vlc_mutex_t sap_mutex = VLC_STATIC_MUTEX;
* \param obj a VLC object
* \param psz_sdp the SDP to register
* \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( 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) );
if( !p_session )
return NULL;
......@@ -134,16 +126,3 @@ int sout_AnnounceUnRegister( vlc_object_t *obj,
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