From 9101d97ff2f25129ec1deb63a7f1df58e3584c57 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 15 Jun 2002 22:30:58 +0000 Subject: Also allow PAL dv implement total time Original commit message from CVS: Also allow PAL dv implement total time --- ext/dv/gstdvdec.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'ext/dv/gstdvdec.c') diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c index 5ab247fe..396473b3 100644 --- a/ext/dv/gstdvdec.c +++ b/ext/dv/gstdvdec.c @@ -72,7 +72,10 @@ GST_PAD_TEMPLATE_FACTORY (sink_temp, GST_CAPS_NEW ( "dv_dec_sink", "video/dv", - "format", GST_PROPS_STRING ("NTSC") + "format", GST_PROPS_LIST ( + GST_PROPS_STRING ("PAL"), + GST_PROPS_STRING ("NTSC") + ) ) ) @@ -280,8 +283,17 @@ gst_dvdec_src_query (GstPad *pad, GstPadQueryType type, case GST_FORMAT_DEFAULT: *format = GST_FORMAT_TIME; case GST_FORMAT_TIME: - *value = 0; + { + guint64 len; + + len = gst_bytestream_length (dvdec->bs); + if (len != -1 && dvdec->length) { + *value = (len * GST_SECOND) / (dvdec->length * 25); + } + else + return FALSE; break; + } default: res = FALSE; break; -- cgit