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

Go to the source code of this file.

Data Structures

struct  FailingMuxerPacketData
 
struct  TestCase
 

Macros

#define MAX_TST_PACKETS   128
 
#define SLEEPTIME_50_MS   50000
 
#define SLEEPTIME_10_MS   10000
 
#define BUFFER_SIZE   64
 

Functions

static int prepare_packet (AVPacket *pkt, const FailingMuxerPacketData *pkt_data, int64_t pts)
 
static int initialize_fifo_tst_muxer_chain (AVFormatContext **oc)
 
static int fifo_basic_test (AVFormatContext *oc, AVDictionary **opts, const FailingMuxerPacketData *pkt_data)
 
static int fifo_overflow_drop_test (AVFormatContext *oc, AVDictionary **opts, const FailingMuxerPacketData *data)
 
static int run_test (const TestCase *test)
 
int main (int argc, char *argv[])
 

Variables

const TestCase tests []
 

Macro Definition Documentation

#define MAX_TST_PACKETS   128

Definition at line 30 of file fifo_muxer.c.

#define SLEEPTIME_50_MS   50000

Definition at line 31 of file fifo_muxer.c.

Referenced by fifo_overflow_drop_test().

#define SLEEPTIME_10_MS   10000

Definition at line 32 of file fifo_muxer.c.

#define BUFFER_SIZE   64

Definition at line 200 of file fifo_muxer.c.

Referenced by run_test().

Function Documentation

static int prepare_packet ( AVPacket pkt,
const FailingMuxerPacketData pkt_data,
int64_t  pts 
)
static

Definition at line 42 of file fifo_muxer.c.

Referenced by fifo_basic_test(), and fifo_overflow_drop_test().

static int initialize_fifo_tst_muxer_chain ( AVFormatContext **  oc)
static

Definition at line 58 of file fifo_muxer.c.

Referenced by run_test().

static int fifo_basic_test ( AVFormatContext oc,
AVDictionary **  opts,
const FailingMuxerPacketData pkt_data 
)
static

Definition at line 80 of file fifo_muxer.c.

static int fifo_overflow_drop_test ( AVFormatContext oc,
AVDictionary **  opts,
const FailingMuxerPacketData data 
)
static

Definition at line 133 of file fifo_muxer.c.

static int run_test ( const TestCase test)
static

Definition at line 202 of file fifo_muxer.c.

Referenced by main().

int main ( int  argc,
char *  argv[] 
)

Definition at line 273 of file fifo_muxer.c.

Variable Documentation

const TestCase tests[]
Initial value:
= {
{fifo_basic_test, "nonfail test", NULL,1, 0, 0, {0, 0, 0}},
{fifo_basic_test, "recovery test", "attempt_recovery=1:recovery_wait_time=0",
0, 0, 0, {AVERROR(ETIMEDOUT), 3, 0}},
{fifo_basic_test, "overflow without packet dropping","queue_size=3",
1, 0, 0, {0, 0, SLEEPTIME_10_MS}},
{fifo_overflow_drop_test, "overflow with packet dropping", "queue_size=3:drop_pkts_on_overflow=1",
0, 0, 0, {0, 0, SLEEPTIME_50_MS}},
{NULL}
}
#define NULL
Definition: coverity.c:32
#define SLEEPTIME_50_MS
Definition: fifo_muxer.c:31
static int fifo_basic_test(AVFormatContext *oc, AVDictionary **opts, const FailingMuxerPacketData *pkt_data)
Definition: fifo_muxer.c:80
#define SLEEPTIME_10_MS
Definition: fifo_muxer.c:32
static int fifo_overflow_drop_test(AVFormatContext *oc, AVDictionary **opts, const FailingMuxerPacketData *data)
Definition: fifo_muxer.c:133
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

Definition at line 245 of file fifo_muxer.c.

Referenced by checkasm_check_h264pred(), and main().