FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
webmdashenc.c File Reference
#include <float.h>
#include <stdint.h>
#include <string.h>
#include "avformat.h"
#include "avio_internal.h"
#include "matroska.h"
#include "libavutil/avstring.h"
#include "libavutil/dict.h"
#include "libavutil/opt.h"
#include "libavutil/time_internal.h"

Go to the source code of this file.

Data Structures

struct  AdaptationSet
 
struct  WebMDashMuxContext
 

Macros

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

Functions

static const char * get_codec_name (int codec_id)
 
static double get_duration (AVFormatContext *s)
 
static int write_header (AVFormatContext *s)
 
static void write_footer (AVFormatContext *s)
 
static int subsegment_alignment (AVFormatContext *s, AdaptationSet *as)
 
static int bitstream_switching (AVFormatContext *s, AdaptationSet *as)
 
static int write_representation (AVFormatContext *s, AVStream *stream, char *id, int output_width, int output_height, int output_sample_rate)
 
static int check_matching_width (AVFormatContext *s, AdaptationSet *as)
 
static int check_matching_height (AVFormatContext *s, AdaptationSet *as)
 
static int check_matching_sample_rate (AVFormatContext *s, AdaptationSet *as)
 
static void free_adaptation_sets (AVFormatContext *s)
 
static int parse_filename (char *filename, char **representation_id, char **initialization_pattern, char **media_pattern)
 
static int write_adaptation_set (AVFormatContext *s, int as_index)
 
static int to_integer (char *p, int len)
 
static int parse_adaptation_sets (AVFormatContext *s)
 
static int webm_dash_manifest_write_header (AVFormatContext *s)
 
static int webm_dash_manifest_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int webm_dash_manifest_write_trailer (AVFormatContext *s)
 

Variables

static const AVOption options []
 

Macro Definition Documentation

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

Definition at line 553 of file webmdashenc.c.

Function Documentation

static const char* get_codec_name ( int  codec_id)
static

Definition at line 63 of file webmdashenc.c.

Referenced by write_adaptation_set(), and write_representation().

static double get_duration ( AVFormatContext s)
static

Definition at line 78 of file webmdashenc.c.

Referenced by webm_dash_manifest_write_header(), and write_header().

static int write_header ( AVFormatContext s)
static

Definition at line 91 of file webmdashenc.c.

Referenced by webm_dash_manifest_write_header().

static void write_footer ( AVFormatContext s)
static

Definition at line 133 of file webmdashenc.c.

Referenced by webm_dash_manifest_write_header().

static int subsegment_alignment ( AVFormatContext s,
AdaptationSet as 
)
static

Definition at line 138 of file webmdashenc.c.

Referenced by write_adaptation_set().

static int bitstream_switching ( AVFormatContext s,
AdaptationSet as 
)
static

Definition at line 151 of file webmdashenc.c.

Referenced by write_adaptation_set().

static int write_representation ( AVFormatContext s,
AVStream stream,
char *  id,
int  output_width,
int  output_height,
int  output_sample_rate 
)
static

Definition at line 176 of file webmdashenc.c.

Referenced by write_adaptation_set().

static int check_matching_width ( AVFormatContext s,
AdaptationSet as 
)
static

Definition at line 229 of file webmdashenc.c.

Referenced by write_adaptation_set().

static int check_matching_height ( AVFormatContext s,
AdaptationSet as 
)
static

Definition at line 242 of file webmdashenc.c.

Referenced by write_adaptation_set().

static int check_matching_sample_rate ( AVFormatContext s,
AdaptationSet as 
)
static

Definition at line 255 of file webmdashenc.c.

Referenced by write_adaptation_set().

static void free_adaptation_sets ( AVFormatContext s)
static
static int parse_filename ( char *  filename,
char **  representation_id,
char **  initialization_pattern,
char **  media_pattern 
)
static

Definition at line 285 of file webmdashenc.c.

Referenced by write_adaptation_set().

static int write_adaptation_set ( AVFormatContext s,
int  as_index 
)
static

Definition at line 345 of file webmdashenc.c.

Referenced by webm_dash_manifest_write_header().

static int to_integer ( char *  p,
int  len 
)
static

Definition at line 440 of file webmdashenc.c.

Referenced by parse_adaptation_sets().

static int parse_adaptation_sets ( AVFormatContext s)
static

Definition at line 452 of file webmdashenc.c.

Referenced by webm_dash_manifest_write_header().

static int webm_dash_manifest_write_header ( AVFormatContext s)
static

Definition at line 507 of file webmdashenc.c.

static int webm_dash_manifest_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 542 of file webmdashenc.c.

static int webm_dash_manifest_write_trailer ( AVFormatContext s)
static

Definition at line 547 of file webmdashenc.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "adaptation_sets", "Adaptation sets. Syntax: id=0,streams=0,1,2 id=1,streams=3,4 and so on", OFFSET(adaptation_sets), AV_OPT_TYPE_STRING, { 0 }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },
{ "debug_mode", "[private option - users should never set this]. Create deterministic output", OFFSET(debug_mode), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },
{ "live", "create a live stream manifest", OFFSET(is_live), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },
{ "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 },
{ "chunk_duration_ms", "duration of each chunk (in milliseconds)", OFFSET(chunk_duration), AV_OPT_TYPE_INT, {.i64 = 1000}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
{ "utc_timing_url", "URL of the page that will return the UTC timestamp in ISO format", OFFSET(utc_timing_url), AV_OPT_TYPE_STRING, { 0 }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },
{ "time_shift_buffer_depth", "Smallest time (in seconds) shifting buffer for which any Representation is guaranteed to be available.", OFFSET(time_shift_buffer_depth), AV_OPT_TYPE_DOUBLE, { .dbl = 60.0 }, 1.0, DBL_MAX, AV_OPT_FLAG_ENCODING_PARAM },
{ "minimum_update_period", "Minimum Update Period (in seconds) of the manifest.", OFFSET(minimum_update_period), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, 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: webmdashenc.c:553

Definition at line 554 of file webmdashenc.c.