diff options
-rw-r--r-- | gst/mxf/mxfaes-bwf.c | 80 | ||||
-rw-r--r-- | gst/mxf/mxfdemux.c | 13 | ||||
-rw-r--r-- | gst/mxf/mxfdms1.c | 192 | ||||
-rw-r--r-- | gst/mxf/mxfdms1.h | 100 | ||||
-rw-r--r-- | gst/mxf/mxfmetadata.c | 540 | ||||
-rw-r--r-- | gst/mxf/mxfmetadata.h | 32 | ||||
-rw-r--r-- | gst/mxf/mxfmpeg.c | 42 | ||||
-rw-r--r-- | gst/mxf/mxfmux.c | 50 | ||||
-rw-r--r-- | gst/mxf/mxftypes.c | 227 | ||||
-rw-r--r-- | gst/mxf/mxftypes.h | 56 |
10 files changed, 742 insertions, 590 deletions
diff --git a/gst/mxf/mxfaes-bwf.c b/gst/mxf/mxfaes-bwf.c index 78c2f8a0..8c93febd 100644 --- a/gst/mxf/mxfaes-bwf.c +++ b/gst/mxf/mxfaes-bwf.c @@ -371,139 +371,139 @@ mxf_metadata_wave_audio_essence_descriptor_write_tags (MXFMetadataBase * m, }; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &block_align_ul, 16); + memcpy (&t->ul, &block_align_ul, 16); t->size = 2; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT16_BE (t->data, self->block_align); - mxf_primer_pack_add_mapping (primer, 0x3d0a, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d0a, &t->ul); ret = g_list_prepend (ret, t); if (self->sequence_offset) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &sequence_offset_ul, 16); + memcpy (&t->ul, &sequence_offset_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->sequence_offset); - mxf_primer_pack_add_mapping (primer, 0x3d0b, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d0b, &t->ul); ret = g_list_prepend (ret, t); } t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &avg_bps_ul, 16); + memcpy (&t->ul, &avg_bps_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->avg_bps); - mxf_primer_pack_add_mapping (primer, 0x3d09, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d09, &t->ul); ret = g_list_prepend (ret, t); if (!mxf_ul_is_zero (&self->channel_assignment)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &channel_assignment_ul, 16); + memcpy (&t->ul, &channel_assignment_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &self->channel_assignment, 16); - mxf_primer_pack_add_mapping (primer, 0x3d32, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d32, &t->ul); ret = g_list_prepend (ret, t); } if (self->peak_envelope_version) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &peak_envelope_version_ul, 16); + memcpy (&t->ul, &peak_envelope_version_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->peak_envelope_version); - mxf_primer_pack_add_mapping (primer, 0x3d29, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d29, &t->ul); ret = g_list_prepend (ret, t); } if (self->peak_envelope_format) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &peak_envelope_format_ul, 16); + memcpy (&t->ul, &peak_envelope_format_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->peak_envelope_format); - mxf_primer_pack_add_mapping (primer, 0x3d2a, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d2a, &t->ul); ret = g_list_prepend (ret, t); } if (self->points_per_peak_value) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &points_per_peak_value_ul, 16); + memcpy (&t->ul, &points_per_peak_value_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->points_per_peak_value); - mxf_primer_pack_add_mapping (primer, 0x3d2b, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d2b, &t->ul); ret = g_list_prepend (ret, t); } if (self->peak_envelope_block_size) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &peak_envelope_block_size_ul, 16); + memcpy (&t->ul, &peak_envelope_block_size_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->peak_envelope_block_size); - mxf_primer_pack_add_mapping (primer, 0x3d2c, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d2c, &t->ul); ret = g_list_prepend (ret, t); } if (self->peak_channels) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &peak_channels_ul, 16); + memcpy (&t->ul, &peak_channels_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->peak_channels); - mxf_primer_pack_add_mapping (primer, 0x3d2d, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d2d, &t->ul); ret = g_list_prepend (ret, t); } if (self->peak_frames) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &peak_frames_ul, 16); + memcpy (&t->ul, &peak_frames_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->peak_frames); - mxf_primer_pack_add_mapping (primer, 0x3d2e, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d2e, &t->ul); ret = g_list_prepend (ret, t); } if (self->peak_of_peaks_position) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &peak_of_peaks_position_ul, 16); + memcpy (&t->ul, &peak_of_peaks_position_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT64_BE (t->data, self->peak_of_peaks_position); - mxf_primer_pack_add_mapping (primer, 0x3d2f, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d2f, &t->ul); ret = g_list_prepend (ret, t); } if (!mxf_timestamp_is_unknown (&self->peak_envelope_timestamp)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &peak_envelope_timestamp_ul, 16); + memcpy (&t->ul, &peak_envelope_timestamp_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; mxf_timestamp_write (&self->peak_envelope_timestamp, t->data); - mxf_primer_pack_add_mapping (primer, 0x3d30, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d30, &t->ul); ret = g_list_prepend (ret, t); } if (self->peak_envelope_data) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &peak_envelope_data_ul, 16); + memcpy (&t->ul, &peak_envelope_data_ul, 16); t->size = self->peak_envelope_data_length; t->data = g_memdup (self->peak_envelope_data, t->size); - mxf_primer_pack_add_mapping (primer, 0x3d31, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d31, &t->ul); ret = g_list_prepend (ret, t); } @@ -954,47 +954,47 @@ mxf_metadata_aes3_audio_essence_descriptor_write_tags (MXFMetadataBase * m, if (self->emphasis) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &emphasis_ul, 16); + memcpy (&t->ul, &emphasis_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->emphasis); - mxf_primer_pack_add_mapping (primer, 0x3d0d, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d0d, &t->ul); ret = g_list_prepend (ret, t); } if (self->block_start_offset) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &block_start_offset_ul, 16); + memcpy (&t->ul, &block_start_offset_ul, 16); t->size = 2; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT16_BE (t->data, self->block_start_offset); - mxf_primer_pack_add_mapping (primer, 0x3d0f, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d0f, &t->ul); ret = g_list_prepend (ret, t); } if (self->auxiliary_bits_mode) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &auxiliary_bits_mode_ul, 16); + memcpy (&t->ul, &auxiliary_bits_mode_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->auxiliary_bits_mode); - mxf_primer_pack_add_mapping (primer, 0x3d08, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d08, &t->ul); ret = g_list_prepend (ret, t); } if (self->channel_status_mode) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &channel_status_mode_ul, 16); + memcpy (&t->ul, &channel_status_mode_ul, 16); t->size = 8 + self->n_channel_status_mode; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->n_channel_status_mode); GST_WRITE_UINT32_BE (t->data + 4, 1); memcpy (t->data + 8, self->channel_status_mode, t->size); - mxf_primer_pack_add_mapping (primer, 0x3d10, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d10, &t->ul); ret = g_list_prepend (ret, t); } @@ -1002,7 +1002,7 @@ mxf_metadata_aes3_audio_essence_descriptor_write_tags (MXFMetadataBase * m, guint i; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &fixed_channel_status_data_ul, 16); + memcpy (&t->ul, &fixed_channel_status_data_ul, 16); t->size = 8 + 24 * self->n_fixed_channel_status_data; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; @@ -1010,20 +1010,20 @@ mxf_metadata_aes3_audio_essence_descriptor_write_tags (MXFMetadataBase * m, GST_WRITE_UINT32_BE (t->data + 4, 24); for (i = 0; i < self->n_fixed_channel_status_data; i++) memcpy (t->data + 8 + 24 * i, self->fixed_channel_status_data[i], 24); - mxf_primer_pack_add_mapping (primer, 0x3d11, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d11, &t->ul); ret = g_list_prepend (ret, t); } if (self->user_data_mode) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &user_data_mode_ul, 16); + memcpy (&t->ul, &user_data_mode_ul, 16); t->size = 8 + self->n_user_data_mode; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->n_user_data_mode); GST_WRITE_UINT32_BE (t->data + 4, 1); memcpy (t->data + 8, self->user_data_mode, t->size); - mxf_primer_pack_add_mapping (primer, 0x3d12, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d12, &t->ul); ret = g_list_prepend (ret, t); } @@ -1031,7 +1031,7 @@ mxf_metadata_aes3_audio_essence_descriptor_write_tags (MXFMetadataBase * m, guint i; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &fixed_user_data_ul, 16); + memcpy (&t->ul, &fixed_user_data_ul, 16); t->size = 8 + 24 * self->n_fixed_user_data; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; @@ -1039,7 +1039,7 @@ mxf_metadata_aes3_audio_essence_descriptor_write_tags (MXFMetadataBase * m, GST_WRITE_UINT32_BE (t->data + 4, 24); for (i = 0; i < self->n_fixed_user_data; i++) memcpy (t->data + 8 + 24 * i, self->fixed_user_data[i], 24); - mxf_primer_pack_add_mapping (primer, 0x3d11, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d11, &t->ul); ret = g_list_prepend (ret, t); } diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index 76458e88..1333135e 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -31,11 +31,6 @@ */ /* TODO: - * - Differentiate UL and UUIDs, the former can define an object system - * (i.e. mxf_ul_is_a() and friends could be implemented), see SMPTE S336M. - * The latter are just 16 byte unique identifiers - * - Check everything for correctness vs. SMPTE S336M, some things can probably - * be generalized/simplified * - Seeking support: Use IndexTableSegments * - Handle timecode tracks correctly (where is this documented?) * - Handle drop-frame field of timecode tracks @@ -1262,7 +1257,7 @@ gst_mxf_demux_handle_metadata (GstMXFDemux * demux, const MXFUL * key, GST_DEBUG_OBJECT (demux, "Metadata with instance uid %s already exists and has different type '%s'," " expected '%s'", - mxf_ul_to_string (&MXF_METADATA_BASE (metadata)->instance_uid, str), + mxf_uuid_to_string (&MXF_METADATA_BASE (metadata)->instance_uid, str), g_type_name (G_TYPE_FROM_INSTANCE (old)), g_type_name (G_TYPE_FROM_INSTANCE (metadata))); gst_mini_object_unref (GST_MINI_OBJECT (metadata)); @@ -1276,7 +1271,7 @@ gst_mxf_demux_handle_metadata (GstMXFDemux * demux, const MXFUL * key, GST_DEBUG_OBJECT (demux, "Metadata with instance uid %s already exists and is newer", - mxf_ul_to_string (&MXF_METADATA_BASE (metadata)->instance_uid, str)); + mxf_uuid_to_string (&MXF_METADATA_BASE (metadata)->instance_uid, str)); gst_mini_object_unref (GST_MINI_OBJECT (metadata)); return GST_FLOW_OK; } @@ -1352,7 +1347,7 @@ gst_mxf_demux_handle_descriptive_metadata (GstMXFDemux * demux, GST_DEBUG_OBJECT (demux, "Metadata with instance uid %s already exists and has different type '%s'," " expected '%s'", - mxf_ul_to_string (&MXF_METADATA_BASE (m)->instance_uid, str), + mxf_uuid_to_string (&MXF_METADATA_BASE (m)->instance_uid, str), g_type_name (G_TYPE_FROM_INSTANCE (old)), g_type_name (G_TYPE_FROM_INSTANCE (m))); gst_mini_object_unref (GST_MINI_OBJECT (m)); @@ -1365,7 +1360,7 @@ gst_mxf_demux_handle_descriptive_metadata (GstMXFDemux * demux, GST_DEBUG_OBJECT (demux, "Metadata with instance uid %s already exists and is newer", - mxf_ul_to_string (&MXF_METADATA_BASE (m)->instance_uid, str)); + mxf_uuid_to_string (&MXF_METADATA_BASE (m)->instance_uid, str)); gst_mini_object_unref (GST_MINI_OBJECT (m)); return GST_FLOW_OK; } diff --git a/gst/mxf/mxfdms1.c b/gst/mxf/mxfdms1.c index 0493270a..7de27b7d 100644 --- a/gst/mxf/mxfdms1.c +++ b/gst/mxf/mxfdms1.c @@ -68,13 +68,13 @@ mxf_dms1_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, goto error; memcpy (&MXF_METADATA_BASE (self)->instance_uid, tag_data, 16); GST_DEBUG (" instance uid = %s", - mxf_ul_to_string (&MXF_METADATA_BASE (self)->instance_uid, str)); + mxf_uuid_to_string (&MXF_METADATA_BASE (self)->instance_uid, str)); } else if (memcmp (tag_ul, &generation_uid_ul, 16) == 0) { if (tag_size != 16) goto error; memcpy (&MXF_METADATA_BASE (self)->generation_uid, tag_data, 16); GST_DEBUG (" generation uid = %s", - mxf_ul_to_string (&MXF_METADATA_BASE (self)->generation_uid, str)); + mxf_uuid_to_string (&MXF_METADATA_BASE (self)->generation_uid, str)); } else { ret = MXF_METADATA_BASE_CLASS (mxf_dms1_parent_class)->handle_tag @@ -442,7 +442,7 @@ mxf_dms1_framework_handle_tag (MXFMetadataBase * metadata, GST_DEBUG (" original extended spoken language code = %s", self->original_extended_spoken_language_code); } else if (memcmp (tag_ul, &metadata_server_locators_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->metadata_server_locators_uids, + if (!mxf_uuid_array_parse (&self->metadata_server_locators_uids, &self->n_metadata_server_locators, tag_data, tag_size)) goto error; @@ -453,12 +453,12 @@ mxf_dms1_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_metadata_server_locators; i++) { GST_DEBUG (" metadata server locator %u = %s", i, - mxf_ul_to_string (&self->metadata_server_locators_uids[i], str)); + mxf_uuid_to_string (&self->metadata_server_locators_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &titles_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->titles_sets_uids, &self->n_titles_sets, + if (!mxf_uuid_array_parse (&self->titles_sets_uids, &self->n_titles_sets, tag_data, tag_size)) goto error; @@ -468,12 +468,12 @@ mxf_dms1_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_titles_sets; i++) { GST_DEBUG (" titles sets %u = %s", i, - mxf_ul_to_string (&self->titles_sets_uids[i], str)); + mxf_uuid_to_string (&self->titles_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &annotation_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->annotation_sets_uids, + if (!mxf_uuid_array_parse (&self->annotation_sets_uids, &self->n_annotation_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of annotation sets = %u", self->n_annotation_sets); @@ -482,12 +482,12 @@ mxf_dms1_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_annotation_sets; i++) { GST_DEBUG (" annotation sets %u = %s", i, - mxf_ul_to_string (&self->annotation_sets_uids[i], str)); + mxf_uuid_to_string (&self->annotation_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &participant_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->participant_sets_uids, + if (!mxf_uuid_array_parse (&self->participant_sets_uids, &self->n_participant_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of participant sets = %u", self->n_participant_sets); @@ -496,7 +496,7 @@ mxf_dms1_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_participant_sets; i++) { GST_DEBUG (" participant sets %u = %s", i, - mxf_ul_to_string (&self->participant_sets_uids[i], str)); + mxf_uuid_to_string (&self->participant_sets_uids[i], str)); } } #endif @@ -506,10 +506,10 @@ mxf_dms1_framework_handle_tag (MXFMetadataBase * metadata, memcpy (&self->contacts_list_set_uid, tag_data, 16); GST_DEBUG (" contacts list = %s", - mxf_ul_to_string (&self->contacts_list_set_uid, str)); + mxf_uuid_to_string (&self->contacts_list_set_uid, str)); } else if (memcmp (tag_ul, &location_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->location_sets_uids, &self->n_location_sets, - tag_data, tag_size)) + if (!mxf_uuid_array_parse (&self->location_sets_uids, + &self->n_location_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of location sets = %u", self->n_location_sets); #ifndef GST_DISABLE_GST_DEBUG @@ -517,7 +517,7 @@ mxf_dms1_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_location_sets; i++) { GST_DEBUG (" location sets %u = %s", i, - mxf_ul_to_string (&self->location_sets_uids[i], str)); + mxf_uuid_to_string (&self->location_sets_uids[i], str)); } } #endif @@ -672,9 +672,9 @@ mxf_dms1_production_clip_framework_handle_tag (MXFMetadataBase * metadata, memcpy (&self->picture_format_set_uid, tag_data, 16); GST_DEBUG (" picture format set = %s", - mxf_ul_to_string (&self->picture_format_set_uid, str)); + mxf_uuid_to_string (&self->picture_format_set_uid, str)); } else if (memcmp (tag_ul, &captions_description_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->captions_description_sets_uids, + if (!mxf_uuid_array_parse (&self->captions_description_sets_uids, &self->n_captions_description_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of captions description sets = %u", @@ -684,13 +684,13 @@ mxf_dms1_production_clip_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_captions_description_sets; i++) { GST_DEBUG (" captions description sets %u = %s", i, - mxf_ul_to_string (&self->captions_description_sets_uids[i], str)); + mxf_uuid_to_string (&self->captions_description_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &contract_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->contract_sets_uids, &self->n_contract_sets, - tag_data, tag_size)) + if (!mxf_uuid_array_parse (&self->contract_sets_uids, + &self->n_contract_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of contract sets = %u", self->n_contract_sets); @@ -699,7 +699,7 @@ mxf_dms1_production_clip_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_contract_sets; i++) { GST_DEBUG (" contract sets %u = %s", i, - mxf_ul_to_string (&self->contract_sets_uids[i], str)); + mxf_uuid_to_string (&self->contract_sets_uids[i], str)); } } #endif @@ -708,7 +708,7 @@ mxf_dms1_production_clip_framework_handle_tag (MXFMetadataBase * metadata, goto error; memcpy (&self->project_set_uid, tag_data, 16); - GST_DEBUG (" project set = %s", mxf_ul_to_string (&self->project_set_uid, + GST_DEBUG (" project set = %s", mxf_uuid_to_string (&self->project_set_uid, str)); } else { ret = @@ -941,7 +941,7 @@ mxf_dms1_production_framework_handle_tag (MXFMetadataBase * metadata, GST_DEBUG (" integration indication = %s", GST_STR_NULL (self->integration_indication)); } else if (memcmp (tag_ul, &identification_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->identification_sets_uids, + if (!mxf_uuid_array_parse (&self->identification_sets_uids, &self->n_identification_sets, tag_data, tag_size)) goto error; @@ -952,12 +952,12 @@ mxf_dms1_production_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_identification_sets; i++) { GST_DEBUG (" identification sets %u = %s", i, - mxf_ul_to_string (&self->identification_sets_uids[i], str)); + mxf_uuid_to_string (&self->identification_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &group_relationship_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->group_relationship_sets_uids, + if (!mxf_uuid_array_parse (&self->group_relationship_sets_uids, &self->n_group_relationship_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of group relationship sets = %u", @@ -967,13 +967,13 @@ mxf_dms1_production_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_group_relationship_sets; i++) { GST_DEBUG (" group relationship sets %u = %s", i, - mxf_ul_to_string (&self->group_relationship_sets_uids[i], str)); + mxf_uuid_to_string (&self->group_relationship_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &branding_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->branding_sets_uids, &self->n_branding_sets, - tag_data, tag_size)) + if (!mxf_uuid_array_parse (&self->branding_sets_uids, + &self->n_branding_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of branding sets = %u", self->n_branding_sets); @@ -982,12 +982,12 @@ mxf_dms1_production_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_branding_sets; i++) { GST_DEBUG (" branding sets %u = %s", i, - mxf_ul_to_string (&self->branding_sets_uids[i], str)); + mxf_uuid_to_string (&self->branding_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &event_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->event_sets_uids, &self->n_event_sets, + if (!mxf_uuid_array_parse (&self->event_sets_uids, &self->n_event_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of event sets = %u", self->n_event_sets); @@ -996,12 +996,12 @@ mxf_dms1_production_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_event_sets; i++) { GST_DEBUG (" event sets %u = %s", i, - mxf_ul_to_string (&self->event_sets_uids[i], str)); + mxf_uuid_to_string (&self->event_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &award_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->award_sets_uids, &self->n_award_sets, + if (!mxf_uuid_array_parse (&self->award_sets_uids, &self->n_award_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of award sets = %u", self->n_award_sets); @@ -1010,12 +1010,12 @@ mxf_dms1_production_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_award_sets; i++) { GST_DEBUG (" award sets %u = %s", i, - mxf_ul_to_string (&self->award_sets_uids[i], str)); + mxf_uuid_to_string (&self->award_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &setting_period_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->setting_period_sets_uids, + if (!mxf_uuid_array_parse (&self->setting_period_sets_uids, &self->n_setting_period_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of setting period sets = %u", @@ -1025,7 +1025,7 @@ mxf_dms1_production_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_setting_period_sets; i++) { GST_DEBUG (" setting period sets %u = %s", i, - mxf_ul_to_string (&self->setting_period_sets_uids[i], str)); + mxf_uuid_to_string (&self->setting_period_sets_uids[i], str)); } } #endif @@ -1255,7 +1255,7 @@ mxf_dms1_clip_framework_handle_tag (MXFMetadataBase * metadata, GST_DEBUG (" slate information = %s", GST_STR_NULL (self->slate_information)); } else if (memcmp (tag_ul, &scripting_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->scripting_sets_uids, + if (!mxf_uuid_array_parse (&self->scripting_sets_uids, &self->n_scripting_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of scripting sets = %u", self->n_scripting_sets); @@ -1264,12 +1264,12 @@ mxf_dms1_clip_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_scripting_sets; i++) { GST_DEBUG (" scripting sets %u = %s", i, - mxf_ul_to_string (&self->scripting_sets_uids[i], str)); + mxf_uuid_to_string (&self->scripting_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &shot_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->shot_sets_uids, &self->n_shot_sets, + if (!mxf_uuid_array_parse (&self->shot_sets_uids, &self->n_shot_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of shot sets = %u", self->n_shot_sets); @@ -1278,12 +1278,12 @@ mxf_dms1_clip_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_shot_sets; i++) { GST_DEBUG (" shot sets %u = %s", i, - mxf_ul_to_string (&self->shot_sets_uids[i], str)); + mxf_uuid_to_string (&self->shot_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &device_parameters_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->device_parameters_sets_uids, + if (!mxf_uuid_array_parse (&self->device_parameters_sets_uids, &self->n_device_parameters_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of device parameters sets = %u", @@ -1293,7 +1293,7 @@ mxf_dms1_clip_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_device_parameters_sets; i++) { GST_DEBUG (" device parameters sets %u = %s", i, - mxf_ul_to_string (&self->device_parameters_sets_uids[i], str)); + mxf_uuid_to_string (&self->device_parameters_sets_uids[i], str)); } } #endif @@ -1303,7 +1303,7 @@ mxf_dms1_clip_framework_handle_tag (MXFMetadataBase * metadata, memcpy (&self->processing_set_uid, tag_data, 16); GST_DEBUG (" processing set = %s", - mxf_ul_to_string (&self->processing_set_uid, str)); + mxf_uuid_to_string (&self->processing_set_uid, str)); } else { ret = MXF_METADATA_BASE_CLASS @@ -1439,7 +1439,7 @@ mxf_dms1_scene_framework_handle_tag (MXFMetadataBase * metadata, memcpy (self->scene_number, tag_data, tag_size); GST_DEBUG (" scene number = %s", self->scene_number); } else if (memcmp (tag_ul, &setting_period_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->setting_period_sets_uids, + if (!mxf_uuid_array_parse (&self->setting_period_sets_uids, &self->n_setting_period_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of setting period sets = %u", @@ -1449,12 +1449,12 @@ mxf_dms1_scene_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_setting_period_sets; i++) { GST_DEBUG (" setting period sets %u = %s", i, - mxf_ul_to_string (&self->setting_period_sets_uids[i], str)); + mxf_uuid_to_string (&self->setting_period_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &shot_scene_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->shot_scene_sets_uids, + if (!mxf_uuid_array_parse (&self->shot_scene_sets_uids, &self->n_shot_scene_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of shot sets = %u", self->n_shot_scene_sets); @@ -1463,7 +1463,7 @@ mxf_dms1_scene_framework_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_shot_scene_sets; i++) { GST_DEBUG (" shot sets %u = %s", i, - mxf_ul_to_string (&self->shot_scene_sets_uids[i], str)); + mxf_uuid_to_string (&self->shot_scene_sets_uids[i], str)); } } #endif @@ -1669,7 +1669,7 @@ mxf_dms1_identification_handle_tag (MXFMetadataBase * metadata, memcpy (&self->identification_locator, tag_data, 16); GST_DEBUG (" identification locator = %s", - mxf_ul_to_string (&self->identification_locator, str)); + mxf_uuid_to_string (&self->identification_locator, str)); } else if (memcmp (tag_ul, &identification_issuing_authority_ul, 16) == 0) { self->identification_issuing_authority = mxf_utf16_to_utf8 (tag_data, tag_size); @@ -2033,7 +2033,7 @@ mxf_dms1_event_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, memcpy (self->event_end_date_and_time, tag_data, tag_size); GST_DEBUG (" event end date and time = %s", self->event_end_date_and_time); } else if (memcmp (tag_ul, &publication_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->publication_sets_uids, + if (!mxf_uuid_array_parse (&self->publication_sets_uids, &self->n_publication_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of publication sets = %u", self->n_publication_sets); @@ -2042,12 +2042,12 @@ mxf_dms1_event_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, guint i; for (i = 0; i < self->n_publication_sets; i++) { GST_DEBUG (" publication sets %u = %s", i, - mxf_ul_to_string (&self->publication_sets_uids[i], str)); + mxf_uuid_to_string (&self->publication_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &annotation_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->annotation_sets_uids, + if (!mxf_uuid_array_parse (&self->annotation_sets_uids, &self->n_annotation_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of annotation sets = %u", self->n_annotation_sets); @@ -2056,7 +2056,7 @@ mxf_dms1_event_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, guint i; for (i = 0; i < self->n_annotation_sets; i++) { GST_DEBUG (" annotation sets %u = %s", i, - mxf_ul_to_string (&self->annotation_sets_uids[i], str)); + mxf_uuid_to_string (&self->annotation_sets_uids[i], str)); } } #endif @@ -2303,7 +2303,7 @@ mxf_dms1_award_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, GST_DEBUG (" nomination category = %s", GST_STR_NULL (self->nomination_category)); } else if (memcmp (tag_ul, &participant_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->participant_sets_uids, + if (!mxf_uuid_array_parse (&self->participant_sets_uids, &self->n_participant_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of participant sets = %u", self->n_participant_sets); @@ -2312,7 +2312,7 @@ mxf_dms1_award_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, guint i; for (i = 0; i < self->n_participant_sets; i++) { GST_DEBUG (" participant sets %u = %s", i, - mxf_ul_to_string (&self->participant_sets_uids[i], str)); + mxf_uuid_to_string (&self->participant_sets_uids[i], str)); } } #endif @@ -2578,7 +2578,7 @@ mxf_dms1_annotation_handle_tag (MXFMetadataBase * metadata, GST_DEBUG (" related material description = %s", GST_STR_NULL (self->related_material_description)); } else if (memcmp (tag_ul, &classification_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->classification_sets_uids, + if (!mxf_uuid_array_parse (&self->classification_sets_uids, &self->n_classification_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of classification sets = %u", @@ -2588,7 +2588,7 @@ mxf_dms1_annotation_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_classification_sets; i++) { GST_DEBUG (" classification sets %u = %s", i, - mxf_ul_to_string (&self->classification_sets_uids[i], str)); + mxf_uuid_to_string (&self->classification_sets_uids[i], str)); } } #endif @@ -2598,9 +2598,9 @@ mxf_dms1_annotation_handle_tag (MXFMetadataBase * metadata, memcpy (&self->cue_words_set_uid, tag_data, 16); GST_DEBUG (" cue words set = %s", - mxf_ul_to_string (&self->cue_words_set_uid, str)); + mxf_uuid_to_string (&self->cue_words_set_uid, str)); } else if (memcmp (tag_ul, &related_material_locators_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->related_material_locators, + if (!mxf_uuid_array_parse (&self->related_material_locators, &self->n_related_material_locators, tag_data, tag_size)) goto error; GST_DEBUG (" number of related material locators = %u", @@ -2610,12 +2610,12 @@ mxf_dms1_annotation_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_related_material_locators; i++) { GST_DEBUG (" related material locators %u = %s", i, - mxf_ul_to_string (&self->related_material_locators[i], str)); + mxf_uuid_to_string (&self->related_material_locators[i], str)); } } #endif } else if (memcmp (tag_ul, &participant_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->participant_sets_uids, + if (!mxf_uuid_array_parse (&self->participant_sets_uids, &self->n_participant_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of participant sets = %u", self->n_participant_sets); @@ -2624,7 +2624,7 @@ mxf_dms1_annotation_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_participant_sets; i++) { GST_DEBUG (" participant sets %u = %s", i, - mxf_ul_to_string (&self->participant_sets_uids[i], str)); + mxf_uuid_to_string (&self->participant_sets_uids[i], str)); } } #endif @@ -2813,7 +2813,7 @@ mxf_dms1_scripting_handle_tag (MXFMetadataBase * metadata, GST_DEBUG (" scripting description = %s", GST_STR_NULL (self->scripting_text)); } else if (memcmp (tag_ul, &scripting_locators_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->scripting_locators, + if (!mxf_uuid_array_parse (&self->scripting_locators, &self->n_scripting_locators, tag_data, tag_size)) goto error; GST_DEBUG (" number of scripting locators = %u", @@ -2823,7 +2823,7 @@ mxf_dms1_scripting_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_scripting_locators; i++) { GST_DEBUG (" scripting locators %u = %s", i, - mxf_ul_to_string (&self->scripting_locators[i], str)); + mxf_uuid_to_string (&self->scripting_locators[i], str)); } } #endif @@ -2936,7 +2936,7 @@ mxf_dms1_classification_handle_tag (MXFMetadataBase * metadata, memcpy (self->content_classification, tag_data, tag_size); GST_DEBUG (" content classification = %s", self->content_classification); } else if (memcmp (tag_ul, &name_value_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->name_value_sets_uids, + if (!mxf_uuid_array_parse (&self->name_value_sets_uids, &self->n_name_value_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of name-value sets = %u", self->n_name_value_sets); @@ -2945,7 +2945,7 @@ mxf_dms1_classification_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_name_value_sets; i++) { GST_DEBUG (" name-value sets %u = %s", i, - mxf_ul_to_string (&self->name_value_sets_uids[i], str)); + mxf_uuid_to_string (&self->name_value_sets_uids[i], str)); } } #endif @@ -3144,9 +3144,9 @@ mxf_dms1_shot_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, memcpy (&self->cue_words_set_uid, tag_data, 16); GST_DEBUG (" cue words set = %s", - mxf_ul_to_string (&self->cue_words_set_uid, str)); + mxf_uuid_to_string (&self->cue_words_set_uid, str)); } else if (memcmp (tag_ul, &key_point_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->key_point_sets_uids, + if (!mxf_uuid_array_parse (&self->key_point_sets_uids, &self->n_key_point_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of key point sets = %u", self->n_key_point_sets); @@ -3155,7 +3155,7 @@ mxf_dms1_shot_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, guint i; for (i = 0; i < self->n_key_point_sets; i++) { GST_DEBUG (" key point sets %u = %s", i, - mxf_ul_to_string (&self->key_point_sets_uids[i], str)); + mxf_uuid_to_string (&self->key_point_sets_uids[i], str)); } } #endif @@ -3401,7 +3401,7 @@ mxf_dms1_participant_handle_tag (MXFMetadataBase * metadata, memcpy (&self->participant_uid, tag_data, 16); GST_DEBUG (" participant uid = %s", - mxf_ul_to_string (&self->participant_uid, str)); + mxf_uuid_to_string (&self->participant_uid, str)); } else if (memcmp (tag_ul, &contribution_status_ul, 16) == 0) { self->contribution_status = mxf_utf16_to_utf8 (tag_data, tag_size); GST_DEBUG (" contribution status = %s", @@ -3420,7 +3420,7 @@ mxf_dms1_participant_handle_tag (MXFMetadataBase * metadata, GST_DEBUG (" role or identity name = %s", GST_STR_NULL (self->role_or_identity_name)); } else if (memcmp (tag_ul, &person_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->person_sets_uids, &self->n_person_sets, + if (!mxf_uuid_array_parse (&self->person_sets_uids, &self->n_person_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of person sets = %u", self->n_person_sets); @@ -3429,12 +3429,12 @@ mxf_dms1_participant_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_person_sets; i++) { GST_DEBUG (" person sets %u = %s", i, - mxf_ul_to_string (&self->person_sets_uids[i], str)); + mxf_uuid_to_string (&self->person_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &organisation_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->organisation_sets_uids, + if (!mxf_uuid_array_parse (&self->organisation_sets_uids, &self->n_organisation_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of organisation sets = %u", self->n_organisation_sets); @@ -3443,7 +3443,7 @@ mxf_dms1_participant_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_organisation_sets; i++) { GST_DEBUG (" organisation sets %u = %s", i, - mxf_ul_to_string (&self->organisation_sets_uids[i], str)); + mxf_uuid_to_string (&self->organisation_sets_uids[i], str)); } } #endif @@ -3574,10 +3574,10 @@ mxf_dms1_contact_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, goto error; memcpy (&self->contact_uid, tag_data, 16); - GST_DEBUG (" contact uid = %s", mxf_ul_to_string (&self->contact_uid, + GST_DEBUG (" contact uid = %s", mxf_uuid_to_string (&self->contact_uid, str)); } else if (memcmp (tag_ul, &name_value_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->name_value_sets_uids, + if (!mxf_uuid_array_parse (&self->name_value_sets_uids, &self->n_name_value_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of name-value sets = %u", self->n_name_value_sets); @@ -3586,12 +3586,12 @@ mxf_dms1_contact_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, guint i; for (i = 0; i < self->n_name_value_sets; i++) { GST_DEBUG (" name-value sets %u = %s", i, - mxf_ul_to_string (&self->name_value_sets_uids[i], str)); + mxf_uuid_to_string (&self->name_value_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &address_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->address_sets_uids, &self->n_address_sets, + if (!mxf_uuid_array_parse (&self->address_sets_uids, &self->n_address_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of address sets = %u", self->n_address_sets); @@ -3600,7 +3600,7 @@ mxf_dms1_contact_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, guint i; for (i = 0; i < self->n_address_sets; i++) { GST_DEBUG (" address sets %u = %s", i, - mxf_ul_to_string (&self->address_sets_uids[i], str)); + mxf_uuid_to_string (&self->address_sets_uids[i], str)); } } #endif @@ -3822,7 +3822,7 @@ mxf_dms1_person_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, self->citizenship = mxf_utf16_to_utf8 (tag_data, tag_size); GST_DEBUG (" citizenship = %s", GST_STR_NULL (self->citizenship)); } else if (memcmp (tag_ul, &organisation_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->organisation_sets_uids, + if (!mxf_uuid_array_parse (&self->organisation_sets_uids, &self->n_organisation_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of organisation sets = %u", self->n_organisation_sets); @@ -3831,7 +3831,7 @@ mxf_dms1_person_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, guint i; for (i = 0; i < self->n_organisation_sets; i++) { GST_DEBUG (" organisation sets %u = %s", i, - mxf_ul_to_string (&self->organisation_sets_uids[i], str)); + mxf_uuid_to_string (&self->organisation_sets_uids[i], str)); } } #endif @@ -4252,7 +4252,7 @@ mxf_dms1_address_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, GST_DEBUG (" astronomical body name = %s", GST_STR_NULL (self->astronomical_body_name)); } else if (memcmp (tag_ul, &communications_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->communications_sets_uids, + if (!mxf_uuid_array_parse (&self->communications_sets_uids, &self->n_communications_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of communications sets = %u", @@ -4262,12 +4262,12 @@ mxf_dms1_address_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, guint i; for (i = 0; i < self->n_communications_sets; i++) { GST_DEBUG (" communications sets %u = %s", i, - mxf_ul_to_string (&self->communications_sets_uids[i], str)); + mxf_uuid_to_string (&self->communications_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &name_value_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->name_value_sets_uids, + if (!mxf_uuid_array_parse (&self->name_value_sets_uids, &self->n_name_value_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of name-value sets = %u", self->n_name_value_sets); @@ -4276,7 +4276,7 @@ mxf_dms1_address_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, guint i; for (i = 0; i < self->n_name_value_sets; i++) { GST_DEBUG (" name-value sets %u = %s", i, - mxf_ul_to_string (&self->name_value_sets_uids[i], str)); + mxf_uuid_to_string (&self->name_value_sets_uids[i], str)); } } #endif @@ -4528,7 +4528,7 @@ mxf_dms1_contract_handle_tag (MXFMetadataBase * metadata, memcpy (self->supply_contract_number, tag_data, tag_size); GST_DEBUG (" supply contract number = %s", self->supply_contract_number); } else if (memcmp (tag_ul, &rights_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->rights_sets_uids, &self->n_rights_sets, + if (!mxf_uuid_array_parse (&self->rights_sets_uids, &self->n_rights_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of rights sets = %u", self->n_rights_sets); @@ -4537,12 +4537,12 @@ mxf_dms1_contract_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_rights_sets; i++) { GST_DEBUG (" rights sets %u = %s", i, - mxf_ul_to_string (&self->rights_sets_uids[i], str)); + mxf_uuid_to_string (&self->rights_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &participant_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->participant_sets_uids, + if (!mxf_uuid_array_parse (&self->participant_sets_uids, &self->n_participant_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of participant sets = %u", self->n_participant_sets); @@ -4551,7 +4551,7 @@ mxf_dms1_contract_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_participant_sets; i++) { GST_DEBUG (" participant sets %u = %s", i, - mxf_ul_to_string (&self->participant_sets_uids[i], str)); + mxf_uuid_to_string (&self->participant_sets_uids[i], str)); } } #endif @@ -5012,7 +5012,7 @@ mxf_dms1_device_parameters_handle_tag (MXFMetadataBase * metadata, GST_DEBUG (" device usage description = %s", GST_STR_NULL (self->device_usage_description)); } else if (memcmp (tag_ul, &name_value_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->name_value_sets_uids, + if (!mxf_uuid_array_parse (&self->name_value_sets_uids, &self->n_name_value_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of name-value sets = %u", self->n_name_value_sets); @@ -5021,7 +5021,7 @@ mxf_dms1_device_parameters_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_name_value_sets; i++) { GST_DEBUG (" name-value sets %u = %s", i, - mxf_ul_to_string (&self->name_value_sets_uids[i], str)); + mxf_uuid_to_string (&self->name_value_sets_uids[i], str)); } } #endif @@ -5117,7 +5117,7 @@ mxf_dms1_name_value_handle_tag (MXFMetadataBase * metadata, memcpy (&self->smpte_universal_label_locator, tag_data, 16); GST_DEBUG (" SMPTE universal label locator = %s", - mxf_ul_to_string (&self->smpte_universal_label_locator, str)); + mxf_uuid_to_string (&self->smpte_universal_label_locator, str)); } else { ret = MXF_METADATA_BASE_CLASS (mxf_dms1_name_value_parent_class)->handle_tag @@ -5466,7 +5466,7 @@ mxf_dms1_contacts_list_handle_tag (MXFMetadataBase * metadata, return FALSE; if (memcmp (tag_ul, &person_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->person_sets_uids, &self->n_person_sets, + if (!mxf_uuid_array_parse (&self->person_sets_uids, &self->n_person_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of person sets = %u", self->n_person_sets); @@ -5475,12 +5475,12 @@ mxf_dms1_contacts_list_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_person_sets; i++) { GST_DEBUG (" person sets %u = %s", i, - mxf_ul_to_string (&self->person_sets_uids[i], str)); + mxf_uuid_to_string (&self->person_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &organisation_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->organisation_sets_uids, + if (!mxf_uuid_array_parse (&self->organisation_sets_uids, &self->n_organisation_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of organisation sets = %u", self->n_organisation_sets); @@ -5489,13 +5489,13 @@ mxf_dms1_contacts_list_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_organisation_sets; i++) { GST_DEBUG (" organisation sets %u = %s", i, - mxf_ul_to_string (&self->organisation_sets_uids[i], str)); + mxf_uuid_to_string (&self->organisation_sets_uids[i], str)); } } #endif } else if (memcmp (tag_ul, &location_sets_ul, 16) == 0) { - if (!mxf_ul_array_parse (&self->location_sets_uids, &self->n_location_sets, - tag_data, tag_size)) + if (!mxf_uuid_array_parse (&self->location_sets_uids, + &self->n_location_sets, tag_data, tag_size)) goto error; GST_DEBUG (" number of location sets = %u", self->n_location_sets); #ifndef GST_DISABLE_GST_DEBUG @@ -5503,7 +5503,7 @@ mxf_dms1_contacts_list_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_location_sets; i++) { GST_DEBUG (" location sets %u = %s", i, - mxf_ul_to_string (&self->location_sets_uids[i], str)); + mxf_uuid_to_string (&self->location_sets_uids[i], str)); } } #endif diff --git a/gst/mxf/mxfdms1.h b/gst/mxf/mxfdms1.h index 4fcbdbb7..b0eee3eb 100644 --- a/gst/mxf/mxfdms1.h +++ b/gst/mxf/mxfdms1.h @@ -432,44 +432,44 @@ struct _MXFDMS1Framework { gchar original_extended_spoken_language_code[13]; guint32 n_metadata_server_locators; - MXFUL *metadata_server_locators_uids; + MXFUUID *metadata_server_locators_uids; /* TODO */ guint32 n_titles_sets; - MXFUL *titles_sets_uids; + MXFUUID *titles_sets_uids; MXFDMS1Titles **titles_sets; guint32 n_annotation_sets; - MXFUL *annotation_sets_uids; + MXFUUID *annotation_sets_uids; MXFDMS1Annotation **annotation_sets; guint32 n_participant_sets; - MXFUL *participant_sets_uids; + MXFUUID *participant_sets_uids; MXFDMS1Participant **participant_sets; - MXFUL contacts_list_set_uid; + MXFUUID contacts_list_set_uid; MXFDMS1ContactsList *contacts_list_set; guint32 n_location_sets; - MXFUL *location_sets_uids; + MXFUUID *location_sets_uids; MXFDMS1Location **location_sets; }; struct _MXFDMS1ProductionClipFramework { MXFDMS1Framework parent; - MXFUL picture_format_set_uid; + MXFUUID picture_format_set_uid; MXFDMS1PictureFormat *picture_format; guint32 n_captions_description_sets; - MXFUL *captions_description_sets_uids; + MXFUUID *captions_description_sets_uids; MXFDMS1CaptionsDescription **captions_description_sets; guint32 n_contract_sets; - MXFUL *contract_sets_uids; + MXFUUID *contract_sets_uids; MXFDMS1Contract **contract_sets; - MXFUL project_set_uid; + MXFUUID project_set_uid; MXFDMS1Project *project_set; }; @@ -479,27 +479,27 @@ struct _MXFDMS1ProductionFramework { gchar *integration_indication; guint32 n_identification_sets; - MXFUL *identification_sets_uids; + MXFUUID *identification_sets_uids; MXFDMS1Identification **identification_sets; guint32 n_group_relationship_sets; - MXFUL *group_relationship_sets_uids; + MXFUUID *group_relationship_sets_uids; MXFDMS1GroupRelationship **group_relationship_sets; guint32 n_branding_sets; - MXFUL *branding_sets_uids; + MXFUUID *branding_sets_uids; MXFDMS1Branding **branding_sets; guint32 n_event_sets; - MXFUL *event_sets_uids; + MXFUUID *event_sets_uids; MXFDMS1Event **event_sets; guint32 n_award_sets; - MXFUL *award_sets_uids; + MXFUUID *award_sets_uids; MXFDMS1Award **award_sets; guint32 n_setting_period_sets; - MXFUL *setting_period_sets_uids; + MXFUUID *setting_period_sets_uids; MXFDMS1SettingPeriod **setting_period_sets; }; @@ -519,18 +519,18 @@ struct _MXFDMS1ClipFramework { gchar *slate_information; guint32 n_scripting_sets; - MXFUL *scripting_sets_uids; + MXFUUID *scripting_sets_uids; MXFDMS1Scripting **scripting_sets; guint32 n_shot_sets; - MXFUL *shot_sets_uids; + MXFUUID *shot_sets_uids; MXFDMS1Shot **shot_sets; guint32 n_device_parameters_sets; - MXFUL *device_parameters_sets_uids; + MXFUUID *device_parameters_sets_uids; MXFDMS1DeviceParameters **device_parameters_sets; - MXFUL processing_set_uid; + MXFUUID processing_set_uid; MXFDMS1Processing *processing_set; }; @@ -540,11 +540,11 @@ struct _MXFDMS1SceneFramework { gchar scene_number[33]; guint32 n_setting_period_sets; - MXFUL *setting_period_sets_uids; + MXFUUID *setting_period_sets_uids; MXFDMS1SettingPeriod **setting_period_sets; guint32 n_shot_scene_sets; - MXFUL *shot_scene_sets_uids; + MXFUUID *shot_scene_sets_uids; MXFDMS1Shot **shot_scene_sets; }; @@ -564,7 +564,7 @@ struct _MXFDMS1Identification { gchar identifier_kind[33]; guint8 *identifier_value; guint16 identifier_value_length; - MXFUL identification_locator; + MXFUUID identification_locator; gchar *identification_issuing_authority; }; @@ -595,11 +595,11 @@ struct _MXFDMS1Event { gchar event_end_date_and_time[33]; guint32 n_publication_sets; - MXFUL *publication_sets_uids; + MXFUUID *publication_sets_uids; MXFDMS1Publication **publication_sets; guint32 n_annotation_sets; - MXFUL *annotation_sets_uids; + MXFUUID *annotation_sets_uids; MXFDMS1Annotation **annotation_sets; }; @@ -622,7 +622,7 @@ struct _MXFDMS1Award { gchar *nomination_category; guint32 n_participant_sets; - MXFUL *participant_sets_uids; + MXFUUID *participant_sets_uids; MXFDMS1Participant **participant_sets; }; @@ -642,18 +642,18 @@ struct _MXFDMS1Annotation { gchar *related_material_description; guint32 n_classification_sets; - MXFUL *classification_sets_uids; + MXFUUID *classification_sets_uids; MXFDMS1Classification **classification_sets; - MXFUL cue_words_set_uid; + MXFUUID cue_words_set_uid; MXFDMS1CueWords *cue_words_set; guint32 n_related_material_locators; - MXFUL *related_material_locators; + MXFUUID *related_material_locators; /* TODO */ guint32 n_participant_sets; - MXFUL *participant_sets_uids; + MXFUUID *participant_sets_uids; MXFDMS1Participant **participant_sets; }; @@ -672,7 +672,7 @@ struct _MXFDMS1Scripting { gchar *scripting_text; guint32 n_scripting_locators; - MXFUL *scripting_locators; + MXFUUID *scripting_locators; /* TODO */ }; @@ -682,7 +682,7 @@ struct _MXFDMS1Classification { gchar content_classification[128]; guint32 n_name_value_sets; - MXFUL *name_value_sets_uids; + MXFUUID *name_value_sets_uids; MXFDMS1NameValue **name_value_sets; }; @@ -699,11 +699,11 @@ struct _MXFDMS1Shot { gchar *shot_comment_kind; gchar *shot_comment; - MXFUL cue_words_set_uid; + MXFUUID cue_words_set_uid; MXFDMS1CueWords *cue_words_set; guint32 n_key_point_sets; - MXFUL *key_point_sets_uids; + MXFUUID *key_point_sets_uids; MXFDMS1KeyPoint **key_point_sets; }; @@ -718,7 +718,7 @@ struct _MXFDMS1KeyPoint { struct _MXFDMS1Participant { MXFDMS1Thesaurus parent; - MXFUL participant_uid; + MXFUUID participant_uid; gchar *contribution_status; gchar *job_function; @@ -726,25 +726,25 @@ struct _MXFDMS1Participant { gchar *role_or_identity_name; guint32 n_person_sets; - MXFUL *person_sets_uids; + MXFUUID *person_sets_uids; MXFDMS1Person **person_sets; guint32 n_organisation_sets; - MXFUL *organisation_sets_uids; + MXFUUID *organisation_sets_uids; MXFDMS1Organisation **organisation_sets; }; struct _MXFDMS1Contact { MXFDMS1Thesaurus parent; - MXFUL contact_uid; + MXFUUID contact_uid; guint32 n_name_value_sets; - MXFUL *name_value_sets_uids; + MXFUUID *name_value_sets_uids; MXFDMS1NameValue **name_value_sets; guint32 n_address_sets; - MXFUL *address_sets_uids; + MXFUUID *address_sets_uids; MXFDMS1Address **address_sets; }; @@ -765,7 +765,7 @@ struct _MXFDMS1Person { gchar *citizenship; guint32 n_organisation_sets; - MXFUL *organisation_sets_uids; + MXFUUID *organisation_sets_uids; MXFDMS1Organisation **organisation_sets; }; @@ -803,11 +803,11 @@ struct _MXFDMS1Address { gchar *astronomical_body_name; guint32 n_communications_sets; - MXFUL *communications_sets_uids; + MXFUUID *communications_sets_uids; MXFDMS1Communications **communications_sets; guint32 n_name_value_sets; - MXFUL *name_value_sets_uids; + MXFUUID *name_value_sets_uids; MXFDMS1NameValue **name_value_sets; }; @@ -828,11 +828,11 @@ struct _MXFDMS1Contract { gchar supply_contract_number[33]; guint32 n_rights_sets; - MXFUL *rights_sets_uids; + MXFUUID *rights_sets_uids; MXFDMS1Rights **rights_sets; guint32 n_participant_sets; - MXFUL *participant_sets_uids; + MXFUUID *participant_sets_uids; MXFDMS1Participant **participant_sets; }; @@ -873,7 +873,7 @@ struct _MXFDMS1DeviceParameters { gchar *device_usage_description; guint32 n_name_value_sets; - MXFUL *name_value_sets_uids; + MXFUUID *name_value_sets_uids; MXFDMS1NameValue **name_value_sets; }; @@ -883,7 +883,7 @@ struct _MXFDMS1NameValue { gchar *item_name; gchar *item_value; - MXFUL smpte_universal_label_locator; + MXFUUID smpte_universal_label_locator; }; struct _MXFDMS1Processing { @@ -909,15 +909,15 @@ struct _MXFDMS1ContactsList { MXFDMS1 parent; guint32 n_person_sets; - MXFUL *person_sets_uids; + MXFUUID *person_sets_uids; MXFDMS1Person **person_sets; guint32 n_organisation_sets; - MXFUL *organisation_sets_uids; + MXFUUID *organisation_sets_uids; MXFDMS1Organisation **organisation_sets; guint32 n_location_sets; - MXFUL *location_sets_uids; + MXFUUID *location_sets_uids; MXFDMS1Location **location_sets; }; diff --git a/gst/mxf/mxfmetadata.c b/gst/mxf/mxfmetadata.c index 8985ea90..b42dfc08 100644 --- a/gst/mxf/mxfmetadata.c +++ b/gst/mxf/mxfmetadata.c @@ -82,14 +82,14 @@ mxf_metadata_base_to_structure_default (MXFMetadataBase * self) ret = gst_structure_id_empty_new (klass->name_quark); - if (!mxf_ul_is_zero (&self->instance_uid)) { - mxf_ul_to_string (&self->instance_uid, str); + if (!mxf_uuid_is_zero (&self->instance_uid)) { + mxf_uuid_to_string (&self->instance_uid, str); gst_structure_id_set (ret, MXF_QUARK (INSTANCE_UID), G_TYPE_STRING, str, NULL); } - if (!mxf_ul_is_zero (&self->generation_uid)) { - mxf_ul_to_string (&self->generation_uid, str); + if (!mxf_uuid_is_zero (&self->generation_uid)) { + mxf_uuid_to_string (&self->generation_uid, str); gst_structure_id_set (ret, MXF_QUARK (GENERATION_UID), G_TYPE_STRING, str, NULL); } @@ -123,7 +123,7 @@ mxf_metadata_base_to_structure_default (MXFMetadataBase * self) g_value_init (&v, GST_TYPE_STRUCTURE); s = gst_structure_id_empty_new (MXF_QUARK (TAG)); - mxf_ul_to_string (&tag->key, str); + mxf_ul_to_string (&tag->ul, str); buf = gst_buffer_new_and_alloc (tag->size); memcpy (GST_BUFFER_DATA (buf), tag->data, tag->size); @@ -280,7 +280,7 @@ mxf_metadata_base_to_buffer (MXFMetadataBase * self, MXFPrimerPack * primer) tmp = g_slice_dup (MXFLocalTag, t); if (t->g_slice) { tmp->data = g_slice_alloc (t->size); - mxf_primer_pack_add_mapping (primer, 0x0000, &t->key); + mxf_primer_pack_add_mapping (primer, 0x0000, &t->ul); memcpy (tmp->data, t->data, t->size); } else { tmp->data = g_memdup (t->data, t->size); @@ -310,7 +310,7 @@ mxf_metadata_base_to_buffer (MXFMetadataBase * self, MXFPrimerPack * primer) ret = gst_buffer_new_and_alloc (size); - memcpy (GST_BUFFER_DATA (ret), &last->key, 16); + memcpy (GST_BUFFER_DATA (ret), &last->ul, 16); mxf_local_tag_free (last); last = NULL; memcpy (GST_BUFFER_DATA (ret) + 16, ber, slen); @@ -326,7 +326,7 @@ mxf_metadata_base_to_buffer (MXFMetadataBase * self, MXFPrimerPack * primer) local_tag = GPOINTER_TO_UINT (g_hash_table_lookup (primer->reverse_mappings, - &t->key)); + &t->ul)); g_assert (local_tag != 0); GST_WRITE_UINT16_BE (data, local_tag); @@ -365,14 +365,14 @@ mxf_metadata_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer, goto error; memcpy (&self->parent.instance_uid, tag_data, 16); GST_DEBUG (" instance uid = %s", - mxf_ul_to_string (&self->parent.instance_uid, str)); + mxf_uuid_to_string (&self->parent.instance_uid, str)); break; case 0x0102: if (tag_size != 16) goto error; memcpy (&self->parent.generation_uid, tag_data, 16); GST_DEBUG (" generation uid = %s", - mxf_ul_to_string (&self->parent.generation_uid, str)); + mxf_uuid_to_string (&self->parent.generation_uid, str)); break; default: ret = @@ -415,27 +415,27 @@ mxf_metadata_write_tags (MXFMetadataBase * m, MXFPrimerPack * primer) /* Last element contains the metadata key */ t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, metadata_key, 16); - GST_WRITE_UINT16_BE (&t->key.u[13], klass->type); + memcpy (&t->ul, metadata_key, 16); + GST_WRITE_UINT16_BE (&t->ul.u[13], klass->type); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &instance_uid_ul, 16); + memcpy (&t->ul, &instance_uid_ul, 16); t->size = 16; t->data = g_slice_alloc (16); t->g_slice = TRUE; memcpy (t->data, &self->parent.instance_uid, 16); - mxf_primer_pack_add_mapping (primer, 0x3c0a, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3c0a, &t->ul); ret = g_list_prepend (ret, t); - if (!mxf_ul_is_zero (&self->parent.generation_uid)) { + if (!mxf_uuid_is_zero (&self->parent.generation_uid)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &generation_uid_ul, 16); + memcpy (&t->ul, &generation_uid_ul, 16); t->size = 16; t->data = g_slice_alloc (16); t->g_slice = TRUE; memcpy (t->data, &self->parent.generation_uid, 16); - mxf_primer_pack_add_mapping (primer, 0x0102, &t->key); + mxf_primer_pack_add_mapping (primer, 0x0102, &t->ul); ret = g_list_prepend (ret, t); } @@ -610,10 +610,10 @@ mxf_metadata_preface_handle_tag (MXFMetadataBase * metadata, goto error; memcpy (&self->primary_package_uid, tag_data, 16); GST_DEBUG (" primary package = %s", - mxf_ul_to_string (&self->primary_package_uid, str)); + mxf_uuid_to_string (&self->primary_package_uid, str)); break; case 0x3b06: - if (!mxf_ul_array_parse (&self->identifications_uids, + if (!mxf_uuid_array_parse (&self->identifications_uids, &self->n_identifications, tag_data, tag_size)) goto error; @@ -623,7 +623,7 @@ mxf_metadata_preface_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_identifications; i++) { GST_DEBUG (" identification %u = %s", i, - mxf_ul_to_string (&self->identifications_uids[i], str)); + mxf_uuid_to_string (&self->identifications_uids[i], str)); } } #endif @@ -633,7 +633,7 @@ mxf_metadata_preface_handle_tag (MXFMetadataBase * metadata, goto error; memcpy (&self->content_storage_uid, tag_data, 16); GST_DEBUG (" content storage = %s", - mxf_ul_to_string (&self->content_storage_uid, str)); + mxf_uuid_to_string (&self->content_storage_uid, str)); break; case 0x3b09: if (tag_size != 16) @@ -699,7 +699,7 @@ mxf_metadata_preface_resolve (MXFMetadataBase * m, GHashTable * metadata) MXFMetadataBase *current = NULL; guint i; - if (!mxf_ul_is_zero (&self->primary_package_uid)) { + if (!mxf_uuid_is_zero (&self->primary_package_uid)) { current = g_hash_table_lookup (metadata, &self->primary_package_uid); if (!current || !MXF_IS_METADATA_GENERIC_PACKAGE (current)) { GST_ERROR ("Primary package not found"); @@ -769,8 +769,8 @@ mxf_metadata_preface_to_structure (MXFMetadataBase * m) gst_structure_id_set (ret, MXF_QUARK (OBJECT_MODEL_VERSION), G_TYPE_UINT, self->object_model_version, NULL); - if (!mxf_ul_is_zero (&self->primary_package_uid)) { - mxf_ul_to_string (&self->primary_package_uid, str); + if (!mxf_uuid_is_zero (&self->primary_package_uid)) { + mxf_uuid_to_string (&self->primary_package_uid, str); gst_structure_id_set (ret, MXF_QUARK (PRIMARY_PACKAGE), G_TYPE_STRING, str, NULL); } @@ -921,51 +921,51 @@ mxf_metadata_preface_write_tags (MXFMetadataBase * m, MXFPrimerPack * primer) }; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &last_modified_date_ul, 16); + memcpy (&t->ul, &last_modified_date_ul, 16); t->size = 8; t->data = g_slice_alloc (8); t->g_slice = TRUE; mxf_timestamp_write (&self->last_modified_date, t->data); - mxf_primer_pack_add_mapping (primer, 0x3b02, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3b02, &t->ul); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &version_ul, 16); + memcpy (&t->ul, &version_ul, 16); t->size = 2; t->data = g_slice_alloc (2); t->g_slice = TRUE; GST_WRITE_UINT16_BE (t->data, self->version); - mxf_primer_pack_add_mapping (primer, 0x3b05, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3b05, &t->ul); ret = g_list_prepend (ret, t); if (self->object_model_version) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &object_model_version_ul, 16); + memcpy (&t->ul, &object_model_version_ul, 16); t->size = 4; t->data = g_slice_alloc (4); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->object_model_version); - mxf_primer_pack_add_mapping (primer, 0x3b07, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3b07, &t->ul); ret = g_list_prepend (ret, t); } - if (!mxf_ul_is_zero (&self->primary_package_uid)) { + if (!mxf_uuid_is_zero (&self->primary_package_uid)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &primary_package_ul, 16); + memcpy (&t->ul, &primary_package_ul, 16); t->size = 16; t->data = g_slice_alloc (16); t->g_slice = TRUE; memcpy (t->data, &self->primary_package_uid, 16); - mxf_primer_pack_add_mapping (primer, 0x3b08, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3b08, &t->ul); ret = g_list_prepend (ret, t); } t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &identifications_ul, 16); + memcpy (&t->ul, &identifications_ul, 16); t->size = 8 + 16 * self->n_identifications; t->data = g_slice_alloc0 (t->size); t->g_slice = TRUE; - mxf_primer_pack_add_mapping (primer, 0x3b06, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3b06, &t->ul); GST_WRITE_UINT32_BE (t->data, self->n_identifications); GST_WRITE_UINT32_BE (t->data + 4, 16); for (i = 0; i < self->n_identifications; i++) { @@ -978,30 +978,30 @@ mxf_metadata_preface_write_tags (MXFMetadataBase * m, MXFPrimerPack * primer) ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &content_storage_ul, 16); + memcpy (&t->ul, &content_storage_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; - mxf_primer_pack_add_mapping (primer, 0x3b03, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3b03, &t->ul); memcpy (t->data, &MXF_METADATA_BASE (self->content_storage)->instance_uid, 16); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &operational_pattern_ul, 16); + memcpy (&t->ul, &operational_pattern_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; - mxf_primer_pack_add_mapping (primer, 0x3b09, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3b09, &t->ul); memcpy (t->data, &self->operational_pattern, 16); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &essence_containers_ul, 16); + memcpy (&t->ul, &essence_containers_ul, 16); t->size = 8 + 16 * self->n_essence_containers; t->data = g_slice_alloc0 (t->size); t->g_slice = TRUE; - mxf_primer_pack_add_mapping (primer, 0x3b0a, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3b0a, &t->ul); GST_WRITE_UINT32_BE (t->data, self->n_essence_containers); GST_WRITE_UINT32_BE (t->data + 4, 16); for (i = 0; i < self->n_essence_containers; i++) { @@ -1011,11 +1011,11 @@ mxf_metadata_preface_write_tags (MXFMetadataBase * m, MXFPrimerPack * primer) if (self->dm_schemes) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &dm_schemes_ul, 16); + memcpy (&t->ul, &dm_schemes_ul, 16); t->size = 8 + 16 * self->n_dm_schemes; t->data = g_slice_alloc0 (t->size); t->g_slice = TRUE; - mxf_primer_pack_add_mapping (primer, 0x3b0b, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3b0b, &t->ul); GST_WRITE_UINT32_BE (t->data, self->n_dm_schemes); GST_WRITE_UINT32_BE (t->data + 4, 16); for (i = 0; i < self->n_dm_schemes; i++) { @@ -1090,7 +1090,7 @@ mxf_metadata_identification_handle_tag (MXFMetadataBase * metadata, goto error; memcpy (&self->this_generation_uid, tag_data, 16); GST_DEBUG (" this generation uid = %s", - mxf_ul_to_string (&self->this_generation_uid, str)); + mxf_uuid_to_string (&self->this_generation_uid, str)); break; case 0x3c01: self->company_name = mxf_utf16_to_utf8 (tag_data, tag_size); @@ -1119,7 +1119,7 @@ mxf_metadata_identification_handle_tag (MXFMetadataBase * metadata, goto error; memcpy (&self->product_uid, tag_data, 16); GST_DEBUG (" product uid = %s", - mxf_ul_to_string (&self->product_uid, str)); + mxf_uuid_to_string (&self->product_uid, str)); break; case 0x3c06: if (!mxf_timestamp_parse (&self->modification_date, tag_data, tag_size)) @@ -1167,8 +1167,8 @@ mxf_metadata_identification_to_structure (MXFMetadataBase * m) MXFMetadataIdentification *self = MXF_METADATA_IDENTIFICATION (m); gchar str[48]; - if (!mxf_ul_is_zero (&self->this_generation_uid)) { - mxf_ul_to_string (&self->this_generation_uid, str); + if (!mxf_uuid_is_zero (&self->this_generation_uid)) { + mxf_uuid_to_string (&self->this_generation_uid, str); gst_structure_id_set (ret, MXF_QUARK (THIS_GENERATION_UID), G_TYPE_STRING, str, NULL); } @@ -1197,8 +1197,8 @@ mxf_metadata_identification_to_structure (MXFMetadataBase * m) gst_structure_id_set (ret, MXF_QUARK (VERSION_STRING), G_TYPE_STRING, self->version_string, NULL); - if (!mxf_ul_is_zero (&self->product_uid)) { - mxf_ul_to_string (&self->product_uid, str); + if (!mxf_uuid_is_zero (&self->product_uid)) { + mxf_uuid_to_string (&self->product_uid, str); gst_structure_id_set (ret, MXF_QUARK (PRODUCT_UID), G_TYPE_STRING, str, NULL); } @@ -1272,77 +1272,77 @@ mxf_metadata_identification_write_tags (MXFMetadataBase * m, if (self->company_name) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &company_name_ul, 16); + memcpy (&t->ul, &company_name_ul, 16); t->data = mxf_utf8_to_utf16 (self->company_name, &t->size); - mxf_primer_pack_add_mapping (primer, 0x3c01, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3c01, &t->ul); ret = g_list_prepend (ret, t); } if (self->product_name) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &product_name_ul, 16); + memcpy (&t->ul, &product_name_ul, 16); t->data = mxf_utf8_to_utf16 (self->product_name, &t->size); - mxf_primer_pack_add_mapping (primer, 0x3c02, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3c02, &t->ul); ret = g_list_prepend (ret, t); } if (!mxf_product_version_is_valid (&self->product_version)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &product_version_ul, 16); + memcpy (&t->ul, &product_version_ul, 16); t->size = 10; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; mxf_product_version_write (&self->product_version, t->data); - mxf_primer_pack_add_mapping (primer, 0x3c03, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3c03, &t->ul); ret = g_list_prepend (ret, t); } if (self->version_string) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &version_string_ul, 16); + memcpy (&t->ul, &version_string_ul, 16); t->data = mxf_utf8_to_utf16 (self->version_string, &t->size); - mxf_primer_pack_add_mapping (primer, 0x3c04, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3c04, &t->ul); ret = g_list_prepend (ret, t); } - if (!mxf_ul_is_zero (&self->product_uid)) { + if (!mxf_uuid_is_zero (&self->product_uid)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &product_uid_ul, 16); + memcpy (&t->ul, &product_uid_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &self->product_uid, 16); - mxf_primer_pack_add_mapping (primer, 0x3c05, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3c05, &t->ul); ret = g_list_prepend (ret, t); } if (!mxf_timestamp_is_unknown (&self->modification_date)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &modification_date_ul, 16); + memcpy (&t->ul, &modification_date_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; mxf_timestamp_write (&self->modification_date, t->data); - mxf_primer_pack_add_mapping (primer, 0x3c06, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3c06, &t->ul); ret = g_list_prepend (ret, t); } if (!mxf_product_version_is_valid (&self->toolkit_version)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &toolkit_version_ul, 16); + memcpy (&t->ul, &toolkit_version_ul, 16); t->size = 10; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; mxf_product_version_write (&self->toolkit_version, t->data); - mxf_primer_pack_add_mapping (primer, 0x3c07, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3c07, &t->ul); ret = g_list_prepend (ret, t); } if (self->platform) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &platform_ul, 16); + memcpy (&t->ul, &platform_ul, 16); t->data = mxf_utf8_to_utf16 (self->platform, &t->size); - mxf_primer_pack_add_mapping (primer, 0x3c08, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3c08, &t->ul); ret = g_list_prepend (ret, t); } @@ -1404,7 +1404,7 @@ mxf_metadata_content_storage_handle_tag (MXFMetadataBase * metadata, switch (tag) { case 0x1901: - if (!mxf_ul_array_parse (&self->packages_uids, &self->n_packages, + if (!mxf_uuid_array_parse (&self->packages_uids, &self->n_packages, tag_data, tag_size)) goto error; GST_DEBUG (" number of packages = %u", self->n_packages); @@ -1413,13 +1413,13 @@ mxf_metadata_content_storage_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_packages; i++) { GST_DEBUG (" package %u = %s", i, - mxf_ul_to_string (&self->packages_uids[i], str)); + mxf_uuid_to_string (&self->packages_uids[i], str)); } } #endif break; case 0x1902: - if (!mxf_ul_array_parse (&self->essence_container_data_uids, + if (!mxf_uuid_array_parse (&self->essence_container_data_uids, &self->n_essence_container_data, tag_data, tag_size)) goto error; @@ -1430,7 +1430,7 @@ mxf_metadata_content_storage_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_essence_container_data; i++) { GST_DEBUG (" essence container data %u = %s", i, - mxf_ul_to_string (&self->essence_container_data_uids[i], str)); + mxf_uuid_to_string (&self->essence_container_data_uids[i], str)); } } #endif @@ -1610,7 +1610,7 @@ mxf_metadata_content_storage_write_tags (MXFMetadataBase * m, if (self->packages) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &packages_ul, 16); + memcpy (&t->ul, &packages_ul, 16); t->size = 8 + 16 * self->n_packages; t->data = g_slice_alloc0 (t->size); t->g_slice = TRUE; @@ -1624,13 +1624,13 @@ mxf_metadata_content_storage_write_tags (MXFMetadataBase * m, &MXF_METADATA_BASE (self->packages[i])->instance_uid, 16); } - mxf_primer_pack_add_mapping (primer, 0x1901, &t->key); + mxf_primer_pack_add_mapping (primer, 0x1901, &t->ul); ret = g_list_prepend (ret, t); } if (self->essence_container_data) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &essence_container_data_ul, 16); + memcpy (&t->ul, &essence_container_data_ul, 16); t->size = 8 + 16 * self->n_essence_container_data; t->data = g_slice_alloc0 (t->size); t->g_slice = TRUE; @@ -1645,7 +1645,7 @@ mxf_metadata_content_storage_write_tags (MXFMetadataBase * m, 16); } - mxf_primer_pack_add_mapping (primer, 0x1902, &t->key); + mxf_primer_pack_add_mapping (primer, 0x1902, &t->ul); ret = g_list_prepend (ret, t); } @@ -1825,32 +1825,32 @@ mxf_metadata_essence_container_data_write_tags (MXFMetadataBase * m, }; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &linked_package_uid_ul, 16); + memcpy (&t->ul, &linked_package_uid_ul, 16); t->size = 32; t->data = g_slice_alloc0 (32); t->g_slice = TRUE; if (self->linked_package) memcpy (t->data, &self->linked_package->parent.package_uid, 32); - mxf_primer_pack_add_mapping (primer, 0x2701, &t->key); + mxf_primer_pack_add_mapping (primer, 0x2701, &t->ul); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &body_sid_ul, 16); + memcpy (&t->ul, &body_sid_ul, 16); t->size = 4; t->data = g_slice_alloc (4); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->body_sid); - mxf_primer_pack_add_mapping (primer, 0x3f07, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3f07, &t->ul); ret = g_list_prepend (ret, t); if (self->index_sid) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &index_sid_ul, 16); + memcpy (&t->ul, &index_sid_ul, 16); t->size = 4; t->data = g_slice_alloc (4); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->index_sid); - mxf_primer_pack_add_mapping (primer, 0x3f07, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3f07, &t->ul); ret = g_list_prepend (ret, t); } @@ -1939,7 +1939,7 @@ mxf_metadata_generic_package_handle_tag (MXFMetadataBase * metadata, mxf_timestamp_to_string (&self->package_modified_date, str)); break; case 0x4403: - if (!mxf_ul_array_parse (&self->tracks_uids, &self->n_tracks, tag_data, + if (!mxf_uuid_array_parse (&self->tracks_uids, &self->n_tracks, tag_data, tag_size)) goto error; @@ -1949,7 +1949,7 @@ mxf_metadata_generic_package_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_tracks; i++) { GST_DEBUG (" track %u = %s", i, - mxf_ul_to_string (&self->tracks_uids[i], str)); + mxf_uuid_to_string (&self->tracks_uids[i], str)); } } #endif @@ -2110,45 +2110,45 @@ mxf_metadata_generic_package_write_tags (MXFMetadataBase * m, }; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &package_uid_ul, 16); + memcpy (&t->ul, &package_uid_ul, 16); t->size = 32; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &self->package_uid, 32); - mxf_primer_pack_add_mapping (primer, 0x4401, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4401, &t->ul); ret = g_list_prepend (ret, t); if (self->name) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &name_ul, 16); + memcpy (&t->ul, &name_ul, 16); t->data = mxf_utf8_to_utf16 (self->name, &t->size); - mxf_primer_pack_add_mapping (primer, 0x4402, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4402, &t->ul); ret = g_list_prepend (ret, t); } t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &package_creation_date_ul, 16); + memcpy (&t->ul, &package_creation_date_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; mxf_timestamp_write (&self->package_creation_date, t->data); - mxf_primer_pack_add_mapping (primer, 0x4405, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4405, &t->ul); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &package_modified_date_ul, 16); + memcpy (&t->ul, &package_modified_date_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; mxf_timestamp_write (&self->package_modified_date, t->data); - mxf_primer_pack_add_mapping (primer, 0x4404, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4404, &t->ul); ret = g_list_prepend (ret, t); if (self->tracks) { guint i; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &tracks_ul, 16); + memcpy (&t->ul, &tracks_ul, 16); t->size = 8 + 16 * self->n_tracks; t->data = g_slice_alloc0 (t->size); t->g_slice = TRUE; @@ -2161,7 +2161,7 @@ mxf_metadata_generic_package_write_tags (MXFMetadataBase * m, memcpy (t->data + 8 + 16 * i, &MXF_METADATA_BASE (self->tracks[i])->instance_uid, 16); } - mxf_primer_pack_add_mapping (primer, 0x4403, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4403, &t->ul); ret = g_list_prepend (ret, t); } @@ -2320,7 +2320,7 @@ mxf_metadata_source_package_handle_tag (MXFMetadataBase * metadata, memcpy (&self->descriptor_uid, tag_data, 16); GST_DEBUG (" descriptor = %s", - mxf_ul_to_string (&self->descriptor_uid, str)); + mxf_uuid_to_string (&self->descriptor_uid, str)); break; default: ret = @@ -2350,7 +2350,7 @@ mxf_metadata_source_package_resolve (MXFMetadataBase * m, GHashTable * metadata) gboolean ret; MXFMetadataFileDescriptor *d; - if (mxf_ul_is_zero (&self->descriptor_uid)) + if (mxf_uuid_is_zero (&self->descriptor_uid)) return MXF_METADATA_BASE_CLASS (mxf_metadata_source_package_parent_class)->resolve (m, metadata); @@ -2469,12 +2469,12 @@ mxf_metadata_source_package_write_tags (MXFMetadataBase * m, if (self->descriptor) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &descriptor_ul, 16); + memcpy (&t->ul, &descriptor_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &MXF_METADATA_BASE (self->descriptor)->instance_uid, 16); - mxf_primer_pack_add_mapping (primer, 0x4701, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4701, &t->ul); ret = g_list_prepend (ret, t); } @@ -2550,7 +2550,7 @@ mxf_metadata_track_handle_tag (MXFMetadataBase * metadata, goto error; memcpy (&self->sequence_uid, tag_data, 16); GST_DEBUG (" sequence uid = %s", - mxf_ul_to_string (&self->sequence_uid, str)); + mxf_uuid_to_string (&self->sequence_uid, str)); break; default: ret = @@ -2665,38 +2665,38 @@ mxf_metadata_track_write_tags (MXFMetadataBase * m, MXFPrimerPack * primer) }; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &track_id_ul, 16); + memcpy (&t->ul, &track_id_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->track_id); - mxf_primer_pack_add_mapping (primer, 0x4801, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4801, &t->ul); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &track_number_ul, 16); + memcpy (&t->ul, &track_number_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->track_number); - mxf_primer_pack_add_mapping (primer, 0x4804, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4804, &t->ul); ret = g_list_prepend (ret, t); if (self->track_name) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &track_name_ul, 16); + memcpy (&t->ul, &track_name_ul, 16); t->data = mxf_utf8_to_utf16 (self->track_name, &t->size); - mxf_primer_pack_add_mapping (primer, 0x4802, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4802, &t->ul); ret = g_list_prepend (ret, t); } t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &sequence_ul, 16); + memcpy (&t->ul, &sequence_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &MXF_METADATA_BASE (self->sequence)->instance_uid, 16); - mxf_primer_pack_add_mapping (primer, 0x4803, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4803, &t->ul); ret = g_list_prepend (ret, t); return ret; @@ -2853,22 +2853,22 @@ mxf_metadata_timeline_track_write_tags (MXFMetadataBase * m, }; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &edit_rate_ul, 16); + memcpy (&t->ul, &edit_rate_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->edit_rate.n); GST_WRITE_UINT32_BE (t->data + 4, self->edit_rate.d); - mxf_primer_pack_add_mapping (primer, 0x4b01, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4b01, &t->ul); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &origin_ul, 16); + memcpy (&t->ul, &origin_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT64_BE (t->data, self->origin); - mxf_primer_pack_add_mapping (primer, 0x4b02, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4b02, &t->ul); ret = g_list_prepend (ret, t); return ret; @@ -2968,22 +2968,22 @@ mxf_metadata_event_track_write_tags (MXFMetadataBase * m, }; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &event_edit_rate_ul, 16); + memcpy (&t->ul, &event_edit_rate_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->event_edit_rate.n); GST_WRITE_UINT32_BE (t->data + 4, self->event_edit_rate.d); - mxf_primer_pack_add_mapping (primer, 0x4901, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4901, &t->ul); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &event_origin_ul, 16); + memcpy (&t->ul, &event_origin_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT64_BE (t->data, self->event_origin); - mxf_primer_pack_add_mapping (primer, 0x4902, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4902, &t->ul); ret = g_list_prepend (ret, t); return ret; @@ -3067,7 +3067,7 @@ mxf_metadata_sequence_handle_tag (MXFMetadataBase * metadata, GST_DEBUG (" duration = %" G_GINT64_FORMAT, self->duration); break; case 0x1001: - if (!mxf_ul_array_parse (&self->structural_components_uids, + if (!mxf_uuid_array_parse (&self->structural_components_uids, &self->n_structural_components, tag_data, tag_size)) goto error; @@ -3078,7 +3078,7 @@ mxf_metadata_sequence_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_structural_components; i++) { GST_DEBUG (" structural component %u = %s", i, - mxf_ul_to_string (&self->structural_components_uids[i], str)); + mxf_uuid_to_string (&self->structural_components_uids[i], str)); } } #endif @@ -3205,27 +3205,27 @@ mxf_metadata_sequence_write_tags (MXFMetadataBase * m, MXFPrimerPack * primer) }; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &data_definition_ul, 16); + memcpy (&t->ul, &data_definition_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &self->data_definition, 16); - mxf_primer_pack_add_mapping (primer, 0x0201, &t->key); + mxf_primer_pack_add_mapping (primer, 0x0201, &t->ul); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &duration_ul, 16); + memcpy (&t->ul, &duration_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT64_BE (t->data, self->duration); - mxf_primer_pack_add_mapping (primer, 0x0202, &t->key); + mxf_primer_pack_add_mapping (primer, 0x0202, &t->ul); ret = g_list_prepend (ret, t); if (self->structural_components) { guint i; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &structural_components_ul, 16); + memcpy (&t->ul, &structural_components_ul, 16); t->size = 8 + 16 * self->n_structural_components; t->data = g_slice_alloc0 (t->size); t->g_slice = TRUE; @@ -3241,7 +3241,7 @@ mxf_metadata_sequence_write_tags (MXFMetadataBase * m, MXFPrimerPack * primer) 16); } - mxf_primer_pack_add_mapping (primer, 0x1001, &t->key); + mxf_primer_pack_add_mapping (primer, 0x1001, &t->ul); ret = g_list_prepend (ret, t); } @@ -3352,21 +3352,21 @@ mxf_metadata_structural_component_write_tags (MXFMetadataBase * m, }; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &data_definition_ul, 16); + memcpy (&t->ul, &data_definition_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &self->data_definition, 16); - mxf_primer_pack_add_mapping (primer, 0x0201, &t->key); + mxf_primer_pack_add_mapping (primer, 0x0201, &t->ul); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &duration_ul, 16); + memcpy (&t->ul, &duration_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT64_BE (t->data, self->duration); - mxf_primer_pack_add_mapping (primer, 0x0202, &t->key); + mxf_primer_pack_add_mapping (primer, 0x0202, &t->ul); ret = g_list_prepend (ret, t); return ret; @@ -3480,30 +3480,30 @@ mxf_metadata_timecode_component_write_tags (MXFMetadataBase * m, }; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &rounded_timecode_base_ul, 16); + memcpy (&t->ul, &rounded_timecode_base_ul, 16); t->size = 2; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT16_BE (t->data, self->rounded_timecode_base); - mxf_primer_pack_add_mapping (primer, 0x1502, &t->key); + mxf_primer_pack_add_mapping (primer, 0x1502, &t->ul); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &start_timecode_ul, 16); + memcpy (&t->ul, &start_timecode_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT64_BE (t->data, self->start_timecode); - mxf_primer_pack_add_mapping (primer, 0x1501, &t->key); + mxf_primer_pack_add_mapping (primer, 0x1501, &t->ul); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &drop_frame_ul, 16); + memcpy (&t->ul, &drop_frame_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, (self->drop_frame) ? 1 : 0); - mxf_primer_pack_add_mapping (primer, 0x1503, &t->key); + mxf_primer_pack_add_mapping (primer, 0x1503, &t->ul); ret = g_list_prepend (ret, t); return ret; @@ -3664,30 +3664,30 @@ mxf_metadata_source_clip_write_tags (MXFMetadataBase * m, }; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &start_position_ul, 16); + memcpy (&t->ul, &start_position_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT64_BE (t->data, self->start_position); - mxf_primer_pack_add_mapping (primer, 0x1201, &t->key); + mxf_primer_pack_add_mapping (primer, 0x1201, &t->ul); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &source_package_id_ul, 16); + memcpy (&t->ul, &source_package_id_ul, 16); t->size = 32; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &self->source_package_id, 32); - mxf_primer_pack_add_mapping (primer, 0x1101, &t->key); + mxf_primer_pack_add_mapping (primer, 0x1101, &t->ul); ret = g_list_prepend (ret, t); t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &source_track_id_ul, 16); + memcpy (&t->ul, &source_track_id_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->source_track_id); - mxf_primer_pack_add_mapping (primer, 0x1102, &t->key); + mxf_primer_pack_add_mapping (primer, 0x1102, &t->ul); ret = g_list_prepend (ret, t); return ret; @@ -3839,7 +3839,7 @@ mxf_metadata_dm_source_clip_write_tags (MXFMetadataBase * m, guint i; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &track_ids_ul, 16); + memcpy (&t->ul, &track_ids_ul, 16); t->size = 8 + 4 * self->n_track_ids; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; @@ -3847,7 +3847,7 @@ mxf_metadata_dm_source_clip_write_tags (MXFMetadataBase * m, GST_WRITE_UINT32_BE (t->data + 4, 4); for (i = 0; i < self->n_track_ids; i++) GST_WRITE_UINT32_BE (t->data + 8 + i * 4, self->track_ids[i]); - mxf_primer_pack_add_mapping (primer, 0x6103, &t->key); + mxf_primer_pack_add_mapping (primer, 0x6103, &t->ul); ret = g_list_prepend (ret, t); } @@ -3954,7 +3954,7 @@ mxf_metadata_dm_segment_handle_tag (MXFMetadataBase * metadata, memcpy (&self->dm_framework_uid, tag_data, 16); GST_DEBUG (" DM framework = %s", - mxf_ul_to_string (&self->dm_framework_uid, str)); + mxf_uuid_to_string (&self->dm_framework_uid, str)); break; default: ret = @@ -4076,20 +4076,20 @@ mxf_metadata_dm_segment_write_tags (MXFMetadataBase * m, MXFPrimerPack * primer) if (self->event_start_position != -1) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &event_start_position_ul, 16); + memcpy (&t->ul, &event_start_position_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT64_BE (t->data, self->event_start_position); - mxf_primer_pack_add_mapping (primer, 0x0601, &t->key); + mxf_primer_pack_add_mapping (primer, 0x0601, &t->ul); ret = g_list_prepend (ret, t); } if (self->event_comment) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &event_comment_ul, 16); + memcpy (&t->ul, &event_comment_ul, 16); t->data = mxf_utf8_to_utf16 (self->event_comment, &t->size); - mxf_primer_pack_add_mapping (primer, 0x0602, &t->key); + mxf_primer_pack_add_mapping (primer, 0x0602, &t->ul); ret = g_list_prepend (ret, t); } @@ -4097,7 +4097,7 @@ mxf_metadata_dm_segment_write_tags (MXFMetadataBase * m, MXFPrimerPack * primer) guint i; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &track_ids_ul, 16); + memcpy (&t->ul, &track_ids_ul, 16); t->size = 8 + 4 * self->n_track_ids; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; @@ -4105,18 +4105,18 @@ mxf_metadata_dm_segment_write_tags (MXFMetadataBase * m, MXFPrimerPack * primer) GST_WRITE_UINT32_BE (t->data + 4, 4); for (i = 0; i < self->n_track_ids; i++) GST_WRITE_UINT32_BE (t->data + 8 + i * 4, self->track_ids[i]); - mxf_primer_pack_add_mapping (primer, 0x6102, &t->key); + mxf_primer_pack_add_mapping (primer, 0x6102, &t->ul); ret = g_list_prepend (ret, t); } if (self->dm_framework) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &dm_framework_ul, 16); + memcpy (&t->ul, &dm_framework_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &MXF_METADATA_BASE (self->dm_framework)->instance_uid, 16); - mxf_primer_pack_add_mapping (primer, 0x6101, &t->key); + mxf_primer_pack_add_mapping (primer, 0x6101, &t->ul); ret = g_list_prepend (ret, t); } @@ -4177,7 +4177,7 @@ mxf_metadata_generic_descriptor_handle_tag (MXFMetadataBase * metadata, switch (tag) { case 0x2f01: - if (!mxf_ul_array_parse (&self->locators_uids, &self->n_locators, + if (!mxf_uuid_array_parse (&self->locators_uids, &self->n_locators, tag_data, tag_size)) goto error; @@ -4187,7 +4187,7 @@ mxf_metadata_generic_descriptor_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_locators; i++) { GST_DEBUG (" locator %u = %s", i, - mxf_ul_to_string (&self->locators_uids[i], str)); + mxf_uuid_to_string (&self->locators_uids[i], str)); } } #endif @@ -4306,7 +4306,7 @@ mxf_metadata_generic_descriptor_write_tags (MXFMetadataBase * m, guint i; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &locators_ul, 16); + memcpy (&t->ul, &locators_ul, 16); t->size = 8 + 16 * self->n_locators;; t->data = g_slice_alloc0 (t->size); t->g_slice = TRUE; @@ -4318,7 +4318,7 @@ mxf_metadata_generic_descriptor_write_tags (MXFMetadataBase * m, memcpy (t->data + 8 + 16 * i, &MXF_METADATA_BASE (self->locators[i])->instance_uid, 16); } - mxf_primer_pack_add_mapping (primer, 0x2f01, &t->key); + mxf_primer_pack_add_mapping (primer, 0x2f01, &t->ul); ret = g_list_prepend (ret, t); } @@ -4476,53 +4476,53 @@ mxf_metadata_file_descriptor_write_tags (MXFMetadataBase * m, if (self->linked_track_id) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &linked_track_id_ul, 16); + memcpy (&t->ul, &linked_track_id_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->linked_track_id); - mxf_primer_pack_add_mapping (primer, 0x3006, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3006, &t->ul); ret = g_list_prepend (ret, t); } t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &sample_rate_ul, 16); + memcpy (&t->ul, &sample_rate_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->sample_rate.n); GST_WRITE_UINT32_BE (t->data + 4, self->sample_rate.d); - mxf_primer_pack_add_mapping (primer, 0x3001, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3001, &t->ul); ret = g_list_prepend (ret, t); if (self->container_duration > 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &container_duration_ul, 16); + memcpy (&t->ul, &container_duration_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT64_BE (t->data, self->container_duration); - mxf_primer_pack_add_mapping (primer, 0x3002, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3002, &t->ul); ret = g_list_prepend (ret, t); } t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &essence_container_ul, 16); + memcpy (&t->ul, &essence_container_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &self->essence_container, 16); - mxf_primer_pack_add_mapping (primer, 0x3004, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3004, &t->ul); ret = g_list_prepend (ret, t); if (!mxf_ul_is_zero (&self->codec)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &codec_ul, 16); + memcpy (&t->ul, &codec_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &self->codec, 16); - mxf_primer_pack_add_mapping (primer, 0x3005, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3005, &t->ul); ret = g_list_prepend (ret, t); } @@ -4960,267 +4960,267 @@ mxf_metadata_generic_picture_essence_descriptor_write_tags (MXFMetadataBase * m, if (self->signal_standard != 1) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &signal_standard_ul, 16); + memcpy (&t->ul, &signal_standard_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->signal_standard); - mxf_primer_pack_add_mapping (primer, 0x3215, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3215, &t->ul); ret = g_list_prepend (ret, t); } if (self->frame_layout != 255) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &frame_layout_ul, 16); + memcpy (&t->ul, &frame_layout_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->frame_layout); - mxf_primer_pack_add_mapping (primer, 0x320c, &t->key); + mxf_primer_pack_add_mapping (primer, 0x320c, &t->ul); ret = g_list_prepend (ret, t); } if (self->stored_width != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &stored_width_ul, 16); + memcpy (&t->ul, &stored_width_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->stored_width); - mxf_primer_pack_add_mapping (primer, 0x3203, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3203, &t->ul); ret = g_list_prepend (ret, t); } if (self->stored_height != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &stored_height_ul, 16); + memcpy (&t->ul, &stored_height_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->stored_height); - mxf_primer_pack_add_mapping (primer, 0x3202, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3202, &t->ul); ret = g_list_prepend (ret, t); } if (self->stored_f2_offset != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &stored_f2_offset_ul, 16); + memcpy (&t->ul, &stored_f2_offset_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->stored_f2_offset); - mxf_primer_pack_add_mapping (primer, 0x3216, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3216, &t->ul); ret = g_list_prepend (ret, t); } if (self->sampled_width != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &sampled_width_ul, 16); + memcpy (&t->ul, &sampled_width_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->sampled_width); - mxf_primer_pack_add_mapping (primer, 0x3205, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3205, &t->ul); ret = g_list_prepend (ret, t); } if (self->sampled_height != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &sampled_height_ul, 16); + memcpy (&t->ul, &sampled_height_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->sampled_height); - mxf_primer_pack_add_mapping (primer, 0x3204, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3204, &t->ul); ret = g_list_prepend (ret, t); } if (self->sampled_x_offset != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &sampled_x_offset_ul, 16); + memcpy (&t->ul, &sampled_x_offset_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->sampled_x_offset); - mxf_primer_pack_add_mapping (primer, 0x3206, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3206, &t->ul); ret = g_list_prepend (ret, t); } if (self->sampled_y_offset != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &sampled_y_offset_ul, 16); + memcpy (&t->ul, &sampled_y_offset_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->sampled_y_offset); - mxf_primer_pack_add_mapping (primer, 0x3207, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3207, &t->ul); ret = g_list_prepend (ret, t); } if (self->display_height != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &display_height_ul, 16); + memcpy (&t->ul, &display_height_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->display_height); - mxf_primer_pack_add_mapping (primer, 0x3208, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3208, &t->ul); ret = g_list_prepend (ret, t); } if (self->display_width != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &display_width_ul, 16); + memcpy (&t->ul, &display_width_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->display_width); - mxf_primer_pack_add_mapping (primer, 0x3209, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3209, &t->ul); ret = g_list_prepend (ret, t); } if (self->display_x_offset != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &display_x_offset_ul, 16); + memcpy (&t->ul, &display_x_offset_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->display_x_offset); - mxf_primer_pack_add_mapping (primer, 0x320a, &t->key); + mxf_primer_pack_add_mapping (primer, 0x320a, &t->ul); ret = g_list_prepend (ret, t); } if (self->display_y_offset != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &display_y_offset_ul, 16); + memcpy (&t->ul, &display_y_offset_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->display_y_offset); - mxf_primer_pack_add_mapping (primer, 0x320b, &t->key); + mxf_primer_pack_add_mapping (primer, 0x320b, &t->ul); ret = g_list_prepend (ret, t); } if (self->display_f2_offset != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &display_f2_offset_ul, 16); + memcpy (&t->ul, &display_f2_offset_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->display_f2_offset); - mxf_primer_pack_add_mapping (primer, 0x3217, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3217, &t->ul); ret = g_list_prepend (ret, t); } if (self->aspect_ratio.n != 0 && self->aspect_ratio.d != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &aspect_ratio_ul, 16); + memcpy (&t->ul, &aspect_ratio_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->aspect_ratio.n); GST_WRITE_UINT32_BE (t->data + 4, self->aspect_ratio.d); - mxf_primer_pack_add_mapping (primer, 0x320e, &t->key); + mxf_primer_pack_add_mapping (primer, 0x320e, &t->ul); ret = g_list_prepend (ret, t); } if (self->active_format_descriptor != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &active_format_descriptor_ul, 16); + memcpy (&t->ul, &active_format_descriptor_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->active_format_descriptor); - mxf_primer_pack_add_mapping (primer, 0x3218, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3218, &t->ul); ret = g_list_prepend (ret, t); } if (self->video_line_map[0] != 0 || self->video_line_map[1] != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &video_line_map_ul, 16); + memcpy (&t->ul, &video_line_map_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT64_BE (t->data, self->video_line_map[0]); GST_WRITE_UINT64_BE (t->data + 8, self->video_line_map[1]); - mxf_primer_pack_add_mapping (primer, 0x320d, &t->key); + mxf_primer_pack_add_mapping (primer, 0x320d, &t->ul); ret = g_list_prepend (ret, t); } if (self->alpha_transparency != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &alpha_transparency_ul, 16); + memcpy (&t->ul, &alpha_transparency_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->alpha_transparency); - mxf_primer_pack_add_mapping (primer, 0x320f, &t->key); + mxf_primer_pack_add_mapping (primer, 0x320f, &t->ul); ret = g_list_prepend (ret, t); } if (!mxf_ul_is_zero (&self->capture_gamma)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &capture_gamma_ul, 16); + memcpy (&t->ul, &capture_gamma_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &self->capture_gamma, 16); - mxf_primer_pack_add_mapping (primer, 0x3210, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3210, &t->ul); ret = g_list_prepend (ret, t); } if (self->image_alignment_offset != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &image_alignment_offset_ul, 16); + memcpy (&t->ul, &image_alignment_offset_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->image_alignment_offset); - mxf_primer_pack_add_mapping (primer, 0x3211, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3211, &t->ul); ret = g_list_prepend (ret, t); } if (self->image_start_offset != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &image_start_offset_ul, 16); + memcpy (&t->ul, &image_start_offset_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->image_start_offset); - mxf_primer_pack_add_mapping (primer, 0x3213, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3213, &t->ul); ret = g_list_prepend (ret, t); } if (self->image_end_offset != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &image_end_offset_ul, 16); + memcpy (&t->ul, &image_end_offset_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->image_end_offset); - mxf_primer_pack_add_mapping (primer, 0x3214, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3214, &t->ul); ret = g_list_prepend (ret, t); } if (self->field_dominance != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &field_dominance_ul, 16); + memcpy (&t->ul, &field_dominance_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->field_dominance); - mxf_primer_pack_add_mapping (primer, 0x3212, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3212, &t->ul); ret = g_list_prepend (ret, t); } if (!mxf_ul_is_zero (&self->picture_essence_coding)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &picture_essence_coding_ul, 16); + memcpy (&t->ul, &picture_essence_coding_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &self->picture_essence_coding, 16); - mxf_primer_pack_add_mapping (primer, 0x3201, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3201, &t->ul); ret = g_list_prepend (ret, t); } @@ -5538,88 +5538,88 @@ mxf_metadata_generic_sound_essence_descriptor_write_tags (MXFMetadataBase * m, if (self->audio_sampling_rate.d && self->audio_sampling_rate.n) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &audio_sampling_rate_ul, 16); + memcpy (&t->ul, &audio_sampling_rate_ul, 16); t->size = 8; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->audio_sampling_rate.n); GST_WRITE_UINT32_BE (t->data + 4, self->audio_sampling_rate.d); - mxf_primer_pack_add_mapping (primer, 0x3d03, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d03, &t->ul); ret = g_list_prepend (ret, t); } t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &locked_ul, 16); + memcpy (&t->ul, &locked_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, (self->locked) ? 1 : 0); - mxf_primer_pack_add_mapping (primer, 0x3d02, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d02, &t->ul); ret = g_list_prepend (ret, t); if (self->audio_ref_level) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &audio_ref_level_ul, 16); + memcpy (&t->ul, &audio_ref_level_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->audio_ref_level); - mxf_primer_pack_add_mapping (primer, 0x3d04, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d04, &t->ul); ret = g_list_prepend (ret, t); } if (self->electro_spatial_formulation != 255) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &electro_spatial_formulation_ul, 16); + memcpy (&t->ul, &electro_spatial_formulation_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->electro_spatial_formulation); - mxf_primer_pack_add_mapping (primer, 0x3d05, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d05, &t->ul); ret = g_list_prepend (ret, t); } if (self->channel_count) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &channel_count_ul, 16); + memcpy (&t->ul, &channel_count_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->channel_count); - mxf_primer_pack_add_mapping (primer, 0x3d07, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d07, &t->ul); ret = g_list_prepend (ret, t); } if (self->quantization_bits) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &quantization_bits_ul, 16); + memcpy (&t->ul, &quantization_bits_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->quantization_bits); - mxf_primer_pack_add_mapping (primer, 0x3d01, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d01, &t->ul); ret = g_list_prepend (ret, t); } if (self->dial_norm != 0) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &dial_norm_ul, 16); + memcpy (&t->ul, &dial_norm_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->dial_norm); - mxf_primer_pack_add_mapping (primer, 0x3d0c, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d0c, &t->ul); ret = g_list_prepend (ret, t); } if (!mxf_ul_is_zero (&self->sound_essence_compression)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &sound_essence_compression_ul, 16); + memcpy (&t->ul, &sound_essence_compression_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &self->sound_essence_compression, 16); - mxf_primer_pack_add_mapping (primer, 0x3d06, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3d06, &t->ul); ret = g_list_prepend (ret, t); } @@ -5908,111 +5908,111 @@ mxf_metadata_cdci_picture_essence_descriptor_write_tags (MXFMetadataBase * m, if (self->component_depth) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &component_depth_ul, 16); + memcpy (&t->ul, &component_depth_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->component_depth); - mxf_primer_pack_add_mapping (primer, 0x3301, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3301, &t->ul); ret = g_list_prepend (ret, t); } if (self->horizontal_subsampling) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &horizontal_subsampling_ul, 16); + memcpy (&t->ul, &horizontal_subsampling_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->horizontal_subsampling); - mxf_primer_pack_add_mapping (primer, 0x3302, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3302, &t->ul); ret = g_list_prepend (ret, t); } if (self->vertical_subsampling) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &vertical_subsampling_ul, 16); + memcpy (&t->ul, &vertical_subsampling_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->vertical_subsampling); - mxf_primer_pack_add_mapping (primer, 0x3308, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3308, &t->ul); ret = g_list_prepend (ret, t); } if (self->color_siting != 0xff) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &color_siting_ul, 16); + memcpy (&t->ul, &color_siting_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->color_siting); - mxf_primer_pack_add_mapping (primer, 0x3303, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3303, &t->ul); ret = g_list_prepend (ret, t); } if (self->reversed_byte_order) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &reversed_byte_order_ul, 16); + memcpy (&t->ul, &reversed_byte_order_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, (self->reversed_byte_order) ? 1 : 0); - mxf_primer_pack_add_mapping (primer, 0x330b, &t->key); + mxf_primer_pack_add_mapping (primer, 0x330b, &t->ul); ret = g_list_prepend (ret, t); } if (self->padding_bits) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &padding_bits_ul, 16); + memcpy (&t->ul, &padding_bits_ul, 16); t->size = 2; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT16_BE (t->data, self->padding_bits); - mxf_primer_pack_add_mapping (primer, 0x3307, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3307, &t->ul); ret = g_list_prepend (ret, t); } if (self->alpha_sample_depth) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &alpha_sample_depth_ul, 16); + memcpy (&t->ul, &alpha_sample_depth_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->alpha_sample_depth); - mxf_primer_pack_add_mapping (primer, 0x3309, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3309, &t->ul); ret = g_list_prepend (ret, t); } if (self->black_ref_level) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &black_ref_level_ul, 16); + memcpy (&t->ul, &black_ref_level_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->black_ref_level); - mxf_primer_pack_add_mapping (primer, 0x3304, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3304, &t->ul); ret = g_list_prepend (ret, t); } if (self->white_ref_level) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &white_ref_level_ul, 16); + memcpy (&t->ul, &white_ref_level_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->white_ref_level); - mxf_primer_pack_add_mapping (primer, 0x3305, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3305, &t->ul); ret = g_list_prepend (ret, t); } if (self->color_range) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &color_range_ul, 16); + memcpy (&t->ul, &color_range_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->color_range); - mxf_primer_pack_add_mapping (primer, 0x3306, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3306, &t->ul); ret = g_list_prepend (ret, t); } @@ -6234,67 +6234,67 @@ mxf_metadata_rgba_picture_essence_descriptor_write_tags (MXFMetadataBase * m, if (self->component_max_ref != 255) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &component_max_ref_ul, 16); + memcpy (&t->ul, &component_max_ref_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->component_max_ref); - mxf_primer_pack_add_mapping (primer, 0x3406, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3406, &t->ul); ret = g_list_prepend (ret, t); } if (self->component_min_ref) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &component_min_ref_ul, 16); + memcpy (&t->ul, &component_min_ref_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->component_min_ref); - mxf_primer_pack_add_mapping (primer, 0x3407, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3407, &t->ul); ret = g_list_prepend (ret, t); } if (self->alpha_max_ref != 255) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &alpha_max_ref_ul, 16); + memcpy (&t->ul, &alpha_max_ref_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->alpha_max_ref); - mxf_primer_pack_add_mapping (primer, 0x3408, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3408, &t->ul); ret = g_list_prepend (ret, t); } if (self->alpha_min_ref) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &alpha_min_ref_ul, 16); + memcpy (&t->ul, &alpha_min_ref_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->alpha_min_ref); - mxf_primer_pack_add_mapping (primer, 0x3409, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3409, &t->ul); ret = g_list_prepend (ret, t); } if (self->scanning_direction) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &scanning_direction_ul, 16); + memcpy (&t->ul, &scanning_direction_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->scanning_direction); - mxf_primer_pack_add_mapping (primer, 0x3405, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3405, &t->ul); ret = g_list_prepend (ret, t); } if (self->pixel_layout) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &pixel_layout_ul, 16); + memcpy (&t->ul, &pixel_layout_ul, 16); t->size = 2 * self->n_pixel_layout + 2; t->data = g_slice_alloc0 (t->size); t->g_slice = TRUE; memcpy (t->data, self->pixel_layout, self->n_pixel_layout * 2); - mxf_primer_pack_add_mapping (primer, 0x3401, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3401, &t->ul); ret = g_list_prepend (ret, t); } @@ -6411,12 +6411,12 @@ mxf_metadata_generic_data_essence_descriptor_write_tags (MXFMetadataBase * m, if (!mxf_ul_is_zero (&self->data_essence_coding)) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &data_essence_coding_ul, 16); + memcpy (&t->ul, &data_essence_coding_ul, 16); t->size = 16; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; memcpy (t->data, &self->data_essence_coding, 16); - mxf_primer_pack_add_mapping (primer, 0x3e01, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3e01, &t->ul); ret = g_list_prepend (ret, t); } @@ -6479,7 +6479,7 @@ mxf_metadata_multiple_descriptor_handle_tag (MXFMetadataBase * metadata, switch (tag) { case 0x3f01: - if (!mxf_ul_array_parse (&self->sub_descriptors_uids, + if (!mxf_uuid_array_parse (&self->sub_descriptors_uids, &self->n_sub_descriptors, tag_data, tag_size)) goto error; @@ -6489,7 +6489,7 @@ mxf_metadata_multiple_descriptor_handle_tag (MXFMetadataBase * metadata, guint i; for (i = 0; i < self->n_sub_descriptors; i++) { GST_DEBUG (" sub descriptor %u = %s", i, - mxf_ul_to_string (&self->sub_descriptors_uids[i], str)); + mxf_uuid_to_string (&self->sub_descriptors_uids[i], str)); } } #endif @@ -6607,7 +6607,7 @@ mxf_metadata_multiple_descriptor_write_tags (MXFMetadataBase * m, guint i; t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &sub_descriptors_ul, 16); + memcpy (&t->ul, &sub_descriptors_ul, 16); t->size = 8 + 16 * self->n_sub_descriptors; t->data = g_slice_alloc0 (t->size); t->g_slice = TRUE; @@ -6620,7 +6620,7 @@ mxf_metadata_multiple_descriptor_write_tags (MXFMetadataBase * m, memcpy (t->data + 8 + 16 * i, &MXF_METADATA_BASE (self->sub_descriptors[i])->instance_uid, 16); } - mxf_primer_pack_add_mapping (primer, 0x3f01, &t->key); + mxf_primer_pack_add_mapping (primer, 0x3f01, &t->ul); ret = g_list_prepend (ret, t); } @@ -6733,9 +6733,9 @@ mxf_metadata_text_locator_write_tags (MXFMetadataBase * m, if (self->locator_name) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &locator_name_ul, 16); + memcpy (&t->ul, &locator_name_ul, 16); t->data = mxf_utf8_to_utf16 (self->locator_name, &t->size); - mxf_primer_pack_add_mapping (primer, 0x4101, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4101, &t->ul); ret = g_list_prepend (ret, t); } @@ -6832,9 +6832,9 @@ mxf_metadata_network_locator_write_tags (MXFMetadataBase * m, if (self->url_string) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &url_string_ul, 16); + memcpy (&t->ul, &url_string_ul, 16); t->data = mxf_utf8_to_utf16 (self->url_string, &t->size); - mxf_primer_pack_add_mapping (primer, 0x4001, &t->key); + mxf_primer_pack_add_mapping (primer, 0x4001, &t->ul); ret = g_list_prepend (ret, t); } @@ -6992,7 +6992,7 @@ mxf_descriptive_metadata_framework_get_type (void) GHashTable * mxf_metadata_hash_table_new (void) { - return g_hash_table_new_full ((GHashFunc) mxf_ul_hash, - (GEqualFunc) mxf_ul_is_equal, (GDestroyNotify) NULL, + return g_hash_table_new_full ((GHashFunc) mxf_uuid_hash, + (GEqualFunc) mxf_uuid_is_equal, (GDestroyNotify) NULL, (GDestroyNotify) gst_mini_object_unref); } diff --git a/gst/mxf/mxfmetadata.h b/gst/mxf/mxfmetadata.h index bbdbc62f..b5e45b12 100644 --- a/gst/mxf/mxfmetadata.h +++ b/gst/mxf/mxfmetadata.h @@ -370,8 +370,8 @@ typedef enum { struct _MXFMetadataBase { GstMiniObject parent; - MXFUL instance_uid; - MXFUL generation_uid; + MXFUUID instance_uid; + MXFUUID generation_uid; guint64 offset; @@ -409,14 +409,14 @@ struct _MXFMetadataPreface { guint32 object_model_version; - MXFUL primary_package_uid; + MXFUUID primary_package_uid; MXFMetadataGenericPackage *primary_package; guint32 n_identifications; - MXFUL *identifications_uids; + MXFUUID *identifications_uids; MXFMetadataIdentification **identifications; - MXFUL content_storage_uid; + MXFUUID content_storage_uid; MXFMetadataContentStorage *content_storage; MXFUL operational_pattern; @@ -431,7 +431,7 @@ struct _MXFMetadataPreface { struct _MXFMetadataIdentification { MXFMetadata parent; - MXFUL this_generation_uid; + MXFUUID this_generation_uid; gchar *company_name; @@ -440,7 +440,7 @@ struct _MXFMetadataIdentification { gchar *version_string; - MXFUL product_uid; + MXFUUID product_uid; MXFTimestamp modification_date; @@ -453,11 +453,11 @@ struct _MXFMetadataContentStorage { MXFMetadata parent; guint32 n_packages; - MXFUL *packages_uids; + MXFUUID *packages_uids; MXFMetadataGenericPackage **packages; guint32 n_essence_container_data; - MXFUL *essence_container_data_uids; + MXFUUID *essence_container_data_uids; MXFMetadataEssenceContainerData **essence_container_data; }; @@ -481,7 +481,7 @@ struct _MXFMetadataGenericPackage { MXFTimestamp package_modified_date; guint32 n_tracks; - MXFUL *tracks_uids; + MXFUUID *tracks_uids; MXFMetadataTrack **tracks; guint n_timecode_tracks; @@ -494,7 +494,7 @@ struct _MXFMetadataSourcePackage { MXFMetadataGenericPackage parent; - MXFUL descriptor_uid; + MXFUUID descriptor_uid; MXFMetadataGenericDescriptor *descriptor; gboolean top_level; @@ -521,7 +521,7 @@ struct _MXFMetadataTrack { gchar *track_name; - MXFUL sequence_uid; + MXFUUID sequence_uid; MXFMetadataSequence *sequence; MXFMetadataTrackType type; @@ -552,7 +552,7 @@ struct _MXFMetadataSequence { gint64 duration; guint32 n_structural_components; - MXFUL *structural_components_uids; + MXFUUID *structural_components_uids; MXFMetadataStructuralComponent **structural_components; }; @@ -597,7 +597,7 @@ struct _MXFMetadataDMSegment { guint32 n_track_ids; guint32 *track_ids; - MXFUL dm_framework_uid; + MXFUUID dm_framework_uid; MXFDescriptiveMetadataFramework *dm_framework; }; @@ -605,7 +605,7 @@ struct _MXFMetadataGenericDescriptor { MXFMetadata parent; guint32 n_locators; - MXFUL *locators_uids; + MXFUUID *locators_uids; MXFMetadataLocator **locators; }; @@ -713,7 +713,7 @@ struct _MXFMetadataGenericDataEssenceDescriptor { struct _MXFMetadataMultipleDescriptor { MXFMetadataFileDescriptor parent; - MXFUL *sub_descriptors_uids; + MXFUUID *sub_descriptors_uids; guint32 n_sub_descriptors; MXFMetadataGenericDescriptor **sub_descriptors; }; diff --git a/gst/mxf/mxfmpeg.c b/gst/mxf/mxfmpeg.c index e9269810..eb3f9167 100644 --- a/gst/mxf/mxfmpeg.c +++ b/gst/mxf/mxfmpeg.c @@ -257,111 +257,111 @@ mxf_metadata_mpeg_video_descriptor_write_tags (MXFMetadataBase * m, if (self->single_sequence != -1) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &_single_sequence_ul, 16); + memcpy (&t->ul, &_single_sequence_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, (self->single_sequence) ? 1 : 0); - mxf_primer_pack_add_mapping (primer, 0, &t->key); + mxf_primer_pack_add_mapping (primer, 0, &t->ul); ret = g_list_prepend (ret, t); } if (self->const_b_frames) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &_constant_b_frames_ul, 16); + memcpy (&t->ul, &_constant_b_frames_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, (self->const_b_frames) ? 1 : 0); - mxf_primer_pack_add_mapping (primer, 0, &t->key); + mxf_primer_pack_add_mapping (primer, 0, &t->ul); ret = g_list_prepend (ret, t); } if (self->coded_content_type) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &_coded_content_type_ul, 16); + memcpy (&t->ul, &_coded_content_type_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->coded_content_type); - mxf_primer_pack_add_mapping (primer, 0, &t->key); + mxf_primer_pack_add_mapping (primer, 0, &t->ul); ret = g_list_prepend (ret, t); } if (self->low_delay) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &_low_delay_ul, 16); + memcpy (&t->ul, &_low_delay_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, (self->low_delay) ? 1 : 0); - mxf_primer_pack_add_mapping (primer, 0, &t->key); + mxf_primer_pack_add_mapping (primer, 0, &t->ul); ret = g_list_prepend (ret, t); } if (self->closed_gop) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &_closed_gop_ul, 16); + memcpy (&t->ul, &_closed_gop_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, (self->closed_gop) ? 1 : 0); - mxf_primer_pack_add_mapping (primer, 0, &t->key); + mxf_primer_pack_add_mapping (primer, 0, &t->ul); ret = g_list_prepend (ret, t); } if (self->identical_gop) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &_identical_gop_ul, 16); + memcpy (&t->ul, &_identical_gop_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, (self->identical_gop) ? 1 : 0); - mxf_primer_pack_add_mapping (primer, 0, &t->key); + mxf_primer_pack_add_mapping (primer, 0, &t->ul); ret = g_list_prepend (ret, t); } if (self->max_gop) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &_identical_gop_ul, 16); + memcpy (&t->ul, &_identical_gop_ul, 16); t->size = 2; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT16_BE (t->data, self->max_gop); - mxf_primer_pack_add_mapping (primer, 0, &t->key); + mxf_primer_pack_add_mapping (primer, 0, &t->ul); ret = g_list_prepend (ret, t); } if (self->b_picture_count) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &_b_picture_count_ul, 16); + memcpy (&t->ul, &_b_picture_count_ul, 16); t->size = 2; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT16_BE (t->data, self->b_picture_count); - mxf_primer_pack_add_mapping (primer, 0, &t->key); + mxf_primer_pack_add_mapping (primer, 0, &t->ul); ret = g_list_prepend (ret, t); } if (self->bitrate) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &_bitrate_ul, 16); + memcpy (&t->ul, &_bitrate_ul, 16); t->size = 4; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT32_BE (t->data, self->bitrate); - mxf_primer_pack_add_mapping (primer, 0, &t->key); + mxf_primer_pack_add_mapping (primer, 0, &t->ul); ret = g_list_prepend (ret, t); } if (self->profile_and_level) { t = g_slice_new0 (MXFLocalTag); - memcpy (&t->key, &_profile_and_level_ul, 16); + memcpy (&t->ul, &_profile_and_level_ul, 16); t->size = 1; t->data = g_slice_alloc (t->size); t->g_slice = TRUE; GST_WRITE_UINT8 (t->data, self->profile_and_level); - mxf_primer_pack_add_mapping (primer, 0, &t->key); + mxf_primer_pack_add_mapping (primer, 0, &t->ul); ret = g_list_prepend (ret, t); } @@ -1197,7 +1197,7 @@ mxf_mpeg_video_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps, codec_data = gst_value_get_buffer (v); t->size = GST_BUFFER_SIZE (codec_data); t->data = g_memdup (GST_BUFFER_DATA (codec_data), t->size); - memcpy (&t->key, &sony_mpeg4_extradata, 16); + memcpy (&t->ul, &sony_mpeg4_extradata, 16); mxf_local_tag_insert (t, &MXF_METADATA_BASE (ret)->other_tags); } } diff --git a/gst/mxf/mxfmux.c b/gst/mxf/mxfmux.c index 0052d2e1..d7658dbb 100644 --- a/gst/mxf/mxfmux.c +++ b/gst/mxf/mxfmux.c @@ -265,7 +265,7 @@ gst_mxf_mux_setcaps (GstPad * pad, GstCaps * caps) GstMXFMux *mux = GST_MXF_MUX (gst_pad_get_parent (pad)); GstMXFMuxPad *cpad = (GstMXFMuxPad *) gst_pad_get_element_private (pad); gboolean ret = TRUE; - MXFUL d_instance_uid = { {0,} }; + MXFUUID d_instance_uid = { {0,} }; MXFMetadataFileDescriptor *old_descriptor = cpad->descriptor; GST_DEBUG_OBJECT (pad, "Setting caps %" GST_PTR_FORMAT, caps); @@ -290,8 +290,8 @@ gst_mxf_mux_setcaps (GstPad * pad, GstCaps * caps) return FALSE; } - if (mxf_ul_is_zero (&d_instance_uid)) - mxf_ul_set (&d_instance_uid, mux->metadata); + if (mxf_uuid_is_zero (&d_instance_uid)) + mxf_uuid_init (&d_instance_uid, mux->metadata); memcpy (&MXF_METADATA_BASE (cpad->descriptor)->instance_uid, &d_instance_uid, 16); @@ -432,7 +432,8 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) /* Preface */ mux->preface = (MXFMetadataPreface *) gst_mini_object_new (MXF_TYPE_METADATA_PREFACE); - mxf_ul_set (&MXF_METADATA_BASE (mux->preface)->instance_uid, mux->metadata); + mxf_uuid_init (&MXF_METADATA_BASE (mux->preface)->instance_uid, + mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (mux->preface)->instance_uid, mux->preface); @@ -470,7 +471,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mux->preface->essence_containers = (MXFUL *) g_array_free (tmp, FALSE); /* This will later be used as UID for the material package */ - mxf_ul_set (&mux->preface->primary_package_uid, mux->metadata); + mxf_uuid_init (&mux->preface->primary_package_uid, mux->metadata); /* Identifications */ { @@ -487,12 +488,12 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) (MXFMetadataIdentification *) gst_mini_object_new (MXF_TYPE_METADATA_IDENTIFICATION); - mxf_ul_set (&MXF_METADATA_BASE (identification)->instance_uid, + mxf_uuid_init (&MXF_METADATA_BASE (identification)->instance_uid, mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (identification)->instance_uid, identification); - mxf_ul_set (&identification->this_generation_uid, NULL); + mxf_uuid_init (&identification->this_generation_uid, NULL); identification->company_name = g_strdup ("GStreamer"); identification->product_name = g_strdup ("GStreamer Multimedia Framework"); @@ -544,7 +545,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) cstorage = mux->preface->content_storage = (MXFMetadataContentStorage *) gst_mini_object_new (MXF_TYPE_METADATA_CONTENT_STORAGE); - mxf_ul_set (&MXF_METADATA_BASE (cstorage)->instance_uid, mux->metadata); + mxf_uuid_init (&MXF_METADATA_BASE (cstorage)->instance_uid, mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (cstorage)->instance_uid, cstorage); @@ -557,14 +558,14 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) cstorage->packages[1] = (MXFMetadataGenericPackage *) gst_mini_object_new (MXF_TYPE_METADATA_SOURCE_PACKAGE); - mxf_ul_set (&MXF_METADATA_BASE (cstorage->packages[1])->instance_uid, + mxf_uuid_init (&MXF_METADATA_BASE (cstorage->packages[1])->instance_uid, mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (cstorage->packages[1])->instance_uid, cstorage->packages[1]); p = (MXFMetadataSourcePackage *) cstorage->packages[1]; - mxf_umid_set (&p->parent.package_uid); + mxf_umid_init (&p->parent.package_uid); p->parent.name = g_strdup ("Source package"); memcpy (&p->parent.package_creation_date, &mux->preface->last_modified_date, sizeof (MXFTimestamp)); @@ -584,7 +585,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) d->sub_descriptors = g_new0 (MXFMetadataGenericDescriptor *, p->parent.n_tracks); - mxf_ul_set (&MXF_METADATA_BASE (d)->instance_uid, mux->metadata); + mxf_uuid_init (&MXF_METADATA_BASE (d)->instance_uid, mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (d)->instance_uid, d); } @@ -603,7 +604,8 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) p->parent.tracks[n] = (MXFMetadataTrack *) gst_mini_object_new (MXF_TYPE_METADATA_TIMELINE_TRACK); track = (MXFMetadataTimelineTrack *) p->parent.tracks[n]; - mxf_ul_set (&MXF_METADATA_BASE (track)->instance_uid, mux->metadata); + mxf_uuid_init (&MXF_METADATA_BASE (track)->instance_uid, + mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (track)->instance_uid, track); @@ -618,7 +620,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) sequence = track->parent.sequence = (MXFMetadataSequence *) gst_mini_object_new (MXF_TYPE_METADATA_SEQUENCE); - mxf_ul_set (&MXF_METADATA_BASE (sequence)->instance_uid, + mxf_uuid_init (&MXF_METADATA_BASE (sequence)->instance_uid, mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (sequence)->instance_uid, sequence); @@ -634,7 +636,8 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) gst_mini_object_new (MXF_TYPE_METADATA_SOURCE_CLIP); sequence->structural_components[0] = (MXFMetadataStructuralComponent *) clip; - mxf_ul_set (&MXF_METADATA_BASE (clip)->instance_uid, mux->metadata); + mxf_uuid_init (&MXF_METADATA_BASE (clip)->instance_uid, + mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (clip)->instance_uid, clip); @@ -673,7 +676,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) cstorage->packages[0]); p = (MXFMetadataMaterialPackage *) cstorage->packages[0]; - mxf_umid_set (&p->package_uid); + mxf_umid_init (&p->package_uid); p->name = g_strdup ("Material package"); memcpy (&p->package_creation_date, &mux->preface->last_modified_date, sizeof (MXFTimestamp)); @@ -704,7 +707,8 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) p->tracks[n] = (MXFMetadataTrack *) gst_mini_object_new (MXF_TYPE_METADATA_TIMELINE_TRACK); track = (MXFMetadataTimelineTrack *) p->tracks[n]; - mxf_ul_set (&MXF_METADATA_BASE (track)->instance_uid, mux->metadata); + mxf_uuid_init (&MXF_METADATA_BASE (track)->instance_uid, + mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (track)->instance_uid, track); @@ -736,7 +740,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) sequence = track->parent.sequence = (MXFMetadataSequence *) gst_mini_object_new (MXF_TYPE_METADATA_SEQUENCE); - mxf_ul_set (&MXF_METADATA_BASE (sequence)->instance_uid, + mxf_uuid_init (&MXF_METADATA_BASE (sequence)->instance_uid, mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (sequence)->instance_uid, sequence); @@ -751,7 +755,8 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) gst_mini_object_new (MXF_TYPE_METADATA_SOURCE_CLIP); sequence->structural_components[0] = (MXFMetadataStructuralComponent *) clip; - mxf_ul_set (&MXF_METADATA_BASE (clip)->instance_uid, mux->metadata); + mxf_uuid_init (&MXF_METADATA_BASE (clip)->instance_uid, + mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (clip)->instance_uid, clip); @@ -776,7 +781,8 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) p->tracks[n] = (MXFMetadataTrack *) gst_mini_object_new (MXF_TYPE_METADATA_TIMELINE_TRACK); track = (MXFMetadataTimelineTrack *) p->tracks[n]; - mxf_ul_set (&MXF_METADATA_BASE (track)->instance_uid, mux->metadata); + mxf_uuid_init (&MXF_METADATA_BASE (track)->instance_uid, + mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (track)->instance_uid, track); @@ -788,7 +794,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) sequence = track->parent.sequence = (MXFMetadataSequence *) gst_mini_object_new (MXF_TYPE_METADATA_SEQUENCE); - mxf_ul_set (&MXF_METADATA_BASE (sequence)->instance_uid, + mxf_uuid_init (&MXF_METADATA_BASE (sequence)->instance_uid, mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (sequence)->instance_uid, sequence); @@ -805,7 +811,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) gst_mini_object_new (MXF_TYPE_METADATA_TIMECODE_COMPONENT); sequence->structural_components[0] = (MXFMetadataStructuralComponent *) component; - mxf_ul_set (&MXF_METADATA_BASE (component)->instance_uid, + mxf_uuid_init (&MXF_METADATA_BASE (component)->instance_uid, mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (component)->instance_uid, component); @@ -860,7 +866,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) g_new0 (MXFMetadataEssenceContainerData *, 1); cstorage->essence_container_data[0] = (MXFMetadataEssenceContainerData *) gst_mini_object_new (MXF_TYPE_METADATA_ESSENCE_CONTAINER_DATA); - mxf_ul_set (&MXF_METADATA_BASE (cstorage->essence_container_data[0])-> + mxf_uuid_init (&MXF_METADATA_BASE (cstorage->essence_container_data[0])-> instance_uid, mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (cstorage->essence_container_data[0])->instance_uid, diff --git a/gst/mxf/mxftypes.c b/gst/mxf/mxftypes.c index 5660ec7f..989203ef 100644 --- a/gst/mxf/mxftypes.c +++ b/gst/mxf/mxftypes.c @@ -188,7 +188,7 @@ mxf_ber_encode_size (guint size, guint8 ber[9]) } GstBuffer * -mxf_fill_new (guint size) +mxf_fill_to_buffer (guint size) { GstBuffer *ret; guint slen; @@ -205,16 +205,162 @@ mxf_fill_new (guint size) } void -mxf_ul_set (MXFUL * ul, GHashTable * hashtable) +mxf_uuid_init (MXFUUID * uuid, GHashTable * hashtable) { guint i; do { for (i = 0; i < 4; i++) - GST_WRITE_UINT32_BE (&ul->u[i * 4], g_random_int ()); + GST_WRITE_UINT32_BE (&uuid->u[i * 4], g_random_int ()); - } while (hashtable - && g_hash_table_lookup_extended (hashtable, ul, NULL, NULL)); + } while (hashtable && (mxf_uuid_is_zero (uuid) || + g_hash_table_lookup_extended (hashtable, uuid, NULL, NULL))); +} + +gboolean +mxf_uuid_is_equal (const MXFUUID * a, const MXFUUID * b) +{ + g_return_val_if_fail (a != NULL, FALSE); + g_return_val_if_fail (b != NULL, FALSE); + + return (memcmp (a, b, 16) == 0); +} + +gboolean +mxf_uuid_is_zero (const MXFUUID * a) +{ + static const guint8 zero[16] = { 0x00, }; + + g_return_val_if_fail (a != NULL, FALSE); + + return (memcmp (a, zero, 16) == 0); +} + +guint +mxf_uuid_hash (const MXFUUID * uuid) +{ + guint32 ret = 0; + guint i; + + g_return_val_if_fail (uuid != NULL, 0); + + for (i = 0; i < 4; i++) + ret ^= (uuid->u[i * 4 + 0] << 24) | + (uuid->u[i * 4 + 1] << 16) | + (uuid->u[i * 4 + 2] << 8) | (uuid->u[i * 4 + 3] << 0); + + return ret; +} + +gchar * +mxf_uuid_to_string (const MXFUUID * uuid, gchar str[48]) +{ + gchar *ret = str; + + g_return_val_if_fail (uuid != NULL, NULL); + + if (ret == NULL) + ret = g_malloc (48); + + g_snprintf (ret, 48, + "%02x.%02x.%02x.%02x." + "%02x.%02x.%02x.%02x." + "%02x.%02x.%02x.%02x." + "%02x.%02x.%02x.%02x", + uuid->u[0], uuid->u[1], uuid->u[2], uuid->u[3], + uuid->u[4], uuid->u[5], uuid->u[6], uuid->u[7], + uuid->u[8], uuid->u[9], uuid->u[10], uuid->u[11], + uuid->u[12], uuid->u[13], uuid->u[14], uuid->u[15]); + + return ret; +} + +MXFUUID * +mxf_uuid_from_string (const gchar * str, MXFUUID * uuid) +{ + MXFUUID *ret = uuid; + gint len; + guint i, j; + + g_return_val_if_fail (str != NULL, NULL); + + len = strlen (str); + if (len != 47) { + GST_ERROR ("Invalid UUID string length %d, should be 47", len); + return NULL; + } + + if (ret == NULL) + ret = g_new0 (MXFUUID, 1); + + memset (ret, 0, 16); + + for (i = 0, j = 0; i < 16; i++) { + if (!g_ascii_isxdigit (str[j]) || + !g_ascii_isxdigit (str[j + 1]) || + (str[j + 2] != '.' && str[j + 2] != '\0')) { + GST_ERROR ("Invalid UL string '%s'", str); + if (uuid == NULL) + g_free (ret); + return NULL; + } + + ret->u[i] = (g_ascii_xdigit_value (str[j]) << 4) | + (g_ascii_xdigit_value (str[j + 1])); + j += 3; + } + return ret; +} + +gboolean +mxf_uuid_array_parse (MXFUUID ** array, guint32 * count, const guint8 * data, + guint size) +{ + guint32 element_count, element_size; + guint i; + + g_return_val_if_fail (array != NULL, FALSE); + g_return_val_if_fail (count != NULL, FALSE); + g_return_val_if_fail (data != NULL, FALSE); + + if (size < 8) + return FALSE; + + element_count = GST_READ_UINT32_BE (data); + data += 4; + size -= 4; + + if (element_count == 0) { + *array = NULL; + *count = 0; + return TRUE; + } + + element_size = GST_READ_UINT32_BE (data); + data += 4; + size -= 4; + + if (element_size != 16) { + *array = NULL; + *count = 0; + return FALSE; + } + + if (16 * element_count < size) { + *array = NULL; + *count = 0; + return FALSE; + } + + *array = g_new (MXFUUID, element_count); + *count = element_count; + + for (i = 0; i < element_count; i++) { + memcpy (&((*array)[i]), data, 16); + data += 16; + } + + return TRUE; } gboolean @@ -232,28 +378,29 @@ mxf_umid_is_zero (const MXFUMID * umid) } gchar * -mxf_umid_to_string (const MXFUMID * key, gchar str[96]) +mxf_umid_to_string (const MXFUMID * umid, gchar str[96]) { - g_return_val_if_fail (key != NULL, NULL); + g_return_val_if_fail (umid != NULL, NULL); g_return_val_if_fail (str != NULL, NULL); g_snprintf (str, 96, "%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x." "%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x", - key->u[0], key->u[1], key->u[2], key->u[3], key->u[4], key->u[5], - key->u[6], key->u[7], key->u[8], key->u[9], key->u[10], key->u[11], - key->u[12], key->u[13], key->u[14], key->u[15], - key->u[16], - key->u[17], - key->u[18], - key->u[19], - key->u[20], - key->u[21], - key->u[22], - key->u[23], - key->u[24], - key->u[25], - key->u[26], key->u[27], key->u[28], key->u[29], key->u[30], key->u[31] + umid->u[0], umid->u[1], umid->u[2], umid->u[3], umid->u[4], umid->u[5], + umid->u[6], umid->u[7], umid->u[8], umid->u[9], umid->u[10], umid->u[11], + umid->u[12], umid->u[13], umid->u[14], umid->u[15], + umid->u[16], + umid->u[17], + umid->u[18], + umid->u[19], + umid->u[20], + umid->u[21], + umid->u[22], + umid->u[23], + umid->u[24], + umid->u[25], + umid->u[26], umid->u[27], umid->u[28], umid->u[29], umid->u[30], + umid->u[31] ); return str; @@ -609,7 +756,7 @@ mxf_op_set_generalized (MXFUL * ul, MXFOperationalPattern pattern, /* SMPTE 377M 6.1, Table 2 */ gboolean -mxf_partition_pack_parse (const MXFUL * key, MXFPartitionPack * pack, +mxf_partition_pack_parse (const MXFUL * ul, MXFPartitionPack * pack, const guint8 * data, guint size) { #ifndef GST_DISABLE_GST_DEBUG @@ -624,19 +771,19 @@ mxf_partition_pack_parse (const MXFUL * key, MXFPartitionPack * pack, GST_DEBUG ("Parsing partition pack:"); - if (key->u[13] == 0x02) + if (ul->u[13] == 0x02) pack->type = MXF_PARTITION_PACK_HEADER; - else if (key->u[13] == 0x03) + else if (ul->u[13] == 0x03) pack->type = MXF_PARTITION_PACK_BODY; - else if (key->u[13] == 0x04) + else if (ul->u[13] == 0x04) pack->type = MXF_PARTITION_PACK_FOOTER; GST_DEBUG (" type = %s", (pack->type == MXF_PARTITION_PACK_HEADER) ? "header" : (pack->type == MXF_PARTITION_PACK_BODY) ? "body" : "footer"); - pack->closed = (key->u[14] == 0x02 || key->u[14] == 0x04); - pack->complete = (key->u[14] == 0x03 || key->u[14] == 0x04); + pack->closed = (ul->u[14] == 0x02 || ul->u[14] == 0x04); + pack->complete = (ul->u[14] == 0x03 || ul->u[14] == 0x04); GST_DEBUG (" closed = %s, complete = %s", (pack->closed) ? "yes" : "no", (pack->complete) ? "yes" : "no"); @@ -828,7 +975,7 @@ mxf_partition_pack_to_buffer (const MXFPartitionPack * pack) /* SMPTE 377M 11.1 */ gboolean -mxf_random_index_pack_parse (const MXFUL * key, const guint8 * data, guint size, +mxf_random_index_pack_parse (const MXFUL * ul, const guint8 * data, guint size, GArray ** array) { guint len, i; @@ -900,7 +1047,7 @@ mxf_random_index_pack_to_buffer (const GArray * array) /* SMPTE 377M 10.2.3 */ gboolean -mxf_index_table_segment_parse (const MXFUL * key, +mxf_index_table_segment_parse (const MXFUL * ul, MXFIndexTableSegment * segment, const MXFPrimerPack * primer, const guint8 * data, guint size) { @@ -910,7 +1057,7 @@ mxf_index_table_segment_parse (const MXFUL * key, guint16 tag, tag_size; const guint8 *tag_data; - g_return_val_if_fail (key != NULL, FALSE); + g_return_val_if_fail (ul != NULL, FALSE); g_return_val_if_fail (data != NULL, FALSE); g_return_val_if_fail (primer != NULL, FALSE); @@ -931,7 +1078,7 @@ mxf_index_table_segment_parse (const MXFUL * key, goto error; memcpy (&segment->instance_id, tag_data, 16); GST_DEBUG (" instance id = %s", - mxf_ul_to_string (&segment->instance_id, str)); + mxf_uuid_to_string (&segment->instance_id, str)); break; case 0x3f0b: if (!mxf_fraction_parse (&segment->index_edit_rate, tag_data, tag_size)) @@ -1154,7 +1301,7 @@ _mxf_mapping_ul_free (MXFUL * ul) } gboolean -mxf_primer_pack_parse (const MXFUL * key, MXFPrimerPack * pack, +mxf_primer_pack_parse (const MXFUL * ul, MXFPrimerPack * pack, const guint8 * data, guint size) { guint i; @@ -1379,7 +1526,7 @@ mxf_local_tag_add_to_hash_table (const MXFPrimerPack * primer, GHashTable ** hash_table) { MXFLocalTag *local_tag; - MXFUL *key; + MXFUL *ul; g_return_val_if_fail (primer != NULL, FALSE); g_return_val_if_fail (tag_data != NULL, FALSE); @@ -1394,23 +1541,23 @@ mxf_local_tag_add_to_hash_table (const MXFPrimerPack * primer, g_return_val_if_fail (*hash_table != NULL, FALSE); - key = (MXFUL *) g_hash_table_lookup (primer->mappings, + ul = (MXFUL *) g_hash_table_lookup (primer->mappings, GUINT_TO_POINTER (((guint) tag))); - if (key) { + if (ul) { #ifndef GST_DISABLE_GST_DEBUG gchar str[48]; #endif GST_DEBUG ("Adding local tag 0x%04x with UL %s and size %u", tag, - mxf_ul_to_string (key, str), tag_size); + mxf_ul_to_string (ul, str), tag_size); local_tag = g_slice_new (MXFLocalTag); - memcpy (&local_tag->key, key, sizeof (MXFUL)); + memcpy (&local_tag->ul, ul, sizeof (MXFUL)); local_tag->size = tag_size; local_tag->data = g_memdup (tag_data, tag_size); - g_hash_table_insert (*hash_table, &local_tag->key, local_tag); + g_hash_table_insert (*hash_table, &local_tag->ul, local_tag); } else { GST_WARNING ("Local tag with no entry in primer pack: 0x%04x", tag); } @@ -1437,9 +1584,9 @@ mxf_local_tag_insert (MXFLocalTag * tag, GHashTable ** hash_table) g_return_val_if_fail (*hash_table != NULL, FALSE); GST_DEBUG ("Adding local tag 0x%04x with UL %s and size %u", tag, - mxf_ul_to_string (&tag->key, str), tag->size); + mxf_ul_to_string (&tag->ul, str), tag->size); - g_hash_table_insert (*hash_table, &tag->key, tag); + g_hash_table_insert (*hash_table, &tag->ul, tag); return TRUE; } diff --git a/gst/mxf/mxftypes.h b/gst/mxf/mxftypes.h index 8a6e9ccc..41c78306 100644 --- a/gst/mxf/mxftypes.h +++ b/gst/mxf/mxftypes.h @@ -63,7 +63,7 @@ typedef struct { /* SMPTE 377M 8.3 */ typedef struct { - MXFUL key; + MXFUL ul; guint16 size; guint8 *data; @@ -154,7 +154,7 @@ typedef struct { } MXFIndexEntry; typedef struct { - MXFUL instance_id; + MXFUUID instance_id; MXFFraction index_edit_rate; gint64 index_start_position; gint64 index_duration; @@ -177,39 +177,43 @@ typedef struct { #define GST_TAG_MXF_STRUCTURE "mxf-structure" #define GST_TAG_MXF_DESCRIPTIVE_METADATA_FRAMEWORK "mxf-descriptive-metadata-framework" -/* FIXME: UUID */ -void mxf_ul_set (MXFUL *ul, GHashTable *hashtable); +void mxf_uuid_init (MXFUUID *uuid, GHashTable *hashtable); +gboolean mxf_uuid_is_equal (const MXFUUID *a, const MXFUUID *b); +gboolean mxf_uuid_is_zero (const MXFUUID *uuid); +guint mxf_uuid_hash (const MXFUUID *uuid); +gchar * mxf_uuid_to_string (const MXFUUID *uuid, gchar str[48]); +MXFUUID * mxf_uuid_from_string (const gchar *str, MXFUUID *uuid); +gboolean mxf_uuid_array_parse (MXFUUID ** array, guint32 * count, const guint8 * data, guint size); gchar *mxf_umid_to_string (const MXFUMID * umid, gchar str[96]); MXFUMID *mxf_umid_from_string (const gchar *str, MXFUMID * umid); gboolean mxf_umid_is_equal (const MXFUMID *a, const MXFUMID *b); gboolean mxf_umid_is_zero (const MXFUMID *umid); -/* FIXME: _set => init */ -void mxf_umid_set (MXFUMID *umid); +void mxf_umid_init (MXFUMID *umid); -gboolean mxf_is_mxf_packet (const MXFUL *key); +gboolean mxf_is_mxf_packet (const MXFUL *ul); -gboolean mxf_is_partition_pack (const MXFUL *key); -gboolean mxf_is_header_partition_pack (const MXFUL *key); -gboolean mxf_is_body_partition_pack (const MXFUL *key); -gboolean mxf_is_footer_partition_pack (const MXFUL *key); +gboolean mxf_is_partition_pack (const MXFUL *ul); +gboolean mxf_is_header_partition_pack (const MXFUL *ul); +gboolean mxf_is_body_partition_pack (const MXFUL *ul); +gboolean mxf_is_footer_partition_pack (const MXFUL *ul); -gboolean mxf_is_primer_pack (const MXFUL *key); +gboolean mxf_is_primer_pack (const MXFUL *ul); -gboolean mxf_is_metadata (const MXFUL *key); -gboolean mxf_is_descriptive_metadata (const MXFUL *key); +gboolean mxf_is_metadata (const MXFUL *ul); +gboolean mxf_is_descriptive_metadata (const MXFUL *ul); -gboolean mxf_is_random_index_pack (const MXFUL *key); -gboolean mxf_is_index_table_segment (const MXFUL *key); +gboolean mxf_is_random_index_pack (const MXFUL *ul); +gboolean mxf_is_index_table_segment (const MXFUL *ul); -gboolean mxf_is_generic_container_system_item (const MXFUL *key); -gboolean mxf_is_generic_container_essence_element (const MXFUL *key); +gboolean mxf_is_generic_container_system_item (const MXFUL *ul); +gboolean mxf_is_generic_container_essence_element (const MXFUL *ul); gboolean mxf_is_avid_essence_container_essence_element (const MXFUL * key); -gboolean mxf_is_generic_container_essence_container_label (const MXFUL *key); -gboolean mxf_is_avid_essence_container_label (const MXFUL *key); +gboolean mxf_is_generic_container_essence_container_label (const MXFUL *ul); +gboolean mxf_is_avid_essence_container_label (const MXFUL *ul); -gboolean mxf_is_fill (const MXFUL *key); +gboolean mxf_is_fill (const MXFUL *ul); guint mxf_ber_encode_size (guint size, guint8 ber[9]); @@ -235,21 +239,21 @@ void mxf_timestamp_write (const MXFTimestamp *timestamp, guint8 *data); void mxf_op_set_atom (MXFUL *ul, gboolean single_sourceclip, gboolean single_essence_track); void mxf_op_set_generalized (MXFUL *ul, MXFOperationalPattern pattern, gboolean internal_essence, gboolean streamable, gboolean single_track); -GstBuffer * mxf_fill_new (guint size); +GstBuffer * mxf_fill_to_buffer (guint size); -gboolean mxf_partition_pack_parse (const MXFUL *key, MXFPartitionPack *pack, const guint8 *data, guint size); +gboolean mxf_partition_pack_parse (const MXFUL *ul, MXFPartitionPack *pack, const guint8 *data, guint size); void mxf_partition_pack_reset (MXFPartitionPack *pack); GstBuffer * mxf_partition_pack_to_buffer (const MXFPartitionPack *pack); -gboolean mxf_primer_pack_parse (const MXFUL *key, MXFPrimerPack *pack, const guint8 *data, guint size); +gboolean mxf_primer_pack_parse (const MXFUL *ul, MXFPrimerPack *pack, const guint8 *data, guint size); void mxf_primer_pack_reset (MXFPrimerPack *pack); guint16 mxf_primer_pack_add_mapping (MXFPrimerPack *primer, guint16 local_tag, const MXFUL *ul); GstBuffer * mxf_primer_pack_to_buffer (const MXFPrimerPack *pack); -gboolean mxf_random_index_pack_parse (const MXFUL *key, const guint8 *data, guint size, GArray **array); +gboolean mxf_random_index_pack_parse (const MXFUL *ul, const guint8 *data, guint size, GArray **array); GstBuffer * mxf_random_index_pack_to_buffer (const GArray *array); -gboolean mxf_index_table_segment_parse (const MXFUL *key, MXFIndexTableSegment *segment, const MXFPrimerPack *primer, const guint8 *data, guint size); +gboolean mxf_index_table_segment_parse (const MXFUL *ul, MXFIndexTableSegment *segment, const MXFPrimerPack *primer, const guint8 *data, guint size); void mxf_index_table_segment_reset (MXFIndexTableSegment *segment); gboolean mxf_local_tag_parse (const guint8 * data, guint size, guint16 * tag, |