Commit graph

3473 commits

Author SHA1 Message Date
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