[MPlayer-dev-eng] [PATCH] initial transport stream demuxer

Nico Sabbi nsabbi at libero.it
Wed Feb 19 14:45:47 CET 2003


19/02/2003 14.01.54, Arpi <arpi at thot.banki.hu> wrote:

>1. you forgot to add DEMPXER_TYPE_MPEG_TS to the mpeg header and frame
>parsers in video.c:

right, now I remember  why it works in -rc3 :)


>now it plays the TS sample file i have.
>
>the 2. problem is more like implementation, and understaning of the demuxer
>API. your emuxer should honor the stream IDs it get from the caller.
>including the 2 special values:
>demuxer->audio(/video)->id == -2 means 'ignore this stream', used for
>   -nosound, no vidoe codec and -dump* options.
>demuxer->audio(/video)->id == -1 means autodetection of stream ID (use the
>   first/best available stream)
>all ID values >=0 means stream id explicitly given by use (-aid/-vid/-sid
>options) so you should take only the requested stream id, and fail if no
>such stream in the file. in the case of TS, you should consider this ID as
>TS PID.
>unfortunatelly TS PIDs may be 0..8192, while the current limits in demuxer
>layer are 0..255. so, you should do either some internal remapping of PIDs
>to IDs (probably an &255 si enough) or change limits in demuxer.h and
>cfg-common.h for IDs.
>
>the most important that you should not create streams (new_sh_audio/video)
>if ID==-2, and drop packets (instead of calling ds_add_packet()) if ID==-2
>the next step - for supporting more than one a/v streams in a TS file) is
>the ID checking.
>
>



Fine, I'll make those changes tonight and I will also try to   make chaining work.

Thanks very much for your help.

		Nico






More information about the MPlayer-dev-eng mailing list