FFmpeg  4.0
Data Structures | Macros | Functions | Variables
webm_chunk.c File Reference
#include <float.h>
#include <time.h>
#include "avformat.h"
#include "avio.h"
#include "avio_internal.h"
#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/avstring.h"
#include "libavutil/parseutils.h"
#include "libavutil/mathematics.h"
#include "libavutil/time_internal.h"
#include "libavutil/timestamp.h"

Go to the source code of this file.

Data Structures

struct  WebMChunkContext
 

Macros

#define MAX_FILENAME_SIZE   1024
 
#define OFFSET(x)   offsetof(WebMChunkContext, x)
 

Functions

static int chunk_mux_init (AVFormatContext *s)
 
static int get_chunk_filename (AVFormatContext *s, int is_header, char *filename)
 
static int webm_chunk_write_header (AVFormatContext *s)
 
static int chunk_start (AVFormatContext *s)
 
static int chunk_end (AVFormatContext *s)
 
static int webm_chunk_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int webm_chunk_write_trailer (AVFormatContext *s)
 

Variables

static const AVOption options []
 

Macro Definition Documentation

◆ MAX_FILENAME_SIZE

#define MAX_FILENAME_SIZE   1024

Definition at line 45 of file webm_chunk.c.

Referenced by chunk_end(), and get_chunk_filename().

◆ OFFSET

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

Definition at line 250 of file webm_chunk.c.

Function Documentation

◆ chunk_mux_init()

static int chunk_mux_init ( AVFormatContext s)
static

Definition at line 60 of file webm_chunk.c.

Referenced by webm_chunk_write_header().

◆ get_chunk_filename()

static int get_chunk_filename ( AVFormatContext s,
int  is_header,
char *  filename 
)
static

Definition at line 87 of file webm_chunk.c.

Referenced by chunk_end(), and webm_chunk_write_header().

◆ webm_chunk_write_header()

static int webm_chunk_write_header ( AVFormatContext s)
static

Definition at line 110 of file webm_chunk.c.

◆ chunk_start()

static int chunk_start ( AVFormatContext s)
static

Definition at line 152 of file webm_chunk.c.

Referenced by g2m_decode_frame(), roqvideo_decode_frame(), and webm_chunk_write_packet().

◆ chunk_end()

static int chunk_end ( AVFormatContext s)
static

Definition at line 165 of file webm_chunk.c.

Referenced by decode_lsp(), webm_chunk_write_packet(), and webm_chunk_write_trailer().

◆ webm_chunk_write_packet()

static int webm_chunk_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 198 of file webm_chunk.c.

◆ webm_chunk_write_trailer()

static int webm_chunk_write_trailer ( AVFormatContext s)
static

Definition at line 238 of file webm_chunk.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "chunk_start_index", "start index of the chunk", OFFSET(chunk_start_index), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
{ "header", "filename of the header where the initialization data will be written", OFFSET(header_filename), AV_OPT_TYPE_STRING, { 0 }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },
{ "audio_chunk_duration", "duration of each chunk in milliseconds", OFFSET(chunk_duration), AV_OPT_TYPE_INT, {.i64 = 5000}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
{ "method", "set the HTTP method", OFFSET(http_method), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:276
#define OFFSET(x)
Definition: webm_chunk.c:250

Definition at line 251 of file webm_chunk.c.

Referenced by chunk_end(), and webm_chunk_write_header().