[FFmpeg-devel] Audio conversion and floating-point codecs

Peter Ross pross
Sat Jul 17 12:15:58 CEST 2010


On Sat, Jul 10, 2010 at 11:49:57PM +0200, Michael Niedermayer wrote:
> On Sat, Jul 10, 2010 at 11:47:45PM +0200, Michael Niedermayer wrote:
> > On Sat, Jul 10, 2010 at 04:53:48PM -0400, Ronald S. Bultje wrote:
> > > Hi,
> > > 
> > > On Sat, Jul 10, 2010 at 4:11 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > > > AVFrame could be extended and used for audio frames for example
> > > 
> > > That takes all this a little far, isn't AVAudioFrame easier?
> > 
> > I dont mind but there should be a parent struct that contains the common
> > fields so generic code is possible
> 
> This has the problem though that adding more common fields means breaking
> ABI

I am swaying towards AVAudioFrame:

* the only field shared between audio and video is frame->data.

* need a variable number of channels. makes sense to dynamically
  allocate the frame->data array, to avoid having an
  AVCODEC_MAX_CHANNELS macro.

* need audio-specific get_buffer/release_buffer routines.

  so it's adding a switch type statement to the existing default_xxx_functions,
  or declaring new get_audio_buffer/release_audio_buffer.

  the later makes it more obvious to the user/developer

* the subtitle stuff declares its own structure, sso makes sense for
  audio to have its own too.

* Type checking, e.g. attempting to feed an audio frame into a
  video encoder will give a compile time error

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100717/d7018466/attachment.pgp>



More information about the ffmpeg-devel mailing list