FFmpeg
Data Structures | Macros | Functions | Variables
fifo_test.c File Reference
#include <stdlib.h>
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "libavutil/avassert.h"
#include "avformat.h"
#include "url.h"

Go to the source code of this file.

Data Structures

struct  FailingMuxerPacketData
 
struct  FailingMuxerContext
 

Macros

#define MAX_TST_PACKETS   128
 
#define SLEEPTIME_50_MS   50000
 
#define SLEEPTIME_10_MS   10000
 
#define OFFSET(x)   offsetof(FailingMuxerContext, x)
 

Functions

static int failing_write_header (AVFormatContext *avf)
 
static int failing_write_packet (AVFormatContext *avf, AVPacket *pkt)
 
static int failing_write_trailer (AVFormatContext *avf)
 
static void failing_deinit (AVFormatContext *avf)
 

Variables

static const AVOption options []
 
static const AVClass failing_muxer_class
 
AVOutputFormat ff_fifo_test_muxer
 

Macro Definition Documentation

#define MAX_TST_PACKETS   128

Definition at line 33 of file fifo_test.c.

#define SLEEPTIME_50_MS   50000

Definition at line 34 of file fifo_test.c.

#define SLEEPTIME_10_MS   10000

Definition at line 35 of file fifo_test.c.

Referenced by failing_write_packet().

#define OFFSET (   x)    offsetof(FailingMuxerContext, x)

Definition at line 123 of file fifo_test.c.

Function Documentation

static int failing_write_header ( AVFormatContext avf)
static

Definition at line 60 of file fifo_test.c.

static int failing_write_packet ( AVFormatContext avf,
AVPacket pkt 
)
static

Definition at line 66 of file fifo_test.c.

static int failing_write_trailer ( AVFormatContext avf)
static

Definition at line 101 of file fifo_test.c.

static void failing_deinit ( AVFormatContext avf)
static

Definition at line 107 of file fifo_test.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{"write_header_ret", "write_header() return value", OFFSET(write_header_ret),
AV_OPT_TYPE_INT, {.i64 = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
{"write_trailer_ret", "write_trailer() return value", OFFSET(write_trailer_ret),
AV_OPT_TYPE_INT, {.i64 = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
{"print_deinit_summary", "print summary when deinitializing muxer", OFFSET(print_deinit_summary),
AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM},
{NULL}
}
#define NULL
Definition: coverity.c:32
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:276
#define OFFSET(x)
Definition: fifo_test.c:123

Definition at line 124 of file fifo_test.c.

const AVClass failing_muxer_class
static
Initial value:
= {
.class_name = "Fifo test muxer",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption options[]
Definition: fifo_test.c:124

Definition at line 134 of file fifo_test.c.

AVOutputFormat ff_fifo_test_muxer
Initial value:
= {
.name = "fifo_test",
.long_name = NULL_IF_CONFIG_SMALL("Fifo test muxer"),
.priv_data_size = sizeof(FailingMuxerContext),
.deinit = failing_deinit,
.priv_class = &failing_muxer_class,
}
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:690
#define AVFMT_ALLOW_FLUSH
Format allows flushing.
Definition: avformat.h:476
static const AVClass failing_muxer_class
Definition: fifo_test.c:134
static int failing_write_trailer(AVFormatContext *avf)
Definition: fifo_test.c:101
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int failing_write_header(AVFormatContext *avf)
Definition: fifo_test.c:60
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:94
static int failing_write_packet(AVFormatContext *avf, AVPacket *pkt)
Definition: fifo_test.c:66
static void failing_deinit(AVFormatContext *avf)
Definition: fifo_test.c:107
#define flags(name, subs,...)
Definition: cbs_av1.c:561
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:463
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:349

Definition at line 141 of file fifo_test.c.