#include "config.h"
#include <float.h>
#include "avformat.h"
#include "internal.h"
#include "os_support.h"
#include "avc.h"
#include "url.h"
#include "isom.h"
#include "libavutil/opt.h"
#include "libavutil/avstring.h"
#include "libavutil/mathematics.h"
#include "libavutil/intreadwrite.h"
Go to the source code of this file.
Data Structures | |
struct | Fragment |
struct | OutputStream |
struct | SmoothStreamingContext |
Defines | |
#define | OFFSET(x) offsetof(SmoothStreamingContext, x) |
#define | E AV_OPT_FLAG_ENCODING_PARAM |
Functions | |
static int | ism_write (void *opaque, uint8_t *buf, int buf_size) |
static int64_t | ism_seek (void *opaque, int64_t offset, int whence) |
static void | get_private_data (OutputStream *os) |
static void | ism_free (AVFormatContext *s) |
static int | ism_write_header (AVFormatContext *s) |
static int | parse_fragment (AVFormatContext *s, const char *filename, int64_t *start_ts, int64_t *duration, int64_t *moof_size, int64_t size) |
static int | add_fragment (OutputStream *os, const char *file, const char *infofile, int64_t start_time, int64_t duration, int64_t start_pos, int64_t size) |
static int | copy_moof (AVFormatContext *s, const char *infile, const char *outfile, int64_t size) |
static void | output_chunk_list (OutputStream *os, AVIOContext *out, int final, int skip, int window_size) |
static int | write_manifest (AVFormatContext *s, int final) |
static int | ism_flush (AVFormatContext *s, int final) |
static int | ism_write_packet (AVFormatContext *s, AVPacket *pkt) |
static int | ism_write_trailer (AVFormatContext *s) |
Variables | |
static const AVOption | options [] |
static const AVClass | ism_class |
AVOutputFormat | ff_smoothstreaming_muxer |
#define E AV_OPT_FLAG_ENCODING_PARAM |
Definition at line 594 of file smoothstreamingenc.c.
#define OFFSET | ( | x | ) | offsetof(SmoothStreamingContext, x) |
Definition at line 593 of file smoothstreamingenc.c.
static int add_fragment | ( | OutputStream * | os, | |
const char * | file, | |||
const char * | infofile, | |||
int64_t | start_time, | |||
int64_t | duration, | |||
int64_t | start_pos, | |||
int64_t | size | |||
) | [static] |
static int copy_moof | ( | AVFormatContext * | s, | |
const char * | infile, | |||
const char * | outfile, | |||
int64_t | size | |||
) | [static] |
static void get_private_data | ( | OutputStream * | os | ) | [static] |
Definition at line 142 of file smoothstreamingenc.c.
Referenced by get_video_private_data(), handle_file(), and ism_write_header().
static int ism_flush | ( | AVFormatContext * | s, | |
int | final | |||
) | [static] |
Definition at line 496 of file smoothstreamingenc.c.
Referenced by ism_write_packet(), and ism_write_trailer().
static void ism_free | ( | AVFormatContext * | s | ) | [static] |
Definition at line 162 of file smoothstreamingenc.c.
Referenced by ism_write_header(), and ism_write_trailer().
static int64_t ism_seek | ( | void * | opaque, | |
int64_t | offset, | |||
int | whence | |||
) | [static] |
static int ism_write_header | ( | AVFormatContext * | s | ) | [static] |
Definition at line 188 of file smoothstreamingenc.c.
static int ism_write_packet | ( | AVFormatContext * | s, | |
AVPacket * | pkt | |||
) | [static] |
Definition at line 557 of file smoothstreamingenc.c.
static int ism_write_trailer | ( | AVFormatContext * | s | ) | [static] |
Definition at line 577 of file smoothstreamingenc.c.
static void output_chunk_list | ( | OutputStream * | os, | |
AVIOContext * | out, | |||
int | final, | |||
int | skip, | |||
int | window_size | |||
) | [static] |
static int parse_fragment | ( | AVFormatContext * | s, | |
const char * | filename, | |||
int64_t * | start_ts, | |||
int64_t * | duration, | |||
int64_t * | moof_size, | |||
int64_t | size | |||
) | [static] |
static int write_manifest | ( | AVFormatContext * | s, | |
int | final | |||
) | [static] |
Initial value:
{ .name = "smoothstreaming", .long_name = NULL_IF_CONFIG_SMALL("Smooth Streaming Muxer"), .priv_data_size = sizeof(SmoothStreamingContext), .audio_codec = AV_CODEC_ID_AAC, .video_codec = AV_CODEC_ID_H264, .flags = AVFMT_GLOBALHEADER | AVFMT_NOFILE, .write_header = ism_write_header, .write_packet = ism_write_packet, .write_trailer = ism_write_trailer, .codec_tag = (const AVCodecTag* const []){ ff_mp4_obj_type, 0 }, .priv_class = &ism_class, }
Definition at line 612 of file smoothstreamingenc.c.
Initial value:
{ .class_name = "smooth streaming muxer", .item_name = av_default_item_name, .option = options, .version = LIBAVUTIL_VERSION_INT, }
Definition at line 604 of file smoothstreamingenc.c.
Initial value:
{ { "window_size", "number of fragments kept in the manifest", OFFSET(window_size), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, E }, { "extra_window_size", "number of fragments kept outside of the manifest before removing from disk", OFFSET(extra_window_size), AV_OPT_TYPE_INT, { .i64 = 5 }, 0, INT_MAX, E }, { "lookahead_count", "number of lookahead fragments", OFFSET(lookahead_count), AV_OPT_TYPE_INT, { .i64 = 2 }, 0, INT_MAX, E }, { "min_frag_duration", "minimum fragment duration (in microseconds)", OFFSET(min_frag_duration), AV_OPT_TYPE_INT64, { .i64 = 5000000 }, 0, INT_MAX, E }, { "remove_at_exit", "remove all fragments when finished", OFFSET(remove_at_exit), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, E }, { NULL }, }
Definition at line 595 of file smoothstreamingenc.c.