[FFmpeg-devel] [PATCH] 5 of 5 Add Speex Encoding
Wed Jul 8 01:01:13 CEST 2009
Art Clarke wrote:
> On Tue, Jul 7, 2009 at 7:29 AM, Michael Niedermayer <michaelni at gmx.at>wrote:
>>> 2) in flvenc.c, either don't enforce the frames-per-packet (assume the
>>> knows what they are doing) or just warn people if is not between 1 and 8.
>> i think iam in favor of letting the user shoot himself, if that is what he
>> asks for, that said thats just a very weak oppinion of mine, i dont mind
>> a check ...
> Any suggestions on the best way to make this configurable in libspeexenc.c?
> My default idea is to add (yet another) field at the end of AVCodecContext
> named "frames_per_packet", make it settable in libavcodec/options.c, and
> then use it in libspeexenc.c (and potentially any other codecs that need
> it). This would be a minor version bump for libavcodec.
Here is my idea:
add frames_per_packet to AVCodecContext
- min/max_frames_per_packet might be useful too for when it needs
to be variable
add num_frames to AVPacket, 0 for incomplete or partial
new audio encoding function that outputs to an AVPacket
demuxer: set num_frames based on extradata or parsing
parser: parse out full frames if needed and determine num_frames
decoder: decode all frames in the packet
encoder: encode frame(s) based on user settings and set num_frames
muxer: able to determine if num_frames is compatible with the container
More information about the ffmpeg-devel