Commit graph

3005 commits

Author SHA1 Message Date
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
Sebastian Dröge 7f8d9d1df2 player: Only set the pipeline to PLAYING in play() if buffering>=100%
Otherwise the application can break the buffering logic by setting the
pipeline to PLAYING before we buffered enough.
2016-01-06 16:55:44 +02:00
Thiago Santos f57109ad2e adaptivedemux: stop reverse playback when we reach the limit
Avoids downloading and pushing a full segment just to get 1 nanosecond
of data. This happens frequently when seeking is done with flags
that adjust to boundaries or when the start is aligned with segment
starts. The later is common when segment durations is a multiple of
a second.
2016-01-06 10:23:13 -03:00
Thiago Santos bf272edaf3 adaptivedemux: correctly track segment.position in reverse playback
For reverse, set position to segment.stop when starting and also
don't set the position to fragment end timestamp when it finishes,
just leave it at the fragment start.
2016-01-06 10:23:13 -03:00
Matthew Waters 519280204c glcolorconvert: implement usage of a buffer pool
Saves unnecessary glGenTextures and glDeleteTextures which may have a
non-trivial cost.
2016-01-06 16:48:33 +11:00
Matthew Waters 37264a86e1 glbasememory: fix copying GstGLAllocationParams
Fixes a GST_IS_GL_CONTEXT critical
2016-01-06 16:48:33 +11:00
Matthew Waters 8d34c91855 glmemorypbo: remove unused code
https://bugzilla.gnome.org/show_bug.cgi?id=759679
2016-01-06 16:48:33 +11:00
Matthew Waters 479dcdc3b4 glupload: always add texture-target field to GL caps
1. Various elements/base classes only perform a subset check on accept-caps
2. Some GL elements have texture-target in their pad template
3. When checking subsets, only the caps to check are allowed to contain extra
   fields.  If the 'template' caps have extra fields, the subset fails.
Thus without texture-target on the caps, various accept-caps implementations
were failing.

Also, add some convenience functions for setting and retrieving
texture targets to/from GValue.

https://bugzilla.gnome.org/show_bug.cgi?id=759860
2016-01-05 13:28:19 +11:00
Matthew Waters 65f03061ad glupload: passthrough composition caps features
Don't unconditionally add it to any and all caps transformations.

https://bugzilla.gnome.org/show_bug.cgi?id=759860
2016-01-05 13:28:19 +11:00
Sebastian Dröge b53972a5cb player: Remove gst_player_new() and make gst_player_new_full() the normal constructor
In very few cases the simple version was actually needed and having the
parameters hidden by a _full() version caused application that actually needed
it to not use it.
2016-01-04 09:55:28 +02:00
Jan Schmidt 40b0736dfd glviewconvert: Fix stereoscopic handling w/ texture-target
The addition of texture-target negotiation broke stereoscopic
handling when not in passthrough mode, so fix that.
2016-01-04 01:04:23 +11:00
Tim-Philipp Müller 4e37976d83 codecparsers: vp9: minor clean-up
Remove setting of parser variable to NULL after free,
that makes no sense (and coverity is no doubt going
to complain about it).
2015-12-30 13:17:24 +00:00
Tim-Philipp Müller d6834432ed codecparsers: vp9: fix macro namespacing and rename GstVp9InterpFilter 2015-12-30 13:12:13 +00:00
Tim-Philipp Müller 75b31d1872 codecparsers: vp9: fix doc typos and sprinkle some Since markers 2015-12-30 13:09:23 +00:00
Tim-Philipp Müller 10392acca5 codecparsers: vp9: move license blurb into header and remove aux files
This is just a bunch of lookup tables..
2015-12-30 11:04:32 +00:00