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 "mux.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 FFOutputFormat 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.

◆ 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),
{NULL}
}

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,
}

Definition at line 134 of file fifo_test.c.

◆ ff_fifo_test_muxer

const FFOutputFormat ff_fifo_test_muxer
Initial value:
= {
.p.name = "fifo_test",
.p.long_name = NULL_IF_CONFIG_SMALL("Fifo test muxer"),
.priv_data_size = sizeof(FailingMuxerContext),
.p.priv_class = &failing_muxer_class,
.p.flags = AVFMT_NOFILE,
.flags_internal = FF_FMT_ALLOW_FLUSH,
}

Definition at line 141 of file fifo_test.c.

deinit
static void deinit(AVFormatContext *s)
Definition: chromaprint.c:50
options
static const AVOption options[]
Definition: fifo_test.c:124
FF_FMT_ALLOW_FLUSH
#define FF_FMT_ALLOW_FLUSH
Definition: mux.h:30
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:281
FailingMuxerContext
Definition: fifo_test.c:48
failing_write_trailer
static int failing_write_trailer(AVFormatContext *avf)
Definition: fifo_test.c:101
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:101
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
OFFSET
#define OFFSET(x)
Definition: fifo_test.c:123
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:106
AVFMT_NOFILE
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:469
failing_muxer_class
static const AVClass failing_muxer_class
Definition: fifo_test.c:134
failing_write_packet
static int failing_write_packet(AVFormatContext *avf, AVPacket *pkt)
Definition: fifo_test.c:66
write_packet
static int write_packet(Muxer *mux, OutputStream *ost, AVPacket *pkt)
Definition: ffmpeg_mux.c:61
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:244
failing_write_header
static int failing_write_header(AVFormatContext *avf)
Definition: fifo_test.c:60
write_header
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:346
failing_deinit
static void failing_deinit(AVFormatContext *avf)
Definition: fifo_test.c:107