1 /* GStreamer 2 * Copyright (C) <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 #ifndef __MXF_UL_H__ 21 #define __MXF_UL_H__ 22 23 #include <gst/gst.h> 24 25 /* SMPTE 377M 3.2 */ 26 typedef struct { 27 guint8 u[16]; 28 } MXFUL; 29 30 typedef enum { 31 MXF_UL_SMPTE, 32 MXF_UL_FILL, 33 MXF_UL_PARTITION_PACK, 34 MXF_UL_PRIMER_PACK, 35 MXF_UL_METADATA, 36 MXF_UL_DESCRIPTIVE_METADATA, 37 MXF_UL_RANDOM_INDEX_PACK, 38 MXF_UL_INDEX_TABLE_SEGMENT, 39 MXF_UL_GENERIC_CONTAINER_SYSTEM_ITEM, 40 MXF_UL_GENERIC_CONTAINER_ESSENCE_ELEMENT, 41 MXF_UL_GENERIC_CONTAINER_ESSENCE_CONTAINER_LABEL, 42 MXF_UL_AVID_ESSENCE_CONTAINER_ESSENCE_ELEMENT, 43 MXF_UL_AVID_ESSENCE_CONTAINER_ESSENCE_LABEL, 44 MXF_UL_OPERATIONAL_PATTERN_IDENTIFICATION, 45 MXF_UL_TRACK_TIMECODE_12M_INACTIVE, 46 MXF_UL_TRACK_TIMECODE_12M_ACTIVE, 47 MXF_UL_TRACK_TIMECODE_309M, 48 MXF_UL_TRACK_METADATA, 49 MXF_UL_TRACK_PICTURE_ESSENCE, 50 MXF_UL_TRACK_SOUND_ESSENCE, 51 MXF_UL_TRACK_DATA_ESSENCE, 52 MXF_UL_TRACK_AUXILIARY_DATA, 53 MXF_UL_TRACK_PARSED_TEXT, 54 MXF_UL_TRACK_AVID_PICTURE_ESSENCE, 55 MXF_UL_INSTANCE_UID, 56 MXF_UL_GENERATION_UID, 57 MXF_UL_LAST_MODIFIED_DATE, 58 MXF_UL_VERSION, 59 MXF_UL_OBJECT_MODEL_VERSION, 60 MXF_UL_PRIMARY_PACKAGE, 61 MXF_UL_IDENTIFICATIONS, 62 MXF_UL_CONTENT_STORAGE, 63 MXF_UL_OPERATIONAL_PATTERN, 64 MXF_UL_ESSENCE_CONTAINERS, 65 MXF_UL_DM_SCHEMES, 66 MXF_UL_THIS_GENERATION_UID, 67 MXF_UL_COMPANY_NAME, 68 MXF_UL_PRODUCT_NAME, 69 MXF_UL_PRODUCT_VERSION, 70 MXF_UL_VERSION_STRING, 71 MXF_UL_PRODUCT_UID, 72 MXF_UL_MODIFICATION_DATE, 73 MXF_UL_TOOLKIT_VERSION, 74 MXF_UL_PLATFORM, 75 MXF_UL_PACKAGES, 76 MXF_UL_ESSENCE_CONTAINER_DATA, 77 MXF_UL_LINKED_PACKAGE_UID, 78 MXF_UL_BODY_SID, 79 MXF_UL_INDEX_SID, 80 MXF_UL_PACKAGE_UID, 81 MXF_UL_PACKAGE_NAME, 82 MXF_UL_PACKAGE_CREATION_DATE, 83 MXF_UL_PACKAGE_MODIFIED_DATE, 84 MXF_UL_TRACKS, 85 MXF_UL_DESCRIPTOR, 86 MXF_UL_TRACK_ID, 87 MXF_UL_TRACK_NUMBER, 88 MXF_UL_TRACK_NAME, 89 MXF_UL_SEQUENCE, 90 MXF_UL_EDIT_RATE, 91 MXF_UL_ORIGIN, 92 MXF_UL_EVENT_EDIT_RATE, 93 MXF_UL_EVENT_ORIGIN, 94 MXF_UL_DATA_DEFINITION, 95 MXF_UL_DURATION, 96 MXF_UL_STRUCTURAL_COMPONENTS, 97 MXF_UL_ROUNDED_TIMECODE_BASE, 98 MXF_UL_START_TIMECODE, 99 MXF_UL_DROP_FRAME, 100 MXF_UL_START_POSITION, 101 MXF_UL_SOURCE_PACKAGE_ID, 102 MXF_UL_SOURCE_TRACK_ID, 103 MXF_UL_DM_SOURCECLIP_TRACK_IDS, 104 MXF_UL_EVENT_START_POSITION, 105 MXF_UL_EVENT_COMMENT, 106 MXF_UL_DM_SEGMENT_TRACK_IDS, 107 MXF_UL_DM_FRAMEWORK, 108 MXF_UL_LOCATORS, 109 MXF_UL_LINKED_TRACK_ID, 110 MXF_UL_SAMPLE_RATE, 111 MXF_UL_CONTAINER_DURATION, 112 MXF_UL_ESSENCE_CONTAINER, 113 MXF_UL_CODEC, 114 MXF_UL_SIGNAL_STANDARD, 115 MXF_UL_FRAME_LAYOUT, 116 MXF_UL_STORED_WIDTH, 117 MXF_UL_STORED_HEIGHT, 118 MXF_UL_STORED_F2_OFFSET, 119 MXF_UL_SAMPLED_WIDTH, 120 MXF_UL_SAMPLED_HEIGHT, 121 MXF_UL_SAMPLED_X_OFFSET, 122 MXF_UL_SAMPLED_Y_OFFSET, 123 MXF_UL_DISPLAY_HEIGHT, 124 MXF_UL_DISPLAY_WIDTH, 125 MXF_UL_DISPLAY_X_OFFSET, 126 MXF_UL_DISPLAY_Y_OFFSET, 127 MXF_UL_DISPLAY_F2_OFFSET, 128 MXF_UL_ASPECT_RATIO, 129 MXF_UL_ACTIVE_FORMAT_DESCRIPTOR, 130 MXF_UL_VIDEO_LINE_MAP, 131 MXF_UL_ALPHA_TRANSPARENCY, 132 MXF_UL_CAPTURE_GAMMA, 133 MXF_UL_IMAGE_ALIGNMENT_OFFSET, 134 MXF_UL_IMAGE_START_OFFSET, 135 MXF_UL_IMAGE_END_OFFSET, 136 MXF_UL_FIELD_DOMINANCE, 137 MXF_UL_PICTURE_ESSENCE_CODING, 138 MXF_UL_AUDIO_SAMPLING_RATE, 139 MXF_UL_LOCKED, 140 MXF_UL_AUDIO_REF_LEVEL, 141 MXF_UL_ELECTRO_SPATIAL_FORMULATION, 142 MXF_UL_CHANNEL_COUNT, 143 MXF_UL_QUANTIZATION_BITS, 144 MXF_UL_DIAL_NORM, 145 MXF_UL_SOUND_ESSENCE_COMPRESSION, 146 MXF_UL_COMPONENT_DEPTH, 147 MXF_UL_HORIZONTAL_SUBSAMPLING, 148 MXF_UL_VERTICAL_SUBSAMPLING, 149 MXF_UL_COLOR_SITING, 150 MXF_UL_REVERSED_BYTE_ORDER, 151 MXF_UL_PADDING_BITS, 152 MXF_UL_ALPHA_SAMPLE_DEPTH, 153 MXF_UL_BLACK_REF_LEVEL, 154 MXF_UL_WHITE_REF_LEVEL, 155 MXF_UL_COLOR_RANGE, 156 MXF_UL_COMPONENT_MAX_REF, 157 MXF_UL_COMPONENT_MIN_REF, 158 MXF_UL_ALPHA_MAX_REF, 159 MXF_UL_ALPHA_MIN_REF, 160 MXF_UL_SCANNING_DIRECTION, 161 MXF_UL_PIXEL_LAYOUT, 162 MXF_UL_DATA_ESSENCE_CODING, 163 MXF_UL_SUB_DESCRIPTORS, 164 MXF_UL_LOCATOR_NAME, 165 MXF_UL_URL_STRING, 166 MXF_UL_MAX 167 } MXFULId; 168 169 extern const MXFUL _mxf_ul_table[MXF_UL_MAX]; 170 171 #define MXF_UL(id) (&_mxf_ul_table[MXF_UL_##id]) 172 173 gboolean mxf_ul_is_equal (const MXFUL *a, const MXFUL *b); 174 gboolean mxf_ul_is_subclass (const MXFUL *class, const MXFUL *subclass); 175 gboolean mxf_ul_is_zero (const MXFUL *ul); 176 gboolean mxf_ul_is_valid (const MXFUL *ul); 177 guint mxf_ul_hash (const MXFUL *ul); 178 179 gchar * mxf_ul_to_string (const MXFUL *ul, gchar str[48]); 180 MXFUL * mxf_ul_from_string (const gchar *str, MXFUL *ul); 181 182 gboolean mxf_ul_array_parse (MXFUL **array, guint32 *count, const guint8 *data, guint size); 183 184 #endif /* __MXF_UL_H__ */ 185