declare and use UID type
Originally committed as revision 5836 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7c87a2f0c0
commit
4bfff76814
@ -43,17 +43,19 @@
|
|||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
#include "riff.h"
|
#include "riff.h"
|
||||||
|
|
||||||
|
typedef DECLARE_ALIGNED_16(uint8_t, UID[16]);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
AVStream *stream;
|
AVStream *stream;
|
||||||
uint8_t track_uid[16];
|
UID track_uid;
|
||||||
uint8_t sequence_uid[16];
|
UID sequence_uid;
|
||||||
int track_id;
|
int track_id;
|
||||||
int track_number;
|
int track_number;
|
||||||
} MXFTrack;
|
} MXFTrack;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DECLARE_ALIGNED_16(uint8_t, essence_container[16]);
|
UID essence_container;
|
||||||
DECLARE_ALIGNED_16(uint8_t, essence_compression[16]);
|
UID essence_compression;
|
||||||
enum CodecType codec_type;
|
enum CodecType codec_type;
|
||||||
AVRational sample_rate;
|
AVRational sample_rate;
|
||||||
AVRational aspect_ratio;
|
AVRational aspect_ratio;
|
||||||
@ -75,20 +77,22 @@ typedef struct {
|
|||||||
} MXFContext;
|
} MXFContext;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DECLARE_ALIGNED_16(uint8_t, key[16]);
|
UID key;
|
||||||
offset_t offset;
|
offset_t offset;
|
||||||
uint64_t length;
|
uint64_t length;
|
||||||
} KLVPacket;
|
} KLVPacket;
|
||||||
|
|
||||||
static const uint8_t mxf_metadata_source_package_key[] = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x37, 0x00 };
|
static const UID mxf_metadata_source_package_key = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x37, 0x00 };
|
||||||
static const uint8_t mxf_metadata_sequence_key[] = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x00 };
|
static const UID mxf_metadata_sequence_key = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x00 };
|
||||||
static const uint8_t mxf_metadata_generic_sound_descriptor_key[] = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x42, 0x00 };
|
static const UID mxf_metadata_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_metadata_cdci_descriptor_key[] = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x28, 0x00 };
|
static const UID mxf_metadata_cdci_descriptor_key = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x28, 0x00 };
|
||||||
static const uint8_t mxf_metadata_mpegvideo_descriptor_key[] = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x51, 0x00 };
|
static const UID mxf_metadata_mpegvideo_descriptor_key = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x51, 0x00 };
|
||||||
static const uint8_t mxf_metadata_wave_descriptor_key[] = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x48, 0x00 };
|
static const UID mxf_metadata_wave_descriptor_key = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x48, 0x00 };
|
||||||
static const uint8_t mxf_metadata_track_key[] = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x3b, 0x00 };
|
static const UID mxf_metadata_track_key = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x3b, 0x00 };
|
||||||
static const uint8_t mxf_header_partition_pack_key[] = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02 };
|
|
||||||
static const uint8_t mxf_essence_element_key[] = { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01 };
|
/* partial keys to match */
|
||||||
|
static const uint8_t mxf_header_partition_pack_key[] = { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02 };
|
||||||
|
static const uint8_t mxf_essence_element_key[] = { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01 };
|
||||||
|
|
||||||
#define IS_KLV_KEY(x, y) (!memcmp(x, y, sizeof(y)))
|
#define IS_KLV_KEY(x, y) (!memcmp(x, y, sizeof(y)))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user