[MPlayer-dev-eng] Q: new_demuxers_demuxer procedure

Nico nsabbi at libero.it
Wed Jul 9 22:04:16 CEST 2003


Hi,
is this procedure correct to initialize  a  demuxer that
    1) demuxes audio itself
    2) relies video to  demux_mpg

?

The following code doesn't find any video, even when changing 0 with -1 
in new_sh_video and od->video->id = -1;
        .....

        if(vt)
        {
                  s = new_ds_stream(demuxer->video);
                  od = new_demuxer(s, DEMUXER_TYPE_MPEG_ES, -2, 0, -2);

                  //
                  sh_video = new_sh_video(od, 0);
                  od->video->id = 0;
                  od->audio->id = -2;
                  od->video->sh = sh_video;
                  sh_video->ds = od->video;
                  sh_video->format = vt;
                  //

                mp_msg(MSGT_DEMUXER,MSGL_INFO, "OPENED_SH_VIDEO, VD: %x\n");
        }

       if(at)
        {
                sh_audio = new_sh_audio(demuxer, 0);
                sh_audio->ds = demuxer->audio;
                sh_audio->format = at;
                demuxer->audio->sh = sh_audio;

                mp_msg(MSGT_DEMUXER,MSGL_INFO, "OPENED_SH_AUDIO\n");
        }

                demuxer = new_demuxers_demuxer(od, demuxer, demuxer);

        demuxer->movi_start = 0;
        demuxer->movi_end = demuxer->stream->end_pos;

        stream_seek(demuxer->stream, 0);               

        return demuxer;
 


Thanks,
            Nico



More information about the MPlayer-dev-eng mailing list