[FFmpeg-devel] [PATCH] Move the video size and rate abbreviations system from libavformat to libavcodec

Stefano Sabatini stefano.sabatini-lala
Thu Jun 7 15:11:15 CEST 2007


On date Wednesday 2007-06-06 17:03:54 +0200, Michael Niedermayer encoded:
> Hi
> 
> On Wed, Jun 06, 2007 at 04:58:28PM +0200, Aurelien Jacobs wrote:
> > On Wed, 06 Jun 2007 16:31:20 +0200
> > Baptiste Coudurier <baptiste.coudurier at smartjog.com> wrote:
> [...]
> > > Right. What about keeping parse* in avformat, making them calling 
> > > av_parse* (which will be added to avcodec), deprecate them, and remove 
> > > them with next major bump ? So you have clean avcodec API right now.
> > 
> > That's a nice plan. I'm for it.
> 
> me too :)

Yes, it's a good idea :-).

So the attached patch does as follows:

* Defines in libavcodec/utils.c:
  * the definition of AbvEntry
  * the array frame_abvs
  * av_parse_image_size
  * av_parse_frame_rate

  Struct defintion and array and functions are moved *unchanged* (but
  the "av_" prefix for the parse_image_size and parse_frame_rate
  functions) from libavformat/utils.c.

* Exports the functions av_parse_image_size and av_parse_frame_rate in 
  libavcodec/avcodec.h.

* Modifies parse_image_size and parse_frame_rate in libavformat/utils.c
  to only call the corresponding av_ functions in libavcodec.
  
* Declares parse_image_size and parse_frame_rate deprecated in
  libavformat/avformat.h.

All this without to break abi.

Suggested changelog message:
"Moves the parse_image_size and parse_frame_rate functionality from
libavformat to libavcodec, deprecates parse_image_size and
parse_frame_rate in favour of av_parse_image_size and
av_parse_frame_rate."

Just another nitpick: I'd prefer to call parse_image_size and
parse_frame_rate in this way:

parse_image_size -> av_parse_video_frame_size
parse_frame_rate -> av_parse_video_frame_rate

for both symmetry and unambiguity ("frame" may refer to both a video or
an audio frame). If you like this I can provide another patch with the
corresponding changes.

Regards.
-- 
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: move-video-abbrs-support-to-libavcodec-01.patch
Type: text/x-diff
Size: 10611 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070607/9c9864ca/attachment.patch>



More information about the ffmpeg-devel mailing list