Commit graph

2957 commits

Author SHA1 Message Date
Thiago Santos
f16916f7e7 adaptivedemux: add utility function to get stream from pad
Simplifies the code a bit and avoid repeating this
common operation
2016-02-04 14:03:55 -03:00
Luis de Bethencourt
aeed18a2bf glquery: remove unnecessary pointer check
All uses of query->context in gstglquery.c assume it exists. We can assume
this as well before unrefing it. Furthermore, gst_object_unref() will just
silently return if it ever were to not exist.
2016-02-04 12:18:39 +00:00
Matthew Waters
4bbe16bb7f glbasefilter: enable qos by default
Improves the responsiveness of the pipeline when resources are close/above the
limitations of the hardware.

Any subclass that wishes not to enable qos can do so themselves.

https://bugzilla.gnome.org/show_bug.cgi?id=761519
2016-02-04 17:31:03 +11:00
Tim-Philipp Müller
fdb45d84fa docs: remove some leftover 'Since 0.10.x' markers 2016-02-03 21:16:18 +00:00
David Waring
1328a44a01 libs: player: use configured GST_PKG_CONFIG_PATH when invoking the introspection scanner
https://bugzilla.gnome.org/show_bug.cgi?id=761460
2016-02-02 17:52:23 +00:00
Matthew Waters
eb14273631 Revert "gl/eagl: try getting a gles3 context"
This reverts commit 96b9666d59.
This reverts commit d11385d167.

This breaks the texture sharing with the applemedia elements as
CVOpenGLESTextureCache seems to have an arbitrary restriction on GLES2 only.
2016-02-02 18:37:44 +11:00
Matthew Waters
87573ba66c glcolorconvert: don't skip subset structures
We may need them to transform into a different set of formats.

Fixes YUV->YUV with two glcolorconverts, e.g:

format=I420 ! glcolorconvert ! glcolorconvert ! format=NV12
2016-02-02 16:21:14 +11:00
Matthew Waters
9b6be35222 glbasefilter: always call gl_start when not called already
Fixes elements transitioning out of passthrough mode using GL resources that
hadn'e been allocated yet.
2016-02-02 16:19:54 +11:00
Matthew Waters
10e85bfdc0 glcolorconvert: fix RGB,rectangle->planar YUV conversion
Converting to GRAY is no fun.  Another case of normalized vs unnormalized
texture coordinates.
2016-02-02 15:29:03 +11:00
Matthew Waters
cb08d13e45 glcolorconvert: fix YUY2/UYVY,rectangle->RGB conversion
1.0 / width does not offset by one pixel in rectangular textures (which use
unnormalized coordinates).

Provide the actual pixel offset as a uniform to the shader.
2016-02-02 14:55:10 +11:00
Matthew Waters
914da9f746 glcolorconvert: perform better negotiation
1. Correctly describe what we can caps we can transform to/from.
   i.e. no YUV->YUV or GRAY->YUV or YUV->GRAY (except for passthrough).
2. Prefer similar formats and ignore incompatible formats on fixation.
2016-02-02 13:27:06 +11:00
Julien Isorce
f1c053f644 gstglwindow: initialize navigation_loop to NULL
Useful when gst_gl_window.c::gst_gl_window_new is not used.
This is the case when using a custom GstGLWindow.
(ex: GstGLWindowGPUProcess from Chromium)
2016-02-01 13:59:22 +00:00
Tim-Philipp Müller
d11385d167 gl: eagl: fix build
gstglcontext_eagl.m:238:45: error: too few arguments to function call,
expected at least 4, have 3
2016-02-01 09:26:37 +00:00
Matthew Waters
96b9666d59 gl/eagl: try getting a gles3 context
Fallback to a gles2 context if that fails
2016-02-01 14:26:37 +11:00
Wang Xin-yu (王昕宇)
0891b90111 glprototypes: fix parameter type of glGenBuffers
The number of buffers should be GLsizei instead of GLuint.

https://bugzilla.gnome.org/show_bug.cgi?id=761272
2016-01-29 14:31:21 +11:00
Matthew Waters
406fe90331 glcontext: back out unintended lost_context changes 2016-01-29 12:45:57 +11:00
Matthew Waters
49199b03ac egl: implement selecting opengl3 contexts 2016-01-29 11:51:58 +11:00
Matthew Waters
f524419315 gl/egl: pass the error value to get_error_string() 2016-01-29 11:51:58 +11:00
Matthew Waters
87031b14cb videoaggregator: don't do caps processing that is not overridable
Allows the subclass to completely override the chosen src caps.

This is needed as videoaggregator generally has no idea exactly
what operation is being performed.

- Adds a fixate_caps vfunc for fixation
- Merges gst_video_aggregator_update_converters() into
  gst_videoaggregator_update_src_caps() as we need some of its info
  for proper caps handling.
- Pass the downstream caps to the update_caps vfunc

https://bugzilla.gnome.org/show_bug.cgi?id=756207
2016-01-27 20:36:25 +11:00
Matthew Waters
8c549633ee gl: move control binding proxy implementation from glvideomixer
Other elements may need to use it's functionality
2016-01-27 20:01:25 +11:00
Alex Ashley
cfb1b79516 adaptivedemux: fix leak of stream->internal_pad
The function gst_adaptive_demux_stream_update_source() function creates
a new GstPad called internal_pad. This pad is not freed when releasing
the stream.

The solution is to set GST_PAD_FLAG_NEED_PARENT so that the chain
functions do not get called when the pad has no parent and then
remove the parent in the gst_adaptive_demux_stream_free() function. This
causes the refcount of the pad to be set to zero.

https://bugzilla.gnome.org/show_bug.cgi?id=760982
2016-01-22 19:04:42 +02:00
Sebastian Dröge
c87a7e2667 base/audio/video: Install headers and pkg-config files
They are still considered unstable API but it would be good to give them some
wider testing already to make sure the API is useful.

https://bugzilla.gnome.org/show_bug.cgi?id=760733
2016-01-22 12:39:48 +02:00
Sebastian Dröge
8a1fa31c67 audio: Move audioaggregator base class to a library
It's useful enough already to be used in other elements for audio aggregation,
let's give people the opportunity to use it and give it some API testing.

https://bugzilla.gnome.org/show_bug.cgi?id=760733
2016-01-22 12:39:48 +02:00
Holger Kaelberer
a2376d00cf glwindow: Fix android build
https://bugzilla.gnome.org/show_bug.cgi?id=760972
2016-01-22 09:59:28 +02:00
Tim-Philipp Müller
e317a350bc libs: g-i: fix init section to avoid compiler warnings
..GstPlayer-1.0.c: In function ‘main’:
..GstPlayer-1.0.c:587:3: warning: implicit declaration of function ‘gst_init’

https://bugzilla.gnome.org/show_bug.cgi?id=760090
2016-01-19 08:40:35 +00:00
Sebastian Dröge
3184175dae glfilter: First make caps writable in fixate_caps(), then truncate them
Truncating requires writable caps.
2016-01-16 17:14:54 +02:00
Sebastian Dröge
c08c795bb4 glcolorconvert: Caps passed to fixate_caps() are not owned by us and guaranteed to be fixed
So don't try to fixate them, which takes ownership and steals them from
basetransform.

https://bugzilla.gnome.org/show_bug.cgi?id=760696
2016-01-16 17:12:29 +02:00
Sebastian Dröge
2018167ee2 Revert "glpool: fix caps refcount issue"
This reverts commit 3bdcdedfa0.

gst_caps_replace() takes a new reference already, if there is a problem then
it is elsewhere. And there are a few problems, see
https://bugzilla.gnome.org/show_bug.cgi?id=760696
2016-01-16 16:55:42 +02:00
Thiago Santos
b7a0be23c6 adaptivedemux: replace ghostpad with a standard pad
Handling the ghostpad and its internal pad was causing more issues
than helping because of their coupled activation/deactivation
actions.

As we have to install custom chain,event and query functions it is
better to use a floating sink pad internally in the demuxer and just
use those pad functions to push through a standard pad in the demuxer

https://bugzilla.gnome.org/show_bug.cgi?id=757951
2016-01-15 11:32:37 -03:00
Florin Apostol
d92f11b819 adaptivedemux: do not flush the input pad
gst_adaptive_demux_stream_clear_eos_and_flush_state() function will do
all the necessary cleaning.

https://bugzilla.gnome.org/show_bug.cgi?id=757951
2016-01-15 11:32:37 -03:00
Matthew Waters
a8b4c6c4ff glquery: provide compat definition for GL_QUERY_RESULT
e.g. android doesn't have it

While we're here move a state specific assertion after the supported check.
Removes an assertion on GLES
2016-01-15 17:00:55 +11:00
Matthew Waters
6b6b591370 gl: add compatibility definition of GLint64
e.g. anrdoid doesn't have it
2016-01-15 16:07:27 +11:00
Matthew Waters
3bdcdedfa0 glpool: fix caps refcount issue
The caps are from an allocation query which are transfer none but were being
treated as transfer full.
2016-01-15 14:00:56 +11:00
Matthew Waters
eb7ac03a91 glmemory: log the time for glTexSubImage/glReadPixels 2016-01-15 13:21:56 +11:00
Matthew Waters
5437874596 gl: add a gstglquery object for arbitrary GL queries
Currently only GL_TIME_ELAPSED and GL_TIMESTAMP are supported
2016-01-15 13:21:56 +11:00
Matthew Waters
2ef124dac6 gldebug: implement a delayed debug system
The messages are stored by gst_gl_async_debug_store_log_msg() and output later
by a corresponding store(), output() or an unset()/free().

Some wrapper macros are provided to avoid callers explicitly using __FILE__,
GST_FUNCTION and __LINE__
2016-01-15 12:19:02 +11:00
Matthew Waters
ad2f0cf619 gldebug: use gst_info_vasprintf in insert_debug_marker()
Allows expansion of GST_PTR_FORMAT and GST_SEGMENT_FORMAT arguments.
2016-01-15 12:19:02 +11:00
Matthew Waters
8e77cf1030 glfilter: recreate the fbo on caps changes
The width/height may change which requires recreating the depth buffer.
2016-01-15 12:05:03 +11:00
Matthew Waters
3e16a6a2e7 glbasefilter: add a class function on set_caps (from GL)
This is simply a convenience to avoid duplicating the thread marshalling on
set_caps.
2016-01-15 12:05:03 +11:00
Matthew Waters
82bb5d4e22 gl/x11/navigation: add button press to the selected event mask
Otherwise we won't get the button press events and GstNavigation fails.
2016-01-14 17:52:23 +11:00
Alessandro Decina
bef0a46c5d glcolorconvert: try harder to passthrough
This makes a pipeline like:

... ! video/x-raw(memory:GLMemory),format=UYVY ! glcolorconvert !
video/x-raw(memory:GLMemory),format={UYVY, NV12} ! ...

passthrough instead of converting UYVY => NV12. The conversion would happen
before this change since the element (and basetransform) transform the src caps
to format={NV12, UYVY} (since NV12 comes first in the glcolorconvert:src
template) and then the default caps fixate func would fixate to NV12. Blah.

Also there's no need to intersect against the template caps in ::transform_caps
since basetransform does that right after calling the vfunc.
2016-01-14 16:38:07 +11:00
Matthew Waters
0be9c9f960 gldebug: add a specific category for the debug spam from the driver 2016-01-13 12:00:03 +11:00
Matthew Waters
04ec728722 glbasememory: Free the actual memory object when requested
Otherwise we are leaking ~400B on each GstMemory allocation.

Freeing in the base class matches the GObject semantics.
2016-01-11 20:40:39 +11:00
Matthew Waters
3423e108d4 glmemorypbo: don't double read pixels
The optimistic download_transfer was not setting the required flag to not
perform glReadPixels on subsequent map (READ). resulting in glReadPixels
happening twice.
2016-01-11 20:40:39 +11:00
Matthew Waters
e8a251db4b glmemory: expose gst_gl_memory_texsubimage
Removes extremely similar code from glmemorypbo.
2016-01-11 20:40:39 +11:00
Matthew Waters
0ebd719644 glfeature add a specific debug category
Saves having to trawl through the 'default' category when function retrieval
goes wrong.
2016-01-11 20:40:39 +11:00
Thiago Santos
16a2f7f5c0 adaptivedemux: fix seeking that just updates stop position
Fixed adaptivedemux seeking without flushing that just wants
to update stop position. This required protecting the segment
variables with a new mutex so that the seeking thread and the
download threads could safely manipulate the segment and
events related to it.

This contention is only locked/unlocked when starting a new
download, when the first fragment of a segment is received and
when seeking so, hopefully, it won't damage performance.
2016-01-07 15:46:01 -03:00
Thiago Santos
eaace4922c adaptivedemux: fix segment update on seeks
Fixes typo on reverse rate check and also only update the
position when the start/stop was actually changed.
2016-01-07 15:45:56 -03:00
Matthew Waters
11fb4fff80 glsyncmeta: only flush with a shared context
The wait code will flush for us for single context pipelines.
2016-01-07 14:11:13 +11:00
Matthew Waters
2aadd7eaf9 glcontext: implement checking whether a context has been shared
Some operations are unnecessary when running with only a single GL
context.
e.g. glFlush when setting a fence object as the flush happens on wait.

API: gst_gl_context_is_shared
2016-01-07 14:11:13 +11:00