summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-21 17:45:09 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-21 17:45:09 +0100
commitb7f617ad585bf441b417035b9d9f46dcc215d9a5 (patch)
tree6fe92e16da4952ac67bd40cb84ba50db46341dbb /gst
parenta0951a630bcc17a619519e4dbb02516cc3032726 (diff)
downloadgst-plugins-bad-b7f617ad585bf441b417035b9d9f46dcc215d9a5.tar.gz
gst-plugins-bad-b7f617ad585bf441b417035b9d9f46dcc215d9a5.tar.bz2
gst-plugins-bad-b7f617ad585bf441b417035b9d9f46dcc215d9a5.zip
mxfdemux: Add read-only property to get the structural metadata
Diffstat (limited to 'gst')
-rw-r--r--gst/mxf/mxfdemux.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index b96b1685..292ae6a1 100644
--- a/gst/mxf/mxfdemux.c
+++ b/gst/mxf/mxfdemux.c
@@ -114,7 +114,8 @@ enum
{
PROP_0,
PROP_PACKAGE,
- PROP_MAX_DRIFT
+ PROP_MAX_DRIFT,
+ PROP_STRUCTURE
};
static gboolean gst_mxf_demux_sink_event (GstPad * pad, GstEvent * event);
@@ -3789,6 +3790,23 @@ gst_mxf_demux_get_property (GObject * object, guint prop_id,
case PROP_MAX_DRIFT:
g_value_set_uint64 (value, demux->max_drift);
break;
+ case PROP_STRUCTURE:{
+ GstStructure *s;
+
+ g_mutex_lock (demux->metadata_lock);
+ if (demux->preface)
+ s = mxf_metadata_base_to_structure (MXF_METADATA_BASE (demux->preface));
+ else
+ s = NULL;
+
+ gst_value_set_structure (value, s);
+
+ if (s)
+ gst_structure_free (s);
+
+ g_mutex_unlock (demux->metadata_lock);
+ break;
+ }
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -3869,6 +3887,11 @@ gst_mxf_demux_class_init (GstMXFDemuxClass * klass)
100 * GST_MSECOND, G_MAXUINT64, 500 * GST_MSECOND,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (gobject_class, PROP_STRUCTURE,
+ g_param_spec_boxed ("structure", "Structure",
+ "Structural metadata of the MXF file",
+ GST_TYPE_STRUCTURE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_mxf_demux_change_state);
gstelement_class->query = GST_DEBUG_FUNCPTR (gst_mxf_demux_query);