Go to the documentation of this file.
27 ctx->extradata_size = 8;
35 ctx->extradata_size = 0;
56 #define OFFSET(x) offsetof(Dummy12Context, x)
57 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
80 .
name =
"dummy_v1_codec",
92 .
name =
"dummy_v2_codec",
104 .
name =
"dummy_v3_codec",
115 .
name =
"dummy_v4_codec",
125 printf(
"%-14s: %dx%d prv: %s",
126 ctx->codec ?
ctx->codec->name :
"NULL",
129 if (
ctx->codec &&
ctx->codec->priv_class &&
ctx->codec->priv_data_size) {
134 printf(
" opts: %"PRId64
" %s", i64, str);
143 printf(
"%s -> %s\nclosed:\n",
c1 ?
c1->name :
"NULL",
c2 ?
c2->name :
"NULL");
160 fprintf(stderr,
"avcodec_open2 failed\n");
187 for (
i = 0; dummy_codec[
i];
i++)
190 printf(
"testing avcodec_copy_context()\n");
int avcodec_close(AVCodecContext *avctx)
Close a given AVCodecContext and free all the data associated with it (but not the AVCodecContext its...
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
static const AVOption dummy_options[]
const AVClass * priv_class
AVClass for the private context.
static AVCodec dummy_v4_encoder
This structure describes decoded (raw) audio or video data.
static AVCodec dummy_v1_encoder
const struct AVCodec * codec
static AVCodec dummy_v3_encoder
int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
Copy the settings of the source AVCodecContext into the destination AVCodecContext.
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
static AVCodec dummy_v2_encoder
void avcodec_free_context(AVCodecContext **pavctx)
Free the codec context and everything associated with it and write NULL to the provided pointer.
Rational number (pair of numerator and denominator).
const char * av_default_item_name(void *ptr)
Return the context name.
static int dummy_close(AVCodecContext *ctx)
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
int av_opt_get_int(void *obj, const char *name, int search_flags, int64_t *out_val)
static int dummy_init(AVCodecContext *ctx)
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
static const AVClass dummy_v1_class
printf("static const uint8_t my_array[100] = {\n")
#define i(width, name, range_min, range_max)
av_cold void avcodec_register(AVCodec *codec)
Register the codec codec and initialize libavcodec.
const char * name
Name of the codec implementation.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
static const AVClass dummy_v2_class
static void test_copy(const AVCodec *c1, const AVCodec *c2)
#define FF_ARRAY_ELEMS(a)
main external API structure.
This structure stores compressed data.
static int dummy_encode(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
int width
picture width / height.
int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val)
static void test_copy_print_codec(const AVCodecContext *ctx)
void * priv_data
Format private data.