FFmpeg
Data Structures | Macros | Functions | Variables
img2enc.c File Reference
#include <time.h>
#include "config_components.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/avstring.h"
#include "libavutil/dict.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/time_internal.h"
#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"
#include "img2.h"
#include "mux.h"

Go to the source code of this file.

Data Structures

struct  VideoMuxData
 

Macros

#define OFFSET(x)   offsetof(VideoMuxData, x)
 
#define ENC   AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int write_header (AVFormatContext *s)
 
static int write_muxed_file (AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
 
static int write_packet_pipe (AVFormatContext *s, AVPacket *pkt)
 
static int write_and_close (AVFormatContext *s, AVIOContext **pb, const unsigned char *buf, int size)
 
static int write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int query_codec (enum AVCodecID id, int std_compliance)
 

Variables

static const AVOption muxoptions []
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 254 of file img2enc.c.

◆ ENC

#define ENC   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 255 of file img2enc.c.

Function Documentation

◆ write_header()

static int write_header ( AVFormatContext s)
static

Definition at line 55 of file img2enc.c.

◆ write_muxed_file()

static int write_muxed_file ( AVFormatContext s,
AVIOContext pb,
AVPacket pkt 
)
static

Definition at line 81 of file img2enc.c.

Referenced by write_packet(), and write_packet_pipe().

◆ write_packet_pipe()

static int write_packet_pipe ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 119 of file img2enc.c.

◆ write_and_close()

static int write_and_close ( AVFormatContext s,
AVIOContext **  pb,
const unsigned char *  buf,
int  size 
)
static

Definition at line 133 of file img2enc.c.

Referenced by write_packet().

◆ write_packet()

static int write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 140 of file img2enc.c.

◆ query_codec()

static int query_codec ( enum AVCodecID  id,
int  std_compliance 
)
static

Definition at line 243 of file img2enc.c.

Referenced by avformat_query_codec().

Variable Documentation

◆ muxoptions

const AVOption muxoptions[]
static
Initial value:
= {
{ "update", "continuously overwrite one file", OFFSET(update), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC },
{ "start_number", "set first number in the sequence", OFFSET(start_img_number), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, INT_MAX, ENC },
{ "strftime", "use strftime for filename", OFFSET(use_strftime), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC },
{ "frame_pts", "use current frame pts for filename", OFFSET(frame_pts), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC },
{ "atomic_writing", "write files atomically (using temporary files and renames)", OFFSET(use_rename), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC },
{ "protocol_opts", "specify protocol options for the opened files", OFFSET(protocol_opts), AV_OPT_TYPE_DICT, {0}, 0, 0, ENC },
{ NULL },
}

Definition at line 256 of file img2enc.c.

OFFSET
#define OFFSET(x)
Definition: img2enc.c:254
update
static av_always_inline void update(SilenceDetectContext *s, AVFrame *insamples, int is_silence, int current_sample, int64_t nb_samples_notify, AVRational time_base)
Definition: af_silencedetect.c:78
NULL
#define NULL
Definition: coverity.c:32
AV_OPT_TYPE_DICT
@ AV_OPT_TYPE_DICT
Underlying C type is AVDictionary*.
Definition: opt.h:290
ENC
#define ENC
Definition: img2enc.c:255
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition: opt.h:327