FFmpeg
Data Structures | Macros | Functions | Variables
fifo_test.c File Reference
#include <stdlib.h>
#include "libavutil/opt.h"
#include "libavutil/time.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
 
const AVOutputFormat ff_fifo_test_muxer
 

Macro Definition Documentation

◆ MAX_TST_PACKETS

#define MAX_TST_PACKETS   128

Definition at line 32 of file fifo_test.c.

◆ SLEEPTIME_50_MS

#define SLEEPTIME_50_MS   50000

Definition at line 33 of file fifo_test.c.

◆ SLEEPTIME_10_MS

#define SLEEPTIME_10_MS   10000

Definition at line 34 of file fifo_test.c.

◆ OFFSET

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

Definition at line 122 of file fifo_test.c.

Function Documentation

◆ failing_write_header()

static int failing_write_header ( AVFormatContext avf)
static

Definition at line 59 of file fifo_test.c.

◆ failing_write_packet()

static int failing_write_packet ( AVFormatContext avf,
AVPacket pkt 
)
static

Definition at line 65 of file fifo_test.c.

◆ failing_write_trailer()

static int failing_write_trailer ( AVFormatContext avf)
static

Definition at line 100 of file fifo_test.c.

◆ failing_deinit()

static void failing_deinit ( AVFormatContext avf)
static

Definition at line 106 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),
{NULL}
}

Definition at line 123 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,
}

Definition at line 133 of file fifo_test.c.

◆ ff_fifo_test_muxer

const AVOutputFormat ff_fifo_test_muxer
Initial value:

Definition at line 140 of file fifo_test.c.

deinit
static void deinit(AVFormatContext *s)
Definition: chromaprint.c:50
options
static const AVOption options[]
Definition: fifo_test.c:123
AV_OPT_FLAG_ENCODING_PARAM
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:277
FailingMuxerContext
Definition: fifo_test.c:47
failing_write_trailer
static int failing_write_trailer(AVFormatContext *avf)
Definition: fifo_test.c:100
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
write_trailer
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:98
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
OFFSET
#define OFFSET(x)
Definition: fifo_test.c:122
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AVFMT_ALLOW_FLUSH
#define AVFMT_ALLOW_FLUSH
Format allows flushing.
Definition: avformat.h:484
AVFMT_NOFILE
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:464
write_packet
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:727
failing_muxer_class
static const AVClass failing_muxer_class
Definition: fifo_test.c:133
failing_write_packet
static int failing_write_packet(AVFormatContext *avf, AVPacket *pkt)
Definition: fifo_test.c:65
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:241
failing_write_header
static int failing_write_header(AVFormatContext *avf)
Definition: fifo_test.c:59
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
write_header
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:347
failing_deinit
static void failing_deinit(AVFormatContext *avf)
Definition: fifo_test.c:106