summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorRavi Kiran K N <ravi.kiran@samsung.com>2015-02-11 18:09:24 +0530
committerTim-Philipp Müller <tim@centricular.com>2015-04-28 19:36:03 +0100
commitebbefbb792737f5ccad94d3067c8289faedd534d (patch)
tree07955b7ea9533066d9a7173c65d79540459e2b30 /ext
parent7f4f4131df6d419080285ae5d22cfe45a7b8278c (diff)
dvdemux: extract recording time
Extracts the recorded time of the dv file from the metadata and puts it into the global tags. https://bugzilla.gnome.org/show_bug.cgi?id=743657
Diffstat (limited to 'ext')
-rw-r--r--ext/dv/gstdvdemux.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/dv/gstdvdemux.c b/ext/dv/gstdvdemux.c
index 352283a9a..be9964771 100644
--- a/ext/dv/gstdvdemux.c
+++ b/ext/dv/gstdvdemux.c
@@ -303,6 +303,8 @@ gst_dvdemux_add_pad (GstDVDemux * dvdemux, GstStaticPadTemplate * template,
GstPad *pad;
GstEvent *event;
gchar *stream_id;
+ gchar rec_datetime[40];
+ GstDateTime *rec_dt;
pad = gst_pad_new_from_static_template (template, template->name_template);
@@ -341,6 +343,16 @@ gst_dvdemux_add_pad (GstDVDemux * dvdemux, GstStaticPadTemplate * template,
tags = gst_tag_list_new (GST_TAG_CONTAINER_FORMAT, "DV", NULL);
gst_tag_list_set_scope (tags, GST_TAG_SCOPE_GLOBAL);
+
+ if (dv_get_recording_datetime (dvdemux->decoder, rec_datetime)) {
+ rec_dt = gst_date_time_new_from_iso8601_string (rec_datetime);
+ if (rec_dt) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_DATE_TIME,
+ rec_dt, NULL);
+ gst_date_time_unref (rec_dt);
+ }
+ }
+
if (dvdemux->videosrcpad)
gst_pad_push_event (dvdemux->videosrcpad,
gst_event_new_tag (gst_tag_list_ref (tags)));