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
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:
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 =
done:
gst_object_unref (dvdemux);
+ GST_INFO ("Result : dest_format:%d, dest_value:%lld, res:%d",
+ *dest_format, *dest_value, res);
return res;
error:
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;
default:
res = FALSE;
}
+ GST_INFO ("Result : dest_format:%d, dest_value:%lld, res:%d",
+ *dest_format, *dest_value, res);
done:
gst_object_unref (dvdemux);
&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,
/* 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,
/* could not convert seek format to bytes offset */
break;
}
+ GST_INFO ("Finished conversion of stop, BYTES cur : %lld",
+ start_position);
} else {
end_position = -1;
}