Commit graph

3428 commits

Author SHA1 Message Date
Jan Schmidt dc56472777 adaptivedemux: Convert premature EOS on non-exposed pads to ERROR
If we need to send EOS on a pad that hasn't prerolled, generate
an error on the bus instead, otherwise the app will have no idea.

Fixes the HLS testFragmentNotFound test, which is waiting
for either EOS or an error.
2017-02-09 10:50:26 +11:00
Jan Schmidt 69d2f80954 adaptivedemux: Handle errors from prepared_streams too
Check both active and prepared_streams when we receive an
error on the bus, so we post errors for streams that are
still pre-rolling
2017-02-09 10:50:22 +11:00
Jan Schmidt 1f2bc4a684 adaptivedemux: Fix bitrate printed in debug
The download bitrate is already in bits per second,
no need to multiply it by 8 again when printing it
for debug.
2017-02-07 23:53:30 +11:00
Jan Schmidt b2113f69c6 adaptivedemux: Preroll streams before exposing them
To ensure that pads have caps when they are exposed, do
the exposing when all pending streams have prerolled an
output buffer, and only then EOS and remove any old pads.

Improves the switching sequence by making caps available
as soon as a pad appears.

With fixes from Seungha Yang <sh.yang@lge.com>

https://bugzilla.gnome.org/show_bug.cgi?id=758257
2017-02-07 23:53:30 +11:00
Seungha Yang 780c57d6bb adaptivedemux: Handle SEEK event only once
send_event() of parent class (i.e., GstBinClass) iterates srcpads
to send SEEK event. And performing it per srcpad is inefficient.
So, let's drop duplicated SEEK event by checking seqnum

https://bugzilla.gnome.org/show_bug.cgi?id=776612
2017-01-31 13:26:08 +02:00
Thibault Saunier cea4346d84 meson: Build GIR files 2017-01-23 12:48:53 -03:00
Lyon Wang b22fec8293 player: Add support for selecting a specific video sink
- Add overlay video renderer "video-sink" property, so that can be set
- In create_video_sink, it returns video sink instead of always NULL
- Add new renderer_new_with_sink() API to set video sink

https://bugzilla.gnome.org/show_bug.cgi?id=776490
2017-01-17 13:14:59 +02:00
Sebastian Dröge 9bd99d3670 player: Add missing documentation for deprecated functions 2017-01-17 13:09:55 +02:00
Lyon Wang 2609aaa48b player: Add get video snapshot API
Add get video snapshot API:
  gst_player_get_video_snapshot()

https://bugzilla.gnome.org/show_bug.cgi?id=773709
2017-01-17 13:09:55 +02:00
Matthew Waters 03b539bdfc gl: update sys dependants for function removals
4315a4b54d forgot to change the androidmedia/videotoolbox/caopengllayer
sources as required.
2017-01-13 13:01:28 +11:00
Juan Pablo Ugarte fb5339a387 glslstage: define GL constants if needed instead of using #ifdef
https://bugzilla.gnome.org/show_bug.cgi?id=777144
2017-01-13 11:20:51 +11:00
Matthew Waters 6919b4ca66 glutils: document functions 2017-01-13 11:20:51 +11:00
Matthew Waters 4de388278a glutils: privatise matrix multiplication/videoaffinetransformation retrieval 2017-01-13 11:20:51 +11:00
Matthew Waters 4315a4b54d gl/utils: also take care of the local GL context in query functions
Simplifies a deduplicates a lot of code in elements retrieving/setting
the local OpenGL context.
2017-01-13 11:20:51 +11:00
Matthew Waters 3fba290979 glutils: remove trivial helper function
gst_gl_caps_replace_all_caps_features() is only used in two places and can
be trivially reproduced.
2017-01-13 11:20:51 +11:00
Matthew Waters 6f4657c464 gl/docs: add symbols from -unused.txt 2017-01-13 11:20:50 +11:00
Matthew Waters f032334eac gl/docs: some type fixes of type names 2017-01-13 11:20:50 +11:00
Tim-Philipp Müller 95c842a860 codecparsers: remove problematic 'extern inline'
'extern inline' was added in 2fb76c89 for MSVC (it was just
'inline' before), but all of this doesn't really make sense,
the functions are not going to be inlined anyway, and what
'extern inline' means exactly also appears to depend on the
Cxx standard targetted. Let's just remove the 'extern inline'
entirely. At least gcc6 still emits the exact same code as
before anyway. Fixes compilation/linking with gcc 4.8 as
used on L4T on the TK1.
2017-01-10 16:03:30 +00:00
Edward Hervey 800aca8161 adaptivedemux: Use a simple queue instead of queue2
The reason we previously used queue2 was to calculate the download rate,
but that wasn't entirely correct and we therefore calculate it before
queue2. We therefore now just need a simple queue.
2017-01-10 16:31:40 +01:00
Edward Hervey 4f7e23fbee adaptivedemux: Remove unneeded variables
We now have properly non-blocking download time calculation
2017-01-10 16:31:06 +01:00
Matthew Waters 1c12c21653 glwindow: use the same parameter names between vfuncs and functions of the same name
Silences GI warnings about symbol's not being used from source code
comment block
2017-01-10 20:07:09 +11:00
Matthew Waters 91ed9fe362 glbasememory: type fix for GstGLBaseMemoryAllocatorAllocFunction 2017-01-10 20:06:39 +11:00
Matthew Waters b76f14f004 gldisplay: add missing transfer annotations 2017-01-10 20:05:42 +11:00
Matthew Waters b65ecbaa2b gl: add skip annotations to non-GI possible struct constructors 2017-01-10 20:04:30 +11:00
Matthew Waters f8a2721388 glbasememory: remove unused and #if 0'ed function definitions 2017-01-10 20:03:09 +11:00
Matthew Waters a1f2da88bf gl: add necessary get_type() functions for allocation params structures
All using the existing GstGLAllocationParams infrastructure
2017-01-10 19:58:48 +11:00
Matthew Waters a20d064304 gldisplay: some annotation updates/typo fixes 2017-01-10 15:35:52 +11:00
Matthew Waters 01cf3547dd gl: remove reference to non-existant header
../../../../gst-libs/gst/gl/gl.h:57:45: fatal error: gst/gl/gstglcontrolbindingproxy.h: No such file or directory
 #include <gst/gl/gstglcontrolbindingproxy.h>
                                             ^
2017-01-10 14:29:46 +11:00
Matthew Waters a4024b61cf gl: remove custom control binding proxy
Use the existing GstProxyControlBinding instead.
2017-01-10 13:57:37 +11:00
Matthew Waters f3d2be1e4f gl: remove unneeded gst_gl_buffer_alloc from header file
There's no implementation anymore!
2017-01-10 13:57:37 +11:00
Matthew Waters 66d616f5ed gl/egl: remove use of texture orientation 2017-01-10 13:57:37 +11:00
Matthew Waters d9f553bff5 glcontext/egl: don't overwrite set GError
Doing so is an error and will cause a glib warning to be printed.

https://bugzilla.gnome.org/show_bug.cgi?id=776722
2017-01-10 01:00:12 +11:00
Sebastian Dröge 19ddd9efd2 player: Add deprecated compatibility functions for the audio/video/subtitle stream getters 2016-12-21 11:38:11 +02:00
Sebastian Dröge 00f9a21cd2 player: Move audio/video/subtitle stream list getters into the correct namespace 2016-12-21 11:32:52 +02:00
Lyon Wang 9294dc4ac7 player: Add get track number media info API
https://bugzilla.gnome.org/show_bug.cgi?id=773570
2016-12-21 11:31:09 +02:00
Matthew Waters d8d28e4426 gl/format: use the unsized format for RGB on GLES2
In GLES2 GL_RGB8 doesn't exist so we cannot use it, use GL_RGB
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=776141
2016-12-17 01:13:44 +11:00
Matthew Waters e6e403a6c9 gl/window: remove unused priv variable
https://ci.gstreamer.net/job/GStreamer-master/7989/console
2016-12-16 00:22:41 +11:00
Matthew Waters f58eb98440 gl/window: remove use of main_context_push/pop_thread_default()
No-one's using/depending on it (it would have criticalled and not worked)
and it's causing more problems than it's solving.  Store the GMainContext
in the public struct instead for subclasses to optionally use instead of
relying on the push/pop state to be correct.

https://bugzilla.gnome.org/show_bug.cgi?id=775970
2016-12-16 00:02:47 +11:00
Sebastian Dröge e07a7bbf29 videoaggregator: Remove unlock() if set_info() fails
There is not mutex locked here that needs to be unlocked.
2016-12-14 15:35:42 +02:00
Sebastian Dröge 5c99f9cf37 gst: Don't declare variables inside the for loop header
This is a C99 feature.
2016-12-13 22:39:01 +02:00
Edward Hervey 23a3a2c5cb adaptivedemux: Avoid using unset GError
gst_uri_handler_set_uri() doesn't guarantee the GError will be set
if it returns FALSE.
2016-12-12 15:53:46 +01:00
Arun Raghavan 6a0d53b767 player: Don't try to cache the GQuark for GST_PLAYER_ERROR
This is potentially racy (in the unlikely scenario that we get two
first-time calls to gst_player_error_quark() at the same time). This
should not impact anything in terms of performance since it's only on
the error path.

The call itself could just be inlined by making GST_PLAYER_ERROR be
defined to the g_quark_from_static_string() call, but this feels ugly
from an API perspective.
2016-12-08 11:22:38 +05:30
Julien Isorce f7b039e7df gstglupload: relax EGL context check
Check for GST_GL_PLATFORM_EGL enum instead of type GstGLContextEGL.

https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-12-01 10:50:10 +00:00
Julien Isorce 119955bea4 gstglcontext: is_shared should return FALSE if no group
If a sub class of GstGLContext does not create a group
then it currently crashes:

0 g_atomic_int_get (&share->refcount)
1 _context_share_group_is_shared (context->priv->sharegroup)
2 gst_gl_context_is_shared
3 _default_set_sync_gl

https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-12-01 10:50:05 +00:00
Matthew Waters 1db88cbee7 glmemoryegl: remove spurious #if GST_GL_HAVE_DMABUF conditions
8c2118823b had some incorrect preprocessor
conditions that aren't actually needed.  Remove them.

https://bugzilla.gnome.org/show_bug.cgi?id=775248
2016-11-30 19:29:27 +11:00
Philippe Renon 4664fc0b27 opencv: add opencv image format documentation
https://bugzilla.gnome.org/show_bug.cgi?id=774576
2016-11-29 21:21:49 -05:00
Philippe Renon f6021e0016 opencv: account for sparse/padded formats when converting caps to cv image type
https://bugzilla.gnome.org/show_bug.cgi?id=774576
2016-11-29 21:21:49 -05:00
Nicolas Dufresne cfc420bf4d opencvvideofilter: Don't parse the caps twice
The GstVideoFilter already provide caps parsed into GstVideoInfo. Avoid
doing that twice by splitting the helper.

https://bugzilla.gnome.org/show_bug.cgi?id=775288
2016-11-29 21:21:49 -05:00
Nicolas Dufresne ed3877655d opencvfilter: Properly port to GstVideoFilter
This is a subblass of VideoFilter but yet does not use any of it's
features. This also fixes issue in case the incoming images have custom
strides as the VideoMeta is no longer ignored.

https://bugzilla.gnome.org/show_bug.cgi?id=775288
2016-11-29 21:21:49 -05:00
Philippe Normand 73721ad4e9 mssdemux: improved live playback support
When a MSS server hosts a live stream the fragments listed in the
manifest usually don't have accurate timestamps and duration, except
for the first fragment, which additionally stores timing information
for the few upcoming fragments. In this scenario it is useless to
periodically fetch and update the manifest and the fragments list can
be incrementally built by parsing the first/current fragment.

https://bugzilla.gnome.org/show_bug.cgi?id=755036
2016-11-29 14:43:41 +01:00
Anton Eliasson 03615a772a codecparsers: h264parse: improve documentation commentary
https://bugzilla.gnome.org/show_bug.cgi?id=775306
2016-11-29 10:34:16 +00:00
Anton Eliasson 0e8567a981 codecparsers: h264parse: docs spellcheck
Spell checks, correct capitalization and some rewording to
better fit the terms used in the H.264 spec.

https://bugzilla.gnome.org/show_bug.cgi?id=775306
2016-11-29 10:30:50 +00:00
Sebastian Dröge 57bb47f3f7 mpegtssection: Fix off-by-one in PMT parsing 2016-11-28 20:05:02 +02:00
Sebastian Dröge 911a6083c8 mpegtssection: Don't assert if the given section length is longer than the PMT actually is
Instead error out cleanly and just assert that we didn't read more than
the available data.
2016-11-28 19:53:46 +02:00
Matthew Waters 024e92afe7 glwindow: move g_main_context_push/pop_thread_default() to run()
Calling g_main_context_push_thread and then g_main_context_invoke()
(used by gst_gl_window_send_message_async()) in the same thread will
cause the invoked function to run immediately instead of being delayed.

This had implications for the creation of the OpenGL context not waiting
until the main loop had completely started up and as a result would
sometimes deadlock in short create/destroy scenarios.

https://bugzilla.gnome.org/show_bug.cgi?id=775171
2016-11-28 14:27:03 +11:00
Matthew Waters 25fbc6d877 glcontext: fix race between creation/shutdown
626bcccff9 removed some locks that
allowed the main loop quit to occur before the context was fully
created.

2776cef25d attempted to readd them but
missed the scop of the quit() call.

Also remove the use of g_thread_join() as that's not safe to use when
it's possible to lose the last reference from the GL thread.

https://bugzilla.gnome.org/show_bug.cgi?id=775171
2016-11-28 14:27:03 +11:00
Luis de Bethencourt de99cf0de1 opencv: Enable in meson build
https://bugzilla.gnome.org/show_bug.cgi?id=774223
2016-11-26 17:55:23 +00:00
Edward Hervey d58f668ece mpegtssection: Add more section size checks
The smallest section ever needs to be at least 3 bytes (i.e. just the short
header).
Non-short headers need to be at least 11 bytes long (3 for the minimum header,
5 for the non-short header, and 4 for the CRC).

https://bugzilla.gnome.org/show_bug.cgi?id=775048
2016-11-26 10:46:08 +01:00
Edward Hervey 7b12593cce mpegtssection: Fix PAT parsing
Use the estimated number of programs for parsing. Avoids over-reading.

https://bugzilla.gnome.org/show_bug.cgi?id=775120
2016-11-26 10:45:52 +01:00
Sebastian Dröge 939528e542 gl/x11: Remove unused static function 2016-11-25 23:44:25 +02:00
Edward Hervey d1fa342b71 mpegtssection: Don't free empty streams
Also avoids a useless assertion
2016-11-24 11:15:22 +01:00
Matthew Waters 4a0214335f gl/contextglx: error out on more invalid display/window combinations
https://bugzilla.gnome.org/show_bug.cgi?id=774851
2016-11-23 17:04:34 +11:00
Matthew Waters 7ab4abb3ab gl: add necessary context_egl.h #includes to the source files 2016-11-23 15:57:05 +11:00
Matthew Waters 75d36b990d gl/memoryegl: remove access to private header gstglcontext_egl.h
It's been removed and thus compiling anything against GstGLMemoryEGL
would error with:

In file included from gstomxvideodec.c:41:0:
usr/include/gstreamer-1.0/gst/gl/egl/gstglmemoryegl.h:32:41: fatal error: gst/gl/egl/gstglcontext_egl.h: No such file or directory
 #include <gst/gl/egl/gstglcontext_egl.h>
                                         ^

https://bugzilla.gnome.org/show_bug.cgi?id=774886
2016-11-23 13:36:45 +11:00
Philippe Renon d130a19c89 opencv: forward declare opencv types
Forward declare opencv types to avoid exposing them in the API.

https://bugzilla.gnome.org/show_bug.cgi?id=774223
2016-11-21 17:37:46 +01:00
Tim-Philipp Müller 6cc049452a interfaces: photography: clean up header indentation 2016-11-21 10:52:39 +00:00
David Evans 5591f55db5 gl: add gstreamer-video to pkg-config path
https://bugzilla.gnome.org/show_bug.cgi?id=774624
2016-11-21 09:34:44 +02:00
Sebastian Dröge db504c9ea5 videoaggregator: Mark pad as needing reconfiguration again if it failed
And return FLUSHING instead of NOT_NEGOTIATED on flushing pads.

https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:22:44 +02:00
Scott D Phillips 1f6b96410a meson: wayland: wl_scanner is required: false
https://bugzilla.gnome.org/show_bug.cgi?id=774637
2016-11-17 17:42:30 -03:00
Matthew Waters b69dadcc61 meson: wayland: move dep checks to the lib
Moves them closer to where they are used.  We don't want every check in
the main meson.build file.
2016-11-17 15:16:18 +11:00
Matthew Waters 39b59beace meson: gl/egl: add missing source file
d42145e8c1 didn't add the necessary
meson build changes.
2016-11-17 14:32:10 +11:00
Matthew Waters 8c2118823b gl/egl: remove EGLImage functions from egl context
By adding the necessary GstEGLImage entry points to create a GstEGLImage
from a GstGLMemory.

https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-11-17 14:06:21 +11:00
Matthew Waters f2e9190229 glcontext: add vfunc to retrieve the OpenGL platform version
i.e. the version of EGL, GLX, etc implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-11-17 14:06:21 +11:00
Matthew Waters d42145e8c1 gl/egl: move get_error_string() into gstegl
So others can use it without #include-ing a private header

https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-11-17 14:06:21 +11:00
Matthew Waters cdaada4300 display/egl: implement getting the EGLDisplay of a specific platform
https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-11-17 14:06:21 +11:00
Víctor Manuel Jáquez Leal 9ca4c8ec35 gl/egl: check the feature in the extensions list
https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-11-16 19:52:54 +01:00
Matthew Waters bb84f7357b glcontext/cocoa: implement empty swap_buffers
Fixes some GL tests on OS X.
2016-11-16 17:34:29 +11:00
Thibault Saunier c38d3a41e2 meson: Build waylandsink
https://bugzilla.gnome.org/show_bug.cgi?id=774493
2016-11-15 18:33:25 -03:00
Matthew Waters 9f690fa241 glwindow/cocoa: remove unneeded window code in NSWindow
This is all taken care of by GstGLWindowCocoa/GstGLNSView now.
2016-11-16 00:01:00 +11:00
Matthew Waters 23ec5aeb83 glwindow/cocoa: remove our view from the parent when closing
Otherwise, when the application reuses the same UIView, we were getting
draw notifications on the previous view/layer's which weren't valid anymore
and were referencing pointers that had been freed.

https://bugzilla.gnome.org/show_bug.cgi?id=753003
2016-11-16 00:00:17 +11:00
Matthew Waters 5602cab04d gl/caopengllayer: add a debug category 2016-11-15 23:55:00 +11:00
Matthew Waters f2d09b8cd4 glbufferpool: introduce check for GLMemory allocators
The last missing piece of EGLImage support has been pushed.
2016-11-15 23:55:00 +11:00
Scott D Phillips e4407d4599 Fix some MSVC warnings about const-ness
Some miscellaneous warnings about const-ness, either casting away const
where we know it's safe or removing const where it's not correct.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-15 14:53:49 +02:00
Scott D Phillips 3c53da5e09 Cast away const from GstMetaInfo in *_get_meta_info() functions
MSVC warns about the const in the implicit argument conversion in the
calls to g_once_init_{enter,leave}. It's OK so explicitly cast it.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-15 14:53:49 +02:00
Seungha Yang e2dbc2affa adaptivedemux: Fix startup SEGMENT seeking and setting for live
Because fragment.timestamp is relative value to period_start,
startup SEGMENT seeking should be pointed to "fragment.timestamp + period_start"

https://bugzilla.gnome.org/show_bug.cgi?id=774196
2016-11-15 14:47:46 +02:00
Philippe Renon 5594c7e53e opencv: move base opencv filter class and utilities to gst-libs
https://bugzilla.gnome.org/show_bug.cgi?id=774223
2016-11-14 18:25:57 +00:00
Tim-Philipp Müller ba6b8c33e0 gl: x11-xcb is not a required dependency
Don't fail if it's not found..
2016-11-11 01:06:23 +00:00
Matthew Waters 28396d348f adaptivedemux: reset the manifest failure count after a successful retrieval
This changes the failure case to require a consecutive number of
failures rather than being spread out over the entire stream.

Fixes the case where fetching the manifest was intermittent.

https://bugzilla.gnome.org/show_bug.cgi?id=774177
2016-11-11 00:11:25 +11:00
Matthew Waters 6d50a9e8a8 adaptivedemux: call the subclass for duration queries for live sources
Otherwise, the duration query was failing for live sources

https://bugzilla.gnome.org/show_bug.cgi?id=774177
2016-11-11 00:11:25 +11:00
Matthew Waters fab5aa8b16 adaptivedemux: restart the manifest update task after a seek
For formats that need to update the manifest to know about new
fragments as they're being written by the server would never receive an
updated fragment list after a seek event

https://bugzilla.gnome.org/show_bug.cgi?id=774177
2016-11-11 00:11:25 +11:00
Dongil Park 324b3873c8 mpegts: fix typo in GstMpegtsDescriptor
https://bugzilla.gnome.org/show_bug.cgi?id=774132
2016-11-10 10:07:59 +00:00
Matthew Waters 3f7b549881 gl/utils: move gen_shader() to the plugin and remove del_shader()
gst_gl_context_del_shader() can be replaced by a g_object_unref().
gst_gl_context_gen_shader() should be replaced by using GstGLSLStage.
2016-11-10 20:11:03 +11:00
Matthew Waters 59350d078b glwindow: remove unused field in public struct 2016-11-10 20:05:45 +11:00
Matthew Waters 01fa90c1e7 glwindow: remove is_running() function
It isn't necessary in correctly written programs.
2016-11-10 20:05:45 +11:00
Nirbheek Chauhan de4552d279 meson/gl: XCB changes also need x11-xcb as a dependency
https://ci.gstreamer.net/job/GStreamer-master-meson/380/console

[...]
gst-libs/gst/gl/x11/xcb_event_source.c:98: undefined reference to `xcb_get_file_descriptor'
2016-11-08 17:52:02 +05:30
Philippe Normand a424f04a22 gl/x11: fix meson build
The x11_event_source.[ch] files were renamed in
4f6c226bd2.
2016-11-08 09:54:15 +01:00
Matthew Waters f9d463d80e glwindow: remove the navigation thread
This functionality can now effectively be implemented with the display event
thread.
2016-11-08 15:14:27 +11:00
Matthew Waters 4f6c226bd2 gl/x11: use xcb instead of libX11
- xcb is supposedly thread-safe!

videotestsrc ! glimagesink now doesn't spuriously result in a
'call XInitThreads()' error however if anybody else is using X11,
then XInitThreads() still needs to be called and multiple glimagesink's
still need XInitThreads().

Everything still takes libX11 handles as they are compatible with the xcb
variants.  Unfortunately we cannot move fully over to xcb due to GLX being
entirely based on Xlib.  It's also impossible to transform a xcb_connection
to a Display which means we require X11 handles.
2016-11-08 15:14:26 +11:00
Matthew Waters e4916fb1ef gldisplay: add a list of glwindow's
With the event thread on the display, for a particular winsys event
we need to be able to retreive the window that the event matches.
2016-11-08 15:14:26 +11:00
Matthew Waters 1a6c4be242 gldisplay: add a dedicated event thread
Will take the place of the navigation event thread for dealing with
winsys events.
2016-11-08 12:50:45 +11:00