summaryrefslogtreecommitdiffstats
path: root/gst/mxf/mxfmetadata.h
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2009-01-22 11:47:48 +0100
committerSebastian Dröge <slomo@circular-chaos.org>2009-01-22 13:13:00 +0100
commit716ce72e46fa646f5c25cc49aae557ef485949d5 (patch)
treed649cf3e3b81d01fdffe392f862a4b1515f35fe7 /gst/mxf/mxfmetadata.h
parent52028f2e11e5facd539616d29aff0c7098a057bc (diff)
downloadgst-plugins-bad-716ce72e46fa646f5c25cc49aae557ef485949d5.tar.gz
gst-plugins-bad-716ce72e46fa646f5c25cc49aae557ef485949d5.tar.bz2
gst-plugins-bad-716ce72e46fa646f5c25cc49aae557ef485949d5.zip
Store MXF metadata in a hash table, keyed by UID
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.
Diffstat (limited to 'gst/mxf/mxfmetadata.h')
-rw-r--r--gst/mxf/mxfmetadata.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/gst/mxf/mxfmetadata.h b/gst/mxf/mxfmetadata.h
index ac34a018..e162d9b9 100644
--- a/gst/mxf/mxfmetadata.h
+++ b/gst/mxf/mxfmetadata.h
@@ -373,6 +373,8 @@ struct _MXFMetadataBase {
MXFUL instance_uid;
MXFUL generation_uid;
+ guint64 offset;
+
MXFMetadataBaseResolveState resolved;
GHashTable *other_tags;
@@ -382,7 +384,7 @@ struct _MXFMetadataBaseClass {
GstMiniObjectClass parent;
gboolean (*handle_tag) (MXFMetadataBase *self, MXFPrimerPack *primer, guint16 tag, const guint8 *tag_data, guint tag_size);
- gboolean (*resolve) (MXFMetadataBase *self, MXFMetadataBase **metadata);
+ gboolean (*resolve) (MXFMetadataBase *self, GHashTable *metadata);
};
struct _MXFMetadata {
@@ -745,9 +747,9 @@ struct _MXFDescriptiveMetadataFrameworkInterface {
};
gboolean mxf_metadata_base_parse (MXFMetadataBase *self, MXFPrimerPack *primer, const guint8 *data, guint size);
-gboolean mxf_metadata_base_resolve (MXFMetadataBase *self, MXFMetadataBase **metadata);
+gboolean mxf_metadata_base_resolve (MXFMetadataBase *self, GHashTable *metadata);
-MXFMetadata *mxf_metadata_new (guint16 type, MXFPrimerPack *primer, const guint8 *data, guint size);
+MXFMetadata *mxf_metadata_new (guint16 type, MXFPrimerPack *primer, guint64 offset, const guint8 *data, guint size);
void mxf_metadata_register (guint16 type_id, GType type);
void mxf_metadata_init_types (void);
@@ -757,6 +759,8 @@ void mxf_metadata_generic_picture_essence_descriptor_set_caps (MXFMetadataGeneri
void mxf_metadata_generic_sound_essence_descriptor_set_caps (MXFMetadataGenericSoundEssenceDescriptor * self, GstCaps * caps);
void mxf_descriptive_metadata_register (guint8 scheme, GSList *sets);
-MXFDescriptiveMetadata * mxf_descriptive_metadata_new (guint8 scheme, guint32 type, MXFPrimerPack * primer, const guint8 * data, guint size);
+MXFDescriptiveMetadata * mxf_descriptive_metadata_new (guint8 scheme, guint32 type, MXFPrimerPack * primer, guint64 offset, const guint8 * data, guint size);
+
+GHashTable *mxf_metadata_hash_table_new (void);
#endif /* __MXF_METADATA_H__ */