Commit graph

3151 commits

Author SHA1 Message Date
Sebastian Dröge
c6d389c772 player: De-duplicate rate setting code and always use the property 2016-08-23 15:02:19 +03:00
Sebastian Dröge
fa8bfb3991 player: Protect setter/getter for the configuration with a mutex 2016-08-23 15:02:19 +03:00
Sebastian Dröge
a0f6105204 player: Move subtitle URI setter next to the uri setter
It's confusing to have them a couple of hundred lines apart.
2016-08-23 15:02:19 +03:00
Jan Schmidt
1d5b32ee91 adaptivedemux: Fix the previous commit
Remove extra files that were not meant to be added to the commit
2016-08-23 02:13:19 +10:00
Jan Schmidt
389e35d032 adaptivedemux: Fix broken updates loop on live streams
Prevent the manifest update loop from looping endlessly
after a seek event, by clearing the variable that tells
the task function not to immediately exit.
2016-08-23 01:57:55 +10:00
Michael Olbrich
0a63569fd1 adaptivedemux: fix stream exposure condition
The new streams should not be exposed until all streams are done with the
current fragment. The old code is incorrect and actually only checked the
current stream. Fix this by properly checking all streams.

Also, ignore the current stream. The code is only reached when the current
stream finished downloading and since
07f49f15b1 ("adaptivedemux: On EOS, handle it
before waking download loop") download_finished is set after
gst_adaptive_demux_stream_advance_fragment_unlocked() is called.

Without this HLS playback with multiple streams is broken, because the new
streams are never exposed.

https://bugzilla.gnome.org/show_bug.cgi?id=770075
2016-08-23 01:40:39 +10:00
Nirbheek Chauhan
42af2d66d8 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Matej Knopp <matej.knopp@gmail.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:35:54 +01:00
Nirbheek Chauhan
2fb76c89fc codecparsers: Explicitly export functions marked inline
On MSVC, inline functions are not available outside of a file unless
explicitly exported
2016-08-19 14:37:04 +01:00
Matthew Waters
306e610547 glwindow: marshal gst_gl_window_resize through the window loop
saves having every caller do it themselves.
2016-08-19 16:07:07 +10:00
Matthew Waters
05a0f0002c gl/wayland: use multi-threaded safe event wayland API
Multiple threads may be accessing the wayland fd at the same time which
requires the use of special wayland API to deal with to ensure nobody
will steal reads and cause a stall for anyone else.
2016-08-19 16:06:26 +10:00
Matthew Waters
0fc3c0f9dc gl/egl: fix inverted typedef
2b6841d had an inverted typedef defining ginptr and EGLAttrib.  Fix that.
2016-08-16 20:34:37 +10:00
Matthew Waters
2b6841da32 gl/build: add configure check for possibly missing EGLAttrib
Fixes the build on older android targets.
2016-08-16 16:51:02 +10:00
Song Bing
4e04f28478 gl/egl/dmabuf: Wrong attribute list type for EGL 1.5
For EGL 1.5 spec, the attribute list type should be EGLAttrib.

https://bugzilla.gnome.org/show_bug.cgi?id=768602
2016-08-16 15:34:08 +10:00
Vincent Penquerc'h
2776cef25d glcontext: fix race joining thread on finalize
https://bugzilla.gnome.org/show_bug.cgi?id=769939
2016-08-16 13:10:30 +10:00
Sebastian Dröge
a9e38d3fec adaptivedemux: Add API for allowing subclasses to download URLs in chunks
This allows to gradually download part of a fragment when the final size is
not known and only a part of it should be downloaded. For example when only
the moof should be parsed and/or a single keyframe should be downloaded.

https://bugzilla.gnome.org/show_bug.cgi?id=741104
2016-08-11 11:56:55 +02:00
Matthew Waters
402ab38f07 glcolorconvert: add missing rgb16 and bgr16 video formats in switch
Fixes an assertion that code should not be reached

https://bugzilla.gnome.org/show_bug.cgi?id=769462
2016-08-04 23:16:14 +10:00
Jan Schmidt
07f49f15b1 adaptivedemux: On EOS, handle it before waking download loop
Otherwise, if the download loop wakes too quickly, it
might miss the last_ret value update from the processing
thread and loop again.
2016-08-04 04:29:38 +10:00
Haihua Hu
fa37e3588e glwindow: Fix glimagesink cannot show frame when connect to qmlglsrc
When connect to qmlglsrc, x11 event loop will be replace by qt event loop
which will cause the window cannot receive event from xserver, such as resize

https://bugzilla.gnome.org/show_bug.cgi?id=768160
2016-08-03 22:10:56 +10:00
Hyunjun Ko
2bb3baa8c9 glupload: Use bufferpool to allocate new buffer in GLTextureUploadMeta
To improve performace of upload with GLTextureUploadMeta,
use bufferpool instead of allocating new buffer every time.

https://bugzilla.gnome.org/show_bug.cgi?id=769293
2016-08-03 21:16:47 +10:00
Matthew Waters
a46d4f3b57 glwindow: move unsetting queue_resize to _resize() instead of _draw()
Makes infinitely more sense and implementation were expecting that behaviour
anyway and would enter a resize, draw, resize, draw, ... cycle instead of only
resizing once.
2016-08-03 21:15:01 +10:00
Sebastian Dröge
050b253d1c adaptivedemux: Never ever hold the manifest lock while changing the source element state
Otherwise we will deadlock in various situations that take the manifest lock
from the streaming thread or when shutting down or ...
2016-08-03 09:15:08 +03:00
Vincent Penquerc'h
535f10b61d adaptivedemux: retry once on 4xx/5xx in certain conditions
This helps catch those 404 server errors in live streams when
seeking to the very beginning, as the server will handle a
request with some delay, which can cause it to drop the fragment
before sending it.

https://bugzilla.gnome.org/show_bug.cgi?id=753751
2016-08-02 12:52:34 +01:00
Alex Ashley
341cdb198f adaptivedemux: expose HTTP status
To allow adaptivedemux to make retry decisions, it needs to know what
sort of HTTP error has occurred. For example, the retry logic for a
410 error is different from a 504 error.

https://bugzilla.gnome.org/show_bug.cgi?id=753751
2016-08-02 12:52:34 +01:00
Vincent Penquerc'h
5b7f60dada adaptivedemux: allow seeking before start in live streams
Some derived classes (at least dashdemux) expose a seeking range
based on wall clock. This means that a subsequent seek to the start
of this range will be before the allowed range.

To solve this, seeks without the ACCURATE flag are allowed to seek
before the start for live streams, in which case the segment is
shifted to start at the start of the new seek range. If there is
an end position, is is shifted too, to keep the duration constant.

https://bugzilla.gnome.org/show_bug.cgi?id=753751
2016-08-02 12:52:34 +01:00
Sebastian Dröge
c1982d8b2f adaptivedemux: Also call reset() in READY->PAUSED
This allows subclasses to have initialization code in a single place.
2016-07-29 12:34:19 +03:00
Matthew Waters
01157c4433 glframebuffer: add compatibility definition for GL_DEPTH_STENCIL_ATTACHMENT
GLES2 doesn't have it defined...
2016-07-26 15:57:54 +10:00
Matthew Waters
5da138d1ae glfilter: rewrite subclasses for filter_texture() occuring on GL thread
There's no need for the jump to an extra thread in most cases, especially
when relying solely on a shader to render.  We can use the provided
render_to_target() functions to simplify filter writing.
2016-07-26 14:07:24 +10:00
Matthew Waters
6edd89c883 glutils: remove unused GstGLDisplayProjection 2016-07-26 14:07:24 +10:00
Matthew Waters
06b4b52a20 glcontext: remove not thread-safe get/set_error()
Use GError's instead if necessary.
2016-07-26 14:07:24 +10:00
Matthew Waters
518e8a3fd2 glframebuffer: rewrite for a more consistent API
Facilities are given to create fbo's and attach GL memory (renderbuffers
or textures).  It also keeps track of the renderable size for use with
effective use with glViewport().
2016-07-26 14:07:24 +10:00
Matthew Waters
aa109016a3 gl: use GLMemory for accessing textures everywhere
This simplifies and consolidates a lot of duplicated code creating
and modifying textures.
2016-07-26 14:07:24 +10:00
Matthew Waters
f10a67ec44 glfilter: rename draw_texture to draw_fullscreen_quad
And remove unused arguments.
2016-07-26 14:07:24 +10:00
Matthew Waters
9e06a75018 gl: add memory type for renderbuffer's
Soon to be used for framebuffers for e.g. depth buffers or throwaway color
buffers.
2016-07-26 14:07:24 +10:00
Matthew Waters
0daa380245 glformat: define our own set of formats from the GL defines
also add some depth/stencil formats
2016-07-26 14:07:24 +10:00
Matthew Waters
6f4091bbd3 glbasememory: assert for a valid allocator instead of segfaulting 2016-07-26 14:07:24 +10:00
Sebastian Dröge
aa1a663c8a player: Add some 'const' to config getters 2016-07-25 13:06:46 +03:00
Sebastian Dröge
1f7d341d92 player: G-I annotation fixes 2016-07-25 13:06:36 +03:00
Guillaume Desmottes
0f692e202e player: move 'position-update-interval' setting to the config struct
https://bugzilla.gnome.org/show_bug.cgi?id=769144
2016-07-25 13:03:20 +03:00
Guillaume Desmottes
6e39cef802 player: add API to change http user agent
Introducing a new 'config' API similar to GstBufferPoolConfig.

https://bugzilla.gnome.org/show_bug.cgi?id=765314
2016-07-25 13:02:35 +03:00
Tim-Philipp Müller
c593e0a17f gl: wayland: improve debug message when connecting to display
And another copy'n'paste-o.

https://bugzilla.gnome.org/show_bug.cgi?id=768929
2016-07-18 17:47:50 +01:00
Guillaume Desmottes
d29ec01b8a camerabinpreview: fix bus leak
We were never removing the watch introduced in
gst_camerabin_create_preview_pipeline() so its extra ref on the bus was
never released.

https://bugzilla.gnome.org/show_bug.cgi?id=768838
2016-07-15 13:41:48 -03:00
Jan Schmidt
585e60c4ab adaptivedemux: Add more safeguards around state changes.
Make state changes of internal elements more reliable by locking
their state, and ensuring that they aren't blocked pushing data
downstream before trying to set their state.

Add a boolean to avoid starting tasks when the main
thread is busy trying to shut the element down.
2016-07-15 14:33:23 +10:00
Jan Schmidt
5fc21d5c74 adaptivedemux: Add debug code to change bitrate.
Add some disabled-by-default debugging code that forces
bitrate changes by modulating the measured bitrate every
few fragments
2016-07-15 14:33:23 +10:00
Jan Schmidt
03f96dd731 adaptivedemux: More locking/switching fixes
Try harder to make switching pads work better by
making sure concurrent downloads are finished before exposing
a new set of pads.

Release the manifest lock when signalling no-more-pads, as
that can call back into adaptivedemux again
2016-07-15 14:33:23 +10:00
Jan Schmidt
963a273f61 adaptivedemux: Don't switch streams and expose pads while downloading.
If other stream fragments are still downloading but new streams
have been scheduled, don't expose them yet - wait until the last
one finishes. Otherwise, we can cancel a partially downloaded
auxilliary stream and cause a gap.
2016-07-15 14:33:23 +10:00
Jan Schmidt
62ca319927 adaptivedemux: Drop the manifest lock during outbound actions
Drop the manifest lock when performing actions that might
call back into adaptivedemux and trigger deadlocks, such
as adding/removing pads or sending in-band events (EOS).

Unlock the manifest lock when changing the child bin state to
NULL, as it might call back to acquire the manifest lock when
shutting down pads.

Drop the manifest lock while pushing events.
2016-07-15 14:33:23 +10:00
Nirbheek Chauhan
a3d58818e8 Fix various gboolean vs GstFlowReturn problems
Caught by building with MSVC which gave warnings for these
2016-07-11 15:02:06 +01:00
Edward Hervey
e4c955e4d7 adaptivedemux: Also consider more seek flags as "snap" seeks
In the case of KEY_UNIT and TRICKMODE_KEY_UNITS seeks, we want to
"snap" to the closest fragment.

Without this, we end up pushing out a segment which does not match
the first fragment timestamp being pushed out, resulting in one or
more buffers being eventually dropped because they are out of segment.
2016-07-07 17:28:57 +02:00
Sebastian Dröge
43a2ee8948 adaptivedemux: Add custom flow return for allowing subclasses to specify when a fragment is finished
If it is finished before upstream going EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=767365
2016-07-01 14:11:51 +02:00
Sebastian Dröge
ca9f62e1d0 adaptivedemux: Get rid of internal stream adapter and let subclasses handle this directly
This allows subclasses to have more control and especially ensure that they
push data downstream with the correct offsets.

https://bugzilla.gnome.org/show_bug.cgi?id=764684
2016-07-01 14:10:31 +02:00