summaryrefslogtreecommitdiff
path: root/gst/mxf/mxful.h
blob: 76e3ba67ab8aa7f6b5c6c7866f73e8adf9f82887 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/* GStreamer
 * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef __MXF_UL_H__
#define __MXF_UL_H__

#include <gst/gst.h>

/* SMPTE 377M 3.2 */
typedef struct {
  guint8 u[16];
} MXFUL;

typedef enum {
  MXF_UL_SMPTE,
  MXF_UL_FILL,
  MXF_UL_PARTITION_PACK,
  MXF_UL_PRIMER_PACK,
  MXF_UL_METADATA,
  MXF_UL_DESCRIPTIVE_METADATA,
  MXF_UL_RANDOM_INDEX_PACK,
  MXF_UL_INDEX_TABLE_SEGMENT,
  MXF_UL_GENERIC_CONTAINER_SYSTEM_ITEM,
  MXF_UL_GENERIC_CONTAINER_ESSENCE_ELEMENT,
  MXF_UL_GENERIC_CONTAINER_ESSENCE_CONTAINER_LABEL,
  MXF_UL_AVID_ESSENCE_CONTAINER_ESSENCE_ELEMENT,
  MXF_UL_AVID_ESSENCE_CONTAINER_ESSENCE_LABEL,
  MXF_UL_OPERATIONAL_PATTERN_IDENTIFICATION,
  MXF_UL_TRACK_TIMECODE_12M_INACTIVE,
  MXF_UL_TRACK_TIMECODE_12M_ACTIVE,
  MXF_UL_TRACK_TIMECODE_309M,
  MXF_UL_TRACK_METADATA,
  MXF_UL_TRACK_PICTURE_ESSENCE,
  MXF_UL_TRACK_SOUND_ESSENCE,
  MXF_UL_TRACK_DATA_ESSENCE,
  MXF_UL_TRACK_AUXILIARY_DATA,
  MXF_UL_TRACK_PARSED_TEXT,
  MXF_UL_TRACK_AVID_PICTURE_ESSENCE,
  MXF_UL_INSTANCE_UID,
  MXF_UL_GENERATION_UID,
  MXF_UL_LAST_MODIFIED_DATE,
  MXF_UL_VERSION,
  MXF_UL_OBJECT_MODEL_VERSION,
  MXF_UL_PRIMARY_PACKAGE,
  MXF_UL_IDENTIFICATIONS,
  MXF_UL_CONTENT_STORAGE,
  MXF_UL_OPERATIONAL_PATTERN,
  MXF_UL_ESSENCE_CONTAINERS,
  MXF_UL_DM_SCHEMES,
  MXF_UL_THIS_GENERATION_UID,
  MXF_UL_COMPANY_NAME,
  MXF_UL_PRODUCT_NAME,
  MXF_UL_PRODUCT_VERSION,
  MXF_UL_VERSION_STRING,
  MXF_UL_PRODUCT_UID,
  MXF_UL_MODIFICATION_DATE,
  MXF_UL_TOOLKIT_VERSION,
  MXF_UL_PLATFORM,
  MXF_UL_PACKAGES,
  MXF_UL_ESSENCE_CONTAINER_DATA,
  MXF_UL_LINKED_PACKAGE_UID,
  MXF_UL_BODY_SID,
  MXF_UL_INDEX_SID,
  MXF_UL_PACKAGE_UID,
  MXF_UL_PACKAGE_NAME,
  MXF_UL_PACKAGE_CREATION_DATE,
  MXF_UL_PACKAGE_MODIFIED_DATE,
  MXF_UL_TRACKS,
  MXF_UL_DESCRIPTOR,
  MXF_UL_TRACK_ID,
  MXF_UL_TRACK_NUMBER,
  MXF_UL_TRACK_NAME,
  MXF_UL_SEQUENCE,
  MXF_UL_EDIT_RATE,
  MXF_UL_ORIGIN,
  MXF_UL_EVENT_EDIT_RATE,
  MXF_UL_EVENT_ORIGIN,
  MXF_UL_DATA_DEFINITION,
  MXF_UL_DURATION,
  MXF_UL_STRUCTURAL_COMPONENTS,
  MXF_UL_ROUNDED_TIMECODE_BASE,
  MXF_UL_START_TIMECODE,
  MXF_UL_DROP_FRAME,
  MXF_UL_START_POSITION,
  MXF_UL_SOURCE_PACKAGE_ID,
  MXF_UL_SOURCE_TRACK_ID,
  MXF_UL_DM_SOURCECLIP_TRACK_IDS,
  MXF_UL_EVENT_START_POSITION,
  MXF_UL_EVENT_COMMENT,
  MXF_UL_DM_SEGMENT_TRACK_IDS,
  MXF_UL_DM_FRAMEWORK,
  MXF_UL_LOCATORS,
  MXF_UL_LINKED_TRACK_ID,
  MXF_UL_SAMPLE_RATE,
  MXF_UL_CONTAINER_DURATION,
  MXF_UL_ESSENCE_CONTAINER,
  MXF_UL_CODEC,
  MXF_UL_SIGNAL_STANDARD,
  MXF_UL_FRAME_LAYOUT,
  MXF_UL_STORED_WIDTH,
  MXF_UL_STORED_HEIGHT,
  MXF_UL_STORED_F2_OFFSET,
  MXF_UL_SAMPLED_WIDTH,
  MXF_UL_SAMPLED_HEIGHT,
  MXF_UL_SAMPLED_X_OFFSET,
  MXF_UL_SAMPLED_Y_OFFSET,
  MXF_UL_DISPLAY_HEIGHT,
  MXF_UL_DISPLAY_WIDTH,
  MXF_UL_DISPLAY_X_OFFSET,
  MXF_UL_DISPLAY_Y_OFFSET,
  MXF_UL_DISPLAY_F2_OFFSET,
  MXF_UL_ASPECT_RATIO,
  MXF_UL_ACTIVE_FORMAT_DESCRIPTOR,
  MXF_UL_VIDEO_LINE_MAP,
  MXF_UL_ALPHA_TRANSPARENCY,
  MXF_UL_CAPTURE_GAMMA,
  MXF_UL_IMAGE_ALIGNMENT_OFFSET,
  MXF_UL_IMAGE_START_OFFSET,
  MXF_UL_IMAGE_END_OFFSET,
  MXF_UL_FIELD_DOMINANCE,
  MXF_UL_PICTURE_ESSENCE_CODING,
  MXF_UL_AUDIO_SAMPLING_RATE,
  MXF_UL_LOCKED,
  MXF_UL_AUDIO_REF_LEVEL,
  MXF_UL_ELECTRO_SPATIAL_FORMULATION,
  MXF_UL_CHANNEL_COUNT,
  MXF_UL_QUANTIZATION_BITS,
  MXF_UL_DIAL_NORM,
  MXF_UL_SOUND_ESSENCE_COMPRESSION,
  MXF_UL_COMPONENT_DEPTH,
  MXF_UL_HORIZONTAL_SUBSAMPLING,
  MXF_UL_VERTICAL_SUBSAMPLING,
  MXF_UL_COLOR_SITING,
  MXF_UL_REVERSED_BYTE_ORDER,
  MXF_UL_PADDING_BITS,
  MXF_UL_ALPHA_SAMPLE_DEPTH,
  MXF_UL_BLACK_REF_LEVEL,
  MXF_UL_WHITE_REF_LEVEL,
  MXF_UL_COLOR_RANGE,
  MXF_UL_COMPONENT_MAX_REF,
  MXF_UL_COMPONENT_MIN_REF,
  MXF_UL_ALPHA_MAX_REF,
  MXF_UL_ALPHA_MIN_REF,
  MXF_UL_SCANNING_DIRECTION,
  MXF_UL_PIXEL_LAYOUT,
  MXF_UL_DATA_ESSENCE_CODING,
  MXF_UL_SUB_DESCRIPTORS,
  MXF_UL_LOCATOR_NAME,
  MXF_UL_URL_STRING,
  MXF_UL_MAX
} MXFULId;

extern const MXFUL _mxf_ul_table[MXF_UL_MAX];

#define MXF_UL(id) (&_mxf_ul_table[MXF_UL_##id])

gboolean mxf_ul_is_equal (const MXFUL *a, const MXFUL *b);
gboolean mxf_ul_is_subclass (const MXFUL *class, const MXFUL *subclass);
gboolean mxf_ul_is_zero (const MXFUL *ul);
gboolean mxf_ul_is_valid (const MXFUL *ul);
guint mxf_ul_hash (const MXFUL *ul);

gchar * mxf_ul_to_string (const MXFUL *ul, gchar str[48]);
MXFUL * mxf_ul_from_string (const gchar *str, MXFUL *ul);

gboolean mxf_ul_array_parse (MXFUL **array, guint32 *count, const guint8 *data, guint size);

#endif /* __MXF_UL_H__ */