[Ffmpeg-devel] Interleaving audio and video

Michael Niedermayer michaelni
Mon Feb 5 12:19:42 CET 2007


Hi

On Sun, Feb 04, 2007 at 06:06:14PM -0800, Roman Shaposhnik wrote:
> Hi
> 
> On Mon, 2007-02-05 at 01:35 +0100, Michael Niedermayer wrote:
> > >   Hm. In that case personally I don't know of any place I would
> > > logically extract this code to. So unless you or Baptiste can
> > > take a lead on figuring this out, I guess I would have
> > > to keep all of the packetizer code in dvenc.c. I actually
> > > have what seems to be a reasonable patch for it to get
> > > rid of Fifo and make code faster. Its just that it'll be
> > > premature to commit it if we can agree on a common place
> > > for such code to be in for all the muxers that require it.
> > > All in all, I think I'll wait a couple of days.
> > 
> > i really dont understand what you want, 
> 
>   I guess I was just following Baptiste suggestion that ffmpeg could
> benefit from an AVPacketizer. I thought it would be good idea. Here's
> how I imagined it would be used by DV: if I can guarantee that all
> incoming Audio packets are of a certain predetermined length (something
> our imaginary  AVPacketizer would take care of) and are always
> interleaved properly (something I can already do if I use 
> av_interleaved_write_frame() & co.) that would turn DV muxer into
> a trivial reshuffling routine. That would also simplify GXF and
> would help it not misuse av_interleaved_write_frame().
> 
>   Does it make it clearer ?
> 
> > mpeg-ps uses fifos and thats
> > what it should use, dv does some sample reshuffle and _missuses_ a
> > fifo for this (which because its not supposed to be done that way is
> > slow), if you fix dv thats great, but i dont see what code you want 
> > to share with any other muxer, cutting and merging packets is exactly
> > what a fifo should be used for, iam not aware of another muxer which
> > does mandatory sample reshuffle
> 
>   Fifo is fine. And just to make sure that I don't misuse it again
> my plan to fix DV muxer to reshuffle samples immediately as
> they get delivered to me by dv_write_packet() (basically
> turning them into DIF blocks and storing these DIF blocks
> for later use when I get a video frame for them). Now since I would
> need a sort of a circular buffer for taking care of reusing 
> DIF blocks I might use Fifo to manage that.

a fifo with pointers to DIF blocks? well i dunno .... if you want to do that
i wont object but i have a odd feeling about this ...
just dont "extend" fifo.c/h, reading writing sizeof(*dif) into my_dif_ptr
doesnt need void* r/w routines

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

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070205/4e947517/attachment.pgp>



More information about the ffmpeg-devel mailing list