Exemple #1
0
/*****************************************************************************
 * Import_ZPL: main import function
 *****************************************************************************/
int Import_ZPL( vlc_object_t *p_this )
{
    demux_t *p_demux = (demux_t *)p_this;

    if(! ( demux_IsPathExtension( p_demux, ".zpl" ) || demux_IsForced( p_demux,  "zpl" )))
        return VLC_EGENERIC;

    STANDARD_DEMUX_INIT_MSG( "found valid ZPL playlist" );
    p_demux->p_sys->psz_prefix = FindPrefix( p_demux );

    return VLC_SUCCESS;
}
/*****************************************************************************
 * Import_Shoutcast: main import function
 *****************************************************************************/
int Import_Shoutcast( vlc_object_t *p_this )
{
    demux_t *p_demux = (demux_t *)p_this;

    if( !demux_IsForced( p_demux, "shout-winamp" ) )
        return VLC_EGENERIC;

    p_demux->pf_demux = Demux;
    p_demux->pf_control = Control;
    msg_Dbg( p_demux, "using shoutcast playlist reader" );

    return VLC_SUCCESS;
}
Exemple #3
0
/*****************************************************************************
 * Import_podcast: main import function
 *****************************************************************************/
int Import_podcast( vlc_object_t *p_this )
{
    demux_t *p_demux = (demux_t *)p_this;

    if( !demux_IsForced( p_demux, "podcast" ) )
        return VLC_EGENERIC;

    p_demux->pf_demux = Demux;
    p_demux->pf_control = Control;
    msg_Dbg( p_demux, "using podcast reader" );

    return VLC_SUCCESS;
}
Exemple #4
0
Fichier : b4s.c Projet : AsamQi/vlc
/*****************************************************************************
 * Import_B4S: main import function
 *****************************************************************************/
int Import_B4S( vlc_object_t *p_this )
{
    demux_t *demux = (demux_t *)p_this;

    if( !demux_IsPathExtension( demux, ".b4s" )
     && !demux_IsForced( demux, "b4s-open" ) )
        return VLC_EGENERIC;

    demux->pf_demux = Demux;
    demux->pf_control = Control;

    return VLC_SUCCESS;
}
Exemple #5
0
Fichier : wpl.c Projet : Kafay/vlc
/*****************************************************************************
 * Import_WPL: main import function
 *****************************************************************************/
int Import_WPL( vlc_object_t *p_this )
{
    demux_t *p_demux = (demux_t *)p_this;
    const uint8_t *p_peek;
    CHECK_PEEK( p_peek, 8 );

    if(! ( demux_IsPathExtension( p_demux, ".wpl" ) || demux_IsForced( p_demux,  "wpl" )))
        return VLC_EGENERIC;

    STANDARD_DEMUX_INIT_MSG( "found valid WPL playlist" );
    p_demux->p_sys->psz_prefix = FindPrefix( p_demux );

    return VLC_SUCCESS;
}
Exemple #6
0
/*****************************************************************************
 * Import_Shoutcast: main import function
 *****************************************************************************/
int Import_Shoutcast( vlc_object_t *p_this )
{
    demux_t *p_demux = (demux_t *)p_this;

    if( !demux_IsForced( p_demux, "shout-winamp" ) )
        return VLC_EGENERIC;

    STANDARD_DEMUX_INIT_MSG( "using shoutcast playlist reader" );
    p_demux->p_sys->p_xml = NULL;
    p_demux->p_sys->p_xml_reader = NULL;

    /* Do we want to list adult content ? */
    var_Create( p_demux, "shoutcast-show-adult",
                VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
    p_demux->p_sys->b_adult = var_GetBool( p_demux, "shoutcast-show-adult" );

    return VLC_SUCCESS;
}
Exemple #7
0
/*****************************************************************************
 * Import_PLS: main import function
 *****************************************************************************/
int Import_PLS( vlc_object_t *p_this )
{
    demux_t *p_demux = (demux_t *)p_this;
    const uint8_t *p_peek;
    CHECK_PEEK( p_peek, 10 );

    if( POKE( p_peek, "[playlist]", 10 ) || POKE( p_peek, "[Reference]", 10 ) ||
        demux_IsPathExtension( p_demux, ".pls" )   || demux_IsForced( p_demux, "pls" ) )
    {
        ;
    }
    else return VLC_EGENERIC;

    STANDARD_DEMUX_INIT_MSG(  "found valid PLS playlist file");
    p_demux->p_sys->psz_prefix = FindPrefix( p_demux );

    return VLC_SUCCESS;
}
Exemple #8
0
Fichier : asx.c Projet : Kubink/vlc
int Import_ASX( vlc_object_t *p_this )
{
    demux_t *p_demux = (demux_t *)p_this;

    if( demux_IsPathExtension( p_demux, ".asx" ) ||
        demux_IsPathExtension( p_demux, ".wax" ) ||
        demux_IsPathExtension( p_demux, ".wvx" ) ||
        (
          ( CheckContentType( p_demux->s, "video/x-ms-asf" ) ||
            CheckContentType( p_demux->s, "audio/x-ms-wax" ) ) && PeekASX( p_demux )
        ) ||
        demux_IsForced( p_demux, "asx-open" ) )
    {
        STANDARD_DEMUX_INIT_MSG( "found valid ASX playlist" );
        return VLC_SUCCESS;
    }
    else
        return VLC_EGENERIC;
}
Exemple #9
0
/*****************************************************************************
 * Import_PLS: main import function
 *****************************************************************************/
int Import_PLS( vlc_object_t *p_this )
{
    demux_t *p_demux = (demux_t *)p_this;
    const uint8_t *p_peek;
    CHECK_FILE();
    CHECK_PEEK( p_peek, 10 );

    if( POKE( p_peek, "[playlist]", 10 ) || POKE( p_peek, "[Reference]", 10 ) ||
        demux_IsPathExtension( p_demux, ".pls" )   || demux_IsForced( p_demux, "pls" ) )
    {
        ;
    }
    else return VLC_EGENERIC;

    msg_Dbg( p_demux, "found valid PLS playlist file");
    p_demux->pf_demux = Demux;
    p_demux->pf_control = Control;

    return VLC_SUCCESS;
}
Exemple #10
0
/*****************************************************************************
 * Open: check file and initializes structures
 *****************************************************************************/
static int Open( vlc_object_t * p_this )
{
    demux_t     *p_demux = (demux_t*)p_this;
    demux_sys_t *p_sys;

    /* Identify cdg file by extension, as there is no simple way to
     * detect it */
    if( !demux_IsPathExtension( p_demux, ".cdg" ) && !demux_IsForced( p_demux, "cdg" ) )
        return VLC_EGENERIC;

    /* CDG file size has to be multiple of CDG_FRAME_SIZE (it works even
     * if size is unknown ie 0) */
//    if( (stream_Size( p_demux->s ) % CDG_FRAME_SIZE) != 0 )
//    {
//        msg_Err( p_demux, "Reject CDG file based on its size" );
//        return VLC_EGENERIC;
//    }

    p_sys = malloc( sizeof( demux_sys_t ) );
    if( unlikely(p_sys == NULL) )
        return VLC_ENOMEM;

    p_demux->pf_demux   = Demux;
    p_demux->pf_control = Control;
    p_demux->p_sys      = p_sys;

    /* */
    es_format_Init( &p_sys->fmt, VIDEO_ES, VLC_CODEC_CDG );
    p_sys->fmt.video.i_width  = 300-2*6;
    p_sys->fmt.video.i_height = 216-2*12 ;
    p_sys->fmt.video.i_visible_width = p_sys->fmt.video.i_width;
    p_sys->fmt.video.i_visible_height = p_sys->fmt.video.i_height;

    p_sys->p_es = es_out_Add( p_demux->out, &p_sys->fmt );

    /* There is CDG_FRAME_RATE frames per second */
    date_Init( &p_sys->pts, CDG_FRAME_RATE, 1 );
    date_Set( &p_sys->pts, 0 );

    return VLC_SUCCESS;
}
Exemple #11
0
int Import_ASX( vlc_object_t *p_this )
{
    demux_t *p_demux = (demux_t *)p_this;

    CHECK_FILE();
    if( demux_IsPathExtension( p_demux, ".asx" ) ||
        demux_IsPathExtension( p_demux, ".wax" ) ||
        demux_IsPathExtension( p_demux, ".wvx" ) ||
        (
          ( CheckContentType( p_demux->s, "video/x-ms-asf" ) ||
            CheckContentType( p_demux->s, "audio/x-ms-wax" ) ) && PeekASX( p_demux )
        ) ||
        demux_IsForced( p_demux, "asx-open" ) )
    {
        msg_Dbg( p_demux, "found valid ASX playlist" );
    }
    else
        return VLC_EGENERIC;

    p_demux->pf_control = Control;
    p_demux->pf_demux = Demux;
    return VLC_SUCCESS;
}