mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
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.
This commit is contained in:
parent
8417929e1a
commit
ecc3125b27
2 changed files with 22 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-10-24 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
|
* ext/dv/gstdvdemux.c: (gst_dvdemux_add_pads):
|
||||||
|
Call gst_element_no_more_pads when there will be no more pads.
|
||||||
|
|
||||||
2005-10-24 Wim Taymans <wim@fluendo.com>
|
2005-10-24 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/rtp/Makefile.am:
|
* gst/rtp/Makefile.am:
|
||||||
|
|
|
@ -225,6 +225,8 @@ gst_dvdemux_add_pads (GstDVDemux * dvdemux)
|
||||||
GST_DEBUG_FUNCPTR (gst_dvdemux_handle_src_event));
|
GST_DEBUG_FUNCPTR (gst_dvdemux_handle_src_event));
|
||||||
gst_pad_use_fixed_caps (dvdemux->audiosrcpad);
|
gst_pad_use_fixed_caps (dvdemux->audiosrcpad);
|
||||||
gst_element_add_pad (GST_ELEMENT (dvdemux), dvdemux->audiosrcpad);
|
gst_element_add_pad (GST_ELEMENT (dvdemux), dvdemux->audiosrcpad);
|
||||||
|
|
||||||
|
gst_element_no_more_pads (GST_ELEMENT (dvdemux));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -246,8 +248,8 @@ gst_dvdemux_src_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INFO ("src_value:%lld, src_format:%d, dest_format:%d", src_value,
|
GST_INFO ("pad:%s:%s, src_value:%lld, src_format:%d, dest_format:%d",
|
||||||
src_format, *dest_format);
|
GST_DEBUG_PAD_NAME (pad), src_value, src_format, *dest_format);
|
||||||
|
|
||||||
switch (src_format) {
|
switch (src_format) {
|
||||||
case GST_FORMAT_BYTES:
|
case GST_FORMAT_BYTES:
|
||||||
|
@ -301,7 +303,7 @@ gst_dvdemux_src_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
|
||||||
switch (*dest_format) {
|
switch (*dest_format) {
|
||||||
case GST_FORMAT_TIME:
|
case GST_FORMAT_TIME:
|
||||||
if (pad == dvdemux->videosrcpad) {
|
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) {
|
} else if (pad == dvdemux->audiosrcpad) {
|
||||||
if (src_value)
|
if (src_value)
|
||||||
*dest_value =
|
*dest_value =
|
||||||
|
@ -329,6 +331,8 @@ gst_dvdemux_src_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
|
||||||
done:
|
done:
|
||||||
gst_object_unref (dvdemux);
|
gst_object_unref (dvdemux);
|
||||||
|
|
||||||
|
GST_INFO ("Result : dest_format:%d, dest_value:%lld, res:%d",
|
||||||
|
*dest_format, *dest_value, res);
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
@ -351,6 +355,8 @@ gst_dvdemux_sink_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
GST_DEBUG ("%d -> %d", src_format, *dest_format);
|
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)
|
if (*dest_format == GST_FORMAT_DEFAULT)
|
||||||
*dest_format = GST_FORMAT_TIME;
|
*dest_format = GST_FORMAT_TIME;
|
||||||
|
@ -396,6 +402,8 @@ gst_dvdemux_sink_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
|
||||||
default:
|
default:
|
||||||
res = FALSE;
|
res = FALSE;
|
||||||
}
|
}
|
||||||
|
GST_INFO ("Result : dest_format:%d, dest_value:%lld, res:%d",
|
||||||
|
*dest_format, *dest_value, res);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
gst_object_unref (dvdemux);
|
gst_object_unref (dvdemux);
|
||||||
|
@ -659,6 +667,7 @@ gst_dvdemux_handle_src_event (GstPad * pad, GstEvent * event)
|
||||||
&cur_type, &cur, &stop_type, &stop);
|
&cur_type, &cur, &stop_type, &stop);
|
||||||
|
|
||||||
if ((offset = cur) != -1) {
|
if ((offset = cur) != -1) {
|
||||||
|
GST_INFO ("starting conversion of cur");
|
||||||
/* bring the format to time on srcpad. */
|
/* bring the format to time on srcpad. */
|
||||||
conv = GST_FORMAT_TIME;
|
conv = GST_FORMAT_TIME;
|
||||||
if (!(res = gst_pad_query_convert (pad,
|
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 */
|
/* could not convert time format to bytes offset */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
GST_INFO ("Finished conversion of cur, BYTES cur : %lld",
|
||||||
|
start_position);
|
||||||
} else {
|
} else {
|
||||||
start_position = -1;
|
start_position = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((offset = stop) != -1) {
|
if ((offset = stop) != -1) {
|
||||||
|
GST_INFO ("starting conversion of stop");
|
||||||
/* bring the format to time on srcpad. */
|
/* bring the format to time on srcpad. */
|
||||||
conv = GST_FORMAT_TIME;
|
conv = GST_FORMAT_TIME;
|
||||||
if (!(res = gst_pad_query_convert (pad,
|
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 */
|
/* could not convert seek format to bytes offset */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
GST_INFO ("Finished conversion of stop, BYTES cur : %lld",
|
||||||
|
start_position);
|
||||||
} else {
|
} else {
|
||||||
end_position = -1;
|
end_position = -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue