-/**
- * Register a new session with the announce handler
- *
- * \param p_sout a sout instance structure
- * \param p_session a session descriptor
- * \param p_method an announce method descriptor
- * \return VLC_SUCCESS or an error
- */
-int sout_AnnounceRegister( sout_instance_t *p_sout,
- session_descriptor_t *p_session,
- announce_method_t *p_method )
-{
- int i_ret;
- announce_handler_t *p_announce = (announce_handler_t*)
- vlc_object_find( p_sout,
- VLC_OBJECT_ANNOUNCE,
- FIND_ANYWHERE );
-
- if( !p_announce )
- {
- msg_Dbg( p_sout, "No announce handler found, creating one" );
- p_announce = announce_HandlerCreate( p_sout );
- if( !p_announce )
- {
- msg_Err( p_sout, "Creation failed" );
- return VLC_ENOMEM;
- }
- vlc_object_yield( p_announce );
- msg_Dbg( p_sout,"Creation done" );
- }
-
- i_ret = announce_Register( p_announce, p_session, p_method );
- vlc_object_release( p_announce );
-
- return i_ret;
-}
-