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

📄 podcast.c

📁 uclinux 下的vlc播放器源代码
💻 C
📖 第 1 页 / 共 2 页
字号:
                         && ( !strcmp( psz_elname, "itunes:author" )                            ||!strcmp( psz_elname, "author" ) ) )                { /* <author> isn't standard iTunes podcast stuff */                    psz_item_author = strdup( psz_text );                }                else if( b_item == VLC_TRUE                         && !strcmp( psz_elname, "itunes:category" ) )                {                    psz_item_category = strdup( psz_text );                }                else if( b_item == VLC_TRUE                         && !strcmp( psz_elname, "itunes:duration" ) )                {                    psz_item_duration = strdup( psz_text );                }                else if( b_item == VLC_TRUE                         && !strcmp( psz_elname, "itunes:keywords" ) )                {                    psz_item_keywords = strdup( psz_text );                }                else if( b_item == VLC_TRUE                         && !strcmp( psz_elname, "itunes:subtitle" ) )                {                    psz_item_subtitle = strdup( psz_text );                }                else if( b_item == VLC_TRUE                         && ( !strcmp( psz_elname, "itunes:summary" )                            ||!strcmp( psz_elname, "description" ) ) )                { /* <description> isn't standard iTunes podcast stuff */                    psz_item_summary = strdup( psz_text );                }                /* toplevel meta data */                else if( b_item == VLC_FALSE && b_image == VLC_FALSE                         && !strcmp( psz_elname, "title" ) )                {                    playlist_ItemSetName( p_current, psz_text );                }                else if( b_item == VLC_FALSE && b_image == VLC_FALSE                         && !strcmp( psz_elname, "link" ) )                {                    vlc_input_item_AddInfo( &(p_current->input),                                            _( "Podcast Info" ),                                            _( "Podcast Link" ),                                            "%s",                                            psz_text );                }                else if( b_item == VLC_FALSE && b_image == VLC_FALSE                         && !strcmp( psz_elname, "copyright" ) )                {                    vlc_input_item_AddInfo( &(p_current->input),                                            _( "Podcast Info" ),                                            _( "Podcast Copyright" ),                                            "%s",                                            psz_text );                }                else if( b_item == VLC_FALSE && b_image == VLC_FALSE                         && !strcmp( psz_elname, "itunes:category" ) )                {                    vlc_input_item_AddInfo( &(p_current->input),                                            _( "Podcast Info" ),                                            _( "Podcast Category" ),                                            "%s",                                            psz_text );                }                else if( b_item == VLC_FALSE && b_image == VLC_FALSE                         && !strcmp( psz_elname, "itunes:keywords" ) )                {                    vlc_input_item_AddInfo( &(p_current->input),                                            _( "Podcast Info" ),                                            _( "Podcast Keywords" ),                                            "%s",                                            psz_text );                }                else if( b_item == VLC_FALSE && b_image == VLC_FALSE                         && !strcmp( psz_elname, "itunes:subtitle" ) )                {                    vlc_input_item_AddInfo( &(p_current->input),                                            _( "Podcast Info" ),                                            _( "Podcast Subtitle" ),                                            "%s",                                            psz_text );                }                else if( b_item == VLC_FALSE && b_image == VLC_FALSE                         && ( !strcmp( psz_elname, "itunes:summary" )                            ||!strcmp( psz_elname, "description" ) ) )                { /* <description> isn't standard iTunes podcast stuff */                    vlc_input_item_AddInfo( &(p_current->input),                                            _( "Podcast Info" ),                                            _( "Podcast Summary" ),                                            "%s",                                            psz_text );                }                else                {                    msg_Dbg( p_demux, "unhandled text in element '%s'",                              psz_elname );                }                free( psz_text );                break;            }            // End element            case XML_READER_ENDELEM:            {                // Read the element name                free( psz_elname );                psz_elname = xml_ReaderName( p_xml_reader );                if( !psz_elname ) return -1;                if( !strcmp( psz_elname, "item" ) )                {                    p_item = playlist_ItemNew( p_playlist, psz_item_mrl,                                               psz_item_name );                    if( p_item == NULL ) break;                    playlist_NodeAddItem( p_playlist, p_item,                                          p_current->pp_parents[0]->i_view,                                          p_current, PLAYLIST_APPEND,                                          PLAYLIST_END );                    /* We need to declare the parents of the node as the                     *                  * same of the parent's ones */                    playlist_CopyParents( p_current, p_item );                    if( psz_item_date )                    {                        vlc_input_item_AddInfo( &p_item->input,                                                _( "Podcast Info" ),                                                _( "Podcast Publication Date" ),                                                "%s",                                                psz_item_date );                    }                    if( psz_item_author )                    {                        vlc_input_item_AddInfo( &p_item->input,                                                _( "Podcast Info" ),                                                _( "Podcast Author" ),                                                "%s",                                                psz_item_author );                    }                    if( psz_item_category )                    {                        vlc_input_item_AddInfo( &p_item->input,                                                _( "Podcast Info" ),                                                _( "Podcast Subcategory" ),                                                "%s",                                                psz_item_category );                    }                    if( psz_item_duration )                    {                        vlc_input_item_AddInfo( &p_item->input,                                                _( "Podcast Info" ),                                                _( "Podcast Duration" ),                                                "%s",                                                psz_item_duration );                    }                    if( psz_item_keywords )                    {                        vlc_input_item_AddInfo( &p_item->input,                                                _( "Podcast Info" ),                                                _( "Podcast Keywords" ),                                                "%s",                                                psz_item_keywords );                    }                    if( psz_item_subtitle )                    {                        vlc_input_item_AddInfo( &p_item->input,                                                _( "Podcast Info" ),                                                _( "Podcast Subtitle" ),                                                "%s",                                                psz_item_subtitle );                    }                    if( psz_item_summary )                    {                        vlc_input_item_AddInfo( &p_item->input,                                                _( "Podcast Info" ),                                                _( "Podcast Summary" ),                                                "%s",                                                psz_item_summary );                    }                    if( psz_item_size )                    {                        vlc_input_item_AddInfo( &p_item->input,                                                _( "Podcast Info" ),                                                _( "Podcast Size" ),                                                "%s bytes",                                                psz_item_size );                    }                    if( psz_item_type )                    {                        vlc_input_item_AddInfo( &p_item->input,                                                _( "Podcast Info" ),                                                _( "Podcast Type" ),                                                "%s",                                                psz_item_type );                    }#define FREE(a) if( a ) free( a ); a = NULL;                    FREE( psz_item_name );                    FREE( psz_item_mrl );                    FREE( psz_item_size );                    FREE( psz_item_type );                    FREE( psz_item_date );                    FREE( psz_item_author );                    FREE( psz_item_category );                    FREE( psz_item_duration );                    FREE( psz_item_keywords );                    FREE( psz_item_subtitle );                    FREE( psz_item_summary );#undef FREE                    b_item = VLC_FALSE;                }                else if( !strcmp( psz_elname, "image" ) )                {                    b_image = VLC_FALSE;                }                free( psz_elname );                psz_elname = strdup("");                break;            }        }    }    if( i_ret != 0 )    {        msg_Warn( p_demux, "error while parsing data" );    }    /* Go back and play the playlist */    if( b_play && p_playlist->status.p_item &&        p_playlist->status.p_item->i_children > 0 )    {        playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,                          p_playlist->status.i_view,                          p_playlist->status.p_item,                          p_playlist->status.p_item->pp_children[0] );    }    vlc_object_release( p_playlist );    p_sys->p_playlist = NULL;    return VLC_SUCCESS;}static int Control( demux_t *p_demux, int i_query, va_list args ){    return VLC_EGENERIC;}

⌨️ 快捷键说明

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