[MPlayer-dev-eng] Transport Stream demuxer help

Arpi arpi at thot.banki.hu
Mon Feb 17 00:50:10 CET 2003


Hi,

> I added these lines in demux_open_ts   (taken from demux_ogg):
> 
>         s = new_ds_stream(demuxer->video);
>         od = new_demuxer(s, DEMUXER_TYPE_MPEG_PS, -2, 0, -2);

ok

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

this should be done by the mpeg-ops demuxer

>         /// Return the joined demuxers
>         return new_demuxers_demuxer(od, demuxer, demuxer);

you shouldn't mix the raw and mpeg demuxer sthis way, imho
new_demuxers_demuxer(od,od,od) is the right line.

but anyway i would use instead of the above:

	// assuming demuxer->type == DEMUXER_TYPE_MPEG_TS and that you
	// write PS packets to the video queue of 'demuxer'
        s = new_ds_stream(demuxer->video);
	return demux_open_stream(s,DEMUXER_TYPE_MPEG_PS,-1,-1,-1,NULL);

maybe write 0 (or (PS! not the TS!) stream id) instead of -1.

> Do I have to fill a part of demuxer->video before running 
> new_demuxers_demuxer?
no. but opening the mpeg-ps demuxer will do several calls to stream_read
thus to fill_buffer of your ts demuxer.


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
    "However, many people beg for its inclusion in Debian. Why?" - Gabucino
  "Because having new software in Debian is good." - Josselin Mouette
"Because having good software in Debian is new." - Gabucino


More information about the MPlayer-dev-eng mailing list