mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
adapter: remove _try_to_merge_up()
It causes the timestamp to go wrong, should not cause much of a performance increase and in the cases where it is faster, it is broken in 0.10 as well. We should try to review this when rewriting the adapter for 0.11 memory features. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674791
This commit is contained in:
parent
aad3812633
commit
1b87a07d8e
2 changed files with 11 additions and 2 deletions
|
@ -349,6 +349,7 @@ gst_adapter_push (GstAdapter * adapter, GstBuffer * buf)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Internal method only. Tries to merge buffers at the head of the queue
|
||||
* to form a single larger buffer of size 'size'.
|
||||
*
|
||||
|
@ -404,6 +405,7 @@ gst_adapter_try_to_merge_up (GstAdapter * adapter, gsize size)
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* gst_adapter_map:
|
||||
|
@ -451,7 +453,9 @@ gst_adapter_map (GstAdapter * adapter, gsize size)
|
|||
if (adapter->assembled_len >= size)
|
||||
return adapter->assembled_data;
|
||||
|
||||
#if 0
|
||||
do {
|
||||
#endif
|
||||
cur = adapter->buflist->data;
|
||||
skip = adapter->skip;
|
||||
|
||||
|
@ -464,7 +468,9 @@ gst_adapter_map (GstAdapter * adapter, gsize size)
|
|||
}
|
||||
/* We may be able to efficiently merge buffers in our pool to
|
||||
* gather a big enough chunk to return it from the head buffer directly */
|
||||
#if 0
|
||||
} while (gst_adapter_try_to_merge_up (adapter, size));
|
||||
#endif
|
||||
|
||||
/* see how much data we can reuse from the assembled memory and how much
|
||||
* we need to copy */
|
||||
|
@ -757,7 +763,7 @@ gst_adapter_take_buffer (GstAdapter * adapter, gsize nbytes)
|
|||
buffer = gst_buffer_copy_region (cur, GST_BUFFER_COPY_ALL, skip, nbytes);
|
||||
goto done;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (gst_adapter_try_to_merge_up (adapter, nbytes)) {
|
||||
/* Merged something, let's try again for sub-buffering */
|
||||
cur = adapter->buflist->data;
|
||||
|
@ -769,6 +775,7 @@ gst_adapter_take_buffer (GstAdapter * adapter, gsize nbytes)
|
|||
goto done;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
data = gst_adapter_take_internal (adapter, nbytes);
|
||||
|
||||
|
|
|
@ -257,8 +257,10 @@ GST_START_TEST (test_take3)
|
|||
avail = gst_adapter_available (adapter);
|
||||
fail_unless (avail == 0);
|
||||
|
||||
/* the data should be the same */
|
||||
#if 0
|
||||
/* the data should be the same FIXME, implement span in adapter again. */
|
||||
fail_unless (info.data == info2.data);
|
||||
#endif
|
||||
|
||||
gst_buffer_unmap (buffer2, &info2);
|
||||
gst_buffer_unref (buffer2);
|
||||
|
|
Loading…
Reference in a new issue