• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) 2008-2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
20 /* Handling of MXF structural metadata */
21 
22 #ifndef __MXF_METADATA_H__
23 #define __MXF_METADATA_H__
24 
25 #include <gst/gst.h>
26 #include <gst/audio/audio.h>
27 #include "mxftypes.h"
28 
29 #define MXF_TYPE_METADATA_BASE \
30   (mxf_metadata_base_get_type())
31 #define MXF_METADATA_BASE(obj) \
32   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_BASE, MXFMetadataBase))
33 #define MXF_IS_METADATA_BASE(obj) \
34   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_BASE))
35 #define MXF_METADATA_BASE_GET_CLASS(obj) \
36   (G_TYPE_INSTANCE_GET_CLASS ((obj), MXF_TYPE_METADATA_BASE, MXFMetadataBaseClass))
37 #define MXF_METADATA_BASE_CLASS(klass) \
38   (G_TYPE_CHECK_CLASS_CAST((klass),MXF_TYPE_METADATA_BASE,MXFMetadataBaseClass))
39 typedef struct _MXFMetadataBase MXFMetadataBase;
40 typedef struct _MXFMetadataBaseClass MXFMetadataBaseClass;
41 GType mxf_metadata_base_get_type (void);
42 
43 #define MXF_TYPE_METADATA \
44   (mxf_metadata_get_type())
45 #define MXF_METADATA(obj) \
46   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA, MXFMetadata))
47 #define MXF_IS_METADATA(obj) \
48   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA))
49 #define MXF_METADATA_GET_CLASS(obj) \
50   (G_TYPE_INSTANCE_GET_CLASS ((obj), MXF_TYPE_METADATA, MXFMetadataClass))
51 #define MXF_METADATA_CLASS(klass) \
52   (G_TYPE_CHECK_CLASS_CAST((klass),MXF_TYPE_METADATA,MXFMetadataClass))
53 typedef struct _MXFMetadata MXFMetadata;
54 typedef struct _MXFMetadataClass MXFMetadataClass;
55 GType mxf_metadata_get_type (void);
56 
57 #define MXF_TYPE_METADATA_PREFACE \
58   (mxf_metadata_preface_get_type())
59 #define MXF_METADATA_PREFACE(obj) \
60   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_PREFACE,MXFMetadataPreface))
61 #define MXF_IS_METADATA_PREFACE(obj) \
62   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_PREFACE))
63 typedef struct _MXFMetadataPreface MXFMetadataPreface;
64 typedef MXFMetadataClass MXFMetadataPrefaceClass;
65 GType mxf_metadata_preface_get_type (void);
66 
67 #define MXF_TYPE_METADATA_IDENTIFICATION \
68   (mxf_metadata_identification_get_type())
69 #define MXF_METADATA_IDENTIFICATION(obj) \
70   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_IDENTIFICATION,MXFMetadataIdentification))
71 #define MXF_IS_METADATA_IDENTIFICATION(obj) \
72   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_IDENTIFICATION))
73 typedef struct _MXFMetadataIdentification MXFMetadataIdentification;
74 typedef MXFMetadataClass MXFMetadataIdentificationClass;
75 GType mxf_metadata_identification_get_type (void);
76 
77 #define MXF_TYPE_METADATA_CONTENT_STORAGE \
78   (mxf_metadata_content_storage_get_type())
79 #define MXF_METADATA_CONTENT_STORAGE(obj) \
80   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_CONTENT_STORAGE, MXFMetadataContentStorage))
81 #define MXF_IS_METADATA_CONTENT_STORAGE(obj) \
82   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_CONTENT_STORAGE))
83 typedef struct _MXFMetadataContentStorage MXFMetadataContentStorage;
84 typedef MXFMetadataClass MXFMetadataContentStorageClass;
85 GType mxf_metadata_content_storage_get_type (void);
86 
87 #define MXF_TYPE_METADATA_ESSENCE_CONTAINER_DATA \
88   (mxf_metadata_essence_container_data_get_type())
89 #define MXF_METADATA_ESSENCE_CONTAINER_DATA(obj) \
90   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_ESSENCE_CONTAINER_DATA, MXFMetadataEssenceContainerData))
91 #define MXF_IS_METADATA_ESSENCE_CONTAINER_DATA(obj) \
92   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_ESSENCE_CONTAINER_DATA))
93 typedef struct _MXFMetadataEssenceContainerData MXFMetadataEssenceContainerData;
94 typedef MXFMetadataClass MXFMetadataEssenceContainerDataClass;
95 GType mxf_metadata_essence_container_data_get_type (void);
96 
97 #define MXF_TYPE_METADATA_GENERIC_PACKAGE \
98   (mxf_metadata_generic_package_get_type())
99 #define MXF_METADATA_GENERIC_PACKAGE(obj) \
100   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_GENERIC_PACKAGE, MXFMetadataGenericPackage))
101 #define MXF_IS_METADATA_GENERIC_PACKAGE(obj) \
102   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_GENERIC_PACKAGE))
103 typedef struct _MXFMetadataGenericPackage MXFMetadataGenericPackage;
104 typedef MXFMetadataClass MXFMetadataGenericPackageClass;
105 GType mxf_metadata_generic_package_get_type (void);
106 
107 #define MXF_TYPE_METADATA_MATERIAL_PACKAGE \
108   (mxf_metadata_material_package_get_type())
109 #define MXF_METADATA_MATERIAL_PACKAGE(obj) \
110   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_MATERIAL_PACKAGE, MXFMetadataMaterialPackage))
111 #define MXF_IS_METADATA_MATERIAL_PACKAGE(obj) \
112   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_MATERIAL_PACKAGE))
113 typedef MXFMetadataGenericPackage MXFMetadataMaterialPackage;
114 typedef MXFMetadataClass MXFMetadataMaterialPackageClass;
115 GType mxf_metadata_material_package_get_type (void);
116 
117 #define MXF_TYPE_METADATA_SOURCE_PACKAGE \
118   (mxf_metadata_source_package_get_type())
119 #define MXF_METADATA_SOURCE_PACKAGE(obj) \
120   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_SOURCE_PACKAGE, MXFMetadataSourcePackage))
121 #define MXF_IS_METADATA_SOURCE_PACKAGE(obj) \
122   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_SOURCE_PACKAGE))
123 typedef struct _MXFMetadataSourcePackage MXFMetadataSourcePackage;
124 typedef MXFMetadataClass MXFMetadataSourcePackageClass;
125 GType mxf_metadata_source_package_get_type (void);
126 
127 #define MXF_TYPE_METADATA_TRACK \
128   (mxf_metadata_track_get_type())
129 #define MXF_METADATA_TRACK(obj) \
130   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_TRACK, MXFMetadataTrack))
131 #define MXF_IS_METADATA_TRACK(obj) \
132   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_TRACK))
133 typedef struct _MXFMetadataTrack MXFMetadataTrack;
134 typedef MXFMetadataClass MXFMetadataTrackClass;
135 GType mxf_metadata_track_get_type (void);
136 
137 #define MXF_TYPE_METADATA_TIMELINE_TRACK \
138   (mxf_metadata_timeline_track_get_type())
139 #define MXF_METADATA_TIMELINE_TRACK(obj) \
140   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_TIMELINE_TRACK, MXFMetadataTimelineTrack))
141 #define MXF_IS_METADATA_TIMELINE_TRACK(obj) \
142   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_TIMELINE_TRACK))
143 typedef struct _MXFMetadataTimelineTrack MXFMetadataTimelineTrack;
144 typedef MXFMetadataClass MXFMetadataTimelineTrackClass;
145 GType mxf_metadata_timeline_track_get_type (void);
146 
147 #define MXF_TYPE_METADATA_EVENT_TRACK \
148   (mxf_metadata_event_track_get_type())
149 #define MXF_METADATA_EVENT_TRACK(obj) \
150   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_EVENT_TRACK, MXFMetadataEventTrack))
151 #define MXF_IS_METADATA_EVENT_TRACK(obj) \
152   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_EVENT_TRACK))
153 typedef struct _MXFMetadataEventTrack MXFMetadataEventTrack;
154 typedef MXFMetadataClass MXFMetadataEventTrackClass;
155 GType mxf_metadata_event_track_get_type (void);
156 
157 #define MXF_TYPE_METADATA_STATIC_TRACK \
158   (mxf_metadata_static_track_get_type())
159 #define MXF_METADATA_STATIC_TRACK(obj) \
160   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_STATIC_TRACK, MXFMetadataStaticTrack))
161 #define MXF_IS_METADATA_STATIC_TRACK(obj) \
162   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_STATIC_TRACK))
163 typedef MXFMetadataTrack MXFMetadataStaticTrack;
164 typedef MXFMetadataClass MXFMetadataStaticTrackClass;
165 GType mxf_metadata_static_track_get_type (void);
166 
167 #define MXF_TYPE_METADATA_SEQUENCE \
168   (mxf_metadata_sequence_get_type())
169 #define MXF_METADATA_SEQUENCE(obj) \
170   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_SEQUENCE, MXFMetadataSequence))
171 #define MXF_IS_METADATA_SEQUENCE(obj) \
172   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_SEQUENCE))
173 typedef struct _MXFMetadataSequence MXFMetadataSequence;
174 typedef MXFMetadataClass MXFMetadataSequenceClass;
175 GType mxf_metadata_sequence_get_type (void);
176 
177 #define MXF_TYPE_METADATA_STRUCTURAL_COMPONENT \
178   (mxf_metadata_structural_component_get_type())
179 #define MXF_METADATA_STRUCTURAL_COMPONENT(obj) \
180   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_STRUCTURAL_COMPONENT, MXFMetadataStructuralComponent))
181 #define MXF_IS_METADATA_STRUCTURAL_COMPONENT(obj) \
182   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_STRUCTURAL_COMPONENT))
183 typedef struct _MXFMetadataStructuralComponent MXFMetadataStructuralComponent;
184 typedef MXFMetadataClass MXFMetadataStructuralComponentClass;
185 GType mxf_metadata_structural_component_get_type (void);
186 
187 #define MXF_TYPE_METADATA_SOURCE_CLIP \
188   (mxf_metadata_source_clip_get_type())
189 #define MXF_METADATA_SOURCE_CLIP(obj) \
190   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_SOURCE_CLIP, MXFMetadataSourceClip))
191 #define MXF_IS_METADATA_SOURCE_CLIP(obj) \
192   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_SOURCE_CLIP))
193 typedef struct _MXFMetadataSourceClip MXFMetadataSourceClip;
194 typedef MXFMetadataClass MXFMetadataSourceClipClass;
195 GType mxf_metadata_source_clip_get_type (void);
196 
197 #define MXF_TYPE_METADATA_FILLER \
198   (mxf_metadata_filler_get_type())
199 #define MXF_METADATA_FILLER(obj) \
200   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_FILLER, MXFMetadataFiller))
201 #define MXF_IS_METADATA_FILLER(obj) \
202   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_FILLER))
203 typedef struct _MXFMetadataFiller MXFMetadataFiller;
204 typedef MXFMetadataClass MXFMetadataFillerClass;
205 GType mxf_metadata_filler_get_type (void);
206 
207 #define MXF_TYPE_METADATA_TIMECODE_COMPONENT \
208   (mxf_metadata_timecode_component_get_type())
209 #define MXF_METADATA_TIMECODE_COMPONENT(obj) \
210   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_TIMECODE_COMPONENT, MXFMetadataTimecodeComponent))
211 #define MXF_IS_METADATA_TIMECODE_COMPONENT(obj) \
212   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_TIMECODE_COMPONENT))
213 typedef struct _MXFMetadataTimecodeComponent MXFMetadataTimecodeComponent;
214 typedef MXFMetadataClass MXFMetadataTimecodeComponentClass;
215 GType mxf_metadata_timecode_component_get_type (void);
216 
217 #define MXF_TYPE_METADATA_DM_SOURCE_CLIP \
218   (mxf_metadata_dm_source_clip_get_type())
219 #define MXF_METADATA_DM_SOURCE_CLIP(obj) \
220   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_DM_SOURCE_CLIP, MXFMetadataDMSourceClip))
221 #define MXF_IS_METADATA_DM_SOURCE_CLIP(obj) \
222   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_DM_SOURCE_CLIP))
223 typedef struct _MXFMetadataDMSourceClip MXFMetadataDMSourceClip;
224 typedef MXFMetadataClass MXFMetadataDMSourceClipClass;
225 GType mxf_metadata_dm_source_clip_get_type (void);
226 
227 #define MXF_TYPE_METADATA_DM_SEGMENT \
228   (mxf_metadata_dm_segment_get_type())
229 #define MXF_METADATA_DM_SEGMENT(obj) \
230   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_DM_SEGMENT, MXFMetadataDMSegment))
231 #define MXF_IS_METADATA_DM_SEGMENT(obj) \
232   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_DM_SEGMENT))
233 typedef struct _MXFMetadataDMSegment MXFMetadataDMSegment;
234 typedef MXFMetadataClass MXFMetadataDMSegmentClass;
235 GType mxf_metadata_dm_segment_get_type (void);
236 
237 #define MXF_TYPE_METADATA_GENERIC_DESCRIPTOR \
238   (mxf_metadata_generic_descriptor_get_type())
239 #define MXF_METADATA_GENERIC_DESCRIPTOR(obj) \
240   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_GENERIC_DESCRIPTOR, MXFMetadataGenericDescriptor))
241 #define MXF_IS_METADATA_GENERIC_DESCRIPTOR(obj) \
242   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_GENERIC_DESCRIPTOR))
243 typedef struct _MXFMetadataGenericDescriptor MXFMetadataGenericDescriptor;
244 typedef MXFMetadataClass MXFMetadataGenericDescriptorClass;
245 GType mxf_metadata_generic_descriptor_get_type (void);
246 
247 #define MXF_TYPE_METADATA_FILE_DESCRIPTOR \
248   (mxf_metadata_file_descriptor_get_type())
249 #define MXF_METADATA_FILE_DESCRIPTOR(obj) \
250   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_FILE_DESCRIPTOR, MXFMetadataFileDescriptor))
251 #define MXF_IS_METADATA_FILE_DESCRIPTOR(obj) \
252   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_FILE_DESCRIPTOR))
253 typedef struct _MXFMetadataFileDescriptor MXFMetadataFileDescriptor;
254 typedef MXFMetadataClass MXFMetadataFileDescriptorClass;
255 GType mxf_metadata_file_descriptor_get_type (void);
256 
257 #define MXF_TYPE_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR \
258   (mxf_metadata_generic_picture_essence_descriptor_get_type())
259 #define MXF_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR(obj) \
260   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR, MXFMetadataGenericPictureEssenceDescriptor))
261 #define MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR(obj) \
262   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR))
263 typedef struct _MXFMetadataGenericPictureEssenceDescriptor MXFMetadataGenericPictureEssenceDescriptor;
264 typedef MXFMetadataClass MXFMetadataGenericPictureEssenceDescriptorClass;
265 GType mxf_metadata_generic_picture_essence_descriptor_get_type (void);
266 
267 #define MXF_TYPE_METADATA_CDCI_PICTURE_ESSENCE_DESCRIPTOR \
268   (mxf_metadata_cdci_picture_essence_descriptor_get_type())
269 #define MXF_METADATA_CDCI_PICTURE_ESSENCE_DESCRIPTOR(obj) \
270   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_CDCI_PICTURE_ESSENCE_DESCRIPTOR, MXFMetadataCDCIPictureEssenceDescriptor))
271 #define MXF_IS_METADATA_CDCI_PICTURE_ESSENCE_DESCRIPTOR(obj) \
272   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_CDCI_PICTURE_ESSENCE_DESCRIPTOR))
273 typedef struct _MXFMetadataCDCIPictureEssenceDescriptor MXFMetadataCDCIPictureEssenceDescriptor;
274 typedef MXFMetadataClass MXFMetadataCDCIPictureEssenceDescriptorClass;
275 GType mxf_metadata_cdci_picture_essence_descriptor_get_type (void);
276 
277 #define MXF_TYPE_METADATA_RGBA_PICTURE_ESSENCE_DESCRIPTOR \
278   (mxf_metadata_rgba_picture_essence_descriptor_get_type())
279 #define MXF_METADATA_RGBA_PICTURE_ESSENCE_DESCRIPTOR(obj) \
280   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_RGBA_PICTURE_ESSENCE_DESCRIPTOR, MXFMetadataRGBAPictureEssenceDescriptor))
281 #define MXF_IS_METADATA_RGBA_PICTURE_ESSENCE_DESCRIPTOR(obj) \
282   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_RGBA_PICTURE_ESSENCE_DESCRIPTOR))
283 typedef struct _MXFMetadataRGBAPictureEssenceDescriptor MXFMetadataRGBAPictureEssenceDescriptor;
284 typedef MXFMetadataClass MXFMetadataRGBAPictureEssenceDescriptorClass;
285 GType mxf_metadata_rgba_picture_essence_descriptor_get_type (void);
286 
287 #define MXF_TYPE_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR \
288   (mxf_metadata_generic_sound_essence_descriptor_get_type())
289 #define MXF_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR(obj) \
290   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR, MXFMetadataGenericSoundEssenceDescriptor))
291 #define MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR(obj) \
292   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR))
293 typedef struct _MXFMetadataGenericSoundEssenceDescriptor MXFMetadataGenericSoundEssenceDescriptor;
294 typedef MXFMetadataClass MXFMetadataGenericSoundEssenceDescriptorClass;
295 GType mxf_metadata_generic_sound_essence_descriptor_get_type (void);
296 
297 #define MXF_TYPE_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR \
298   (mxf_metadata_generic_data_essence_descriptor_get_type())
299 #define MXF_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR(obj) \
300   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR, MXFMetadataGenericDataEssenceDescriptor))
301 #define MXF_IS_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR(obj) \
302   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR))
303 typedef struct _MXFMetadataGenericDataEssenceDescriptor MXFMetadataGenericDataEssenceDescriptor;
304 typedef MXFMetadataClass MXFMetadataGenericDataEssenceDescriptorClass;
305 GType mxf_metadata_generic_data_essence_descriptor_get_type (void);
306 
307 #define MXF_TYPE_METADATA_MULTIPLE_DESCRIPTOR \
308   (mxf_metadata_multiple_descriptor_get_type())
309 #define MXF_METADATA_MULTIPLE_DESCRIPTOR(obj) \
310   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_MULTIPLE_DESCRIPTOR, MXFMetadataMultipleDescriptor))
311 #define MXF_IS_METADATA_MULTIPLE_DESCRIPTOR(obj) \
312   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_MULTIPLE_DESCRIPTOR))
313 typedef struct _MXFMetadataMultipleDescriptor MXFMetadataMultipleDescriptor;
314 typedef MXFMetadataClass MXFMetadataMultipleDescriptorClass;
315 GType mxf_metadata_multiple_descriptor_get_type (void);
316 
317 #define MXF_TYPE_METADATA_LOCATOR \
318   (mxf_metadata_locator_get_type())
319 #define MXF_METADATA_LOCATOR(obj) \
320   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_LOCATOR, MXFMetadataLocator))
321 #define MXF_IS_METADATA_LOCATOR(obj) \
322   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_LOCATOR))
323 typedef struct _MXFMetadataLocator MXFMetadataLocator;
324 typedef MXFMetadataClass MXFMetadataLocatorClass;
325 GType mxf_metadata_locator_get_type (void);
326 
327 #define MXF_TYPE_METADATA_NETWORK_LOCATOR \
328   (mxf_metadata_network_locator_get_type())
329 #define MXF_METADATA_NETWORK_LOCATOR(obj) \
330   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_NETWORK_LOCATOR, MXFMetadataNetworkLocator))
331 #define MXF_IS_METADATA_NETWORK_LOCATOR(obj) \
332   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_NETWORK_LOCATOR))
333 typedef struct _MXFMetadataNetworkLocator MXFMetadataNetworkLocator;
334 typedef MXFMetadataClass MXFMetadataNetworkLocatorClass;
335 GType mxf_metadata_network_locator_get_type (void);
336 
337 #define MXF_TYPE_METADATA_TEXT_LOCATOR \
338   (mxf_metadata_text_locator_get_type())
339 #define MXF_METADATA_TEXT_LOCATOR(obj) \
340   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_METADATA_TEXT_LOCATOR, MXFMetadataTextLocator))
341 #define MXF_IS_METADATA_TEXT_LOCATOR(obj) \
342   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_METADATA_TEXT_LOCATOR))
343 typedef struct _MXFMetadataTextLocator MXFMetadataTextLocator;
344 typedef MXFMetadataClass MXFMetadataTextLocatorClass;
345 GType mxf_metadata_text_locator_get_type (void);
346 
347 #define MXF_TYPE_DESCRIPTIVE_METADATA \
348   (mxf_descriptive_metadata_get_type())
349 #define MXF_DESCRIPTIVE_METADATA(obj) \
350   (G_TYPE_CHECK_INSTANCE_CAST((obj),MXF_TYPE_DESCRIPTIVE_METADATA,MXFDescriptiveMetadata))
351 #define MXF_IS_DESCRIPTIVE_METADATA(obj) \
352   (G_TYPE_CHECK_INSTANCE_TYPE((obj),MXF_TYPE_DESCRIPTIVE_METADATA))
353 #define MXF_DESCRIPTIVE_METADATA_GET_CLASS(obj) \
354   (G_TYPE_INSTANCE_GET_CLASS ((obj), MXF_TYPE_DESCRIPTIVE_METADATA, MXFDescriptiveMetadataClass))
355 #define MXF_DESCRIPTIVE_METADATA_CLASS(klass) \
356   (G_TYPE_CHECK_CLASS_CAST((klass),MXF_TYPE_DESCRIPTIVE_METADATA,MXFDescriptiveMetadataClass))
357 typedef struct _MXFDescriptiveMetadata MXFDescriptiveMetadata;
358 typedef struct _MXFDescriptiveMetadataClass MXFDescriptiveMetadataClass;
359 GType mxf_descriptive_metadata_get_type (void);
360 
361 #define MXF_TYPE_DESCRIPTIVE_METADATA_FRAMEWORK \
362   (mxf_descriptive_metadata_framework_get_type ())
363 #define MXF_DESCRIPTIVE_METADATA_FRAMEWORK(obj) \
364   (G_TYPE_CHECK_INSTANCE_CAST ((obj), MXF_TYPE_DESCRIPTIVE_METADATA_FRAMEWORK, MXFDescriptiveMetadataFramework))
365 #define MXF_IS_DESCRIPTIVE_METADATA_FRAMEWORK(obj) \
366   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MXF_TYPE_DESCRIPTIVE_METADATA_FRAMEWORK))
367 #define MXF_DESCRIPTIVE_METADATA_FRAMEWORK_GET_INTERFACE(inst) \
368   (G_TYPE_INSTANCE_GET_INTERFACE ((inst), MXF_TYPE_DESCRIPTIVE_METADATA_FRAMEWORK, MXFDescriptiveMetadataFrameworkInterface))
369 
370 typedef struct _MXFDescriptiveMetadataFramework MXFDescriptiveMetadataFramework; /* dummy object */
371 typedef struct _MXFDescriptiveMetadataFrameworkInterface MXFDescriptiveMetadataFrameworkInterface;
372 GType mxf_descriptive_metadata_framework_get_type (void);
373 
374 typedef enum {
375   MXF_METADATA_BASE_RESOLVE_STATE_NONE = 0,
376   MXF_METADATA_BASE_RESOLVE_STATE_SUCCESS,
377   MXF_METADATA_BASE_RESOLVE_STATE_FAILURE,
378   MXF_METADATA_BASE_RESOLVE_STATE_RUNNING
379 } MXFMetadataBaseResolveState;
380 
381 struct _MXFMetadataBase {
382   GObject parent;
383 
384   MXFUUID instance_uid;
385   MXFUUID generation_uid;
386 
387   guint64 offset;
388 
389   MXFMetadataBaseResolveState resolved;
390 
391   GHashTable *other_tags;
392 };
393 
394 struct _MXFMetadataBaseClass {
395   GObjectClass parent;
396 
397   gboolean (*handle_tag) (MXFMetadataBase *self, MXFPrimerPack *primer, guint16 tag, const guint8 *tag_data, guint tag_size);
398   gboolean (*resolve) (MXFMetadataBase *self, GHashTable *metadata);
399   GstStructure * (*to_structure) (MXFMetadataBase *self);
400   GList * (*write_tags) (MXFMetadataBase *self, MXFPrimerPack *primer);
401 
402   GQuark name_quark;
403 };
404 
405 struct _MXFMetadata {
406   MXFMetadataBase parent;
407 };
408 
409 struct _MXFMetadataClass {
410   MXFMetadataBaseClass parent;
411 
412   guint16 type;
413 };
414 
415 struct _MXFMetadataPreface {
416   MXFMetadata parent;
417 
418   MXFTimestamp last_modified_date;
419   guint16 version;
420 
421   guint32 object_model_version;
422 
423   MXFUUID primary_package_uid;
424   MXFMetadataGenericPackage *primary_package;
425 
426   guint32 n_identifications;
427   MXFUUID *identifications_uids;
428   MXFMetadataIdentification **identifications;
429 
430   MXFUUID content_storage_uid;
431   MXFMetadataContentStorage *content_storage;
432 
433   MXFUL operational_pattern;
434 
435   guint32 n_essence_containers;
436   MXFUL *essence_containers;
437 
438   guint32 n_dm_schemes;
439   MXFUL *dm_schemes;
440 };
441 
442 struct _MXFMetadataIdentification {
443   MXFMetadata parent;
444 
445   MXFUUID this_generation_uid;
446 
447   gchar *company_name;
448 
449   gchar *product_name;
450   MXFProductVersion product_version;
451 
452   gchar *version_string;
453 
454   MXFUUID product_uid;
455 
456   MXFTimestamp modification_date;
457 
458   MXFProductVersion toolkit_version;
459 
460   gchar *platform;
461 };
462 
463 struct _MXFMetadataContentStorage {
464   MXFMetadata parent;
465 
466   guint32 n_packages;
467   MXFUUID *packages_uids;
468   MXFMetadataGenericPackage **packages;
469 
470   guint32 n_essence_container_data;
471   MXFUUID *essence_container_data_uids;
472   MXFMetadataEssenceContainerData **essence_container_data;
473 };
474 
475 struct _MXFMetadataEssenceContainerData {
476   MXFMetadata parent;
477 
478   MXFUMID linked_package_uid;
479   MXFMetadataSourcePackage *linked_package;
480 
481   guint32 index_sid;
482   guint32 body_sid;
483 };
484 
485 struct _MXFMetadataGenericPackage {
486   MXFMetadata parent;
487 
488   MXFUMID package_uid;
489 
490   gchar *name;
491   MXFTimestamp package_creation_date;
492   MXFTimestamp package_modified_date;
493 
494   guint32 n_tracks;
495   MXFUUID *tracks_uids;
496   MXFMetadataTrack **tracks;
497 
498   guint n_timecode_tracks;
499   guint n_metadata_tracks;
500   guint n_essence_tracks;
501   guint n_other_tracks;
502 };
503 
504 struct _MXFMetadataSourcePackage
505 {
506   MXFMetadataGenericPackage parent;
507 
508   MXFUUID descriptor_uid;
509   MXFMetadataGenericDescriptor *descriptor;
510 
511   gboolean top_level;
512 
513   /* TRUE if descriptor is multi-descriptor, i.e. content is interleaved */
514   gboolean is_interleaved;
515 };
516 
517 typedef enum {
518   MXF_METADATA_TRACK_UNKNOWN               = 0x00,
519   MXF_METADATA_TRACK_TIMECODE_12M_INACTIVE = 0x10,
520   MXF_METADATA_TRACK_TIMECODE_12M_ACTIVE   = 0x11,
521   MXF_METADATA_TRACK_TIMECODE_309M         = 0x12,
522   MXF_METADATA_TRACK_METADATA              = 0x20,
523   MXF_METADATA_TRACK_PICTURE_ESSENCE       = 0x30,
524   MXF_METADATA_TRACK_SOUND_ESSENCE         = 0x31,
525   MXF_METADATA_TRACK_DATA_ESSENCE          = 0x32,
526   MXF_METADATA_TRACK_AUXILIARY_DATA        = 0x40,
527   MXF_METADATA_TRACK_PARSED_TEXT           = 0x41
528 } MXFMetadataTrackType;
529 
530 struct _MXFMetadataTrack {
531   MXFMetadata parent;
532 
533   guint32 track_id;
534   guint32 track_number;
535 
536   gchar *track_name;
537 
538   MXFUUID sequence_uid;
539   MXFMetadataSequence *sequence;
540 
541   MXFMetadataTrackType type;
542 
543   MXFMetadataFileDescriptor **descriptor;
544   guint n_descriptor;
545 };
546 
547 struct _MXFMetadataTimelineTrack {
548   MXFMetadataTrack parent;
549 
550   MXFFraction edit_rate;
551   gint64 origin;
552 };
553 
554 struct _MXFMetadataEventTrack {
555   MXFMetadataTrack parent;
556 
557   MXFFraction event_edit_rate;
558   gint64 event_origin;
559 };
560 
561 struct _MXFMetadataSequence {
562   MXFMetadata parent;
563 
564   MXFUL data_definition;
565 
566   gint64 duration;
567 
568   guint32 n_structural_components;
569   MXFUUID *structural_components_uids;
570   MXFMetadataStructuralComponent **structural_components;
571 };
572 
573 struct _MXFMetadataStructuralComponent {
574   MXFMetadata parent;
575 
576   MXFUL data_definition;
577   gint64 duration;
578 };
579 
580 struct _MXFMetadataTimecodeComponent {
581   MXFMetadataStructuralComponent parent;
582 
583   gint64 start_timecode;
584   guint16 rounded_timecode_base;
585   gboolean drop_frame;
586 };
587 
588 struct _MXFMetadataSourceClip {
589   MXFMetadataStructuralComponent parent;
590 
591   gint64 start_position;
592   MXFUMID source_package_id;
593   MXFMetadataSourcePackage *source_package;
594 
595   guint32 source_track_id;
596 };
597 
598 struct _MXFMetadataFiller {
599   MXFMetadataStructuralComponent parent;
600 };
601 
602 struct _MXFMetadataDMSourceClip {
603   MXFMetadataSourceClip parent;
604 
605   guint32 n_track_ids;
606   guint32 *track_ids;
607 };
608 
609 struct _MXFMetadataDMSegment {
610   MXFMetadataStructuralComponent parent;
611 
612   gint64 event_start_position;
613   gchar *event_comment;
614 
615   guint32 n_track_ids;
616   guint32 *track_ids;
617 
618   MXFUUID dm_framework_uid;
619   MXFDescriptiveMetadataFramework *dm_framework;
620 };
621 
622 struct _MXFMetadataGenericDescriptor {
623   MXFMetadata parent;
624 
625   guint32 n_locators;
626   MXFUUID *locators_uids;
627   MXFMetadataLocator **locators;
628 };
629 
630 struct _MXFMetadataFileDescriptor {
631   MXFMetadataGenericDescriptor parent;
632 
633   guint32 linked_track_id;
634 
635   MXFFraction sample_rate;
636   gint64 container_duration;
637 
638   MXFUL essence_container;
639   MXFUL codec;
640 };
641 
642 struct _MXFMetadataGenericPictureEssenceDescriptor {
643   MXFMetadataFileDescriptor parent;
644 
645   guint8 signal_standard;
646   guint8 frame_layout;
647 
648   guint32 stored_width;
649   guint32 stored_height;
650   gint32 stored_f2_offset;
651   guint32 sampled_width;
652   guint32 sampled_height;
653   gint32 sampled_x_offset;
654   gint32 sampled_y_offset;
655   guint32 display_height;
656   guint32 display_width;
657   gint32 display_x_offset;
658   gint32 display_y_offset;
659   gint32 display_f2_offset;
660   MXFFraction aspect_ratio;
661 
662   guint8 active_format_descriptor;
663   gint32 video_line_map[2];
664   guint8 alpha_transparency;
665   MXFUL capture_gamma;
666 
667   guint32 image_alignment_offset;
668   guint32 image_start_offset;
669   guint32 image_end_offset;
670 
671   guint8 field_dominance;
672 
673   MXFUL picture_essence_coding;
674 };
675 
676 struct _MXFMetadataCDCIPictureEssenceDescriptor {
677   MXFMetadataGenericPictureEssenceDescriptor parent;
678 
679   guint32 component_depth;
680   guint32 horizontal_subsampling;
681   guint32 vertical_subsampling;
682   guint8 color_siting;
683   gboolean reversed_byte_order;
684   gint16 padding_bits;
685   guint32 alpha_sample_depth;
686   guint32 black_ref_level;
687   guint32 white_ref_level;
688   guint32 color_range;
689 };
690 
691 struct _MXFMetadataRGBAPictureEssenceDescriptor {
692   MXFMetadataGenericPictureEssenceDescriptor parent;
693 
694   guint32 component_max_ref;
695   guint32 component_min_ref;
696   guint32 alpha_max_ref;
697   guint32 alpha_min_ref;
698   guint8 scanning_direction;
699 
700   guint32 n_pixel_layout;
701   guint8 *pixel_layout;
702 
703   /* TODO: palette & palette layout */
704 };
705 
706 struct _MXFMetadataGenericSoundEssenceDescriptor {
707   MXFMetadataFileDescriptor parent;
708 
709   MXFFraction audio_sampling_rate;
710 
711   gboolean locked;
712 
713   gint8 audio_ref_level;
714 
715   guint8 electro_spatial_formulation;
716 
717   guint32 channel_count;
718   guint32 quantization_bits;
719 
720   gint8 dial_norm;
721 
722   MXFUL sound_essence_compression;
723 };
724 
725 struct _MXFMetadataGenericDataEssenceDescriptor {
726   MXFMetadataFileDescriptor parent;
727 
728   MXFUL data_essence_coding;
729 };
730 
731 struct _MXFMetadataMultipleDescriptor {
732   MXFMetadataFileDescriptor parent;
733 
734   MXFUUID *sub_descriptors_uids;
735   guint32 n_sub_descriptors;
736   MXFMetadataGenericDescriptor **sub_descriptors;
737 };
738 
739 struct _MXFMetadataLocator {
740   MXFMetadata parent;
741 };
742 
743 struct _MXFMetadataNetworkLocator {
744   MXFMetadataLocator parent;
745 
746   gchar *url_string;
747 };
748 
749 struct _MXFMetadataTextLocator {
750   MXFMetadataLocator parent;
751 
752   gchar *locator_name;
753 };
754 
755 struct _MXFDescriptiveMetadata {
756   MXFMetadataBase parent;
757 };
758 
759 struct _MXFDescriptiveMetadataClass {
760   MXFMetadataBaseClass parent;
761 
762   guint8 scheme;
763   guint32 type;
764 };
765 
766 struct _MXFDescriptiveMetadataFrameworkInterface {
767   GTypeInterface parent;
768 };
769 
770 gboolean mxf_metadata_base_parse (MXFMetadataBase *self, MXFPrimerPack *primer, const guint8 *data, guint size);
771 gboolean mxf_metadata_base_resolve (MXFMetadataBase *self, GHashTable *metadata);
772 GstStructure * mxf_metadata_base_to_structure (MXFMetadataBase *self);
773 GstBuffer * mxf_metadata_base_to_buffer (MXFMetadataBase *self, MXFPrimerPack *primer);
774 
775 MXFMetadata *mxf_metadata_new (guint16 type, MXFPrimerPack *primer, guint64 offset, const guint8 *data, guint size);
776 void mxf_metadata_register (GType type);
777 void mxf_metadata_init_types (void);
778 
779 MXFMetadataTrackType mxf_metadata_track_identifier_parse (const MXFUL * track_identifier);
780 const MXFUL * mxf_metadata_track_identifier_get (MXFMetadataTrackType type);
781 
782 void mxf_metadata_generic_picture_essence_descriptor_set_caps (MXFMetadataGenericPictureEssenceDescriptor * self, GstCaps * caps);
783 gboolean mxf_metadata_generic_picture_essence_descriptor_from_caps (MXFMetadataGenericPictureEssenceDescriptor * self, GstCaps * caps);
784 
785 GstCaps *mxf_metadata_generic_sound_essence_descriptor_create_caps (MXFMetadataGenericSoundEssenceDescriptor * self, GstAudioFormat *format);
786 void mxf_metadata_generic_sound_essence_descriptor_set_caps (MXFMetadataGenericSoundEssenceDescriptor * self, GstCaps * caps);
787 gboolean mxf_metadata_generic_sound_essence_descriptor_from_caps (MXFMetadataGenericSoundEssenceDescriptor * self, GstCaps * caps);
788 
789 void mxf_descriptive_metadata_register (guint8 scheme, GType *types);
790 MXFDescriptiveMetadata * mxf_descriptive_metadata_new (guint8 scheme, guint32 type, MXFPrimerPack * primer, guint64 offset, const guint8 * data, guint size);
791 
792 GHashTable *mxf_metadata_hash_table_new (void);
793 
794 #endif /* __MXF_METADATA_H__ */
795