Commit graph

3595 commits

Author SHA1 Message Date
Thibault Saunier
806ff70590 compositor: Add support for crossfade blending
Crossfading is a bit more complex than just having two pads with the
right keyframes as the blending is not exactly the same.

The difference is in the way we compute the alpha channel, in the case
of crossfading, we have to compute an additive operation between
the destination and the source (factored by the alpha property of both
the input pad alpha property and the crossfading ratio) basically so
that the crossfade result of 2 opaque frames is also fully opaque at any
time in the crossfading process, avoid bleeding through the layer
blending.

Some rationnal can be found in https://phabricator.freedesktop.org/T7773.

https://bugzilla.gnome.org/show_bug.cgi?id=784827
2017-08-03 12:59:43 -04:00
Julien Isorce
b89c94b37e gl: return NULL mem if eglCreateImage failed
Found on rpi when gpu_mem is too low so there is not enough memory to
create the eglimage. But still gst_buffer_pool_acquire_buffer succeeded.
And it leads to a CRITICAL assert:
  gst_egl_image_get_image: assertion 'GST_IS_EGL_IMAGE (image)' failed

https://bugzilla.gnome.org/show_bug.cgi?id=785518
2017-08-01 10:32:36 +01:00
Stefan Sauer
1db572bf4f aggregator: log all events
We already log a few events explicitly, just log them all with more detail.
2017-07-30 12:19:35 +02:00
Tim-Philipp Müller
6ac76b3dd7 aggregator: fix header formatting 2017-07-29 16:54:38 +01:00
Matthew Waters
25ec84fa63 gl: document missing GstGLShader functions 2017-07-28 16:58:38 +01:00
Matthew Waters
3d2785965d gl/docs: some documentation updates
Add some missing/incomplete docs
2017-07-28 11:00:12 +01:00
Matthew Waters
23da53306f gl/docs: correctly name our objects in the documentation GstGl -> GstGL 2017-07-27 12:40:30 +10:00
Matthew Waters
bb3478da5b gl/docs: document GstGLFormat enum 2017-07-27 12:40:30 +10:00
Stefan Sauer
d3c8462e6c audioaggregator: use local var
Instead of the self->priv-> deref use the local var we created already.
2017-07-26 09:43:52 +02:00
Sebastian Dröge
7c3bfbb512 aggregator: Remove the GAP event from the queue before queueing up the GAP buffer
Otherwise check_events() will not remove the GAP event (as the queue
tail is not the event anymore but the GAP buffer), then the GAP buffer
is handled, then the GAP event is handled again, ... forever.
2017-07-24 18:38:57 +03:00
Tim-Philipp Müller
38726eb341 gl: fix g-i annotations for glframebuffer
gstglframebuffer.c:176: Error: GstGL: annotations not supported for tag "Since:".
2017-07-21 08:43:45 +01:00
Alessandro Decina
85e5c7b4d9 meson: specify fallback for libgmodule_dep
Fixes build with glib built as a subproject.
2017-07-20 17:51:41 +10:00
Tim-Philipp Müller
93c379a3fc video: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
059cc73487 uridownloader: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
ce8485a585 player: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
00bc9d7070 opencv: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
659fa31cf9 mpegts: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
8de28a4226 photography: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
6f47205321 insertbin: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
d9354b83bb codecparsers: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
7a28f62222 basecamerabinsrc: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
670c7433a6 aggregator: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
859f96615f audio: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
97e1fb6376 allocators: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
9fb266ce5c adaptivedemux: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Edward Hervey
9da1328283 meson: Fix GLES2 check
On systems without pkg-config, we have the the library present but
not the headers

https://bugzilla.gnome.org/show_bug.cgi?id=785010
2017-07-17 08:52:57 +02:00
Philippe Normand
dcb35318e9 glwindow_cocoa: fix video overlay support
Make sure the window handle is configured after the NSWindow was created.

https://bugzilla.gnome.org/show_bug.cgi?id=767462
2017-07-16 10:21:29 +01:00
Matthew Waters
24e3cbf13b gl/cocoa: keep refs over async operations
Avoids dereferencing dead objects

What happens in the autovideosink case is that context 1 is created and
destroyed before all the async operations hae executed on the associated
window.  When the delayed operations execute, they then reference dead
objects and crash.

We fix this by keeping refs over all async operations so the object
cannot be deleted while async operations are in flight.

https://bugzilla.gnome.org/show_bug.cgi?id=782379
2017-07-16 12:50:31 +10:00
Matthew Waters
1656d8000d gl/window/x11: implement set_render_rectangle support
https://bugzilla.gnome.org/show_bug.cgi?id=782959
2017-07-16 12:50:31 +10:00
Stefan Sauer
b0e2b2b71b aggregator: remove duplicated code fragment
This code already runs above when (event || query).
2017-07-13 22:02:17 +02:00
Stefan Sauer
893c11136b aggregator: code cleanups
Fix comment typos, some copy'n'paste in logging. Add more doc comments.
2017-07-13 22:02:17 +02:00
Edward Hervey
50f92fab89 adaptivedemux: Workaround for live seek ranges when advancing
This is a workaround for a regression introduced by
f4190a49c0
 ( adaptivedemux: Check live seeking range more often )

The goal of the previous commit was to be able to cope with non-1.0
rates on live streams which have a "seeking window" (i.e. the server
keeps around quite a bit of the live stream so you can seek back into
it).

Without that commit, two different kind of issues would happen:
* When doing reverse playback, you would never check whether you
  are outside of the seekable region. And would then continuously
  try to download fragments that are no longer present.
* When doing fast forward, you would end up requesting fragments
  which are not present yet.

In order to determine whether one was *really* outside of the seekable
window, we check whether the current stream position is still
within the seekable region.

The *problem* though with that commit is that it assumes that subclasses
will return continuously updated seeking ranges (i.e. dependent on the
current time), which is *NOT* the case.

For example:
* dashdemux does use the current UTC to determine the seekable region
* hlsdemux uses the values from the last updated manifest

Therefore if one downloads fragments faster than realtime, for HLS
we would end up at the end of the last manifest seekable range, and
the previous commit would consider the stream as being ended... which
is not the case.

In the long run, we need to figure out a way to cope with non-1.0
rates on live streams for all types of stream (including HLS).

https://bugzilla.gnome.org/show_bug.cgi?id=783075
2017-07-13 14:44:11 +02:00
Thiago Santos
33afa6bd18 adaptivedemux: small refactor to avoid repeated code
Move segment event update to a function

https://bugzilla.gnome.org/show_bug.cgi?id=773159
2017-07-12 10:13:39 +02:00
Edward Hervey
1df725e5cd adaptivedemux: Handle prepared streams on seeks
This is a race that was exposed by the {hls|dash}.scrub_forward_seeking
validate test.

The "race" is that a subclass might want to change format, causing
a new stream to be created (but not exposed/switched yet) and put on the
prepared_streams list. That stream will have values (including pending
segment) from the pre-seek state.

Before the stream is exposed/switched, a new seek comes in and the stream
values get updated ... but the ones that will be changed don't get updated
causing them to push out wrong segments once they are exposed.

https://bugzilla.gnome.org/show_bug.cgi?id=773159
2017-07-12 10:13:39 +02:00
Jan Schmidt
6083ad6287 glfilter: Remove hard-coded pad templates
Add a function to install the default RGBA pad templates,
but don't make them required so that there can be
GstGLFilter sub-classes with different input/output
caps if they want. Remove the hard-coded RGBA restriction in
the set_caps_features call, as it will be taken care
of by intersecting with the pad templates.

Update all the sub-classes to match
2017-07-12 15:50:24 +10:00
Jan Schmidt
cb3a65a19a glupload: Don't throw assertions on invalid allocation query
basesrc can send an allocation query with no caps, in which
case we should just fail it without throwing assertions.
2017-07-12 15:48:23 +10:00
Nicolas Dufresne
2f8980d70d Revert "adaptivedemux: Allow application to force EOS"
This reverts commit 8a070cf9af.
2017-07-07 17:20:38 -04:00
Nicolas Dufresne
8a070cf9af adaptivedemux: Allow application to force EOS
Adaptive demuxers are special demuxers that runs their own sources
internally. In this patch we flag the demuxer as being a source in order
to receive the downstream events. We then handle the EOS event by
resetting the internal state and pushing EOS on all pads. This handling
is done asynchronously to avoid blocking user thread.

https://bugzilla.gnome.org/show_bug.cgi?id=723868
2017-07-07 14:36:38 -04:00
Mathieu Duponchelle
3899b2f6e9 aggregator: Invalidate pad's tail position ...
when dequeuing a segment event.

https://bugzilla.gnome.org/show_bug.cgi?id=784593
2017-07-06 16:22:01 +02:00
Mathieu Duponchelle
0478773155 videoaggregator: fix gaps at end of streams.
When the pad has received EOS, its buffer may still be mixed
any number of times, when the pad's framerate is inferior
to the output framerate.

This was introduced by my patch in
https://bugzilla.gnome.org/show_bug.cgi?id=782962, this patch
also correctly addresses the initial issue.
2017-07-06 04:02:38 +02:00
Tim-Philipp Müller
2db4ff751f codecparsers: h264: flesh out documentation for GST_H264_PARSER_NO_NAL_END 2017-07-04 15:28:36 +01:00
Stefan Sauer
179b583693 aggregator: fix "'aggclass' may be used uninitialized in this function" 2017-07-01 20:23:25 +02:00
Julien Isorce
86ae9777ad glupload: add GST_CAPS_FEATURE_MEMORY_DMABUF
Insert before SystemMemory to advice upstream elements that it is
preferable for them to push dmabuf with the caps feature.

Examples:

/* Discard memory:DMABuf caps feature */
GST_GL_PLATFORM=egl GST_GL_API=gles2 GST_GL_WINDOW=x11 gst-launch-1.0 \
    filesrc location=test.mp4 ! qtdemux ! h264parse ! vaapih264dec ! \
    capsfilter caps="video/x-raw(memory:SystemMemory)" ! glimagesink

/* Force memory:DMABuf caps feature. */
GST_GL_PLATFORM=egl GST_GL_API=gles2 GST_GL_WINDOW=x11 gst-launch-1.0 \
    filesrc location=test.mp4 ! qtdemux ! h264parse ! vaapih264dec ! \
    capsfilter caps="video/x-raw(memory:DMABuf)" ! glimagesink

/* Auto select memory:DMABuf caps feature.  */
GST_GL_PLATFORM=egl GST_GL_API=gles2 GST_GL_WINDOW=x11 gst-launch-1.0 \
    filesrc location=test.mp4 ! qtdemux ! h264parse ! vaapih264dec ! \
    glimagesink

https://bugzilla.gnome.org/show_bug.cgi?id=774649
2017-06-30 08:31:20 +01:00
Matthew Waters
effda87a0b gl: reset gl->DrawBuffer to the necessary values
GL_COLOR_ATTACHMENT0 when a framebuffer is bound
GL_BACK if no framebuffer is bound

https://bugzilla.gnome.org/show_bug.cgi?id=784210
2017-06-29 14:59:12 +10:00
Hyunjun Ko
02ef39f48a glmemory: reset the draw buffer to GL_BACK
The draw buffer should be reset to GL_BACK since the framebuffer is already
unbound.

https://bugzilla.gnome.org/show_bug.cgi?id=784210
2017-06-29 14:59:12 +10:00
Nicolas Dufresne
55e701a373 meson: Re-add pkg-config support for bcm_host
Now we just fallback to find_library for Rasbian jessy and older.

https://bugzilla.gnome.org/show_bug.cgi?id=784026
2017-06-22 12:20:25 -04:00
Guillaume Desmottes
859daad65d gl: meson: use cc.find_library() to detect 'bcm_host'
On the raspberry pi no pkg-config file is provided for the bcm_host
library. We are using AC_CHECK_LIB to detect this lib with autotools,
cc.find_library() library is a closer meson equivalent.

https://bugzilla.gnome.org/show_bug.cgi?id=784026
2017-06-21 11:44:22 -04:00
Sebastian Dröge
450b1c92ab gl/cocoa: Put gstglwindow_cocoa.h into noinst_HEADERS again
And remove gstgldisplay_cocoa.h instead, which got moved to the
installed headers earlier.
2017-06-20 19:20:19 +03:00
Sebastian Dröge
f845208d79 glupload: Fix DirectVIV uploader for formats with a single plane
We have to pass the "height" as height = vmeta->offset[1] / width to the
API, which of course does not work well for formats with only a single
plane. Use the whole memory size instead of the offset in that case.
2017-06-12 22:29:01 +03:00
Vincent Penquerc'h
e5a0c4a751 jpeg2000sampling: fix critical when sampling is missing from caps
This can happen with real files
2017-06-08 16:17:43 +01:00
Seungha Yang
87cb9fa49e adaptivedemux: Clear "cancelled" on uridownloader before processing manifest
Previous commit let demux call gst_uri_downloader_cancel() on _demux_reset().
Note that, _demux_reset() called during PAUSED_TO_READY and READY_TO_PAUSED.
And, it will set "cancelled" on uridownloader which blocks the use of
uridownloader. The issue is that, subclass can use the uridownloader not only
live streaming for manifest update, but also for fetching another manifests
such as variant and rendition m3u8 of hls streaming. So to unblock it,
demux should clear "cancelled" before processing initial manifest.

https://bugzilla.gnome.org/show_bug.cgi?id=783401
2017-06-06 19:21:56 -07:00
Mathieu Duponchelle
694da006e0 adaptivedemux: release the manifest lock ...
before broadcasting preroll.

The deadlock was as follows:

-> The subclass pushes a buffer on a newly-created stream in T1
-> We take the preroll lock in T1, to handle_preroll
-> The demuxer is stopped in T2, we take the MANIFEST_LOCK
-> T1 starts blocking because it received a reconfigure event
   and needs to take the MANIFEST_LOCK
-> T2 deadlocks because it now wants the preroll_lock.

https://bugzilla.gnome.org/show_bug.cgi?id=783255
2017-06-01 15:27:07 +02:00
Thiago Santos
5a693fdd9d adaptivedemux: do not erase data while updates-loop is running
Make sure the manifest update loop is stopped before proceeding with the
resetting of the manifest data. Otherwise, the updates loop will try to
use it and it leads to a segfault

https://bugzilla.gnome.org/show_bug.cgi?id=783028
2017-06-01 15:27:07 +02:00
Jeremy Hiatt
3620268325 glutils: Fix GValue leak in gst_gl_value_set_texture_target_from_mask() 2017-06-01 14:39:49 +03:00
Mathieu Duponchelle
c88125045f adaptivedemux: make sure to free all "old streams"
As we release the MANIFEST_LOCK in stop_tasks,
demux->priv->old_streams can be set, we need to free these
otherwise we may end up trying to dispose elements in the
READY state.

https://bugzilla.gnome.org/show_bug.cgi?id=783256
2017-06-01 11:13:46 +02:00
Edward Hervey
b104fb203a adaptivedemux: Don't be too aggressive with seek ranges
When an accurate seek is requested on a live stream, only requests the
exact value for the "starting position" (i.e. start in forward playback
and stop in reverse playback).

https://bugzilla.gnome.org/show_bug.cgi?id=782698
2017-05-31 11:34:41 +02:00
Edward Hervey
304a628de7 nonstreamaudio: Avoid using wrong variable
And to make that 100% obvious, only use variables declared within the
switch cases instead of function-wide ones.

Also remove useless one-time-use-only variable.

CID #1409857
2017-05-26 17:44:40 +02:00
Edward Hervey
2a193cde84 nonstreamaudio: Avoid using un-initialized value
We would end up with cur_position not set but proceed being at its
default value of TRUE. Instead, properly set proceed to FALSE

CID #1409855
2017-05-26 17:44:17 +02:00
Edward Hervey
cf362be9ff adaptivedemux: Fix debugging message
GstSegment position is a guint64 and not a gint64

CID #1409910
2017-05-26 17:30:34 +02:00
Edward Hervey
f4190a49c0 adaptivedemux: Check live seeking range more often
The live seeking range was only checked when doing actual seeks. This was
assuming that the rate would always be 1.0 (i.e. the playback would
advance in realtime, and therefore fragments would always be available
since the seeking window moves at the same rate).

With non-1.0 rates, this no longer becomes valid, and therefore we need
to check whether we are still within the live seeking range when advancing.

https://bugzilla.gnome.org/show_bug.cgi?id=783075
2017-05-26 11:51:14 +02:00
Edward Hervey
2cf4ece73b adaptivedemux: Don't create invalid event
tags could potentially be NULL
2017-05-26 09:55:42 +02:00
Matthew Waters
430a90df20 adaptivedemux: retry download MAX_DOWNLOAD_RETRY_COUNT times before erroring
What we want is to retry downloading the fragment on 4xx/5xx errors
however returning EOS will cause waiting for a manifest update for live
(which may be a really long time) or stop everything for non-live.

Change that to only return EOS/ERROR once we've reached the error limit.

https://bugzilla.gnome.org/show_bug.cgi?id=776609
2017-05-25 13:33:35 +03:00
Sebastian Dröge
be08f0f9a8 gl: Fix indentation 2017-05-25 13:06:03 +03:00
Sebastian Dröge
2434305ec5 glframebuffer: #define GL_READ_FRAMEBUFFER / GL_DRAW_FRAMEBUFFER if not defined yet
Just like we do elsewhere already.
2017-05-25 13:05:23 +03:00
Haihua Hu
c2b2c68bea glformat: fix the usage of GST_GL_RGB565
GL_RGB565 is sized internal glformat, the corresponding glformat
should be GL_RGB and type is GL_UNSIGNED_SHORT_565. Otherwise will
return GL_INVALID_ENUM when creating texture.

https://bugzilla.gnome.org/show_bug.cgi?id=783066
2017-05-25 12:34:12 +03:00
Haihua Hu
405d059a22 glframebuffer: check frame buffer status need use specific fbo target
https://bugzilla.gnome.org/show_bug.cgi?id=783065
2017-05-25 12:34:04 +03:00
Olivier Crête
86a256aebc aggregator: Process serialized queries through the queue
This ensures that they really get processed in order with
buffers. Just waiting for the queue to be empty is sometimes not
enough as the buffers are dropped from the pad before the result is
pushed to the next element, sometimes resulting in surprising
re-ordering.
2017-05-23 12:35:58 +02:00
Olivier Crête
9e2640ba95 aggregator: Set flow to FLUSHING on pad stop
Fixes a rare race where the pad is being stopped while doing a query.
2017-05-23 12:35:58 +02:00
Carlos Rafael Giani
2e4c6d6a49 audio: Add nonstreamaudiodecoder base class
https://bugzilla.gnome.org/show_bug.cgi?id=768576
2017-05-22 16:34:05 +02:00
Olivier Crête
5443aa9ac8 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
Olivier Crête
fbfc427552 aggregator: Request pad templates which are not request pad
https://bugzilla.gnome.org/show_bug.cgi?id=782920
2017-05-21 18:39:49 +02:00
Olivier Crête
8f0fba54b5 aggregator: Don't restrict sink pad names
Sink pads could have other names than sink_%u

https://bugzilla.gnome.org/show_bug.cgi?id=782920
2017-05-21 18:39:09 +02:00
Olivier Crête
68bb5bfecc 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
431dc9720a aggregator: Implement propose allocation
https://bugzilla.gnome.org/show_bug.cgi?id=782918
2017-05-21 18:17:54 +02:00
Olivier Crête
20bf97f089 aggregator: Check for the result of caps events
https://bugzilla.gnome.org/show_bug.cgi?id=782918
2017-05-21 18:17:54 +02:00
Olivier Crête
a463859eba aggregator: Caps event always goes to the aggregate thread
So no need to check it here.

https://bugzilla.gnome.org/show_bug.cgi?id=782918
2017-05-21 18:17:54 +02:00
Carlos Rafael Giani
d6e46b905a gl/viv-fb: Fix user-choice string comparisons
https://bugzilla.gnome.org/show_bug.cgi?id=782921
2017-05-21 16:52:23 +02:00
Olivier Crête
892693865f 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
ea26b9aa37 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
31bbfd6773 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
Olivier Crête
12197e4bb5 aggregator: Add downstream allocation query
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-05-21 13:24:26 +02:00
Olivier Crête
7b1235940f 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
06ae762211 gl: x11: fix compiler warning 2017-05-21 11:44:37 +01:00
Matthew Waters
15e13bd44e glcontext: add public swap_buffers function
That simply calls the implementation
2017-05-21 12:12:02 +02:00
Graham Leggett
711b006cb9 adaptivedemux: fix debug message printf format
Match gsize to G_GSIZE_FORMAT in the debug message.

https://bugzilla.gnome.org/show_bug.cgi?id=782873
2017-05-20 18:20:34 +01:00
Olivier Crête
583e655234 aggregator: Remove unused GST_FLOW_NOT_HANDLED 2017-05-20 16:21:17 +02:00
Matthew Waters
7c53043386 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
Nicolas Dufresne
ed8512c53e aggregator: Reset upstream latency on first buffer
In the case an aggregator is created and pads are requested but only
linked later, we end up never updating the upstream latency.
This was because latency queries on pads that are not linked succeed,
so we never did a new query once a live source has been linked, so the
thread was never started.

https://bugzilla.gnome.org/show_bug.cgi?id=757548
2017-05-20 16:21:17 +02:00
George Kiagiadakis
39d2526c34 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
d2335bce9b aggregator: Always handle sync'ed events on output thread
Having all synchronized events always be handled on the output
thread should make synchronization easier.

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Olivier Crête
4cec1925e3 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
a6710944e8 aggregator: Make pad eos as soon as all buffers are processed, dont way for events
https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Olivier Crête
6e96bebd5b aggregator: Only count buffers when declaring queue full
https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Olivier Crête
4d408ea920 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
Olivier Crête
20aee5f575 aggregator: Only declare first buffer on actual buffer
The function needs to be unlocked if any data is received, but only
end the first buffer processing on an actual buffer, synchronized events
don't matter on the first buffer processing.

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Olivier Crête
1ab33d78fe aggregator: Set initial position on first buffer
Set the initial position on the first buffer, otherwise the queue
will grow without limits before the output thread is started.

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Olivier Crête
82f7b00ea3 aggregator: Reset the pad's first buffer flag with the rest
There is not reason to have separate code to reset this one.

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Olivier Crête
05374aa22c aggregator: Reset pad on init
Factor out the pad reset code from the flushing and use it on init as well

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Olivier Crête
d722e064fd aggregator: Fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
fvanzile
eca91d6772 glcontext: keep a ref to the active thread
With the macOS/iOS implementations, the active thread can change
multiple times over the life of a pipeline which would expose a race in
the thread tracking.

Fix by taking a ref on the active thread while the context is active.

https://bugzilla.gnome.org/show_bug.cgi?id=779202
2017-05-20 16:19:38 +02:00