Commit graph

20703 commits

Author SHA1 Message Date
Sebastian Dröge
d5069d27ef Revert "decodebin2: Set a time limit on "upstream" multiqueues"
This reverts commit 07dc9ba071. It causes
timeouts in validate because queues run full before prerolling.
2017-05-31 12:30:40 +03:00
Edward Hervey
07dc9ba071 decodebin2: Set a time limit on "upstream" multiqueues
Those multiqueue are the ones dealing with adaptive demuxers. They should
have a time limit set so that they don't end up buffering too much data.

They would previously be set with no limits at all, which would cause them
to grow indefinitely until downstream blocks.
2017-05-31 10:27:19 +03:00
Mathieu Duponchelle
5d6b3b60cb gst-discoverer: use state changes instead of ASYNC_DONE.
And monitor no_more_pads.

With live sources such as rtsp, uridecodebin only creates its
child decodebins between PAUSED and PLAYING.

This means that the ASYNC_DONE it posts when getting NO_PREROLL
in its change_state method gets immediately propagated by the
GstBin parent class, as opposed to a situation where a
decodebin has been added to it already, and has posted ASYNC_START.

The proposed solution, instead of simply waiting for ASYNC_DONE,
and finishing prematurely in that case, waits for three conditions
to be true:

* the uridecodebin needs to have emitted no_more_pads
* its current state must be PAUSED if not live, PLAYING otherwise
* There must be no "pending subtitle pads", ie pads where we haven't
  received tags yet.

All these conditions are checked in the message handler, as we
post custom messages on it when we get subtitle tags or no_more_pads.

https://bugzilla.gnome.org/show_bug.cgi?id=783257
2017-05-31 05:10:21 +02:00
Vincent Penquerc'h
bb0abf8558 oggdemux: fix artifacts at chain boundaries
https://bugzilla.gnome.org/show_bug.cgi?id=782132
2017-05-29 16:22:04 +01:00
Edward Hervey
62df7fdaba pango: Handle failure to multiply fractions
And set PAR back to the default value of 1:1

CID #1409851
2017-05-26 18:02:12 +02:00
Vincent Penquerc'h
523e98396f oggdemux: fix clipping more samples than exist in the first packet
This can happen in Opus (and maybe other codecs ?), and would cause
failure to play.

https://bugzilla.gnome.org/show_bug.cgi?id=782157
2017-05-26 14:41:47 +01:00
Olivier Crête
7108cd2fc8 tests: Make audiomixer test_clip verify the resulting timestamps too 2017-05-23 12:35:58 +02:00
Olivier Crête
e537f3576a tests: audiointerleave: Remove drain with manual clock
Now that the queries go onto the queue, you may need to pull the crank
in order for them to be processed, making this test difficult.
2017-05-23 12:35:58 +02:00
Olivier Crête
4fdb5ab675 videotestsrc: Protect videoinfo with object lock
The videoinfo is set in the streaming thread, but can be read by any
thread from the various queries, so protect it with the object lock.
2017-05-23 08:54:25 +02:00
Olivier Crête
930c3cea40 audioaggregate: Don't hold object locks across calls to aggregate_one
https://bugzilla.gnome.org/show_bug.cgi?id=782878
2017-05-21 18:44:53 +02:00
Tim-Philipp Müller
18e55dcdc0 pbutils: fix stand-alone version header include
Include gst headers for GST_EXPORT.
2017-05-21 17:43:12 +01:00
Tim-Philipp Müller
aa69b69e63 meson: don't need config.h.meson any longer 2017-05-21 17:35:36 +01:00
Olivier Crête
1dc6f66310 glbasemixer: Remove unused negotiated member
This is now all handled in GstAggregator, so this code is not
called anymore.
2017-05-21 18:31:59 +02:00
Olivier Crête
da4913f2f6 videoaggregator: Declare that it supports the video meta on input
https://bugzilla.gnome.org/show_bug.cgi?id=782918
2017-05-21 18:17:54 +02:00
Olivier Crête
a2b0f2771a gl*mixer: Use propose_allocation from the GstAggregator base class
https://bugzilla.gnome.org/show_bug.cgi?id=782918
2017-05-21 18:17:54 +02:00
Olivier Crête
55ab23cc30 audioaggregator: Use downstream allocator and params if available
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-05-21 13:24:29 +02:00
Olivier Crête
af28bcab13 videoaggregator: Create normal video pool as a fallback
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-05-21 13:24:29 +02:00
Olivier Crête
b2d4a6835b glbasemixer: Remove own decide_allocation, use GstAggregator's
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-05-21 13:24:29 +02:00
Olivier Crête
d456da5cbf glbasemixer: Use aggregator for allocation handling
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-05-21 13:24:29 +02:00
Olivier Crête
4a571db4c7 videoaggregator: Get the buffer from the pool if available
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-05-21 13:24:29 +02:00
Mark Nauwelaerts
6d6a6bc3d8 textoverlay: optionally scale text to ensure proper display text aspect ratio
... by prescaling with an inverse aspect scaling as applied by video scaling
2017-05-21 12:46:36 +02:00
Olivier Crête
b488a560ed videoaggregator: Return to parent on reconfigure
The caps negotiation is now in the parent, so need to return there
if a reconfiguration is needed, otherwise it will loops forever.
2017-05-21 12:45:07 +02:00
Tim-Philipp Müller
df160d1989 meson: only check for c++ compiler once 2017-05-21 10:49:20 +01:00
Tim-Philipp Müller
74d974817f meson: make C++ compiler optional
It's only used to check our headers are C++ clean and
for the Qt example.
2017-05-21 09:37:14 +01:00
Olivier Crête
7b2e201bfa audiointerleave: Take object lock while modifying channel count 2017-05-20 17:52:00 +02:00
Edward Hervey
dfa548dc5b videodecoder: Don't queue frames in TRICKMODE_KEY_UNITS
When the input is TRICKMODE_KEY_UNITS, we expect to only receive keyframes
which we want to decode/push immediately. Therefore don't queue them.

If upstream didn't send just keyframes (which is the ideal situation), two
different things can happen:
1) Either the subclass checks the segment flags and properly configures
 the decoder implementation to only decode/output keyframes,
2) Or the subclass really decodes and outputs everything, in which case
 the reverse frames will end up arriving "late" downstream (and will
 be dropped). If upstream did properly send GOP in reverse order, we
 still end up just showing keyframes (but at the overhead of decoding
 everything).

https://bugzilla.gnome.org/show_bug.cgi?id=777094
2017-05-20 17:37:27 +02:00
Guillaume Desmottes
36b7e5890f videorate: stop copying buffers in drop-only mode
gst_video_rate_flush_prev() ensures that the pushed buffer is writable
by calling gst_buffer_make_writable() on videorate->prevbuf.

In drop-only mode we always push buffers directly when they are received
from GstBaseTransform (gst_video_rate_transform_ip()) and do not keep them
around. GstBaseTransform already ensures that those buffers are
writable so there is no need to do it twice.

This change saves us from copying buffers in drop-only mode as we no longer
calls gst_buffer_make_writable() with a buffer having a refcount of 2
(one ref owned by GstBaseTransform and one in videorate->prevbuf).

https://bugzilla.gnome.org/show_bug.cgi?id=780767
2017-05-20 16:35:53 +02:00
Guillaume Desmottes
2c2d2a444c videorate: factor out gst_video_rate_push_buffer()
No semantic change, just factor out this function from
gst_video_rate_flush_prev().

I'm about to use it to change the 'drop-only' code path.

https://bugzilla.gnome.org/show_bug.cgi?id=780767
2017-05-20 16:35:53 +02:00
Matthew Waters
719498601f aggregator: add simple support for caps handling
Modelled off the videoaggregator caps handling as that seems the most
mature aggregtor-using implementation that has caps handling there is.

https://bugzilla.gnome.org/show_bug.cgi?id=776931
2017-05-20 16:21:17 +02:00
Olivier Crête
8a302f1815 aggregator: Remove unused GST_FLOW_NOT_HANDLED 2017-05-20 16:21:17 +02:00
Matthew Waters
57673e608e aggregator: add simple support for caps handling
Modelled off the videoaggregator caps handling as that seems the most
mature aggregtor-using implementation that has caps handling there is.

https://bugzilla.gnome.org/show_bug.cgi?id=776931
2017-05-20 16:21:17 +02:00
George Kiagiadakis
2a60a9f66f videoaggregator: delay using new caps from a sink pad until the next buffer in the queue is taken
When caps changes while streaming, the new caps was getting processed
immediately in videoaggregator, but the next buffer in the queue that
corresponds to this new caps was not necessarily being used immediately,
which resulted sometimes in using an old buffer with new caps. Of course
there used to be a separate buffer_vinfo for mapping the buffer with its
own caps, but in compositor the GstVideoConverter was still using wrong
info and resulted in invalid reads and corrupt output.

This approach here is more safe. We delay using the new caps
until we actually select the next buffer in the queue for use.
This way we also eliminate the need for buffer_vinfo, since the
pad->info is always in sync with the format of the selected buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=780682
2017-05-20 16:21:16 +02:00
Olivier Crête
26819ba296 aggregator: Delay clipping to output thread
This is required because the synchronized events like caps or segments
may only be processed on the output thread.

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Olivier Crête
cbafb022aa tests: Test caps using query
Sending an event can accepted event if the caps were rejected
because the event could be queued and processed later.

Also send a drain query in the caps test to make sure that the
event has been processed.

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Olivier Crête
1e7aaf775f aggregator: Simplify clip function
The return value was ignored anyway

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Tim-Philipp Müller
7fb0aeac10 meson: add options to set package name and origin
https://bugzilla.gnome.org/show_bug.cgi?id=782172
2017-05-20 14:46:51 +01:00
Jan Schmidt
3b3bc34e9a Fix unit test for videodecoder now outputting mono multiview by default 2017-05-19 18:38:45 +02:00
Jan Schmidt
2980e96a50 videodecoder: Output mono multiview caps if none specified
Always put multiview-caps onto the output caps, assuming
mono if we've got no other information. It's still easy for
downstream elements to override using a capssetter or event
probe if desired.

https://bugzilla.gnome.org/show_bug.cgi?id=776172
2017-05-19 18:02:36 +02:00
Sebastian Dröge
cc281e80d6 discoverer: Clean up more fields to decide if parent/child streams are equivalent
https://bugzilla.gnome.org/show_bug.cgi?id=782780
2017-05-18 13:24:19 +03:00
Sebastian Dröge
5614862de1 Revert "discoverer: Consider parent/child streams the same if they have caps with the same name"
This reverts commit 478b7a8eb4.

video/mpeg,systemstream=true / false distinguishes between container and
elementary stream.
2017-05-18 13:13:58 +03:00
Sebastian Dröge
478b7a8eb4 discoverer: Consider parent/child streams the same if they have caps with the same name
Child streams could have more accurate width/height or various other
information added. If they have the same name, they are likely to be the
same streams.

https://bugzilla.gnome.org/show_bug.cgi?id=782697
2017-05-18 11:21:55 +03:00
Sebastian Dröge
efbda07cfa urisourcebin: Unref query with gst_query_unref()
Not gst_object_unref().
2017-05-18 11:03:07 +03:00
vijay
f460d7d184 alsa: Add mapping for PCM F32/F64 formats
Fix enables float pcm formats for both the alsasrc and alsasink

https://bugzilla.gnome.org/show_bug.cgi?id=782695
2017-05-17 10:33:52 -04:00
Sebastian Dröge
67fb3b12ee gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:52 +03:00
Sebastian Dröge
2a8784e218 audioclock: Sink the reference in the constructor
This is now needed as GstClock does not do that internally anymore,
because that broke bindings.

And mark the function correctly as (transfer full), which it already was
before.

https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:52 +03:00
Sebastian Dröge
7185a7ac98 allocators: Annotate constructors with (transfer floating)
GstAllocator is a GstObject and as such uses floating references.

https://bugzilla.gnome.org/show_bug.cgi?id=702960
2017-05-17 10:40:52 +03:00
Nicolas Dufresne
e0d793f793 alsasink: Accept MPEG 1 layer 3 version 2.5
https://bugzilla.gnome.org/show_bug.cgi?id=781929
2017-05-16 15:37:16 -04:00
Nicolas Dufresne
1ceb40cd1e audioringbuffer: Accept MPEG 1 layer 3 version 2.5
https://bugzilla.gnome.org/show_bug.cgi?id=781929
2017-05-16 15:37:16 -04:00
Nicolas Dufresne
c483cbf904 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:05:52 -04:00
Nicolas Dufresne
40f4fc3d84 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:05:52 -04:00