[Fwd: Re: [Ffmpeg-devel] DV Metadata Patch]
Brian Brice
bbrice
Wed Aug 23 03:55:33 CEST 2006
Roman Shaposhnik wrote:
> On Wed, Jul 26, 2006 at 08:04:51PM -0500, Brian Brice wrote:
>> > I've been working on getting metadata for DV encoded frames written
>> > properly within the frame's header. It seems as if lavf/dv.c's
>> > dv_format_frame() is the function that can perform this task, except
>> > it should be done within the codec level rather than output format.
>
> Nice try ;-)
>
>> > The patch I've attached is pretty much moving those functions from the
>> > muxer side to the codec. I'm a bit stuck on the organization that you
>> > guys follow though. This code calls lavf/cutils.c's brktimegm(). I
>> > copied this function from lavf to lavc just as a temporary "get it to
>> > work" solution. The functions in lavf/cutils.c, couldn't they go into
>> > lavu?
>
> That's the trouble -- some of these functions are truly muxer related
> and *can not* be moved to the codec level successfully. Everything that
> deals with date/time/#frames falls into that category.
>
>> > Anyway, I'm sending this patch to you guys for advice on how to organize
>> > this "move" more efficiently within the library. Thanks!
>
> I'll be the one to approve it. So far you're on the right track,
> however:
>
> 1. It seems that the BIG UGLY TABLES (tm) are no longer needed.
> I put them there for testing purposes -- but haven't had
> a single complaint yet. Please consider folding them
> into nice if-then-else code.
>
> 2. The following PACKs should remain in libavformat/dv.c or at least
> not be fully set:
> dv_timecode
> dv_audio_source
> dv_audio_control
> dv_audio_recdate
> dv_audio_rectime
>
> 3. The following PACKs *theoretically* can be set in libavcodec/dv.c, but
> you might find it problematic to convince security minded folks to do that:
> dv_video_recdate
> dv_video_rectime
>
Sorry for taking a while. Here's a patch that will write preliminary
metadata within DV frames on the codec level. This is useful for when
DV is encapsulate in AVI or QuickTime files. It writes the following
sections when encoding a video frame:
dv_header525
dv_header625
dv_video_source
dv_video_control
The remaining sections are left to the DV DIF output format to fill in.
Some functionality was taken out of lavf/dv.c because it'll be done in
the codec instead. It also makes sure not to overwrite what the codec
has set.
Some types were moved to lavc/dvdata.h because they're shared by both
lavc and lavf.
I'm actually not sure what those BIG UGLY TABLES (tm) are necessarily
for, so I left them as is. Sorry, Roman. :-P
--
Brian Brice
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dv-metadata.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060822/eb55fc82/attachment.asc>
More information about the ffmpeg-devel
mailing list