Go to the documentation of this file.
33 #define MAX_TST_PACKETS 128
34 #define SLEEPTIME_50_MS 50000
35 #define SLEEPTIME_10_MS 10000
63 return ctx->write_header_ret;
75 if (!
data->recover_after) {
78 data->recover_after--;
83 if (
data->sleep_time) {
85 while (slept < data->sleep_time) {
104 return ctx->write_trailer_ret;
112 if (!
ctx->print_deinit_summary)
115 printf(
"flush count: %d\n",
ctx->flush_count);
116 printf(
"pts seen nr: %d\n",
ctx->pts_written_nr);
118 for (
i = 0;
i <
ctx->pts_written_nr; ++
i ) {
123 #define OFFSET(x) offsetof(FailingMuxerContext, x)
125 {
"write_header_ret",
"write_header() return value",
OFFSET(write_header_ret),
127 {
"write_trailer_ret",
"write_trailer() return value",
OFFSET(write_trailer_ret),
129 {
"print_deinit_summary",
"print summary when deinitializing muxer",
OFFSET(print_deinit_summary),
142 .
p.
name =
"fifo_test",
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
static void deinit(AVFormatContext *s)
int pts_written[MAX_TST_PACKETS]
static const AVOption options[]
AVIOInterruptCB interrupt_callback
Custom interrupt callbacks for the I/O layer.
#define FF_FMT_ALLOW_FLUSH
int ff_check_interrupt(AVIOInterruptCB *cb)
Check if the user has requested to interrupt a blocking function associated with cb.
const FFOutputFormat ff_fifo_test_muxer
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
static int failing_write_trailer(AVFormatContext *avf)
int av_usleep(unsigned usec)
Sleep for a period of time.
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
static int write_trailer(AVFormatContext *s1)
const char * av_default_item_name(void *ptr)
Return the context name.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
printf("static const uint8_t my_array[100] = {\n")
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
static const AVClass failing_muxer_class
static int failing_write_packet(AVFormatContext *avf, AVPacket *pkt)
static int write_packet(Muxer *mux, OutputStream *ost, AVPacket *pkt)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
This structure stores compressed data.
static int failing_write_header(AVFormatContext *avf)
#define AVERROR_EXIT
Immediate exit was requested; the called function should not be restarted.
static void write_header(FFV1Context *f)
static void failing_deinit(AVFormatContext *avf)
void * priv_data
Format private data.