- Microsoft Expression Encoder Screen decoder
- RTMPS protocol support
- RTMPTS protocol support
-- JPEG 2000 encoding support through OpenJPEG
-- G.723.1 demuxer and decoder
- RTMPE protocol support
- RTMPTE protocol support
+- showwaves filter
+- LucasArts SMUSH playback support
+- SAMI, RealText and SubViewer demuxers and decoders
+- Heart Of Darkness PAF playback support
+- iec61883 device
+- asettb filter
+- new option: -progress
+- 3GPP Timed Text encoder/decoder
+- GeoTIFF decoder support
+- ffmpeg -(no)stdin option
+- Opus decoder using libopus
+- caca output device using libcaca
+- alphaextract and alphamerge filters
+- concat filter
+- flite filter
- Canopus Lossless Codec decoder
-- avconv -shortest option is now per-output file
+- bitmap subtitles in filters (experimental and temporary)
+- MP2 encoding via TwoLAME
+- bmp parser
+- smptebars source
+- asetpts filter
+- hue filter
+- ICO muxer
+- SubRip encoder and decoder without embedded timing
+- edge detection filter
+- framestep filter
++- ffmpeg -shortest option is now per-output file
+
+
+version 0.11:
+
+- Fixes: CVE-2012-2772, CVE-2012-2774, CVE-2012-2775, CVE-2012-2776, CVE-2012-2777,
+ CVE-2012-2779, CVE-2012-2782, CVE-2012-2783, CVE-2012-2784, CVE-2012-2785,
+ CVE-2012-2786, CVE-2012-2787, CVE-2012-2788, CVE-2012-2789, CVE-2012-2790,
+ CVE-2012-2791, CVE-2012-2792, CVE-2012-2793, CVE-2012-2794, CVE-2012-2795,
+ CVE-2012-2796, CVE-2012-2797, CVE-2012-2798, CVE-2012-2799, CVE-2012-2800,
+ CVE-2012-2801, CVE-2012-2802, CVE-2012-2803, CVE-2012-2804,
+- v408 Quicktime and Microsoft AYUV Uncompressed 4:4:4:4 encoder and decoder
+- setfield filter
+- CDXL demuxer and decoder
+- Apple ProRes encoder
+- ffprobe -count_packets and -count_frames options
+- Sun Rasterfile Encoder
+- ID3v2 attached pictures reading and writing
+- WMA Lossless decoder
+- bluray protocol
+- blackdetect filter
+- libutvideo encoder wrapper (--enable-libutvideo)
+- swapuv filter
+- bbox filter
+- XBM encoder and decoder
+- RealAudio Lossless decoder
+- ZeroCodec decoder
+- tile video filter
+- Metal Gear Solid: The Twin Snakes demuxer
+- OpenEXR image decoder
+- removelogo filter
+- drop support for ffmpeg without libavfilter
+- drawtext video filter: fontconfig support
+- ffmpeg -benchmark_all option
+- super2xsai filter ported from libmpcodecs
+- add libavresample audio conversion library for compatibility
+- MicroDVD decoder
+- Avid Meridien (AVUI) encoder and decoder
+- accept + prefix to -pix_fmt option to disable automatic conversions.
+- complete audio filtering in libavfilter and ffmpeg
+- add fps filter
+- vorbis parser
+- png parser
+- audio mix filter
-version 0.8:
+version 0.10:
+- Fixes: CVE-2011-3929, CVE-2011-3934, CVE-2011-3935, CVE-2011-3936,
+ CVE-2011-3937, CVE-2011-3940, CVE-2011-3941, CVE-2011-3944,
+ CVE-2011-3945, CVE-2011-3946, CVE-2011-3947, CVE-2011-3949,
+ CVE-2011-3950, CVE-2011-3951, CVE-2011-3952
+- v410 Quicktime Uncompressed 4:4:4 10-bit encoder and decoder
+- SBaGen (SBG) binaural beats script demuxer
+- OpenMG Audio muxer
+- Timecode extraction in DV and MOV
+- thumbnail video filter
+- XML output in ffprobe
+- asplit audio filter
+- tinterlace video filter
+- astreamsync audio filter
+- amerge audio filter
+- ISMV (Smooth Streaming) muxer
- GSM audio parser
- SMJPEG muxer
-
-
-version 0.8_beta2:
-
+- XWD encoder and decoder
- Automatic thread count based on detection number of (available) CPU cores
-- Deprecate libpostproc. If desired, the switch --enable-postproc will
- enable it but it may be removed in a later Libav release.
+- y41p Brooktree Uncompressed 4:1:1 12-bit encoder and decoder
+- ffprobe -show_error option
+- Avid 1:1 10-bit RGB Packer codec
+- v308 Quicktime Uncompressed 4:4:4 encoder and decoder
+- yuv4 libquicktime packed 4:2:0 encoder and decoder
+- ffprobe -show_frames option
+- silencedetect audio filter
+- ffprobe -show_program_version, -show_library_versions, -show_versions options
- rv34: frame-level multi-threading
- optimized iMDCT transform on x86 using SSE for for mpegaudiodec
+- Improved PGS subtitle decoder
+- dumpgraph option to lavfi device
+- r210 and r10k encoders
+- ffwavesynth decoder
+- aviocat tool
+- ffeval tool
-version 0.8_beta1:
+version 0.9:
+- openal input device added
+- boxblur filter added
- BWF muxer
- Flash Screen Video 2 decoder
-- ffplay/ffprobe/ffserver renamed to avplay/avprobe/avserver
-- ffmpeg deprecated, added avconv, which is almost the same for now, except
+- lavfi input device added
+- added avconv, which is almost the same for now, except
for a few incompatible changes in the options, which will hopefully make them
easier to use. The changes are:
* The options placement is now strictly enforced! While in theory the
static char get_media_type_char(enum AVMediaType type)
{
- static const char map[AVMEDIA_TYPE_NB] = {
- [AVMEDIA_TYPE_VIDEO] = 'V',
- [AVMEDIA_TYPE_AUDIO] = 'A',
- [AVMEDIA_TYPE_DATA] = 'D',
- [AVMEDIA_TYPE_SUBTITLE] = 'S',
- [AVMEDIA_TYPE_ATTACHMENT] = 'T',
- };
- return type >= 0 && type < AVMEDIA_TYPE_NB && map[type] ? map[type] : '?';
+ switch (type) {
+ case AVMEDIA_TYPE_VIDEO: return 'V';
+ case AVMEDIA_TYPE_AUDIO: return 'A';
++ case AVMEDIA_TYPE_DATA: return 'D';
+ case AVMEDIA_TYPE_SUBTITLE: return 'S';
++ case AVMEDIA_TYPE_ATTACHMENT:return 'T';
+ default: return '?';
+ }
}
- int opt_codecs(const char *opt, const char *arg)
+ static const AVCodec *next_codec_for_id(enum AVCodecID id, const AVCodec *prev,
+ int encoder)
{
- AVCodec *p = NULL, *p2;
- const char *last_name;
+ while ((prev = av_codec_next(prev))) {
+ if (prev->id == id &&
+ (encoder ? av_codec_is_encoder(prev) : av_codec_is_decoder(prev)))
+ return prev;
+ }
+ return NULL;
+ }
+
+ static void print_codecs_for_id(enum AVCodecID id, int encoder)
+ {
+ const AVCodec *codec = NULL;
+
+ printf(" (%s: ", encoder ? "encoders" : "decoders");
+
+ while ((codec = next_codec_for_id(id, codec, encoder)))
+ printf("%s ", codec->name);
+
+ printf(")");
+ }
+
-void show_codecs(void)
++int show_codecs(const char *opt, const char *arg)
+ {
+ const AVCodecDescriptor *desc = NULL;
+
printf("Codecs:\n"
- " D....... = Decoding supported\n"
- " .E...... = Encoding supported\n"
- " ..V..... = Video codec\n"
- " ..A..... = Audio codec\n"
- " ..S..... = Subtitle codec\n"
- " ...S.... = Supports draw_horiz_band\n"
- " ....D... = Supports direct rendering method 1\n"
- " .....T.. = Supports weird frame truncation\n"
- " ......F. = Supports frame-based multi-threaded decoding\n"
- " ......S. = Supports slice-based multi-threaded decoding\n"
- " ......B. = Supports both frame-based and slice-based multi-threaded decoding\n"
- " .......F = Supports frame-based multi-threaded encoding\n"
- " .......S = Supports slice-based multi-threaded encoding\n"
- " .......B = Supports both frame-based and slice-based multi-threaded encoding\n"
- " --------\n");
- last_name= "000";
- for (;;) {
- int decode = 0;
- int encode = 0;
- int cap = 0;
-
- p2 = NULL;
- while ((p = av_codec_next(p))) {
- if ((p2 == NULL || strcmp(p->name, p2->name) < 0) &&
- strcmp(p->name, last_name) > 0) {
- p2 = p;
- decode = encode = cap = 0;
+ " D... = Decoding supported\n"
+ " .E.. = Encoding supported\n"
+ " ..V. = Video codec\n"
+ " ..A. = Audio codec\n"
+ " ..S. = Subtitle codec\n"
+ " ...I = Intra frame-only codec\n"
+ " -----\n");
+ while ((desc = avcodec_descriptor_next(desc))) {
+ const AVCodec *codec = NULL;
+
+ printf(avcodec_find_decoder(desc->id) ? "D" : ".");
+ printf(avcodec_find_encoder(desc->id) ? "E" : ".");
+
+ printf("%c", get_media_type_char(desc->type));
+ printf((desc->props & AV_CODEC_PROP_INTRA_ONLY) ? "I" : ".");
+
+ printf(" %-20s %s", desc->name, desc->long_name ? desc->long_name : "");
+
+ /* print decoders/encoders when there's more than one or their
+ * names are different from codec name */
+ while ((codec = next_codec_for_id(desc->id, codec, 0))) {
+ if (strcmp(codec->name, desc->name)) {
+ print_codecs_for_id(desc->id, 0);
+ break;
}
- if (p2 && strcmp(p->name, p2->name) == 0) {
- if (av_codec_is_decoder(p))
- decode = 1;
- if (av_codec_is_encoder(p))
- encode = 1;
- cap |= p->capabilities;
+ }
+ codec = NULL;
+ while ((codec = next_codec_for_id(desc->id, codec, 1))) {
+ if (strcmp(codec->name, desc->name)) {
+ print_codecs_for_id(desc->id, 1);
+ break;
}
}
- if (p2 == NULL)
- break;
- last_name = p2->name;
- printf(" %s%s%c%s%s%s%s%s %-15s %s",
- decode ? "D" : (/* p2->decoder ? "d" : */ " "),
- encode ? "E" : " ",
- get_media_type_char(p2->type),
- cap & CODEC_CAP_DRAW_HORIZ_BAND ? "S" : " ",
- cap & CODEC_CAP_DR1 ? "D" : " ",
- cap & CODEC_CAP_TRUNCATED ? "T" : " ",
- decode ?
- cap & CODEC_CAP_FRAME_THREADS ? cap & CODEC_CAP_SLICE_THREADS ? "B" : "F" :
- cap & CODEC_CAP_SLICE_THREADS ? "S" : " "
- : " ",
- encode ?
- cap & CODEC_CAP_FRAME_THREADS ? cap & CODEC_CAP_SLICE_THREADS ? "B" : "F" :
- cap & CODEC_CAP_SLICE_THREADS ? "S" : " "
- : " ",
- p2->name,
- p2->long_name ? p2->long_name : "");
- #if 0
- if (p2->decoder && decode == 0)
- printf(" use %s for decoding", p2->decoder->name);
- #endif
printf("\n");
}
- printf("\n");
- printf("Note, the names of encoders and decoders do not always match, so there are\n"
- "several cases where the above table shows encoder only or decoder only entries\n"
- "even though both encoding and decoding are supported. For example, the h263\n"
- "decoder corresponds to the h263 and h263p encoders, for file formats it is even\n"
- "worse.\n");
++ return 0;
+ }
+
+ static void print_codecs(int encoder)
+ {
+ const AVCodecDescriptor *desc = NULL;
+
+ printf("%s:\n"
- " V... = Video\n"
- " A... = Audio\n"
- " S... = Subtitle\n"
- " .F.. = Frame-level multithreading\n"
- " ..S. = Slice-level multithreading\n"
- " ...X = Codec is experimental\n"
- " ---\n",
++ " V..... = Video\n"
++ " A..... = Audio\n"
++ " S..... = Subtitle\n"
++ " .F.... = Frame-level multithreading\n"
++ " ..S... = Slice-level multithreading\n"
++ " ...X.. = Codec is experimental\n"
++ " ....B. = Supports draw_horiz_band\n"
++ " .....D = Supports direct rendering method 1\n"
++ " ------\n",
+ encoder ? "Encoders" : "Decoders");
+ while ((desc = avcodec_descriptor_next(desc))) {
+ const AVCodec *codec = NULL;
+
+ while ((codec = next_codec_for_id(desc->id, codec, encoder))) {
+ printf("%c", get_media_type_char(desc->type));
+ printf((codec->capabilities & CODEC_CAP_FRAME_THREADS) ? "F" : ".");
+ printf((codec->capabilities & CODEC_CAP_SLICE_THREADS) ? "S" : ".");
+ printf((codec->capabilities & CODEC_CAP_EXPERIMENTAL) ? "X" : ".");
++ printf((codec->capabilities & CODEC_CAP_DRAW_HORIZ_BAND)?"B" : ".");
++ printf((codec->capabilities & CODEC_CAP_DR1) ? "D" : ".");
+
+ printf(" %-20s %s", codec->name, codec->long_name ? codec->long_name : "");
+ if (strcmp(codec->name, desc->name))
+ printf(" (codec %s)", desc->name);
+
+ printf("\n");
+ }
+ }
+ }
+
+ int show_decoders(const char *opt, const char *arg)
+ {
+ print_codecs(0);
+ return 0;
+ }
+
+ int show_encoders(const char *opt, const char *arg)
+ {
+ print_codecs(1);
return 0;
}
/**
* Print a listing containing all the codecs supported by the
* program.
+ * This option processing function does not utilize the arguments.
*/
- int opt_codecs(const char *opt, const char *arg);
-void show_codecs(void);
++int show_codecs(const char *opt, const char *arg);
+
+ /**
+ * Print a listing containing all the decoders supported by the
+ * program.
+ */
+ int show_decoders(const char *opt, const char *arg);
+
+ /**
+ * Print a listing containing all the encoders supported by the
+ * program.
+ */
+ int show_encoders(const char *opt, const char *arg);
/**
* Print a listing containing all the filters supported by the
- { "L", OPT_EXIT, {(void*)show_license}, "show license" },
- { "h", OPT_EXIT, {(void*)show_help}, "show help" },
- { "?", OPT_EXIT, {(void*)show_help}, "show help" },
- { "help", OPT_EXIT, {(void*)show_help}, "show help" },
- { "-help", OPT_EXIT, {(void*)show_help}, "show help" },
- { "version", OPT_EXIT, {(void*)show_version}, "show version" },
- { "formats" , OPT_EXIT, {(void*)show_formats }, "show available formats" },
+ { "L", OPT_EXIT, {(void*)opt_license}, "show license" },
+ { "h", OPT_EXIT, {(void*)opt_help}, "show help" },
+ { "?", OPT_EXIT, {(void*)opt_help}, "show help" },
+ { "help", OPT_EXIT, {(void*)opt_help}, "show help" },
+ { "-help", OPT_EXIT, {(void*)opt_help}, "show help" },
+ { "version", OPT_EXIT, {(void*)opt_version}, "show version" },
+ { "formats" , OPT_EXIT, {(void*)opt_formats }, "show available formats" },
- { "codecs" , OPT_EXIT, {(void*)opt_codecs }, "show available codecs" },
+ { "codecs" , OPT_EXIT, {(void*)show_codecs }, "show available codecs" },
+ { "decoders" , OPT_EXIT, {(void*)show_decoders }, "show available decoders" },
+ { "encoders" , OPT_EXIT, {(void*)show_encoders }, "show available encoders" },
- { "bsfs" , OPT_EXIT, {(void*)show_bsfs }, "show available bit stream filters" },
- { "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
- { "filters", OPT_EXIT, {(void*)show_filters }, "show available filters" },
- { "pix_fmts" , OPT_EXIT, {(void*)show_pix_fmts }, "show available pixel formats" },
+ { "bsfs" , OPT_EXIT, {(void*)opt_bsfs }, "show available bit stream filters" },
+ { "protocols", OPT_EXIT, {(void*)opt_protocols}, "show available protocols" },
+ { "filters", OPT_EXIT, {(void*)opt_filters }, "show available filters" },
+ { "pix_fmts" , OPT_EXIT, {(void*)opt_pix_fmts }, "show available pixel formats" },
{ "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" },
{ "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
{ "v", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
This option has been deprecated. Use the @code{asyncts} audio filter instead.
@item -copyts
Copy timestamps from input to output.
-@item -copytb
-Copy input stream time base from input to output when stream copying.
+@item -copytb @var{mode}
+Specify how to set the encoder timebase when stream copying. @var{mode} is an
+integer numeric value, and can assume one of the following values:
+
+@table @option
+@item 1
+Use the demuxer timebase.
+
+The time base is copied to the output encoder from the corresponding input
+demuxer. This is sometimes required to avoid non monotonically increasing
+timestamps when copying video streams with variable frame rate.
+
+@item 0
+Use the decoder timebase.
+
+The time base is copied to the output encoder from the corresponding input
+decoder.
+
+@item -1
+Try to make the choice automatically, in order to generate a sane output.
+@end table
+
+Default value is -1.
+
- @item -shortest
+ @item -shortest (@emph{output})
Finish encoding when the shortest input stream ends.
@item -dts_delta_threshold
Timestamp discontinuity delta threshold.
ist = input_streams[ifile->ist_index + i];
if (ist->decoding_needed)
output_packet(ist, NULL);
+ poll_filters();
+ }
- if (opt_shortest)
- return AVERROR_EOF;
- else
- return AVERROR(EAGAIN);
- /* mark all outputs that don't go through lavfi as finished */
- for (j = 0; j < nb_output_streams; j++) {
- OutputStream *ost = output_streams[j];
++ for (i = 0; i < nb_output_streams; i++) {
++ OutputStream *ost = output_streams[i];
++ OutputFile *of = output_files[ost->file_index];
++ AVFormatContext *os = output_files[ost->file_index]->ctx;
+
- if (ost->source_index == ifile->ist_index + i &&
- (ost->stream_copy || ost->enc->type == AVMEDIA_TYPE_SUBTITLE))
- ost->finished= 1;
++ if (of->shortest) {
++ int j;
++ for (j = 0; j < of->ctx->nb_streams; j++)
++ output_streams[of->ost_index + j]->finished = 1;
++ continue;
+ }
+ }
+
+ return AVERROR(EAGAIN);
}
reset_eagain();
AVFormatContext *ctx;
AVDictionary *opts;
int ost_index; /* index of the first stream in output_streams */
- int64_t recording_time; /* desired length of the resulting file in microseconds */
- int64_t start_time; /* start time in microseconds */
- uint64_t limit_filesize;
+ int64_t recording_time; ///< desired length of the resulting file in microseconds == AV_TIME_BASE units
+ int64_t start_time; ///< start time in microseconds == AV_TIME_BASE units
+ uint64_t limit_filesize; /* filesize limit expressed in bytes */
+
+ int shortest;
} OutputFile;
extern InputStream **input_streams;
extern int do_pkt_dump;
extern int copy_ts;
extern int copy_tb;
- extern int opt_shortest;
+extern int debug_ts;
extern int exit_on_error;
extern int print_stats;
extern int qp_hist;
{ "async", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&audio_sync_method}, "audio sync method", "" },
{ "adrift_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT, {(void*)&audio_drift_threshold}, "audio drift threshold", "threshold" },
{ "copyts", OPT_BOOL | OPT_EXPERT, {(void*)©_ts}, "copy timestamps" },
- { "copytb", OPT_BOOL | OPT_EXPERT, {(void*)©_tb}, "copy input stream time base when stream copying" },
+ { "copytb", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)©_tb}, "copy input stream time base when stream copying", "mode" },
- { "shortest", OPT_BOOL | OPT_EXPERT, {(void*)&opt_shortest}, "finish encoding within shortest input" }, //
+ { "shortest", OPT_BOOL | OPT_EXPERT | OPT_OFFSET, {.off = OFFSET(shortest)}, "finish encoding within shortest input" },
{ "dts_delta_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT, {(void*)&dts_delta_threshold}, "timestamp discontinuity delta threshold", "threshold" },
+ { "dts_error_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT, {(void*)&dts_error_threshold}, "timestamp error delta threshold", "threshold" },
{ "xerror", OPT_BOOL, {(void*)&exit_on_error}, "exit on error", "error" },
{ "copyinkf", OPT_BOOL | OPT_EXPERT | OPT_SPEC, {.off = OFFSET(copy_initial_nonkeyframes)}, "copy initial non-keyframes" },
{ "frames", OPT_INT64 | HAS_ARG | OPT_SPEC, {.off = OFFSET(max_frames)}, "set the number of frames to record", "number" },
.log_level_offset_offset = offsetof(AVCodecContext, log_level_offset),
.child_next = codec_child_next,
.child_class_next = codec_child_class_next,
+ .category = AV_CLASS_CATEGORY_ENCODER,
+ .get_category = get_category,
};
- int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec){
+#if FF_API_ALLOC_CONTEXT
+void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType codec_type){
+ AVCodec c= {0};
+ c.type= codec_type;
+ avcodec_get_context_defaults3(s, &c);
+}
+#endif
+
+ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec)
+ {
+ int flags=0;
memset(s, 0, sizeof(AVCodecContext));
s->av_class = &av_codec_context_class;
return pic;
}
- int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)
+#define MAKE_ACCESSORS(str, name, type, field) \
+ type av_##name##_get_##field(const str *s) { return s->field; } \
+ void av_##name##_set_##field(str *s, type v) { s->field = v; }
+
+MAKE_ACCESSORS(AVFrame, frame, int64_t, best_effort_timestamp)
+MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_duration)
+MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_pos)
+MAKE_ACCESSORS(AVFrame, frame, int64_t, channel_layout)
+MAKE_ACCESSORS(AVFrame, frame, int, channels)
+MAKE_ACCESSORS(AVFrame, frame, int, sample_rate)
+MAKE_ACCESSORS(AVFrame, frame, AVDictionary *, metadata)
+MAKE_ACCESSORS(AVFrame, frame, int, decode_error_flags)
+
+MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
+MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor)
+
+static void avcodec_get_subtitle_defaults(AVSubtitle *sub)
+{
+ memset(sub, 0, sizeof(*sub));
+ sub->pts = AV_NOPTS_VALUE;
+}
+
+static int get_bit_rate(AVCodecContext *ctx)
+{
+ int bit_rate;
+ int bits_per_sample;
+
+ switch(ctx->codec_type) {
+ case AVMEDIA_TYPE_VIDEO:
+ case AVMEDIA_TYPE_DATA:
+ case AVMEDIA_TYPE_SUBTITLE:
+ case AVMEDIA_TYPE_ATTACHMENT:
+ bit_rate = ctx->bit_rate;
+ break;
+ case AVMEDIA_TYPE_AUDIO:
+ bits_per_sample = av_get_bits_per_sample(ctx->codec_id);
+ bit_rate = bits_per_sample ? ctx->sample_rate * ctx->channels * bits_per_sample : ctx->bit_rate;
+ break;
+ default:
+ bit_rate = 0;
+ break;
+ }
+ return bit_rate;
+}
+
+#if FF_API_AVCODEC_OPEN
+int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
+{
+ return avcodec_open2(avctx, codec, NULL);
+}
+#endif
+
+ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
{
int ret = 0;
AVDictionary *tmp = NULL;
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
{
+ const char *codec_type;
const char *codec_name;
const char *profile = NULL;
- AVCodec *p;
+ const AVCodec *p;
- char buf1[32];
int bitrate;
AVRational display_aspect_ratio;
#include "dv.h"
#include "libavutil/fifo.h"
#include "libavutil/mathematics.h"
+#include "libavutil/intreadwrite.h"
+#include "libavutil/opt.h"
+#include "libavutil/timecode.h"
+ #define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
+
struct DVMuxContext {
+ AVClass *av_class;
const DVprofile* sys; /* current DV profile, e.g.: 525/60, 625/50 */
int n_ast; /* number of stereo audio streams (up to 2) */
AVStream *ast[2]; /* stereo audio streams */