mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
Back out previous code changes, leave doc updates, file bugs instead.
Original commit message from CVS: * gst/gstcaps.c: (gst_caps_is_equal): * plugins/elements/gstfakesrc.c: (gst_fake_src_class_init), (gst_fake_src_create): Back out previous code changes, leave doc updates, file bugs instead.
This commit is contained in:
parent
5a4eb38077
commit
0aa5cea288
3 changed files with 14 additions and 35 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2005-12-05 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/gstcaps.c: (gst_caps_is_equal):
|
||||||
|
* plugins/elements/gstfakesrc.c: (gst_fake_src_class_init),
|
||||||
|
(gst_fake_src_create):
|
||||||
|
Back out previous code changes, leave doc updates, file bugs
|
||||||
|
instead.
|
||||||
|
|
||||||
2005-12-05 Wim Taymans <wim@fluendo.com>
|
2005-12-05 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* plugins/elements/gstfakesrc.c: (gst_fake_src_class_init),
|
* plugins/elements/gstfakesrc.c: (gst_fake_src_class_init),
|
||||||
|
|
|
@ -872,10 +872,8 @@ gst_caps_is_equal (const GstCaps * caps1, const GstCaps * caps2)
|
||||||
if (caps1 == caps2)
|
if (caps1 == caps2)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* one of them NULL => they are different (can't be both NULL because
|
g_return_val_if_fail (caps1 != NULL, FALSE);
|
||||||
* we checked that above) */
|
g_return_val_if_fail (caps2 != NULL, FALSE);
|
||||||
if (caps1 == NULL || caps2 == NULL)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (gst_caps_is_fixed (caps1) && gst_caps_is_fixed (caps2))
|
if (gst_caps_is_fixed (caps1) && gst_caps_is_fixed (caps2))
|
||||||
return gst_caps_is_equal_fixed (caps1, caps2);
|
return gst_caps_is_equal_fixed (caps1, caps2);
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
* SECTION:element-fakesrc
|
* SECTION:element-fakesrc
|
||||||
* @short_description: Generate (meaningless) buffers
|
* @short_description: Generate (meaningless) buffers
|
||||||
* @see_also: #GstFakeSink
|
* @see_also: #GstFakeSink
|
||||||
*
|
*
|
||||||
* <refsect2>
|
* <refsect2>
|
||||||
* <para>
|
* <para>
|
||||||
* The fakesrc element is a multipurpose element that can generate
|
* The fakesrc element is a multipurpose element that can generate
|
||||||
|
@ -225,8 +225,6 @@ static gboolean gst_fake_src_stop (GstBaseSrc * basesrc);
|
||||||
static gboolean gst_fake_src_is_seekable (GstBaseSrc * basesrc);
|
static gboolean gst_fake_src_is_seekable (GstBaseSrc * basesrc);
|
||||||
|
|
||||||
static gboolean gst_fake_src_event_handler (GstBaseSrc * src, GstEvent * event);
|
static gboolean gst_fake_src_event_handler (GstBaseSrc * src, GstEvent * event);
|
||||||
static void gst_fake_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer,
|
|
||||||
GstClockTime * start, GstClockTime * end);
|
|
||||||
static GstFlowReturn gst_fake_src_create (GstBaseSrc * src, guint64 offset,
|
static GstFlowReturn gst_fake_src_create (GstBaseSrc * src, guint64 offset,
|
||||||
guint length, GstBuffer ** buf);
|
guint length, GstBuffer ** buf);
|
||||||
|
|
||||||
|
@ -342,7 +340,6 @@ gst_fake_src_class_init (GstFakeSrcClass * klass)
|
||||||
gstbase_src_class->start = GST_DEBUG_FUNCPTR (gst_fake_src_start);
|
gstbase_src_class->start = GST_DEBUG_FUNCPTR (gst_fake_src_start);
|
||||||
gstbase_src_class->stop = GST_DEBUG_FUNCPTR (gst_fake_src_stop);
|
gstbase_src_class->stop = GST_DEBUG_FUNCPTR (gst_fake_src_stop);
|
||||||
gstbase_src_class->event = GST_DEBUG_FUNCPTR (gst_fake_src_event_handler);
|
gstbase_src_class->event = GST_DEBUG_FUNCPTR (gst_fake_src_event_handler);
|
||||||
gstbase_src_class->get_times = GST_DEBUG_FUNCPTR (gst_fake_src_get_times);
|
|
||||||
gstbase_src_class->create = GST_DEBUG_FUNCPTR (gst_fake_src_create);
|
gstbase_src_class->create = GST_DEBUG_FUNCPTR (gst_fake_src_create);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -701,33 +698,6 @@ gst_fake_src_create_buffer (GstFakeSrc * src)
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gst_fake_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer,
|
|
||||||
GstClockTime * start, GstClockTime * end)
|
|
||||||
{
|
|
||||||
GstFakeSrc *src;
|
|
||||||
|
|
||||||
src = GST_FAKE_SRC (basesrc);
|
|
||||||
|
|
||||||
/* sync on the timestamp of the buffer if requested. */
|
|
||||||
if (src->sync) {
|
|
||||||
GstClockTime timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
|
||||||
|
|
||||||
if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
|
|
||||||
/* get duration to calculate end time */
|
|
||||||
GstClockTime duration = GST_BUFFER_DURATION (buffer);
|
|
||||||
|
|
||||||
if (GST_CLOCK_TIME_IS_VALID (duration)) {
|
|
||||||
*end = timestamp + duration;
|
|
||||||
}
|
|
||||||
*start = timestamp;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
*start = -1;
|
|
||||||
*end = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_fake_src_create (GstBaseSrc * basesrc, guint64 offset, guint length,
|
gst_fake_src_create (GstBaseSrc * basesrc, guint64 offset, guint length,
|
||||||
GstBuffer ** ret)
|
GstBuffer ** ret)
|
||||||
|
@ -743,6 +713,9 @@ gst_fake_src_create (GstBaseSrc * basesrc, guint64 offset, guint length,
|
||||||
|
|
||||||
if (src->datarate > 0) {
|
if (src->datarate > 0) {
|
||||||
time = (src->bytes_sent * GST_SECOND) / src->datarate;
|
time = (src->bytes_sent * GST_SECOND) / src->datarate;
|
||||||
|
if (src->sync) {
|
||||||
|
/* gst_element_wait (GST_ELEMENT (src), time); */
|
||||||
|
}
|
||||||
|
|
||||||
GST_BUFFER_DURATION (buf) =
|
GST_BUFFER_DURATION (buf) =
|
||||||
GST_BUFFER_SIZE (buf) * GST_SECOND / src->datarate;
|
GST_BUFFER_SIZE (buf) * GST_SECOND / src->datarate;
|
||||||
|
|
Loading…
Reference in a new issue