00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef AVFORMAT_MXF_H
00022 #define AVFORMAT_MXF_H
00023
00024 #include "avformat.h"
00025 #include "libavcodec/avcodec.h"
00026 #include <stdint.h>
00027
00028 typedef uint8_t UID[16];
00029
00030 enum MXFMetadataSetType {
00031 AnyType,
00032 MaterialPackage,
00033 SourcePackage,
00034 SourceClip,
00035 TimecodeComponent,
00036 Sequence,
00037 MultipleDescriptor,
00038 Descriptor,
00039 Track,
00040 CryptoContext,
00041 Preface,
00042 Identification,
00043 ContentStorage,
00044 SubDescriptor,
00045 IndexTableSegment,
00046 EssenceContainerData,
00047 TypeBottom,
00048 };
00049
00050 enum MXFFrameLayout {
00051 FullFrame = 0,
00052 SeparateFields,
00053 OneField,
00054 MixedFields,
00055 SegmentedFrame,
00056 };
00057
00058 typedef struct {
00059 UID key;
00060 int64_t offset;
00061 uint64_t length;
00062 } KLVPacket;
00063
00064 typedef struct {
00065 UID uid;
00066 unsigned matching_len;
00067 int id;
00068 } MXFCodecUL;
00069
00070 typedef struct {
00071 struct AVRational time_base;
00072 int samples_per_frame[6];
00073 } MXFSamplesPerFrame;
00074
00075 extern const MXFCodecUL ff_mxf_data_definition_uls[];
00076 extern const MXFCodecUL ff_mxf_codec_uls[];
00077 extern const MXFCodecUL ff_mxf_pixel_format_uls[];
00078
00079 int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum PixelFormat *pix_fmt);
00080 const MXFSamplesPerFrame *ff_mxf_get_samples_per_frame(AVFormatContext *s, AVRational time_base);
00081
00082 #define PRINT_KEY(pc, s, x) av_dlog(pc, "%s %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", s, \
00083 (x)[0], (x)[1], (x)[2], (x)[3], (x)[4], (x)[5], (x)[6], (x)[7], (x)[8], (x)[9], (x)[10], (x)[11], (x)[12], (x)[13], (x)[14], (x)[15])
00084
00085 #endif