[FFmpeg-devel] [RFC/PATCH] Pass PRIVATE_STREAM_2 MPEG-PS packets to caller

Richard peper03 at yahoo.com
Sun Mar 17 23:50:27 CET 2013


On 17/03/13 16:25, Michael Niedermayer wrote:
> On Sun, Mar 17, 2013 at 10:22:34AM +0100, Richard wrote:
>> On 17/03/13 10:01, Richard wrote:
>>> On 17/03/13 01:46, Michael Niedermayer wrote:
>>>> On Sun, Mar 17, 2013 at 12:16:23AM +0100, Richard wrote:
>>>>>
>>>>
>>>>>   libavcodec/Makefile         |    1
>>>>>   libavcodec/allcodecs.c      |    1
>>>>>   libavcodec/avcodec.h        |    2
>>>>>   libavcodec/codec_desc.c     |    6 ++
>>>>>   libavcodec/dvd_nav_parser.c |  116
>>>>> ++++++++++++++++++++++++++++++++++++++++++++
>>>>>   libavcodec/version.h        |    2
>>>>>   libavformat/mpeg.c          |   94 +++++++++++++++++++++++++++++++----
>>>>>   7 files changed, 209 insertions(+), 13 deletions(-)
>>>>> 0694f9365d66b9acabed118eb80d56fb6433a0cd
>>>>> 0001-Add-passing-DVD-navigation-packets-startcode-0x1bf-t.patch
>>>>>  From ef3b2e0758f8c1562413b3a2aff14572f8b7500a Mon Sep 17 00:00:00 2001
>>>>> From: Richard <peper03 at yahoo.com>
>>>>> Date: Sun, 17 Mar 2013 00:14:59 +0100
>>>>> Subject: [PATCH] Add passing DVD navigation packets (startcode 0x1bf) to
>>>>>   caller to allow better playback handling of DVDs.  The two
>>>>>   types of packets (PCI and DSI) are passed untouched but
>>>>>   combined by the new codec ID AV_CODEC_ID_DVD_NAV.  The
>>>>>   first 980 bytes in the packet contain the PCI data.  The
>>>>>   next 1018 are the DSI data.
>>>>
>>>> This breaks demuxing of sofdec:
>>>> for example:
>>>> http://samples.ffmpeg.org/game-formats/sfd/stl_ten_1_big.sfd
>>>
>>> *sigh*
>>
>> *double sigh*
>>
>
>>   libavcodec/Makefile         |    1
>>   libavcodec/allcodecs.c      |    1
>>   libavcodec/avcodec.h        |    2
>>   libavcodec/codec_desc.c     |    6 ++
>>   libavcodec/dvd_nav_parser.c |  116 ++++++++++++++++++++++++++++++++++++++++++++
>>   libavcodec/version.h        |    2
>>   libavformat/mpeg.c          |   95 +++++++++++++++++++++++++++++++-----
>>   7 files changed, 210 insertions(+), 13 deletions(-)
>> ce65b6ac4b97e7a822b8b554f0e4e2af32d62dac  0001-Add-passing-DVD-navigation-packets-startcode-0x1bf-t.patch
>>  From d195035ce13dfcfb7fe2427114e69afe89886d7d Mon Sep 17 00:00:00 2001
>> From: Richard <peper03 at yahoo.com>
>> Date: Sun, 17 Mar 2013 10:21:12 +0100
>> Subject: [PATCH] Add passing DVD navigation packets (startcode 0x1bf) to
>>   caller to allow better playback handling of DVDs.  The two
>>   types of packets (PCI and DSI) are passed untouched but
>>   combined by the new codec ID AV_CODEC_ID_DVD_NAV.  The
>>   first 980 bytes in the packet contain the PCI data.  The
>>   next 1018 are the DSI data.
>
> applied

Thanks.  Rather scrappy, but nice to get it in finally :)

> btw could the offsets in there be used for seeking more accurately?
> using the avformat seeking API ?

Possibly.  I don't know the seeking API and, to be honest, I've not had 
much cause to deal with seeking yet but the DSI packet is basically all 
about searching/seeking.  vobu_1stref_ea, vobu_2ndref_ea and 
vobu_3rdref_ea should give you references within the current VOB unit 
(i.e. up to the next NAV pack) to the 1st, 2nd and 3rd I/P frames but 
particularly the offsets in VOBU_SRI are designed to help you jump 
0.5-120 seconds forwards and backwards within the current vob/cell.

The references on mplayerhq.hu say that bit 31 indicates a valid 
pointer.  My understanding is that bit 31 indicates whether the 
referenced NAV packet contains video or not.

Richard.



More information about the ffmpeg-devel mailing list