FFmpeg  4.0
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

◆ MAX_TST_PACKETS

#define MAX_TST_PACKETS   128

Definition at line 33 of file fifo_test.c.

◆ SLEEPTIME_50_MS

#define SLEEPTIME_50_MS   50000

Definition at line 34 of file fifo_test.c.

◆ SLEEPTIME_10_MS

#define SLEEPTIME_10_MS   10000

Definition at line 35 of file fifo_test.c.

Referenced by failing_write_packet().

◆ OFFSET

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

Definition at line 123 of file fifo_test.c.

Function Documentation

◆ failing_write_header()

static int failing_write_header ( AVFormatContext avf)
static

Definition at line 60 of file fifo_test.c.

◆ failing_write_packet()

static int failing_write_packet ( AVFormatContext avf,
AVPacket pkt 
)
static

Definition at line 66 of file fifo_test.c.

◆ failing_write_trailer()

static int failing_write_trailer ( AVFormatContext avf)
static

Definition at line 101 of file fifo_test.c.

◆ failing_deinit()

static void failing_deinit ( AVFormatContext avf)
static

Definition at line 107 of file fifo_test.c.

Variable Documentation

◆ options

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.

◆ failing_muxer_class

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.

◆ ff_fifo_test_muxer

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:679
#define AVFMT_ALLOW_FLUSH
Format allows flushing.
Definition: avformat.h:478
static const AVClass failing_muxer_class
Definition: fifo_test.c:134
static int flags
Definition: log.c:55
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 AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:465
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:337

Definition at line 141 of file fifo_test.c.