mxf: Differentiate between UL and UUID

This commit is contained in:
Sebastian Dröge 2009-03-26 13:11:07 +01:00
parent ce01236e32
commit c1c8b40d42
10 changed files with 742 additions and 590 deletions

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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

View file

@ -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;
};

File diff suppressed because it is too large Load diff

View file

@ -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;
};

View file

@ -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);
}
}

View file

@ -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,

View file

@ -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;
}

View file

@ -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,