summaryrefslogtreecommitdiffstats
path: root/gst/mxf/mxfdms1.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-11 18:40:55 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-12 11:00:07 +0100
commit61b284de0d44247316fd185134c293d026e4131c (patch)
treee4fb723dea7b889470e8f816c3176bdfc22c1f18 /gst/mxf/mxfdms1.c
parent144466e2cd855f420211b475f18ab0a0a4d7243e (diff)
downloadgst-plugins-bad-61b284de0d44247316fd185134c293d026e4131c.tar.gz
gst-plugins-bad-61b284de0d44247316fd185134c293d026e4131c.tar.bz2
gst-plugins-bad-61b284de0d44247316fd185134c293d026e4131c.zip
mxfdemux: Parse MXFTimestamp's milliseconds and add _to_string() function
Diffstat (limited to 'gst/mxf/mxfdms1.c')
-rw-r--r--gst/mxf/mxfdms1.c44
1 files changed, 14 insertions, 30 deletions
diff --git a/gst/mxf/mxfdms1.c b/gst/mxf/mxfdms1.c
index e4105b8f..1433262f 100644
--- a/gst/mxf/mxfdms1.c
+++ b/gst/mxf/mxfdms1.c
@@ -1237,14 +1237,8 @@ mxf_dms1_clip_framework_handle_tag (MXFMetadataBase * metadata,
if (!mxf_timestamp_parse (&self->clip_creation_date_and_time, tag_data,
tag_size))
goto error;
- GST_DEBUG (" clip creation date and time = %d/%u/%u %u:%u:%u.%u",
- self->clip_creation_date_and_time.year,
- self->clip_creation_date_and_time.month,
- self->clip_creation_date_and_time.day,
- self->clip_creation_date_and_time.hour,
- self->clip_creation_date_and_time.minute,
- self->clip_creation_date_and_time.second,
- (self->clip_creation_date_and_time.quarter_msecond * 1000) / 256);
+ GST_DEBUG (" clip creation date and time = %s",
+ mxf_timestamp_to_string (&self->clip_creation_date_and_time, str));
} else if (memcmp (tag_ul, &take_number_ul, 16) == 0) {
if (tag_size != 2)
goto error;
@@ -2666,6 +2660,9 @@ mxf_dms1_setting_period_handle_tag (MXFMetadataBase * metadata,
{
MXFDMS1SettingPeriod *self = MXF_DMS1_SETTING_PERIOD (metadata);
gboolean ret = TRUE;
+#ifndef GST_DISABLE_GST_DEBUG
+ gchar str[32];
+#endif
MXFUL *tag_ul = NULL;
static const guint8 setting_date_and_time_ul[] = {
0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, 0x07,
@@ -2689,12 +2686,8 @@ mxf_dms1_setting_period_handle_tag (MXFMetadataBase * metadata,
if (!mxf_timestamp_parse (&self->setting_date_and_time, tag_data, tag_size))
goto error;
- GST_DEBUG (" last modified date = %d/%u/%u %u:%u:%u.%u",
- self->setting_date_and_time.year, self->setting_date_and_time.month,
- self->setting_date_and_time.day, self->setting_date_and_time.hour,
- self->setting_date_and_time.minute,
- self->setting_date_and_time.second,
- (self->setting_date_and_time.quarter_msecond * 1000) / 256);
+ GST_DEBUG (" last modified date = %s",
+ mxf_timestamp_to_string (&self->setting_date_and_time, str));
} else if (memcmp (tag_ul, &time_period_keyword_ul, 16) == 0) {
self->time_period_keyword = mxf_utf16_to_utf8 (tag_data, tag_size);
GST_DEBUG (" time period keyword = %s",
@@ -4586,6 +4579,9 @@ mxf_dms1_rights_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer,
MXFDMS1Rights *self = MXF_DMS1_RIGHTS (metadata);
gboolean ret = TRUE;
MXFUL *tag_ul = NULL;
+#ifndef GST_DISABLE_GST_DEBUG
+ gchar str[32];
+#endif
static const guint8 copyright_owner_ul[] = {
0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x03, 0x02,
0x05, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00
@@ -4669,27 +4665,15 @@ mxf_dms1_rights_handle_tag (MXFMetadataBase * metadata, MXFPrimerPack * primer,
tag_size))
goto error;
- GST_DEBUG (" rights start date and time = %d/%u/%u %u:%u:%u.%u",
- self->rights_start_date_and_time.year,
- self->rights_start_date_and_time.month,
- self->rights_start_date_and_time.day,
- self->rights_start_date_and_time.hour,
- self->rights_start_date_and_time.minute,
- self->rights_start_date_and_time.second,
- (self->rights_start_date_and_time.quarter_msecond * 1000) / 256);
+ GST_DEBUG (" rights start date and time = %s",
+ mxf_timestamp_to_string (&self->rights_start_date_and_time, str));
} else if (memcmp (tag_ul, &rights_stop_date_and_time_ul, 16) == 0) {
if (!mxf_timestamp_parse (&self->rights_start_date_and_time, tag_data,
tag_size))
goto error;
- GST_DEBUG (" rights stop date and time = %d/%u/%u %u:%u:%u.%u",
- self->rights_stop_date_and_time.year,
- self->rights_stop_date_and_time.month,
- self->rights_stop_date_and_time.day,
- self->rights_stop_date_and_time.hour,
- self->rights_stop_date_and_time.minute,
- self->rights_stop_date_and_time.second,
- (self->rights_stop_date_and_time.quarter_msecond * 1000) / 256);
+ GST_DEBUG (" rights stop date and time = %s",
+ mxf_timestamp_to_string (&self->rights_stop_date_and_time, str));
} else if (memcmp (tag_ul, &maximum_number_of_usages_ul, 16) == 0) {
if (tag_size != 2)
goto error;