Exemplo n.º 1
0
ts_pes_t *ts_pes_New( demux_t *p_demux, ts_pmt_t *p_program )
{
    VLC_UNUSED(p_demux);
    ts_pes_t *pes = malloc( sizeof( ts_pes_t ) );
    if( !pes )
        return NULL;

    pes->p_es = ts_pes_es_New( p_program );
    if( !pes->p_es )
    {
        free( pes );
        return NULL;
    }
    pes->i_stream_type = 0;
    pes->data_type = TS_ES_DATA_PES;
    pes->i_data_size = 0;
    pes->i_data_gathered = 0;
    pes->p_data = NULL;
    pes->pp_last = &pes->p_data;
    pes->b_always_receive = false;
    pes->p_sections_proc = NULL;
    pes->p_prepcr_outqueue = NULL;
    pes->sl.p_data = NULL;
    pes->sl.pp_last = &pes->sl.p_data;

    return pes;
}
Exemplo n.º 2
0
ts_pes_t *ts_pes_New( demux_t *p_demux, ts_pmt_t *p_program )
{
    VLC_UNUSED(p_demux);
    ts_pes_t *pes = malloc( sizeof( ts_pes_t ) );
    if( !pes )
        return NULL;

    pes->p_es = ts_pes_es_New( p_program );
    if( !pes->p_es )
    {
        free( pes );
        return NULL;
    }
    pes->i_stream_type = 0;
    pes->transport = TS_TRANSPORT_PES;
    pes->gather.i_data_size = 0;
    pes->gather.i_gathered = 0;
    pes->gather.p_data = NULL;
    pes->gather.pp_last = &pes->gather.p_data;
    pes->gather.i_saved = 0;
    pes->b_broken_PUSI_conformance = false;
    pes->b_always_receive = false;
    pes->p_sections_proc = NULL;
    pes->prepcr.p_head = NULL;
    pes->prepcr.pp_last = &pes->prepcr.p_head;
    pes->sl.p_data = NULL;
    pes->sl.pp_last = &pes->sl.p_data;

    return pes;
}