Esempio n. 1
0
static int Intf( vlc_object_t *p_this, char const *psz_cmd,
                 vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
    intf_thread_t *p_newintf;

    p_newintf = intf_Create( p_this->p_vlc, newval.psz_string );

    if( p_newintf )
    {
        p_newintf->b_block = VLC_FALSE;
        if( intf_RunThread( p_newintf ) )
        {
            vlc_object_detach( p_newintf );
            intf_Destroy( p_newintf );
        }
    }

    return VLC_SUCCESS;
}
Esempio n. 2
0
/*****************************************************************************
 * CloseDecoder: clean up the decoder
 *****************************************************************************/
static void CloseDecoder( vlc_object_t *p_this )
{
    decoder_t *p_dec = (decoder_t *)p_this;
    decoder_sys_t *p_sys = p_dec->p_sys;
    intf_thread_t *p_intf;

    /* Destroy the interface object/thread */
    p_intf = vlc_object_find( p_dec, VLC_OBJECT_INTF, FIND_CHILD );
    if( p_intf != NULL )
    {
#ifdef CMML_DEBUG
        msg_Dbg( p_dec, "CMML decoder is freeing interface thread" );
#endif
        intf_StopThread( p_intf );
        vlc_object_detach( p_intf );
        vlc_object_release( p_intf );
        intf_Destroy( p_intf );
    }

    p_sys->p_intf = NULL;

    free( p_sys );
}