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 795486 - aggregator: Add default implementation of get_next_time
aggregator: Add default implementation of get_next_time
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-04-23 17:38 UTC by Olivier Crête
Modified: 2018-05-16 20:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
aggregator: Add default implementation of get_next_time (3.22 KB, patch)
2018-04-23 17:38 UTC, Olivier Crête
none Details | Review
audioaggregator: Remove get_next_time implementation (2.06 KB, patch)
2018-04-23 17:39 UTC, Olivier Crête
none Details | Review
flvmux: Remove get_next_time implementation (1.82 KB, patch)
2018-04-23 17:39 UTC, Olivier Crête
none Details | Review
videoaggregator: Remove get_next_time implementation (2.02 KB, patch)
2018-04-23 17:39 UTC, Olivier Crête
none Details | Review
aggregator: Add get_next_time function for live streams (3.00 KB, patch)
2018-05-05 08:56 UTC, Olivier Crête
committed Details | Review
audioaggregator: Remove custom get_next_time implementation (2.16 KB, patch)
2018-05-05 08:57 UTC, Olivier Crête
committed Details | Review
flvmux: Remove custom get_next_time implementation (1.78 KB, patch)
2018-05-05 08:58 UTC, Olivier Crête
committed Details | Review
videoaggregator: Remove custom get_next_time implementation (2.11 KB, patch)
2018-05-05 08:58 UTC, Olivier Crête
committed Details | Review

Description Olivier Crête 2018-04-23 17:38:30 UTC
I just discovered that all 3 subclasses of GstAggregator that we have in the tree have copy pasted implementation so get_next_time(), so I moved it to the base class and removed the copies from the subclasses. So there is one patch for core, one for base, one for good and one for bad!
Comment 1 Olivier Crête 2018-04-23 17:38:47 UTC
Created attachment 371291 [details] [review]
aggregator: Add default implementation of get_next_time

This is the implementation that was in all 3 subclasses: audio, video
and flvmux.
Comment 2 Olivier Crête 2018-04-23 17:39:10 UTC
Created attachment 371292 [details] [review]
audioaggregator: Remove get_next_time implementation

GstAggregator now does the same thing in the default implementation.
Comment 3 Olivier Crête 2018-04-23 17:39:30 UTC
Created attachment 371293 [details] [review]
flvmux: Remove get_next_time implementation

GstAggregator now does the same thing in the default implementation.
Comment 4 Olivier Crête 2018-04-23 17:39:44 UTC
Created attachment 371294 [details] [review]
videoaggregator: Remove get_next_time implementation

GstAggregator now does the same thing in the default implementation.
Comment 5 Thibault Saunier 2018-04-23 19:33:40 UTC
Review of attachment 371291 [details] [review]:

This is sensibly changing the behavior of the base class but if all (known) subclassed were doing the same I guess it is OK.
Comment 6 Olivier Crête 2018-05-05 08:56:46 UTC
Created attachment 371691 [details] [review]
aggregator: Add get_next_time function for live streams

Instead of making it the default implementation, let's make it a helper. Sebastian rightfully reminded me that there are some formats where you can't deal with "holes" in the stream.
Comment 7 Olivier Crête 2018-05-05 08:57:16 UTC
Created attachment 371692 [details] [review]
audioaggregator: Remove custom get_next_time implementation

GstAggregator now offers  same thing in a common implementation.
Comment 8 Olivier Crête 2018-05-05 08:58:26 UTC
Created attachment 371693 [details] [review]
flvmux: Remove custom get_next_time implementation

GstAggregator now does the same thing in the simple implementation.
Comment 9 Olivier Crête 2018-05-05 08:58:56 UTC
Created attachment 371694 [details] [review]
videoaggregator: Remove custom get_next_time implementation

GstAggregator now has the same thing in the simple implementation.
Comment 10 Sebastian Dröge (slomo) 2018-05-14 06:44:52 UTC
mxfmux uses aggregator but has no get_next_time. It can't handle timeouts in live, and would be erroring out whenever that happens.

Apart from that, moving this in one way or another to the base class seems useful but IMHO a breaking change. Subclasses without a get_next_time implementation are currently waiting forever (e.g. mxfmux) in live mode, but with this change would potentially timeout.
Comment 11 Sebastian Dröge (slomo) 2018-05-14 06:45:48 UTC
(forgot to add this comment last weekend)
Comment 12 Olivier Crête 2018-05-16 20:28:34 UTC
Comment on attachment 371691 [details] [review]
aggregator: Add get_next_time function for live streams

Attachment 371691 [details] pushed as 05298b3 - aggregator: Add get_next_time function for live streams

Updated version is based on slomo's comments, I'm just adding a new function that can be used by subclassed without making it the default behaviour.
Comment 13 Olivier Crête 2018-05-16 20:33:56 UTC
Comment on attachment 371692 [details] [review]
audioaggregator: Remove custom get_next_time implementation

Attachment 371692 [details] pushed as 8583f17 - audioaggregator: Remove custom get_next_time implementation
Comment 14 Olivier Crête 2018-05-16 20:37:59 UTC
Comment on attachment 371693 [details] [review]
flvmux: Remove custom get_next_time implementation

Attachment 371693 [details] pushed as 87b2b35 - flvmux: Remove custom get_next_time implementation
Comment 15 Olivier Crête 2018-05-16 20:43:02 UTC
Attachment 371694 [details] pushed as feb6002 - videoaggregator: Remove custom get_next_time implementation