summaryrefslogtreecommitdiffstats
path: root/ext/dv/gstdvdemux.c
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2005-10-24 17:29:02 +0000
committerEdward Hervey <bilboed@bilboed.com>2005-10-24 17:29:02 +0000
commitecc3125b2720abe199d9da2133f67827bdaaf7aa (patch)
tree8b9f94cf8c412bc62815891cc75f4c1bd2ef166b /ext/dv/gstdvdemux.c
parent8417929e1adefce4e600c7a5c6cfe1e9b207fc75 (diff)
ext/dv/gstdvdemux.c: Call gst_element_no_more_pads when there will be no more pads.
Original commit message from CVS: * ext/dv/gstdvdemux.c: (gst_dvdemux_add_pads): Call gst_element_no_more_pads when there will be no more pads.
Diffstat (limited to 'ext/dv/gstdvdemux.c')
-rw-r--r--ext/dv/gstdvdemux.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/ext/dv/gstdvdemux.c b/ext/dv/gstdvdemux.c
index add3fab3..1408df8f 100644
--- a/ext/dv/gstdvdemux.c
+++ b/ext/dv/gstdvdemux.c
@@ -225,6 +225,8 @@ gst_dvdemux_add_pads (GstDVDemux * dvdemux)
GST_DEBUG_FUNCPTR (gst_dvdemux_handle_src_event));
gst_pad_use_fixed_caps (dvdemux->audiosrcpad);
gst_element_add_pad (GST_ELEMENT (dvdemux), dvdemux->audiosrcpad);
+
+ gst_element_no_more_pads (GST_ELEMENT (dvdemux));
}
static gboolean
@@ -246,8 +248,8 @@ gst_dvdemux_src_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
goto done;
}
- GST_INFO ("src_value:%lld, src_format:%d, dest_format:%d", src_value,
- src_format, *dest_format);
+ GST_INFO ("pad:%s:%s, src_value:%lld, src_format:%d, dest_format:%d",
+ GST_DEBUG_PAD_NAME (pad), src_value, src_format, *dest_format);
switch (src_format) {
case GST_FORMAT_BYTES:
@@ -301,7 +303,7 @@ gst_dvdemux_src_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
switch (*dest_format) {
case GST_FORMAT_TIME:
if (pad == dvdemux->videosrcpad) {
- *dest_value = src_value * GST_SECOND * dvdemux->framerate;
+ *dest_value = src_value * GST_SECOND / dvdemux->framerate;
} else if (pad == dvdemux->audiosrcpad) {
if (src_value)
*dest_value =
@@ -329,6 +331,8 @@ gst_dvdemux_src_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
done:
gst_object_unref (dvdemux);
+ GST_INFO ("Result : dest_format:%d, dest_value:%lld, res:%d",
+ *dest_format, *dest_value, res);
return res;
error:
@@ -351,6 +355,8 @@ gst_dvdemux_sink_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
goto error;
GST_DEBUG ("%d -> %d", src_format, *dest_format);
+ GST_INFO ("pad:%s:%s, src_value:%lld, src_format:%d, dest_format:%d",
+ GST_DEBUG_PAD_NAME (pad), src_value, src_format, *dest_format);
if (*dest_format == GST_FORMAT_DEFAULT)
*dest_format = GST_FORMAT_TIME;
@@ -396,6 +402,8 @@ gst_dvdemux_sink_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
default:
res = FALSE;
}
+ GST_INFO ("Result : dest_format:%d, dest_value:%lld, res:%d",
+ *dest_format, *dest_value, res);
done:
gst_object_unref (dvdemux);
@@ -659,6 +667,7 @@ gst_dvdemux_handle_src_event (GstPad * pad, GstEvent * event)
&cur_type, &cur, &stop_type, &stop);
if ((offset = cur) != -1) {
+ GST_INFO ("starting conversion of cur");
/* bring the format to time on srcpad. */
conv = GST_FORMAT_TIME;
if (!(res = gst_pad_query_convert (pad,
@@ -673,11 +682,14 @@ gst_dvdemux_handle_src_event (GstPad * pad, GstEvent * event)
/* could not convert time format to bytes offset */
break;
}
+ GST_INFO ("Finished conversion of cur, BYTES cur : %lld",
+ start_position);
} else {
start_position = -1;
}
if ((offset = stop) != -1) {
+ GST_INFO ("starting conversion of stop");
/* bring the format to time on srcpad. */
conv = GST_FORMAT_TIME;
if (!(res = gst_pad_query_convert (pad,
@@ -692,6 +704,8 @@ gst_dvdemux_handle_src_event (GstPad * pad, GstEvent * event)
/* could not convert seek format to bytes offset */
break;
}
+ GST_INFO ("Finished conversion of stop, BYTES cur : %lld",
+ start_position);
} else {
end_position = -1;
}