⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rc.c

📁 uclinux 下的vlc播放器源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
            /* Replay the current state of the system. */            msg_rc( STATUS_CHANGE "( new input: %s )", p_playlist->p_input->input.p_item->psz_uri );            msg_rc( STATUS_CHANGE "( audio volume: %d )", config_GetInt( p_intf, "volume" ));            vlc_mutex_lock( &p_playlist->object_lock );            switch( p_playlist->status.i_status )            {                case PLAYLIST_STOPPED:                    msg_rc( STATUS_CHANGE "( stop state: 0 )" );                    break;                case PLAYLIST_RUNNING:                    msg_rc( STATUS_CHANGE "( play state: 1 )" );                    break;                case PLAYLIST_PAUSED:                    msg_rc( STATUS_CHANGE "( pause state: 2 )" );                    break;                default:                    msg_rc( STATUS_CHANGE "( state unknown )" );                    break;            }            vlc_mutex_unlock( &p_playlist->object_lock );        }    }    /*     * sanity check     */    else    {        msg_rc( "unknown command!" );    }    vlc_object_release( p_playlist );    return VLC_SUCCESS;}static int Other( vlc_object_t *p_this, char const *psz_cmd,                     vlc_value_t oldval, vlc_value_t newval, void *p_data ){    intf_thread_t *p_intf = (intf_thread_t*)p_this;    vlc_object_t  *p_playlist;    vlc_value_t    val;    vlc_object_t  *p_input;    p_playlist = vlc_object_find( p_this, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );    if( !p_playlist )    {        return VLC_ENOOBJ;    }    p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_ANYWHERE );    if( !p_input )    {        vlc_object_release( p_playlist );        return VLC_ENOOBJ;    }    if( p_input )    {        var_Get( p_input, "state", &val );        if( ( val.i_int == PAUSE_S ) || ( val.i_int == PLAYLIST_PAUSED ) )        {            msg_rc( _("Type 'pause' to continue.") );            vlc_object_release( p_playlist );            vlc_object_release( p_input );            return VLC_EGENERIC;        }    }    /* Parse miscellaneous commands */    if( !strcmp( psz_cmd, "marq-marquee" ) )    {        if( strlen( newval.psz_string ) > 0 )        {            val.psz_string = newval.psz_string;            var_Set( p_input->p_libvlc, "marq-marquee", val );        }        else        {                val.psz_string = "";                var_Set( p_input->p_libvlc, "marq-marquee", val);        }    }    else if( !strcmp( psz_cmd, "marq-x" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "marq-x", val );        }    }    else if( !strcmp( psz_cmd, "marq-y" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "marq-y", val );        }    }    else if( !strcmp( psz_cmd, "marq-position" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "marq-position", val );        }    }    else if( !strcmp( psz_cmd, "marq-color" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = strtol( newval.psz_string, NULL, 0 );            var_Set( p_input->p_libvlc, "marq-color", val );        }    }    else if( !strcmp( psz_cmd, "marq-opacity" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = strtol( newval.psz_string, NULL, 0 );            var_Set( p_input->p_libvlc, "marq-opacity", val );        }    }    else if( !strcmp( psz_cmd, "marq-size" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "marq-size", val );        }    }    else if( !strcmp( psz_cmd, "marq-timeout" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input, "marq-timeout", val );        }    }    else if( !strcmp( psz_cmd, "mosaic-alpha" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "mosaic-alpha", val );        }    }    else if( !strcmp( psz_cmd, "mosaic-height" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "mosaic-height", val );        }    }    else if( !strcmp( psz_cmd, "mosaic-width" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "mosaic-width", val );        }    }    else if( !strcmp( psz_cmd, "mosaic-xoffset" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "mosaic-xoffset", val );        }    }    else if( !strcmp( psz_cmd, "mosaic-yoffset" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "mosaic-yoffset", val );        }    }    else if( !strcmp( psz_cmd, "mosaic-align" ) )    {        if( strlen( newval.psz_string ) > 0 )        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "mosaic-align", val );        }    }    else if( !strcmp( psz_cmd, "mosaic-vborder" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "mosaic-vborder", val );        }    }    else if( !strcmp( psz_cmd, "mosaic-hborder" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "mosaic-hborder", val );        }    }    else if( !strcmp( psz_cmd, "mosaic-position" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "mosaic-position", val );        }    }    else if( !strcmp( psz_cmd, "mosaic-rows" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "mosaic-rows", val );        }    }    else if( !strcmp( psz_cmd, "mosaic-cols" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "mosaic-cols", val );        }    }    else if( !strcmp( psz_cmd, "mosaic-keep-aspect-ratio" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "mosaic-keep-aspect-ratio", val );        }    }    else if( !strcmp( psz_cmd, "time-format" ) )    {        if( strlen( newval.psz_string ) > 0 )        {            val.psz_string = newval.psz_string;            var_Set( p_input->p_libvlc, "time-format", val );        }        else        {            val.psz_string = "";            var_Set( p_input->p_libvlc, "time-format", val);        }    }    else if( !strcmp( psz_cmd, "time-x" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "time-x", val );        }    }    else if( !strcmp( psz_cmd, "time-y" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "time-y", val );        }    }    else if( !strcmp( psz_cmd, "time-position" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "time-position", val );        }    }    else if( !strcmp( psz_cmd, "time-color" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = strtol( newval.psz_string, NULL, 0 );            var_Set( p_input->p_libvlc, "time-color", val );        }    }    else if( !strcmp( psz_cmd, "time-opacity" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = strtol( newval.psz_string, NULL, 0 );            var_Set( p_input->p_libvlc, "time-opacity", val );        }    }    else if( !strcmp( psz_cmd, "time-size" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "time-size", val );        }    }    else if( !strcmp( psz_cmd, "logo-file" ) )    {        if( strlen( newval.psz_string ) > 0 )        {            val.psz_string = newval.psz_string;            var_Set( p_input->p_libvlc, "logo-file", val );        }    }    else if( !strcmp( psz_cmd, "logo-x" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "logo-x", val );        }    }    else if( !strcmp( psz_cmd, "logo-y" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "logo-y", val );        }    }    else if( !strcmp( psz_cmd, "logo-position" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = atoi( newval.psz_string );            var_Set( p_input->p_libvlc, "logo-position", val );        }    }    else if( !strcmp( psz_cmd, "logo-transparency" ) )    {        if( strlen( newval.psz_string ) > 0)        {            val.i_int = strtol( newval.psz_string, NULL, 0 );            var_Set( p_input->p_libvlc, "logo-transparency", val );        }    }    /*     * sanity check     */    else    {        msg_rc( "Unknown command!" );    }    vlc_object_release( p_playlist );    vlc_object_release( p_input );    return VLC_SUCCESS;}static int Quit( vlc_object_t *p_this, char const *psz_cmd,                 vlc_value_t oldval, vlc_value_t newval, void *p_data ){    playlist_t *p_playlist;    p_playlist = vlc_object_find( p_this, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );    if( p_playlist )    {        playlist_Stop( p_playlist );        v

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -