summaryrefslogtreecommitdiffstats
path: root/gst/mxf/mxfmetadata.c
AgeCommit message (Collapse)AuthorFilesLines
2009-01-31Don't complain if the preface has no primary package setSebastian Dröge1-6/+8
2009-01-22Store MXF metadata in a hash table, keyed by UIDSebastian Dröge1-214/+217
Store the MXF metadata in a hash table, keyed by the instance UID. This simplifies resolval of the metadata and makes looping over all metadata sets unnecessary in most cases. Additionally parse metadata always. If we already have a metadata set with the same UID replace it only if the new metadata set is from a later offset. This fixes metadata parsing of files where following partitions don't have a complete copy of the previous metadata.
2009-01-22Update copyrights for 2009Sebastian Dröge1-1/+1
2009-01-22Simplify parsing of UL/UUID arraysSebastian Dröge1-188/+111
Simplify parsing of UL/UUID arrays by abstracting it into a separate function.
2009-01-22Implement parsing of DMS1 (SMPTE S380M)Sebastian Dröge1-109/+144
2009-01-05gst/mxf/: "Generation UID" and "This Generation UID" are different so handle ↵Sebastian Dröge1-8/+101
them different. Also both are not part o... Original commit message from CVS: * gst/mxf/Makefile.am: * gst/mxf/mxfdemux.c: * gst/mxf/mxfmetadata.c: (mxf_metadata_handle_tag), (mxf_metadata_preface_handle_tag), (mxf_metadata_identification_handle_tag), (mxf_metadata_content_storage_handle_tag), (mxf_metadata_essence_container_data_handle_tag), (mxf_metadata_generic_package_handle_tag), (mxf_metadata_track_handle_tag), (mxf_metadata_sequence_handle_tag), (mxf_metadata_structural_component_handle_tag), (mxf_metadata_generic_descriptor_handle_tag), (mxf_metadata_locator_handle_tag), (mxf_metadata_locator_class_init): * gst/mxf/mxfmetadata.h: "Generation UID" and "This Generation UID" are different so handle them different. Also both are not part of every metadata type.
2009-01-05gst/mxf/: Fix compilation with debugging disabled.Sebastian Dröge1-0/+36
Original commit message from CVS: * gst/mxf/mxfaes-bwf.c: (mxf_metadata_wave_audio_essence_descriptor_handle_tag), (mxf_bwf_create_caps): * gst/mxf/mxfdemux.c: (gst_mxf_demux_handle_klv_packet): * gst/mxf/mxfmetadata.c: (mxf_metadata_handle_tag), (mxf_metadata_preface_handle_tag), (mxf_metadata_identification_handle_tag), (mxf_metadata_content_storage_handle_tag), (mxf_metadata_essence_container_data_handle_tag), (mxf_metadata_generic_package_handle_tag), (mxf_metadata_source_package_handle_tag), (mxf_metadata_track_handle_tag), (mxf_metadata_sequence_handle_tag), (mxf_metadata_structural_component_handle_tag), (mxf_metadata_source_clip_handle_tag), (mxf_metadata_dm_segment_handle_tag), (mxf_metadata_generic_descriptor_handle_tag), (mxf_metadata_file_descriptor_handle_tag), (mxf_metadata_generic_picture_essence_descriptor_handle_tag), (mxf_metadata_generic_sound_essence_descriptor_handle_tag), (mxf_metadata_generic_data_essence_descriptor_handle_tag), (mxf_metadata_multiple_descriptor_handle_tag): * gst/mxf/mxfparse.c: (mxf_partition_pack_parse), (mxf_index_table_segment_parse), (mxf_primer_pack_parse), (mxf_local_tag_add_to_hash_table): Fix compilation with debugging disabled.
2008-12-31Implement support for OP2a/b/c and OP3a/b/c, i.e. tracks with more than a ↵Sebastian Dröge1-2/+3
single component. This currently only works... Original commit message from CVS: * gst/mxf/mxfaes-bwf.c: (mxf_bwf_handle_essence_element), (mxf_aes3_handle_essence_element): * gst/mxf/mxfalaw.c: (mxf_alaw_handle_essence_element): * gst/mxf/mxfd10.c: (mxf_d10_picture_handle_essence_element), (mxf_d10_sound_handle_essence_element): * gst/mxf/mxfdemux.c: (gst_mxf_demux_pad_init), (gst_mxf_demux_choose_package), (gst_mxf_demux_handle_header_metadata_update_streams), (gst_mxf_demux_pad_next_component), (gst_mxf_demux_handle_generic_container_essence_element), (gst_mxf_demux_parse_footer_metadata), (gst_mxf_demux_handle_klv_packet), (gst_mxf_demux_src_query): * gst/mxf/mxfdv-dif.c: (mxf_dv_dif_handle_essence_element): * gst/mxf/mxfjpeg2000.c: (mxf_jpeg2000_handle_essence_element): * gst/mxf/mxfmetadata.c: (mxf_metadata_sequence_init), (mxf_metadata_structural_component_init), (mxf_metadata_generic_picture_essence_descriptor_init): * gst/mxf/mxfmpeg.c: (mxf_mpeg_video_handle_essence_element), (mxf_mpeg_audio_handle_essence_element): * gst/mxf/mxfparse.h: * gst/mxf/mxfup.c: (mxf_up_handle_essence_element): * gst/mxf/mxfvc3.c: (mxf_vc3_handle_essence_element): * tests/check/elements/mxfdemux.c: (_sink_chain): Implement support for OP2a/b/c and OP3a/b/c, i.e. tracks with more than a single component. This currently only works for the case where the components are stored in playback order in the file. Set some more default/distinguished values for the structural metadata. Make some types more strict by choosing the correct subclasses. Set DISCONT flag on buffers after a component switch. Take the last partition from the random index pack for the footer partition of the header partition doesn't reference the footer partition. This gives us the final structural metadata for some more files in the beginning.
2008-12-22gst/mxf/mxfmetadata.*: If resolving a metadata object failed the first time ↵Sebastian Dröge1-3/+10
return Original commit message from CVS: * gst/mxf/mxfmetadata.c: (mxf_metadata_base_resolve): * gst/mxf/mxfmetadata.h: If resolving a metadata object failed the first time return FALSE for a second mxf_metadata_base_resolve() call instead of TRUE.
2008-12-19gst/mxf/: Add mxf_metadata_generic_sound_essence_descriptor_set_caps() to ↵Sebastian Dröge1-5/+41
set rate and channels and use this for all ... Original commit message from CVS: * gst/mxf/mxfaes-bwf.c: (mxf_bwf_create_caps), (mxf_aes3_create_caps): * gst/mxf/mxfalaw.c: (mxf_alaw_create_caps): * gst/mxf/mxfd10.c: (mxf_d10_create_caps): * gst/mxf/mxfdemux.c: * gst/mxf/mxfmetadata.c: (mxf_metadata_source_package_resolve), (mxf_metadata_generic_picture_essence_descriptor_set_caps), (mxf_metadata_generic_sound_essence_descriptor_set_caps): * gst/mxf/mxfmetadata.h: * gst/mxf/mxfmpeg.c: (mxf_mpeg_es_create_caps): Add mxf_metadata_generic_sound_essence_descriptor_set_caps() to set rate and channels and use this for all sound essence. Give some debug output when setting picture essence caps with invalid descriptor values. Fix height calculation from the frame layout a bit more and add a TODO to check if it's really correct now or if it needs more fixing (especially, does the framerate need adjustments?).
2008-12-16gst/mxf/: Rename MXFMetadataBase methods to reflect that they belong toSebastian Dröge1-18/+20
Original commit message from CVS: * gst/mxf/mxfdemux.c: (gst_mxf_demux_handle_header_metadata_resolve_references): * gst/mxf/mxfmetadata.c: (mxf_metadata_base_resolve_default), (mxf_metadata_base_class_init), (mxf_metadata_base_parse), (mxf_metadata_base_resolve), (mxf_metadata_new), (mxf_metadata_preface_resolve), (mxf_metadata_content_storage_resolve), (mxf_metadata_essence_container_data_resolve), (mxf_metadata_generic_package_resolve), (mxf_metadata_source_package_resolve), (mxf_metadata_track_resolve), (mxf_metadata_sequence_resolve), (mxf_metadata_dm_segment_resolve), (mxf_metadata_generic_descriptor_resolve), (mxf_metadata_multiple_descriptor_resolve): * gst/mxf/mxfmetadata.h: Rename MXFMetadataBase methods to reflect that they belong to MXFMetadataBase and not MXFMetadata.
2008-12-15gst/mxf/: Return FALSE when parsing a metadata tag failed.Sebastian Dröge1-29/+37
Original commit message from CVS: * gst/mxf/mxfaes-bwf.c: (mxf_metadata_wave_audio_essence_descriptor_handle_tag), (mxf_metadata_aes3_audio_essence_descriptor_handle_tag): * gst/mxf/mxfmetadata.c: (mxf_metadata_multiple_descriptor_handle_tag): Return FALSE when parsing a metadata tag failed. Remove some useless return value assignments.
2008-12-15gst/mxf/: Convert the structural metadata to GstMiniObjects to make a lot of ↵Sebastian Dröge1-0/+3306
code easier and to make everything bette... Original commit message from CVS: * gst/mxf/Makefile.am: * gst/mxf/mxf.c: (plugin_init): * gst/mxf/mxfaes-bwf.c: (mxf_metadata_wave_audio_essence_descriptor_handle_tag), (mxf_metadata_wave_audio_essence_descriptor_init), (mxf_metadata_wave_audio_essence_descriptor_class_init), (mxf_metadata_aes3_audio_essence_descriptor_finalize), (mxf_metadata_aes3_audio_essence_descriptor_handle_tag), (mxf_metadata_aes3_audio_essence_descriptor_init), (mxf_metadata_aes3_audio_essence_descriptor_class_init), (mxf_is_aes_bwf_essence_track), (mxf_bwf_create_caps), (mxf_aes3_create_caps), (mxf_aes_bwf_create_caps), (mxf_aes_bwf_init): * gst/mxf/mxfaes-bwf.h: * gst/mxf/mxfalaw.c: (mxf_is_alaw_essence_track), (mxf_alaw_create_caps), (mxf_alaw_init): * gst/mxf/mxfalaw.h: * gst/mxf/mxfd10.c: (mxf_is_d10_essence_track), (mxf_d10_create_caps), (mxf_d10_init): * gst/mxf/mxfd10.h: * gst/mxf/mxfdemux.c: (gst_mxf_demux_reset_metadata), (gst_mxf_demux_handle_header_metadata_resolve_references), (gst_mxf_demux_find_package), (gst_mxf_demux_choose_package), (gst_mxf_demux_handle_header_metadata_update_streams), (gst_mxf_demux_handle_metadata), (gst_mxf_demux_handle_generic_container_essence_element), (gst_mxf_demux_handle_klv_packet), (gst_mxf_demux_src_query): * gst/mxf/mxfdemux.h: * gst/mxf/mxfdv-dif.c: (mxf_is_dv_dif_essence_track), (mxf_dv_dif_create_caps), (mxf_dv_dif_init): * gst/mxf/mxfdv-dif.h: * gst/mxf/mxfjpeg2000.c: (mxf_is_jpeg2000_essence_track), (mxf_jpeg2000_create_caps), (mxf_jpeg2000_init): * gst/mxf/mxfjpeg2000.h: * gst/mxf/mxfmetadata.c: (mxf_metadata_base_finalize), (mxf_metadata_base_handle_tag), (mxf_metadata_base_resolve), (mxf_metadata_base_init), (mxf_metadata_base_class_init), (mxf_metadata_parse), (mxf_metadata_resolve), (mxf_metadata_handle_tag), (mxf_metadata_class_init), (mxf_metadata_init), (mxf_metadata_init_types), (mxf_metadata_register), (mxf_metadata_new), (mxf_metadata_preface_finalize), (mxf_metadata_preface_handle_tag), (mxf_metadata_preface_resolve), (mxf_metadata_preface_init), (mxf_metadata_preface_class_init), (mxf_metadata_identification_finalize), (mxf_metadata_identification_handle_tag), (mxf_metadata_identification_init), (mxf_metadata_identification_class_init), (mxf_metadata_content_storage_finalize), (mxf_metadata_content_storage_handle_tag), (mxf_metadata_content_storage_resolve), (mxf_metadata_content_storage_init), (mxf_metadata_content_storage_class_init), (mxf_metadata_essence_container_data_handle_tag), (mxf_metadata_essence_container_data_resolve), (mxf_metadata_essence_container_data_init), (mxf_metadata_essence_container_data_class_init), (mxf_metadata_generic_package_finalize), (mxf_metadata_generic_package_handle_tag), (mxf_metadata_generic_package_resolve), (mxf_metadata_generic_package_init), (mxf_metadata_generic_package_class_init), (mxf_metadata_material_package_resolve), (mxf_metadata_material_package_init), (mxf_metadata_material_package_class_init), (mxf_metadata_source_package_finalize), (mxf_metadata_source_package_handle_tag), (mxf_metadata_source_package_resolve), (mxf_metadata_source_package_init), (mxf_metadata_source_package_class_init), (mxf_metadata_track_finalize), (mxf_metadata_track_handle_tag), (mxf_metadata_track_resolve), (mxf_metadata_track_init), (mxf_metadata_track_class_init), (mxf_metadata_track_identifier_parse), (mxf_metadata_timeline_track_handle_tag), (mxf_metadata_timeline_track_init), (mxf_metadata_timeline_track_class_init), (mxf_metadata_event_track_handle_tag), (mxf_metadata_event_track_init), (mxf_metadata_event_track_class_init), (mxf_metadata_static_track_init), (mxf_metadata_static_track_class_init), (mxf_metadata_sequence_finalize), (mxf_metadata_sequence_handle_tag), (mxf_metadata_sequence_resolve), (mxf_metadata_sequence_init), (mxf_metadata_sequence_class_init), (mxf_metadata_structural_component_handle_tag), (mxf_metadata_structural_component_init), (mxf_metadata_structural_component_class_init), (mxf_metadata_timecode_component_handle_tag), (mxf_metadata_timecode_component_init), (mxf_metadata_timecode_component_class_init), (mxf_metadata_source_clip_handle_tag), (mxf_metadata_source_clip_resolve), (mxf_metadata_source_clip_init), (mxf_metadata_source_clip_class_init), (mxf_metadata_dm_source_clip_finalize), (mxf_metadata_dm_source_clip_handle_tag), (mxf_metadata_dm_source_clip_init), (mxf_metadata_dm_source_clip_class_init), (mxf_metadata_dm_segment_finalize), (mxf_metadata_dm_segment_handle_tag), (mxf_metadata_dm_segment_resolve), (mxf_metadata_dm_segment_init), (mxf_metadata_dm_segment_class_init), (mxf_metadata_generic_descriptor_finalize), (mxf_metadata_generic_descriptor_handle_tag), (mxf_metadata_generic_descriptor_resolve), (mxf_metadata_generic_descriptor_init), (mxf_metadata_generic_descriptor_class_init), (mxf_metadata_file_descriptor_handle_tag), (mxf_metadata_file_descriptor_init), (mxf_metadata_file_descriptor_class_init), (mxf_metadata_generic_picture_essence_descriptor_handle_tag), (mxf_metadata_generic_picture_essence_descriptor_init), (mxf_metadata_generic_picture_essence_descriptor_class_init), (mxf_metadata_generic_picture_essence_descriptor_set_caps), (mxf_metadata_generic_sound_essence_descriptor_handle_tag), (mxf_metadata_generic_sound_essence_descriptor_init), (mxf_metadata_generic_sound_essence_descriptor_class_init), (mxf_metadata_cdci_picture_essence_descriptor_handle_tag), (mxf_metadata_cdci_picture_essence_descriptor_init), (mxf_metadata_cdci_picture_essence_descriptor_class_init), (mxf_metadata_rgba_picture_essence_descriptor_finalize), (mxf_metadata_rgba_picture_essence_descriptor_handle_tag), (mxf_metadata_rgba_picture_essence_descriptor_init), (mxf_metadata_rgba_picture_essence_descriptor_class_init), (mxf_metadata_generic_data_essence_descriptor_handle_tag), (mxf_metadata_generic_data_essence_descriptor_init), (mxf_metadata_generic_data_essence_descriptor_class_init), (mxf_metadata_multiple_descriptor_finalize), (mxf_metadata_multiple_descriptor_handle_tag), (mxf_metadata_multiple_descriptor_resolve), (mxf_metadata_multiple_descriptor_init), (mxf_metadata_multiple_descriptor_class_init), (mxf_metadata_locator_init), (mxf_metadata_locator_class_init), (mxf_metadata_text_locator_finalize), (mxf_metadata_text_locator_handle_tag), (mxf_metadata_text_locator_init), (mxf_metadata_text_locator_class_init), (mxf_metadata_network_locator_finalize), (mxf_metadata_network_locator_handle_tag), (mxf_metadata_network_locator_init), (mxf_metadata_network_locator_class_init): * gst/mxf/mxfmetadata.h: * gst/mxf/mxfmpeg.c: (mxf_metadata_mpeg_video_descriptor_handle_tag), (mxf_metadata_mpeg_video_descriptor_init), (mxf_metadata_mpeg_video_descriptor_class_init), (mxf_is_mpeg_essence_track), (mxf_mpeg_es_create_caps), (mxf_mpeg_create_caps), (mxf_mpeg_init): * gst/mxf/mxfmpeg.h: * gst/mxf/mxfparse.c: (mxf_index_table_segment_parse), (mxf_local_tag_add_to_hash_table): * gst/mxf/mxfparse.h: * gst/mxf/mxftypes.h: * gst/mxf/mxfup.c: (mxf_is_up_essence_track), (mxf_up_create_caps), (mxf_up_init): * gst/mxf/mxfup.h: Convert the structural metadata to GstMiniObjects to make a lot of code easier and to make everything better extensible. Add a "registry" for metadata handlers to improve extensibility even more and to remove metadata type specifics from mxfdemux. Clean up a lot of parts and add some more NULL checks.