FFmpeg
|
#include <stdint.h>
#include "av1.h"
#include "avc.h"
#include "hevc.h"
#include "avformat.h"
#include "avio_internal.h"
#include "avlanguage.h"
#include "flacenc.h"
#include "internal.h"
#include "isom.h"
#include "matroska.h"
#include "riff.h"
#include "subtitles.h"
#include "vorbiscomment.h"
#include "wv.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/crc.h"
#include "libavutil/dict.h"
#include "libavutil/intfloat.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/lfg.h"
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/random_seed.h"
#include "libavutil/rational.h"
#include "libavutil/samplefmt.h"
#include "libavutil/sha.h"
#include "libavutil/stereo3d.h"
#include "libavcodec/xiph.h"
#include "libavcodec/mpeg4audio.h"
#include "libavcodec/internal.h"
Go to the source code of this file.
Data Structures | |
struct | ebml_master |
struct | mkv_seekhead_entry |
struct | mkv_seekhead |
struct | mkv_cuepoint |
struct | mkv_cues |
struct | mkv_track |
struct | mkv_attachment |
struct | mkv_attachments |
struct | MatroskaMuxContext |
Macros | |
#define | MODE_MATROSKAv2 0x01 |
#define | MODE_WEBM 0x02 |
#define | MAX_TRACKS 126 |
Maximum number of tracks allowed in a Matroska file (with track numbers in range 1 to 126 (inclusive) More... | |
#define | MAX_EBML_HEADER_SIZE 35 |
2 bytes * 7 for EBML IDs, 7 1-byte EBML lengths, 6 1-byte uint, 8 byte for "matroska" doctype string More... | |
#define | MAX_SEEKENTRY_SIZE 21 |
2 bytes * 3 for EBML IDs, 3 1-byte EBML lengths, 8 bytes for 64 bit offset, 4 bytes for target EBML ID More... | |
#define | MAX_CUETRACKPOS_SIZE 35 |
per-cuepoint-track - 5 1-byte EBML IDs, 5 1-byte EBML sizes, 3 8-byte uint max and one 1-byte uint for the track number (this assumes MAX_TRACKS to be <= 255) More... | |
#define | MAX_CUEPOINT_CONTENT_SIZE(num_tracks) 10 + MAX_CUETRACKPOS_SIZE * num_tracks |
per-cuepoint - 1 1-byte EBML ID, 1 1-byte EBML size, 8-byte uint max More... | |
#define | OPUS_SEEK_PREROLL 80000000 |
Seek preroll value for opus. More... | |
#define | OFFSET(x) offsetof(MatroskaMuxContext, x) |
#define | FLAGS AV_OPT_FLAG_ENCODING_PARAM |
Variables | |
static const AVCodecTag | additional_audio_tags [] |
static const AVCodecTag | additional_video_tags [] |
static const AVCodecTag | additional_subtitle_tags [] |
static const AVOption | options [] |
#define MODE_MATROSKAv2 0x01 |
Definition at line 113 of file matroskaenc.c.
#define MODE_WEBM 0x02 |
Definition at line 114 of file matroskaenc.c.
#define MAX_TRACKS 126 |
Maximum number of tracks allowed in a Matroska file (with track numbers in range 1 to 126 (inclusive)
Definition at line 118 of file matroskaenc.c.
#define MAX_EBML_HEADER_SIZE 35 |
2 bytes * 7 for EBML IDs, 7 1-byte EBML lengths, 6 1-byte uint, 8 byte for "matroska" doctype string
Definition at line 168 of file matroskaenc.c.
#define MAX_SEEKENTRY_SIZE 21 |
2 bytes * 3 for EBML IDs, 3 1-byte EBML lengths, 8 bytes for 64 bit offset, 4 bytes for target EBML ID
Definition at line 172 of file matroskaenc.c.
#define MAX_CUETRACKPOS_SIZE 35 |
per-cuepoint-track - 5 1-byte EBML IDs, 5 1-byte EBML sizes, 3 8-byte uint max and one 1-byte uint for the track number (this assumes MAX_TRACKS to be <= 255)
Definition at line 176 of file matroskaenc.c.
#define MAX_CUEPOINT_CONTENT_SIZE | ( | num_tracks | ) | 10 + MAX_CUETRACKPOS_SIZE * num_tracks |
per-cuepoint - 1 1-byte EBML ID, 1 1-byte EBML size, 8-byte uint max
Definition at line 179 of file matroskaenc.c.
#define OPUS_SEEK_PREROLL 80000000 |
Seek preroll value for opus.
Definition at line 182 of file matroskaenc.c.
#define OFFSET | ( | x | ) | offsetof(MatroskaMuxContext, x) |
Definition at line 2807 of file matroskaenc.c.
#define FLAGS AV_OPT_FLAG_ENCODING_PARAM |
Definition at line 2808 of file matroskaenc.c.
|
static |
Definition at line 184 of file matroskaenc.c.
Referenced by mkv_write_seekhead(), and put_ebml_id().
|
static |
Definition at line 189 of file matroskaenc.c.
Referenced by end_ebml_master_crc32(), end_ebml_master_crc32_preliminary(), mkv_write_block(), mkv_write_seekhead(), mkv_write_vtt_blocks(), put_ebml_binary(), put_ebml_float(), put_ebml_sint(), put_ebml_uint(), put_ebml_void(), and start_ebml_master().
|
static |
Write an EBML size meaning "unknown size".
bytes | The number of bytes the size should occupy (maximum: 8). |
Definition at line 201 of file matroskaenc.c.
Referenced by start_ebml_master().
|
static |
Calculate how many bytes are needed to represent a given number in EBML.
Definition at line 211 of file matroskaenc.c.
Referenced by mkv_blockgroup_size(), put_ebml_num(), and start_ebml_master().
|
static |
Write a number in EBML variable length format.
bytes | The number of bytes that need to be used to write the number. If zero, any number of bytes can be used. |
Definition at line 227 of file matroskaenc.c.
Referenced by end_ebml_master(), end_ebml_master_crc32(), end_ebml_master_crc32_preliminary(), mkv_write_block(), mkv_write_seekhead(), mkv_write_vtt_blocks(), put_ebml_binary(), put_ebml_float(), put_ebml_sint(), put_ebml_uint(), and put_ebml_void().
|
static |
Definition at line 246 of file matroskaenc.c.
Referenced by mkv_write_attachments(), mkv_write_block(), mkv_write_chapters(), mkv_write_cues(), mkv_write_field_order(), mkv_write_header(), mkv_write_packet_internal(), mkv_write_seekhead(), mkv_write_stereo_mode(), mkv_write_tag_targets(), mkv_write_track(), mkv_write_video_color(), mkv_write_video_projection(), and mkv_write_vtt_blocks().
|
static |
Definition at line 259 of file matroskaenc.c.
Referenced by mkv_write_block().
|
static |
Definition at line 272 of file matroskaenc.c.
Referenced by mkv_check_new_extra_data(), mkv_write_header(), mkv_write_track(), mkv_write_trailer(), mkv_write_video_color(), and mkv_write_video_projection().
|
static |
Definition at line 279 of file matroskaenc.c.
Referenced by end_ebml_master_crc32(), mkv_check_new_extra_data(), mkv_write_attachments(), mkv_write_codecprivate(), mkv_write_header(), mkv_write_track(), mkv_write_trailer(), mkv_write_video_projection(), and put_ebml_string().
|
static |
Definition at line 287 of file matroskaenc.c.
Referenced by mkv_write_attachments(), mkv_write_chapters(), mkv_write_header(), mkv_write_simpletag(), mkv_write_tags(), and mkv_write_track().
|
static |
Write a void element of a given size.
Useful for reserving space in the file to be written to later.
size | The number of bytes to reserve, which must be at least 2. |
Definition at line 299 of file matroskaenc.c.
Referenced by mkv_check_new_extra_data(), mkv_start_seekhead(), mkv_write_header(), mkv_write_native_codecprivate(), mkv_write_seekhead(), mkv_write_tags(), mkv_write_trailer(), and start_ebml_master_crc32().
|
static |
Definition at line 316 of file matroskaenc.c.
Referenced by mkv_write_attachments(), mkv_write_block(), mkv_write_chapters(), mkv_write_cues(), mkv_write_header(), mkv_write_packet_internal(), mkv_write_seekhead(), mkv_write_simpletag(), mkv_write_tag_targets(), mkv_write_tags(), mkv_write_track(), mkv_write_video_color(), mkv_write_video_projection(), and mkv_write_vtt_blocks().
|
static |
Definition at line 326 of file matroskaenc.c.
Referenced by mkv_write_attachments(), mkv_write_block(), mkv_write_chapters(), mkv_write_cues(), mkv_write_header(), mkv_write_packet_internal(), mkv_write_seekhead(), mkv_write_simpletag(), mkv_write_tag(), mkv_write_tag_targets(), mkv_write_tags(), mkv_write_track(), mkv_write_trailer(), mkv_write_video_color(), mkv_write_video_projection(), and mkv_write_vtt_blocks().
|
static |
Definition at line 336 of file matroskaenc.c.
Referenced by mkv_write_attachments(), mkv_write_chapters(), mkv_write_cues(), mkv_write_header(), mkv_write_packet_internal(), mkv_write_seekhead(), mkv_write_tag_targets(), and mkv_write_tracks().
|
static |
Definition at line 349 of file matroskaenc.c.
Referenced by mkv_start_new_cluster(), mkv_write_attachments(), mkv_write_chapters(), mkv_write_cues(), mkv_write_flush_packet(), mkv_write_header(), mkv_write_seekhead(), mkv_write_tags(), mkv_write_tracks(), and mkv_write_trailer().
|
static |
Complete ebml master without destroying the buffer, allowing for later updates.
Definition at line 372 of file matroskaenc.c.
Referenced by mkv_write_header(), mkv_write_tags(), and mkv_write_tracks().
|
static |
Definition at line 385 of file matroskaenc.c.
Referenced by put_xiph_codecpriv().
|
static |
Free the members allocated in the mux context.
Definition at line 394 of file matroskaenc.c.
Referenced by mkv_write_header(), and mkv_write_trailer().
|
static |
Initialize a mkv_seekhead element to be ready to index level 1 Matroska elements.
If a maximum number of elements is specified, enough space will be reserved at the current file location to write a seek head of that size.
segment_offset | The absolute offset to the position in the file where the segment begins. |
numelements | The maximum number of elements that will be indexed by this seek head, 0 if unlimited. |
Definition at line 440 of file matroskaenc.c.
Referenced by mkv_write_header().
|
static |
Definition at line 461 of file matroskaenc.c.
Referenced by mkv_write_attachments(), mkv_write_chapters(), mkv_write_header(), mkv_write_tag_targets(), mkv_write_tracks(), and mkv_write_trailer().
|
static |
Write the seek head to the file and free it.
If a maximum number of elements was specified to mkv_start_seekhead(), the seek head will be written at the location reserved for it. Otherwise, it is written at the current location in the file.
Definition at line 489 of file matroskaenc.c.
Referenced by mkv_write_header(), and mkv_write_trailer().
|
static |
Definition at line 539 of file matroskaenc.c.
Referenced by mkv_write_header().
|
static |
Definition at line 549 of file matroskaenc.c.
Referenced by mkv_write_packet_internal().
|
static |
Definition at line 572 of file matroskaenc.c.
Referenced by mkv_write_trailer().
|
static |
Definition at line 631 of file matroskaenc.c.
Referenced by mkv_write_native_codecprivate().
|
static |
Definition at line 659 of file matroskaenc.c.
Referenced by mkv_write_native_codecprivate().
|
static |
Definition at line 668 of file matroskaenc.c.
Referenced by mkv_write_native_codecprivate().
|
static |
Definition at line 717 of file matroskaenc.c.
Referenced by mkv_check_new_extra_data(), and mkv_write_track().
|
static |
Definition at line 750 of file matroskaenc.c.
Referenced by mkv_write_codecprivate().
|
static |
Definition at line 803 of file matroskaenc.c.
Referenced by mkv_check_new_extra_data(), and mkv_write_track().
|
static |
Definition at line 870 of file matroskaenc.c.
Referenced by mkv_write_track().
|
static |
Definition at line 960 of file matroskaenc.c.
Referenced by mkv_write_track().
|
static |
Definition at line 1037 of file matroskaenc.c.
Referenced by mkv_write_track().
|
static |
Definition at line 1076 of file matroskaenc.c.
Referenced by mkv_write_track().
|
static |
Definition at line 1174 of file matroskaenc.c.
Referenced by mkv_write_tracks().
|
static |
Definition at line 1446 of file matroskaenc.c.
Referenced by mkv_write_header().
|
static |
Definition at line 1479 of file matroskaenc.c.
Referenced by mkv_write_header(), and mkv_write_trailer().
|
static |
Definition at line 1538 of file matroskaenc.c.
Referenced by mkv_write_tag().
|
static |
Definition at line 1572 of file matroskaenc.c.
Referenced by mkv_write_tag(), and mkv_write_tags().
|
static |
Definition at line 1598 of file matroskaenc.c.
Referenced by mkv_check_tag(), and mkv_write_tag().
|
static |
Definition at line 1612 of file matroskaenc.c.
Referenced by mkv_write_tags().
|
static |
Definition at line 1636 of file matroskaenc.c.
Referenced by mkv_write_tags().
|
static |
Definition at line 1647 of file matroskaenc.c.
Referenced by mkv_write_header().
|
static |
Definition at line 1737 of file matroskaenc.c.
Referenced by mkv_write_header().
|
static |
Definition at line 1834 of file matroskaenc.c.
Referenced by mkv_write_header().
|
static |
Definition at line 1858 of file matroskaenc.c.
Definition at line 2057 of file matroskaenc.c.
Referenced by mkv_write_packet_internal(), and mkv_write_vtt_blocks().
Definition at line 2066 of file matroskaenc.c.
Referenced by mkv_write_block().
|
static |
Definition at line 2119 of file matroskaenc.c.
Referenced by mkv_write_packet_internal().
|
static |
Definition at line 2234 of file matroskaenc.c.
Referenced by mkv_write_packet_internal().
|
static |
Definition at line 2279 of file matroskaenc.c.
Referenced by mkv_write_packet(), and mkv_write_packet_internal().
|
static |
Definition at line 2292 of file matroskaenc.c.
Referenced by mkv_write_packet().
|
static |
Definition at line 2399 of file matroskaenc.c.
Referenced by mkv_write_packet(), and mkv_write_trailer().
|
static |
Definition at line 2483 of file matroskaenc.c.
Referenced by mkv_write_flush_packet().
|
static |
Definition at line 2559 of file matroskaenc.c.
|
static |
Definition at line 2578 of file matroskaenc.c.
Definition at line 2697 of file matroskaenc.c.
Definition at line 2714 of file matroskaenc.c.
|
static |
Definition at line 2724 of file matroskaenc.c.
|
static |
Definition at line 2762 of file matroskaenc.c.
|
static |
Definition at line 2777 of file matroskaenc.c.
|
static |
Definition at line 2793 of file matroskaenc.c.
|
static |
Definition at line 2800 of file matroskaenc.c.
|
static |
Definition at line 2809 of file matroskaenc.c.