After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751918 - dataqueue: Make it understand buffers, segments, gaps
dataqueue: Make it understand buffers, segments, gaps
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-03 16:56 UTC by Olivier Crête
Modified: 2018-11-03 12:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
multiqueue: gst_m_q_buffer_item_new() is only for buffers (1.96 KB, patch)
2015-07-03 16:57 UTC, Olivier Crête
none Details | Review
multiqueue: Use actual GstDataQueueItem instead of mimicking it (2.91 KB, patch)
2015-07-03 16:57 UTC, Olivier Crête
none Details | Review
multiqueue: Move setting the dataqueueitem contents into dataqueue (2.46 KB, patch)
2015-07-03 16:57 UTC, Olivier Crête
none Details | Review
dataqueue: Also set duration from GAP events (1.49 KB, patch)
2015-07-03 16:57 UTC, Olivier Crête
none Details | Review
dataqueue: Use cleanup function to initialize (2.42 KB, patch)
2015-07-03 16:57 UTC, Olivier Crête
none Details | Review
multiqueue: Hold lock while reading sq->flushing (1.17 KB, patch)
2015-07-03 16:57 UTC, Olivier Crête
none Details | Review
dataqueue: Migrate timestamp handling code from multiqueue (30.17 KB, patch)
2015-07-03 16:57 UTC, Olivier Crête
none Details | Review
dataqueue: Treat gap event like as if they were buffers (1.31 KB, patch)
2015-07-03 16:57 UTC, Olivier Crête
none Details | Review
dataqueue: Add non-blocking peek function (2.76 KB, patch)
2015-07-03 16:57 UTC, Olivier Crête
none Details | Review
queuearray: Make the find finding return a zero-based index (5.32 KB, patch)
2015-07-03 16:57 UTC, Olivier Crête
none Details | Review
queuearray: Add gst_queue_array_foreach() (4.83 KB, patch)
2015-07-03 16:58 UTC, Olivier Crête
none Details | Review
dataqueue: Add foreach function (4.23 KB, patch)
2015-07-03 16:58 UTC, Olivier Crête
none Details | Review
queuearray: Make the find finding return a zero-based index (6.17 KB, patch)
2015-07-06 20:29 UTC, Olivier Crête
reviewed Details | Review
queuearray: Add gst_queue_array_foreach() (5.10 KB, patch)
2015-07-06 20:29 UTC, Olivier Crête
none Details | Review
queuearray: Make the find finding return a zero-based index (3.22 KB, patch)
2015-07-08 18:00 UTC, Olivier Crête
none Details | Review

Description Olivier Crête 2015-07-03 16:56:47 UTC
In practice, every queue in GStreamer is buffers and synchronized events/queries, so it doesn't make sense to have a GstDataQueue that tries to abstract them, then re-implement the processing every it's used. As we integrate queues in more elements (like in demuxers), we can reduce duplication.
Comment 1 Olivier Crête 2015-07-03 16:57:18 UTC
Created attachment 306746 [details] [review]
multiqueue: gst_m_q_buffer_item_new() is only for buffers

Simplify by treating it as such.
Comment 2 Olivier Crête 2015-07-03 16:57:23 UTC
Created attachment 306747 [details] [review]
multiqueue: Use actual GstDataQueueItem instead of mimicking it
Comment 3 Olivier Crête 2015-07-03 16:57:27 UTC
Created attachment 306748 [details] [review]
multiqueue: Move setting the dataqueueitem contents into dataqueue
Comment 4 Olivier Crête 2015-07-03 16:57:31 UTC
Created attachment 306749 [details] [review]
dataqueue: Also set duration from GAP events
Comment 5 Olivier Crête 2015-07-03 16:57:35 UTC
Created attachment 306750 [details] [review]
dataqueue: Use cleanup function to initialize

Reduces code duplication a little
Comment 6 Olivier Crête 2015-07-03 16:57:40 UTC
Created attachment 306751 [details] [review]
multiqueue: Hold lock while reading sq->flushing
Comment 7 Olivier Crête 2015-07-03 16:57:45 UTC
Created attachment 306752 [details] [review]
dataqueue: Migrate timestamp handling code from multiqueue

Move the code to handle segments and timestamps from the multiqueue
into the dataqueue.
Comment 8 Olivier Crête 2015-07-03 16:57:49 UTC
Created attachment 306753 [details] [review]
dataqueue: Treat gap event like as if they were buffers
Comment 9 Olivier Crête 2015-07-03 16:57:53 UTC
Created attachment 306754 [details] [review]
dataqueue: Add non-blocking peek function
Comment 10 Olivier Crête 2015-07-03 16:57:58 UTC
Created attachment 306755 [details] [review]
queuearray: Make the find finding return a zero-based index

This makes it possible to know from the index if the returned item was
the head or the tail of the queue.
Comment 11 Olivier Crête 2015-07-03 16:58:02 UTC
Created attachment 306756 [details] [review]
queuearray: Add gst_queue_array_foreach()

This has an option to drop the elements as the queue is traversed.
Comment 12 Olivier Crête 2015-07-03 16:58:07 UTC
Created attachment 306757 [details] [review]
dataqueue: Add foreach function

This foreach function can also be used to remove items when
it returns FALSE.
Comment 13 Olivier Crête 2015-07-06 20:29:43 UTC
Created attachment 306956 [details] [review]
queuearray: Make the find finding return a zero-based index

Updated patch against Tim's dataqueue updates

This makes it possible to know from the index if the returned item was
the head or the tail of the queue.
Comment 14 Olivier Crête 2015-07-06 20:29:58 UTC
Created attachment 306957 [details] [review]
queuearray: Add gst_queue_array_foreach()

Updated patch against Tim's dataqueue updates

This has an option to drop the elements as the queue is traversed.
Comment 15 Tim-Philipp Müller 2015-07-08 14:32:25 UTC
Comment on attachment 306956 [details] [review]
queuearray: Make the find finding return a zero-based index

Isn't it possible to do this with less code churn (the s/idx/index/ everywhere)? Is 'idx' used again after the 'index = ...'? If not, can't we just do 'idx = ...' ?
Comment 16 Olivier Crête 2015-07-08 18:00:03 UTC
Created attachment 307099 [details] [review]
queuearray: Make the find finding return a zero-based index

Updated patch which doesn't rename the variable, the resulting code
is a bit more confusing, but the patch is a low shorter.

This makes it possible to know from the index if the returned item was
the head or the tail of the queue.
Comment 17 GStreamer system administrator 2018-11-03 12:28:33 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/120.