[FFmpeg-devel] [patch] export pmt and pcr pids from mpegts demuxer

Michael Niedermayer michaelni
Fri Jun 11 00:18:05 CEST 2010


On Mon, Jun 07, 2010 at 07:21:09PM -0700, Baptiste Coudurier wrote:
> On 06/07/2010 07:08 PM, Michael Niedermayer wrote:
>> On Sun, Jun 06, 2010 at 01:11:35PM -0400, Mike Scheutzow wrote:
>>> This patch allows a libav application to obtain the pmt pid(s) and pcr
>>> pid(s) values parsed by the mpegts demuxer. This is useful for 
>>> applications
>>> that need the output stream pids to match the input stream pids.
>>>
>>> The pid values are added to AVProgram.metadata inside the 
>>> AVFormatContext.
>>>
>>> Example:    key="pmt_pid" value="129"
>>>     key="pcr_pid" value="1064"
>>>
>>> Values are base10.  This patch supports multiple programs per transport
>>> stream.
>>>
>>> Feedback appreciated.
>>
>> this feels like a misuse of the metadata API
>
> Well, I don't agree, poluting AVStream with this format specific values 
> seems really ugly to me.

iam not saying to put them in AVStream, actually iam not sure myself where
to put them, maybe you can elaborate a bit on the use cases of these fields?
Extending AVOptions to allow accessing demuxer specific contexts might be
an option maybe but then maybe not iam not sure.

Puttiing them in metadata though means they will be copied into the output
files metadata too. ( like a .mkv or .mov) and further copying to mpg in a
second step might then even create actual problems if the muxer does something
with these tags.

also as we are alraedy speaking of this, SCR/PCR arent exported currently
and they should as they are needed for clock synchronization of the user
application for actual stream where the user application is not in control
of the incomming data rate.


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100611/96232de5/attachment.pgp>



More information about the ffmpeg-devel mailing list