FFmpeg
4.0
|
#include <inttypes.h>
#include <math.h>
#include <time.h>
#include "libavutil/opt.h"
#include "libavutil/random_seed.h"
#include "libavutil/timecode.h"
#include "libavutil/avassert.h"
#include "libavutil/pixdesc.h"
#include "libavutil/time_internal.h"
#include "libavcodec/bytestream.h"
#include "libavcodec/dnxhddata.h"
#include "libavcodec/dv_profile.h"
#include "libavcodec/h264.h"
#include "libavcodec/internal.h"
#include "audiointerleave.h"
#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"
#include "mxf.h"
#include "config.h"
Go to the source code of this file.
Data Structures | |
struct | MXFLocalTagPair |
struct | MXFIndexEntry |
struct | MXFStreamContext |
struct | MXFContainerEssenceEntry |
struct | MXFPackage |
struct | MXFContext |
Macros | |
#define | EDIT_UNITS_PER_BODY 250 |
#define | KAG_SIZE 512 |
#define | DESCRIPTOR_COUNT(essence_container_count) (essence_container_count > 1 ? essence_container_count + 1 : essence_container_count) |
#define | MXF_COMMON_OPTIONS |
Variables | |
AVOutputFormat | ff_mxf_d10_muxer |
AVOutputFormat | ff_mxf_opatom_muxer |
struct { | |
enum AVCodecID id | |
enum ULIndex index | |
} | mxf_essence_mappings [] |
static const MXFContainerEssenceEntry | mxf_essence_container_uls [] |
static const uint8_t | uuid_base [] = { 0xAD,0xAB,0x44,0x24,0x2f,0x25,0x4d,0xc7,0x92,0xff,0x29,0xbd } |
static const uint8_t | umid_ul [] = { 0x06,0x0A,0x2B,0x34,0x01,0x01,0x01,0x05,0x01,0x01,0x0D,0x00,0x13 } |
static const uint8_t | op1a_ul [] = { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x01,0x09,0x00 } |
complete key for operation pattern, partitions, and primer pack More... | |
static const uint8_t | opatom_ul [] = { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x02,0x0D,0x01,0x02,0x01,0x10,0x03,0x00,0x00 } |
static const uint8_t | footer_partition_key [] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x04,0x04,0x00 } |
static const uint8_t | primer_pack_key [] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x05,0x01,0x00 } |
static const uint8_t | index_table_segment_key [] = { 0x06,0x0E,0x2B,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x02,0x01,0x01,0x10,0x01,0x00 } |
static const uint8_t | random_index_pack_key [] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x11,0x01,0x00 } |
static const uint8_t | header_open_partition_key [] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x02,0x01,0x00 } |
static const uint8_t | header_closed_partition_key [] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x02,0x04,0x00 } |
static const uint8_t | klv_fill_key [] = { 0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x03,0x01,0x02,0x10,0x01,0x00,0x00,0x00 } |
static const uint8_t | body_partition_key [] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x03,0x04,0x00 } |
static const uint8_t | header_metadata_key [] = { 0x06,0x0E,0x2B,0x34,0x02,0x53,0x01,0x01,0x0D,0x01,0x01,0x01,0x01 } |
partial key for header metadata More... | |
static const uint8_t | multiple_desc_ul [] = { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x0D,0x01,0x03,0x01,0x02,0x7F,0x01,0x00 } |
static const MXFLocalTagPair | mxf_local_tag_batch [] |
SMPTE RP210 http://www.smpte-ra.org/mdd/index.html https://smpte-ra.org/sites/default/files/Labels.xml. More... | |
static const MXFLocalTagPair | mxf_user_comments_local_tag [] |
static const uint8_t | smpte_12m_timecode_track_data_ul [] = { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x01,0x01,0x00,0x00,0x00 } |
static const UID | mxf_mpegvideo_descriptor_key = { 0x06,0x0E,0x2B,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x51,0x00 } |
static const UID | mxf_wav_descriptor_key = { 0x06,0x0E,0x2B,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x48,0x00 } |
static const UID | mxf_aes3_descriptor_key = { 0x06,0x0E,0x2B,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x47,0x00 } |
static const UID | mxf_cdci_descriptor_key = { 0x06,0x0E,0x2B,0x34,0x02,0x53,0x01,0x01,0x0D,0x01,0x01,0x01,0x01,0x01,0x28,0x00 } |
static const UID | mxf_generic_sound_descriptor_key = { 0x06,0x0E,0x2B,0x34,0x02,0x53,0x01,0x01,0x0D,0x01,0x01,0x01,0x01,0x01,0x42,0x00 } |
static const uint8_t | mxf_indirect_value_utf16le [] = { 0x4c,0x00,0x02,0x10,0x01,0x00,0x00,0x00,0x00,0x06,0x0e,0x2b,0x34,0x01,0x04,0x01,0x01 } |
struct { | |
UID uid | |
int frame_size | |
int profile | |
uint8_t interlaced | |
} | mxf_h264_codec_uls [] |
static const UID | mxf_mpeg2_codec_uls [] |
static const uint8_t | system_metadata_pack_key [] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x03,0x01,0x04,0x01,0x01,0x00 } |
static const uint8_t | system_metadata_package_set_key [] = { 0x06,0x0E,0x2B,0x34,0x02,0x43,0x01,0x01,0x0D,0x01,0x03,0x01,0x04,0x01,0x02,0x01 } |
static const AVOption | mxf_options [] |
static const AVClass | mxf_muxer_class |
static const AVOption | d10_options [] |
static const AVClass | mxf_d10_muxer_class |
static const AVOption | opatom_options [] |
static const AVClass | mxf_opatom_muxer_class |
AVOutputFormat | ff_mxf_muxer |
#define EDIT_UNITS_PER_BODY 250 |
Definition at line 64 of file mxfenc.c.
Referenced by mxf_write_packet().
#define KAG_SIZE 512 |
Definition at line 65 of file mxfenc.c.
Referenced by klv_fill_size(), mxf_parse_dnxhd_frame(), mxf_parse_dv_frame(), mxf_write_d10_video_packet(), mxf_write_header(), mxf_write_index_table_segment(), mxf_write_klv_fill(), mxf_write_packet(), and mxf_write_partition().
#define DESCRIPTOR_COUNT | ( | essence_container_count | ) | (essence_container_count > 1 ? essence_container_count + 1 : essence_container_count) |
Definition at line 654 of file mxfenc.c.
Referenced by mxf_write_essence_container_refs(), mxf_write_partition(), and mxf_write_preface().
#define MXF_COMMON_OPTIONS |
enum ULIndex |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 519 of file mxfenc.c.
Referenced by mxf_write_content_storage(), mxf_write_essence_container_data(), mxf_write_generic_desc(), mxf_write_identification(), mxf_write_index_table_segment(), mxf_write_multi_descriptor(), mxf_write_package(), mxf_write_preface(), mxf_write_sequence(), mxf_write_structural_component(), mxf_write_tagged_value(), mxf_write_tape_descriptor(), mxf_write_timecode_component(), and mxf_write_track().
|
static |
Definition at line 526 of file mxfenc.c.
Referenced by mxf_write_essence_container_data(), mxf_write_package(), mxf_write_structural_component(), and mxf_write_system_item().
|
static |
Definition at line 535 of file mxfenc.c.
Referenced by mxf_write_content_storage(), mxf_write_essence_container_refs(), mxf_write_multi_descriptor(), mxf_write_package(), mxf_write_preface(), and mxf_write_sequence().
|
static |
Definition at line 541 of file mxfenc.c.
Referenced by mxf_write_partition().
|
static |
Definition at line 549 of file mxfenc.c.
Referenced by mxf_write_content_storage(), mxf_write_essence_container_data(), mxf_write_identification(), mxf_write_index_table_segment(), mxf_write_multi_descriptor(), mxf_write_package(), mxf_write_partition(), mxf_write_preface(), mxf_write_primer_pack(), mxf_write_random_index_pack(), mxf_write_sequence(), mxf_write_structural_component(), mxf_write_tagged_value(), mxf_write_tape_descriptor(), mxf_write_timecode_component(), and mxf_write_track().
|
static |
Definition at line 570 of file mxfenc.c.
Referenced by mxf_write_d10_audio_packet(), mxf_write_d10_video_packet(), mxf_write_generic_desc(), mxf_write_klv_fill(), mxf_write_packet(), and mxf_write_system_item().
|
static |
Definition at line 576 of file mxfenc.c.
Referenced by mxf_write_opatom_body_partition().
Definition at line 585 of file mxfenc.c.
Referenced by mxf_write_header().
|
static |
Definition at line 594 of file mxfenc.c.
Referenced by mxf_write_partition().
|
static |
Definition at line 620 of file mxfenc.c.
Referenced by mxf_write_cdci_common(), mxf_write_common_fields(), mxf_write_content_storage(), mxf_write_essence_container_data(), mxf_write_generic_desc(), mxf_write_generic_sound_common(), mxf_write_identification(), mxf_write_index_table_segment(), mxf_write_local_tag_utf16(), mxf_write_mpegvideo_desc(), mxf_write_multi_descriptor(), mxf_write_package(), mxf_write_preface(), mxf_write_sequence(), mxf_write_structural_component(), mxf_write_tagged_value(), mxf_write_tape_descriptor(), mxf_write_timecode_component(), mxf_write_track(), and mxf_write_wav_common().
|
static |
Definition at line 626 of file mxfenc.c.
Referenced by mxf_write_content_storage(), mxf_write_essence_container_data(), mxf_write_identification(), mxf_write_multi_descriptor(), mxf_write_package(), mxf_write_preface(), mxf_write_sequence(), mxf_write_structural_component(), mxf_write_tagged_value(), mxf_write_tape_descriptor(), mxf_write_timecode_component(), and mxf_write_track().
|
static |
Definition at line 632 of file mxfenc.c.
Referenced by mxf_write_footer().
|
static |
Definition at line 642 of file mxfenc.c.
Referenced by mxf_write_common_fields().
|
static |
Definition at line 657 of file mxfenc.c.
Referenced by mxf_write_partition(), and mxf_write_preface().
|
static |
Definition at line 674 of file mxfenc.c.
Referenced by mxf_write_header_metadata_sets().
|
static |
Definition at line 725 of file mxfenc.c.
Referenced by mxf_utf16_local_tag_length(), and mxf_write_local_tag_utf16().
|
static |
Definition at line 747 of file mxfenc.c.
Referenced by mxf_write_identification(), mxf_write_package(), and mxf_write_tagged_value().
|
static |
Definition at line 766 of file mxfenc.c.
Referenced by mxf_write_identification(), mxf_write_package(), and mxf_write_tagged_value().
|
static |
Definition at line 779 of file mxfenc.c.
Referenced by mxf_write_header_metadata_sets().
|
static |
Definition at line 819 of file mxfenc.c.
Referenced by mxf_write_header_metadata_sets().
|
static |
Definition at line 846 of file mxfenc.c.
Referenced by mxf_write_package().
|
static |
Definition at line 894 of file mxfenc.c.
Referenced by mxf_write_sequence(), mxf_write_structural_component(), and mxf_write_timecode_component().
|
static |
Definition at line 918 of file mxfenc.c.
Referenced by mxf_write_package().
|
static |
Definition at line 945 of file mxfenc.c.
Referenced by mxf_write_package().
|
static |
Definition at line 972 of file mxfenc.c.
Referenced by mxf_write_package().
|
static |
Definition at line 1009 of file mxfenc.c.
Referenced by mxf_write_package().
|
static |
Definition at line 1022 of file mxfenc.c.
Referenced by mxf_write_package().
|
static |
Definition at line 1059 of file mxfenc.c.
Referenced by mxf_write_cdci_common(), and mxf_write_generic_sound_common().
|
static |
Definition at line 1099 of file mxfenc.c.
Referenced by mxf_write_cdci_desc(), and mxf_write_mpegvideo_desc().
|
static |
Definition at line 1223 of file mxfenc.c.
Referenced by mxf_write_generic_sound_desc(), and mxf_write_wav_common().
|
static |
Definition at line 1268 of file mxfenc.c.
Referenced by mxf_write_aes3_desc(), and mxf_write_wav_desc().
|
static |
Definition at line 1299 of file mxfenc.c.
Referenced by mxf_write_user_comments().
|
static |
Definition at line 1328 of file mxfenc.c.
Referenced by mxf_write_package().
|
static |
Definition at line 1346 of file mxfenc.c.
Referenced by mxf_write_header_metadata_sets().
|
static |
Definition at line 1446 of file mxfenc.c.
Referenced by mxf_write_header_metadata_sets().
|
static |
Definition at line 1468 of file mxfenc.c.
Referenced by mxf_write_partition().
|
static |
Definition at line 1517 of file mxfenc.c.
Referenced by mxf_parse_dnxhd_frame(), mxf_parse_dv_frame(), mxf_write_d10_video_packet(), mxf_write_header(), mxf_write_index_table_segment(), mxf_write_klv_fill(), mxf_write_packet(), and mxf_write_partition().
|
static |
Definition at line 1526 of file mxfenc.c.
Referenced by mxf_write_footer(), and mxf_write_packet().
|
static |
Definition at line 1659 of file mxfenc.c.
Referenced by mxf_write_footer(), mxf_write_opatom_body_partition(), mxf_write_opatom_packet(), mxf_write_packet(), and mxf_write_partition().
|
static |
Definition at line 1671 of file mxfenc.c.
Referenced by mxf_write_footer(), mxf_write_opatom_body_partition(), mxf_write_opatom_packet(), and mxf_write_packet().
|
static |
Definition at line 1776 of file mxfenc.c.
Referenced by mxf_write_packet().
|
static |
Definition at line 1861 of file mxfenc.c.
Referenced by mxf_write_packet().
|
static |
Definition at line 1968 of file mxfenc.c.
Referenced by mxf_write_packet().
|
static |
Definition at line 2048 of file mxfenc.c.
Referenced by mxf_parse_mpeg2_frame().
|
static |
Definition at line 2068 of file mxfenc.c.
Referenced by mxf_write_packet().
|
static |
Definition at line 2126 of file mxfenc.c.
Referenced by mxf_write_header().
|
static |
Definition at line 2140 of file mxfenc.c.
Referenced by mxf_write_header().
|
static |
Definition at line 2152 of file mxfenc.c.
Referenced by mxf_write_header().
|
static |
|
static |
Definition at line 2369 of file mxfenc.c.
Referenced by mxf_write_packet().
|
static |
Definition at line 2410 of file mxfenc.c.
Referenced by mxf_write_packet().
|
static |
Definition at line 2439 of file mxfenc.c.
Referenced by mxf_write_packet().
|
static |
Definition at line 2471 of file mxfenc.c.
Referenced by mxf_write_footer(), and mxf_write_opatom_packet().
|
static |
Definition at line 2492 of file mxfenc.c.
Referenced by mxf_write_packet().
|
static |
|
static |
Definition at line 2626 of file mxfenc.c.
Referenced by mxf_write_footer().
|
static |
|
static |
Definition at line 2716 of file mxfenc.c.
Referenced by mxf_interleave().
|
static |
Definition at line 2771 of file mxfenc.c.
Referenced by mxf_interleave().
|
static |
AVOutputFormat ff_mxf_d10_muxer |
AVOutputFormat ff_mxf_opatom_muxer |
const { ... } mxf_essence_mappings[] |
Referenced by mxf_get_essence_container_ul_index().
|
static |
|
static |
Definition at line 393 of file mxfenc.c.
Referenced by mxf_write_uuid().
|
static |
Definition at line 394 of file mxfenc.c.
Referenced by mxf_write_umid().
|
static |
complete key for operation pattern, partitions, and primer pack
Definition at line 399 of file mxfenc.c.
Referenced by mxf_write_partition(), and mxf_write_preface().
|
static |
Definition at line 400 of file mxfenc.c.
Referenced by mxf_write_partition(), and mxf_write_preface().
|
static |
Definition at line 401 of file mxfenc.c.
Referenced by mxf_write_footer(), and mxf_write_partition().
|
static |
Definition at line 402 of file mxfenc.c.
Referenced by mxf_write_primer_pack().
|
static |
Definition at line 403 of file mxfenc.c.
Referenced by mxf_write_index_table_segment().
|
static |
Definition at line 404 of file mxfenc.c.
Referenced by mxf_write_random_index_pack().
|
static |
Definition at line 405 of file mxfenc.c.
Referenced by mxf_write_opatom_packet(), and mxf_write_packet().
|
static |
Definition at line 406 of file mxfenc.c.
Referenced by mxf_write_footer().
|
static |
Definition at line 407 of file mxfenc.c.
Referenced by mxf_write_d10_video_packet(), and mxf_write_klv_fill().
|
static |
Definition at line 408 of file mxfenc.c.
Referenced by mxf_write_opatom_body_partition(), mxf_write_packet(), and mxf_write_partition().
|
static |
partial key for header metadata
Definition at line 413 of file mxfenc.c.
Referenced by mxf_write_metadata_key().
|
static |
Definition at line 414 of file mxfenc.c.
Referenced by mxf_write_essence_container_refs(), mxf_write_multi_descriptor(), and mxf_write_system_item().
|
static |
|
static |
|
static |
Definition at line 892 of file mxfenc.c.
Referenced by mxf_write_common_fields().
|
static |
Definition at line 1093 of file mxfenc.c.
Referenced by mxf_write_mpegvideo_desc().
|
static |
Definition at line 1094 of file mxfenc.c.
Referenced by mxf_write_wav_desc().
|
static |
Definition at line 1095 of file mxfenc.c.
Referenced by mxf_write_aes3_desc().
|
static |
Definition at line 1096 of file mxfenc.c.
Referenced by mxf_write_cdci_desc().
|
static |
Definition at line 1097 of file mxfenc.c.
Referenced by mxf_write_generic_sound_desc().
|
static |
Definition at line 1297 of file mxfenc.c.
Referenced by mxf_write_tagged_value().
UID uid |
Definition at line 1946 of file mxfenc.c.
Referenced by matroska_convert_tags(), matroska_parse_tracks(), matroska_read_header(), and qsv_load_plugins().
int frame_size |
Definition at line 1947 of file mxfenc.c.
Referenced by ac3_eac3_probe(), aic_decode_header(), alac_entropy_coder(), alac_linear_predictor(), apply_filter(), av_buffersink_set_frame_size(), avpriv_codec2_mode_bit_rate(), avpriv_mpegaudio_decode_header(), bitpacked_decode_yuv422p10(), build_frame_code(), caf_write_header(), celt_gauge_psy_weight(), celt_renormalize_vector(), codec2_read_packet(), dca_parse_params(), dcadec_decode_frame(), decode_frame(), decode_packet(), dfa_read_packet(), do_video_out(), dv_frame_offset(), dvvideo_decode_frame(), encode_frame(), escape124_decode_frame(), ff_celt_decode_frame(), ff_compute_frame_duration(), ff_opus_psy_postencode_update(), ff_psy_preprocess(), ff_put_wav_header(), ff_rtp_send_h261(), ff_rtp_send_vc2hq(), ff_sipr_decode_frame_16k(), ff_vbv_update(), find_expected_header(), flic_decode_frame_15_16BPP(), flic_decode_frame_24BPP(), flic_decode_frame_8BPP(), g723_1_decode_frame(), generate_raw_frame(), get_audio_frame_duration(), init_output_frame(), libopus_encode_init(), lmlm4_read_packet(), load_encode_and_write(), main(), move_audio(), mp3_header_decompress(), mp3_read_header(), mp3lame_encode_frame(), mpegts_init(), mxf_parse_dnxhd_frame(), mxf_parse_dv_frame(), mxf_parse_h264_frame(), mxf_write_d10_audio_packet(), new_subtitle_stream(), new_video_stream(), on2avc_decode_frame(), opus_duration(), opus_encode_frame(), pack_bitstream(), prores_encode_frame(), qdm2_decode(), read_packet(), return_stored_frame(), rm_write_header(), rpl_read_packet(), rtp_send_ilbc(), rv10_write_header(), s302m_decode_frame(), s302m_parse_frame_header(), smacker_read_packet(), store_packet(), str_probe(), str_read_packet(), swf_write_video(), vc1t_read_packet(), vorbis_encode_frame(), vp9_superframe_split_filter(), wavpack_decode_frame(), and xmv_fetch_video_packet().
int profile |
Definition at line 1948 of file mxfenc.c.
Referenced by mxf_parse_dv_frame().
uint8_t interlaced |
Definition at line 1949 of file mxfenc.c.
Referenced by avui_decode_frame(), avui_encode_frame(), copy_frame(), encode_init(), ff_dnxhd_find_cid(), find_compressor(), ljpeg_decode_yuv_scan(), magy_decode_slice(), magy_decode_slice10(), mov_get_h264_codec_tag(), mov_get_mpeg2_xdcam_codec_tag(), and mov_write_avid_tag().
const { ... } mxf_h264_codec_uls[] |
Referenced by mxf_parse_h264_frame().
|
static |
Definition at line 2035 of file mxfenc.c.
Referenced by mxf_get_mpeg2_codec_ul().
|
static |
Definition at line 2366 of file mxfenc.c.
Referenced by mxf_write_system_item().
|
static |
Definition at line 2367 of file mxfenc.c.
Referenced by mxf_write_system_item().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
AVOutputFormat ff_mxf_muxer |