Commit graph

3340 commits

Author SHA1 Message Date
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
Tim-Philipp Müller
e92894e4ab codecparsers: jpeg2000: don't allow 0 value for array access with i-1 2016-07-01 12:20:14 +01:00
Tim-Philipp Müller
1462ac7cdf codecparsers: jpeg2000: fix possible out-of-bounds array access
sizeof(array) != G_N_ELEMENTS(array).

CID 1362900
2016-07-01 12:15:28 +01:00
Matthew Waters
087bb0ed6a glviewconvert: fix transformation matrix usage
Calling glUniformMatrix before the shader is bound is invalid and
would result in errors like:

GL_INVALID_OPERATION in glUniformMatrix(program not linked)

Move glUniformMatrix() to after the gst_gl_shader_use() call.
2016-06-30 21:54:03 +10:00
Matthew Waters
e0ecd774dd glupload: fix raw data uploader with addition of GstVideoGLTextureType
Fixes regression from 989200820d

https://bugzilla.gnome.org/show_bug.cgi?id=768217
2016-06-30 14:07:32 +10:00
Olivier Crête
461201c396 glvideoconvert: RG/LA is available in OpenGL ES 3, so let that through 2016-06-29 23:55:18 -04:00
Matthew Waters
5592a966c6 Revert "Revert "gl/eagl: try getting a gles3 context""
This reverts commit eb14273631.

vtdec now successfully outputs textures that can be converted by
glcolorconvert in GLES3 contexts.
2016-06-29 18:04:28 +10:00
Matthew Waters
989200820d glmemory: add the texture type to allocate to parameters
Rather than assuming something.  e.g. zerocopy on iOS with GLES3 requires
the use of Luminance/Luminance Alpha formats and does not work with
Red/RG textures.
2016-06-29 18:04:28 +10:00
Matthew Waters
6958b7a014 glcolorconvert: don't assume Red/RG textures will be used
Take the used texture type from the memory instead.

Fixes conversion from multi-planar YUV formats with two components per plane
(NV12, NV21, YUY2, UYVY, GRAY16_*, etc) with Luminance Alpha input textures.

This is also needed for zerocopy decoding on iOS with GLES 3.x.
2016-06-29 18:04:28 +10:00
Matthew Waters
b9cdc9d4b0 glcontext: correct precondition for get_gl_version
The intention was to assert if both maj and min were NULL (as there would be no
point calling the function).  Instead if either maj or min were NULL, the assert
would occur.

Fix that.
2016-06-29 18:04:28 +10:00
Luis de Bethencourt
276dd2750f jpeg2000parse: fix typo in sampling check
Fixing small typo that changes the value of the return.
2016-06-28 12:12:29 +02:00
Aaron Boxer
e7e6a3579d jpeg2000parse: use enums for colorspace and sampling, rather than strings
Also, move gstjpeg2000sampling to codecparsers project

https://bugzilla.gnome.org/show_bug.cgi?id=767908
2016-06-24 11:23:31 +03:00
Sebastian Dröge
0e58e86c4c eglimage: Only register debug category if dmabuf support is enabled
It's not used otherwise currently and causes compiler warnings.
2016-06-23 16:00:00 +03:00
Wang Xin-yu (王昕宇)
6ed2ca373a glcontext/wgl: try wglCreateContextAttribsARB even not gl3 core profile
https://bugzilla.gnome.org/show_bug.cgi?id=764018
2016-06-21 22:57:13 +10:00
Matthew Waters
8a67cd90b3 glcontext: fix get_current_gl_api() on win32
Another case of incorrect calling conventions.

Using this function on win32 would corrupt the stack pointer and end in
massive hilarity.
2016-06-21 22:57:00 +10:00
Matthew Waters
d3f3787d64 glsl: fixup external-oes shaders by mangling the required extension
Newer devices require using a different GLSL extension for accessing
external-oes textures in a shader using the texture() functions.

While the GL_OES_EGL_image_external_essl3 should supposedly be supported
on a any GLES3 android device, the extension was defined after a lot of the
older drivers were built so they will not know about it.  Thus there are two
possible interpretations of which of texture[2D]() should be supported for
external-oes textures.  Strict adherence to the GL_OES_EGL_image_external
extension spec which uses texture2D() or following GLES3's pattern, also
allowing texture() as a function for accessing external-oes textures

This adds another mangling pass to convert
 #extension GL_OES_EGL_image_external : ...
into
 #extension GL_OES_EGL_image_external_essl3 : ...
on GLES3 and when the GL_OES_EGL_image_external_essl3 extension is supported.

Only uses texture() when the GLES3 and the GL_OES_EGL_image_external_essl3
extension is supported for external-oes textures.
Uses GLES2 + texture2D() + GL_OES_EGL_image_external in all other external-oes
cases.

https://bugzilla.gnome.org/show_bug.cgi?id=766993
2016-06-21 21:27:47 +10:00
Guillaume Desmottes
172529e151 audioaggregator: fix buffer leak
If the pad was still owning a buffer when being destroyed it was leaked.

Fix a leak with the test_flush_start_flush_stop test.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Michael Olbrich
378051d80a h264parse: fix default time_offset_length
The default value for time_offset_length should be 24, see
section E2.2 of the H264 spec.

https://bugzilla.gnome.org/show_bug.cgi?id=767792
2016-06-21 10:45:43 +03:00
Reynaldo H. Verdejo Pinochet
ea272f0bac codecparsers: drop all otherwizes 2016-06-17 15:58:09 -07:00
Sergey Borovkov
180405714c qml: Enable qmlglsink for eglfs
https://bugzilla.gnome.org/show_bug.cgi?id=763044
2016-06-16 01:49:16 +10:00
Matthew Waters
861ce43cd8 glsl: add some debugging 2016-06-15 18:10:59 +10:00
Matthew Waters
27e4288de4 glutils: remove unused functions for texture creation/deletion
Everyone uses GstGLMemory now and any future code should as well.
2016-06-15 16:08:57 +10:00
Matthew Waters
216b8eea6c glfilter: remove unused class fields in/out_tex_id
The functionality is not used by any subclass nor are the values set anywhere.
2016-06-15 15:47:47 +10:00
Matthew Waters
6b7f94abb2 gl/upload/meta: remove unneeded texture deletion
The textures are managed by the GstGLMemory inside the output buffer.  Freeing
them prematurely may result in a use-after-free.
2016-06-15 14:40:40 +10:00
Edward Hervey
deb686cfe1 adaptivedemux: Move SEEK handling to a separate function
Just for code readability. Doesn't change behaviour
2016-06-09 19:25:26 +03:00
Edward Hervey
9296b26095 adaptivedemux: Set DISCONT on startup, resume and after seeks
Initial buffers after STREAM_START and seeks should always have the
DISCONT flag set.

https://bugzilla.gnome.org/show_bug.cgi?id=766650
2016-06-06 13:07:30 +03:00
Sebastian Dröge
a40ecc1168 player: pause() should not inhibit signals but work exactly like play()
https://bugzilla.gnome.org/show_bug.cgi?id=766607#c23
2016-06-06 11:13:00 +03:00
Guillaume Desmottes
991d9a6f5f gst-libs: gl, video: use MAY_BE_LEAKED flag
https://bugzilla.gnome.org/show_bug.cgi?id=767162
2016-06-03 00:59:12 +01:00
Guillaume Desmottes
0467923415 player: inhibit signals after gst_player_stop() has been called
Also wait for the state change to STOP to have been announced before
destroying the player so it won't appear as leaked by leak detector
tools.

https://bugzilla.gnome.org/show_bug.cgi?id=766607
2016-05-30 12:43:22 +03:00
Havard Graff
63a05aff6a gl: glquery: cast to silence compiler warning
https://bugzilla.gnome.org/show_bug.cgi?id=766973
2016-05-28 22:28:06 +01:00
Havard Graff
45a832686b player: use correct _NONE enum
https://bugzilla.gnome.org/show_bug.cgi?id=766973
2016-05-28 21:16:27 +01:00
Tim-Philipp Müller
1b58bbf3ad h264parser: maintain minimal ABI compat
Because we can.

https://bugzilla.gnome.org/show_bug.cgi?id=723352
2016-05-28 10:54:13 +01:00
Sebastian Dröge
b5f8b556e9 h264parser: Remove unused fps_num/fps_den fields
Instead the newly added function should be used to calculate
the framerate properly.

https://bugzilla.gnome.org/show_bug.cgi?id=723352
2016-05-28 10:54:01 +01:00
Matthew Waters
e597e45008 gldisplay: always unref the context on a collision
Otherwise we will leak GstGLContext's when adding the same context more than
once.

Fixes a regression caused by 5f9d10f603 in the
gstglcontext unit test that failed with:

Assertion 'tmp == NULL' failed
2016-05-26 20:19:13 +10:00
Nicolas Dufresne
ff3b60a969 Revert "aggregator: Start the task when linked"
This reverts commit 302580c381.
2016-05-25 13:38:47 -04:00
Nicolas Dufresne
302580c381 aggregator: Start the task when linked
Until now we would start the task when the pad is activated. Part of the
activiation concist of testing if the pipeline is live or not.
Unfortunatly, this is often too soon, as it's likely that the pad get
activated before it is fully linked in dynamic pipeline.

Instead, start the task when the first serialized event arrive. This is
a safe moment as we know that the upstream chain is complete and just
like the pad activation, the pads are locked, hence cannot change.

https://bugzilla.gnome.org/show_bug.cgi?id=757548
2016-05-25 13:35:00 -04:00
Xavier Claessens
b2cfc56e83 gl: win32: Add debug category in gstglcontext_wgl.c
https://bugzilla.gnome.org/show_bug.cgi?id=766867
2016-05-25 23:10:44 +10:00
Haihua Hu
a5cb746983 glimagesink: support video rotation using transform matrix
Add "rotate-method" to glimagesink and apply transform matrix
to vertex coordinate to control rotation.

https://bugzilla.gnome.org/show_bug.cgi?id=765795
2016-05-25 18:28:20 +10:00
Matthew Waters
5f9d10f603 gldisplay: add some debugging about retrieving GL contexts 2016-05-25 18:28:20 +10:00
Sebastian Dröge
6f9b9e153a eglimage: Re-add accidentially removed GST_DEFINE_MINI_OBJECT_TYPE() 2016-05-25 10:01:38 +03:00
Guillaume Desmottes
586509d486 player: fix suburi getter debug message
The property is a string, not a boolean.

https://bugzilla.gnome.org/show_bug.cgi?id=766607
2016-05-25 09:55:28 +03:00
Sebastian Dröge
3af9fd7322 player: Don't set subtitle URI directly but dispatch to the player thread
Otherwise we do state changes and everything in the application thread, which
might block and more important can cause reentrant signals.

https://bugzilla.gnome.org/show_bug.cgi?id=766607
2016-05-25 09:53:15 +03:00
Sebastian Dröge
b730f7e89d eglimage: Ensure that the debug category is always initalized
Before the initializer was only run if dmabuf support was used.

https://bugzilla.gnome.org/show_bug.cgi?id=766794
2016-05-25 09:46:37 +03:00
Tim-Philipp Müller
db90f4686f g-i: pass compiler env to g-ir-scanner
It's what introspection.mak does as well. Should
fix spurious build failures on gnome-continuous.
2016-05-24 00:55:11 +01:00
Arun Raghavan
18f8895f33 player: Fix documentation for gst_player_video_info_get_framerate()
Document out parameters and fix function name.
2016-05-23 17:17:55 +05:30
Xavier Claessens
098c5c16ad gl: win32: Unparent internal window before destroying it
For some reason DestroyWindow() deadlock if it's called from
parent window's KeyPress event.

https://bugzilla.gnome.org/show_bug.cgi?id=766533
2016-05-20 17:04:01 +02:00
Xavier Claessens
83bb89f4ec gl: win32: Don't steal parent focus when creating internal window
This fix regression introduced by 0acc18c60f.

https://bugzilla.gnome.org/show_bug.cgi?id=766520
2016-05-20 17:04:01 +02:00
Olivier Crête
e357e372e1 videoaggregator: Don't wait if input buffer is after output
If the input buffer is after the end of the output buffer, then waiting
for more data won't help. We will never get an input buffer for this point.

This fixes compositing of streams from rtspsrc.

https://bugzilla.gnome.org/show_bug.cgi?id=766422
2016-05-20 10:58:46 -04:00
Guillaume Desmottes
d7c47107ce adaptivedemux: fix pending tags leak
https://bugzilla.gnome.org/show_bug.cgi?id=766662
2016-05-19 20:44:25 +01:00
Tim-Philipp Müller
441072834e videoaggregator: canonicalise function names
Had to be done at some point:
gst_videoaggregator_* -> gst_video_aggregator_*
Also fix up some function names with typos.
2016-05-16 12:27:50 +01:00
Sebastian Dröge
175e02ba7b player: Add uri-loaded signal that is fired whenever a new URI is actually loaded
This allows knowing the "boundary" from which on all following signals are for
the new URI.

https://bugzilla.gnome.org/show_bug.cgi?id=766062
2016-05-15 15:12:21 +03:00
Matthew Waters
b42ccb0556 gldisplay: demote no platform display debug to info
Avoids confusing everyone with a warning that's not always fatal.

https://bugzilla.gnome.org/show_bug.cgi?id=746933
2016-05-15 13:14:41 +03:00
Matthew Waters
799efcb133 gl: take the affine transformation in NDC
Provide a function to get the affine matrix in the meta in terms of NDC
coordinates and use as a standard opengl matrix.

Also advertise support for the affine transformation meta in the allocation
query.
2016-05-14 16:35:29 +03:00
Carlos Garcia Campos
429353337d uridownloader: Take the ownership of the src element
The URI downloader is creating the source element with
gst_element_factory_make() that returns a floating reference that nobody
is consuming. This is causing problems in WebKit, where the smart
pointers used to take references of the source elment get confused and
end up consuming the floating reference and then releasing the element,
which usually crashes because the URI downloader still tries to use its
src element. See https://bugs.webkit.org/show_bug.cgi?id=144040.
This commit adds two helper functions to ensure and destroy the source
element, to make the code simpler and less error prone. The ensure
method takes care of checking if we can reuse the existing one or we
need to create a new one, taking always its ownership. The destroy
method simply avoids duplicated code to set the source to NULL state and
then unref it.

https://bugzilla.gnome.org/show_bug.cgi?id=766053
2016-05-06 15:26:59 +02:00
Alex Ashley
792e9a6033 adaptivedemux: fix threading issues in gst_adaptive_demux_wait_until function
The gst_adaptive_demux_wait_until() function can be woken up either
by its end_time being reached, or from other threads that want to
interrupt the waiting thread.

If the thread is interrupted, it needs to cancel its async clock callback
by unscheduling the clock callback. However, the callback task might already
have been activated, but is waiting for the mutex to become available. In this
case, the call to unschedule does not stop the callback from executing.

The solution to this second issue is to use a reference counted object that
is decremented by both the gst_adaptive_demux_wait_until() function and the
call to gst_clock_id_wait_async (). In this way, the GstAdaptiveDemuxTimer
object is only deleted when both the gst_adaptive_demux_wait_until() function
and the async callback are finished with the object.

https://bugzilla.gnome.org/show_bug.cgi?id=765728
2016-05-06 09:42:41 +01:00
Matthew Waters
5498e97a11 gl/egl: replace gsteglimagememory with an EGLImage wrapper
That can be passed to GstGLMemoryEGL.

This also ports the dmabuf uploader to GstEGLImage and GstGLMemoryEGL.
2016-05-04 13:31:48 +10:00
Gwang Yoon Hwang
c83fd26c80 gl: implement GstGLMemoryEGL
Because current GstEGLImageMemory does not inherit GstGLMemory, GLUpload
allocates additional GLMemory and upload the decoded contents from the decoder
which uses EGLImage (e.g. gst-omx in RPi).

This work adds GstGLMemoryEGL to avoid this overhead. Decoders allocate
GstGLMemoryEGL and decode its contents to the EGLImage of GstGLMemoryEGL.  And
GLUpload uses this memory without allocation of additional textures and blit
operations.

[Matthew Waters]: gst-indent the sources and fix a critical retreiving the egl
display from the memory.

https://bugzilla.gnome.org/show_bug.cgi?id=760916
2016-05-04 12:57:27 +10:00
Matthew Waters
8ccf3dc589 glmemory: add wrapped data pointers to setup_buffer
Allows creating wrapped memories with GstGLAllocationParams.

The wrapped pointers will be set in the parameters before being passed
to the memory allocation function.
2016-05-04 12:51:59 +10:00
Matthew Waters
c9d9077a5f glbasememory: take a pointer as the wrapped gpu handle
Allows passing arbitrary data to wrap the the specific memory implementation
which is required for some memory implementations.
2016-05-04 12:51:59 +10:00
Matthew Waters
344e7db975 gl: fix gles3 header usage for older platforms
Some platforms provide an old version of GLES2/gl2.h and GLES2/gl2ext.h that
will fail when including GLES3/gl3.h due to missing typedef's.

Seen on the RPi.
2016-05-03 20:02:34 +10:00
Sebastian Dröge
7acb1a35cb player: Add required paths via pkg-config for gstreamer-base-1.0 and gstreamer-video-1.0 for gobject-introspection
The GstBase-1.0.gir and GstVideo-1.0.gir files are required by GstPlayer.
Uninstalled builds fail if these files cannot be found.

https://bugzilla.gnome.org/show_bug.cgi?id=765804
2016-04-29 15:15:30 +03:00
Barun Kumar Singh
bf43460018 player: Add audio-video-offset property and setter/getter API
https://bugzilla.gnome.org/show_bug.cgi?id=765315
2016-04-28 13:18:41 +03:00
Sebastian Dröge
b9cfa34118 glviewconvert: Port more things to GLES/GL 3 compatibility
And move the shader mangling code into a single place instead of having a copy
in glcolorconvert and glviewconvert.

https://bugzilla.gnome.org/show_bug.cgi?id=765266
2016-04-27 11:47:20 +03:00
Sebastian Dröge
57a4494528 glcolorconvert: GLES3 deprecates texture2D() and it does not work at all in newer versions than 3.3
Use the newer texture() function instead. This fixes glimagesink and other
things on various Android devices.

https://bugzilla.gnome.org/show_bug.cgi?id=765266
2016-04-27 11:47:20 +03:00
Thiago Santos
9cc00bf2c9 mpegtsmux: write language descriptor when language is available
Adds a new function to mpegts lib to create a iso639 language
descriptor from a language and use it in mpegtsmux to add
a language descriptor to audio streams that have a language set.

https://bugzilla.gnome.org/show_bug.cgi?id=763647
2016-04-26 23:45:34 -03:00
Nicolas Dufresne
38895f2364 aggregator: Check all pads for data when live
When live, we still need to inspect all pads queue in order to determin
if we have received the first buffer or not.

https://bugzilla.gnome.org/show_bug.cgi?id=765431
2016-04-26 06:54:37 -04:00
Nicolas Dufresne
fbd824a2b5 aggregator: Fix locking when using the clock
This fixes a race where we check if there is a clock, then it get
removed and we endup calling gst_clock_new_single_shot_id() with a NULL
pointer instead of a valid clock and also calling gst_object_unref()
with a NULL pointer later.

https://bugzilla.gnome.org/show_bug.cgi?id=757548
2016-04-26 06:54:37 -04:00
Florin Apostol
aa58a70d66 adaptivedemux: use realtime_clock for waiting for a condition
There are several places in adaptivedemux where it waits for
time to pass, for example to wait until it should next download
a fragment. The problem with this approach is that it means that
unit tests are forced to execute in realtime.

This commit replaces the use of g_cond_wait_until() with single
shot GstClockID that signals the condition variable. Under normal
usage, this behaves exactly as before. A unit test can replace the
system clock with a GstTestClock, allowing the test to control the
timing in adaptivedemux.

https://bugzilla.gnome.org/show_bug.cgi?id=762147
2016-04-21 16:46:09 -03:00
Florin Apostol
74d62b9144 adaptivedemux: use GstSystemClock to all real-time calculations
A realtime clock is used in many places, such as deciding which
fragment to select at start up and deciding how long to sleep
before a fragment becomes available. For example dashdemux needs
sample the client's estimate of UTC when selecting where to start
in a live DASH stream.

The problem with dashdemux calculating the client's idea of UTC is
that it makes it difficult to create unit tests, because the passage
of time is a factor in the test.

This commit changes dashdemux and adaptivedemux to use the
GstSystemClock, so that a unit test can replace the system clock when
it needs to be able to control the clock.

This commit makes no change to the behaviour under normal usage, as
GstSystemClock is based upon the system time.

https://bugzilla.gnome.org/show_bug.cgi?id=762147
2016-04-21 16:46:09 -03:00
Barun Kumar Singh
aa754f634c player: Add support for multiview settings
https://bugzilla.gnome.org/show_bug.cgi?id=765302
2016-04-21 14:58:18 +03:00
Hyunjun Ko
6a0b35bf37 gl/cocoa: Fix incompatible type warning
https://bugzilla.gnome.org/show_bug.cgi?id=765292
2016-04-20 10:11:03 +03:00
Thiago Santos
5fc6284cdc videoaggregator: plug caps leak
It was losing ref of the original 'ret' caps that would be returned
or returning it with 2 references to it.
2016-04-18 13:46:55 -03:00
Thiago Santos
641bb44226 videoaggregator: properly handle interlace-mode restrictions
videoaggregator can't handle interlace-mode changes so it must
always restrict itself to the first interlacing mode it receives.

Tests included

https://bugzilla.gnome.org/show_bug.cgi?id=754495
2016-04-18 13:46:48 -03:00
Heinrich Fink
ef12e05a59 gl/caopengllayer: Apply layer.contentsScale to viewport dims
Fixes blurry content on HiDPI screens

https://bugzilla.gnome.org/show_bug.cgi?id=765194
2016-04-18 10:32:07 +03:00
Reynaldo H. Verdejo Pinochet
58465bc90f Drop usage of 'overlayed' to mean 'overlaid' 2016-04-15 13:39:32 -07:00
Sreerenj Balachandran
8f853cfed5 codecparsers: mpegvideo: Parse more slice header fields
https://bugzilla.gnome.org/show_bug.cgi?id=733872
2016-04-15 01:22:52 +10:00
Sreerenj Balachandran
51c7526030 codecparsers: mpegvideo: Add vbv_delay field to PictureHeader
https://bugzilla.gnome.org/show_bug.cgi?id=733872
2016-04-15 01:22:52 +10:00
Sreerenj Balachandran
7b0b74041e codecparsers: mpegvideo: Add more fields to the GstMpegVideoSequenceHdr
Added the fields load_non_intra_quantiser_matrix and
load_chroma_intra_quantiser_matrix to the sequence header structure.

https://bugzilla.gnome.org/show_bug.cgi?id=733872
2016-04-15 01:22:52 +10:00
Sebastian Dröge
ccc068576a meta: Initialize all GstMeta fields
During allocation they are not initialized to all zeroes.

https://bugzilla.gnome.org/show_bug.cgi?id=764902
2016-04-13 10:17:24 +03:00
Matthew Waters
b3b73d39a0 gl/cocoa/eagl: don't leak GThread's when dispatching messages
gst_gl_context_get_thread() returns a refed pointer, we need to unref it.
2016-04-13 01:03:20 +10:00
Matthew Waters
5115eadc46 glupload: keep the parent buffer around when converting EGLImage to 2D textures
e.g. receiving and releasing a buffer from OMX too early will potentially
cause textures to be overwritten while/before they are displayed.
2016-04-12 09:41:23 +10:00
Alessandro Decina
b73d2586ce libgstgl: cocoa, eagl: use libdispatch to schedule GL calls
Use libdispatch instead of GMainLoop to dispatch GL calls. libdispatch is more
optimized and cuts a lot of poll()/pthread_* overhead.
2016-04-11 08:40:03 +10:00
Alessandro Decina
38cb69279b glwindow: reduce the number of GMutexes and GConds in send_message()
Don't create many short lived locks/conds in gst_gl_window_send_message. This is
a micro optimization to save a bunch of pthread_* calls which are expensive on
OSX/iOS and possibly other platforms.
2016-04-11 08:40:03 +10:00
Matthew Waters
aa2b23fe39 videoaggregator: repect the result of find_best_format in the default update_caps
We weren't using the result of find_best_format at all.

Also, move the find_best_format usage to the default update_caps() to make
sure that it is also overridable.

https://bugzilla.gnome.org/show_bug.cgi?id=764363
2016-04-07 20:30:25 +10:00
Aurélien Zanelli
7a599df9f4 aggregator: remove duplicated test of flow_return in pad_chain_internal
https://bugzilla.gnome.org/show_bug.cgi?id=764549
2016-04-04 10:56:33 +03:00
Sreerenj Balachandran
88a3b4da3c codecparser: vp9: move persistent fields from GstVp9FrameHdr to GstVp9Parser
The subsampling_x, subsampling_y, bit_depth, color_space and color_range
fileds are moved from GstVp9FrameHdr to the global GstVp9Parser structure.
These fields are only present in keyframe or intra-only frame, no need to
duplicate them for inter-frames. This is an ABI change.

https://bugzilla.gnome.org/show_bug.cgi?id=764370
2016-04-01 14:12:08 +03:00
Matthew Waters
5e80a99faf eglimage: perform eglCreateImage in the gl thread
while calling eglCreateImage without a GL context current in the executing
thread works on the RPi, some other implementations will return errors.

Marshall the eglCreateImage to the GL thread to appease these implementations.
2016-04-01 16:08:18 +11:00
Matthew Waters
beeb3ff883 glviewconvert: support outputting to multiple draw buffers on GLES3
A similar change that was done to glcolorconvert adding the necessary shader
mangling.
2016-04-01 15:37:04 +11:00
Matthew Waters
822f09f6ae glcolorconvert: implement multiple render targets for GLES3
There are numerous slight differences required between Desktop GL and GLES3 for
multiple render targets.

1. gl_FragData doesn't exist at all and one is required to use
   'layout (location = ?) out ...' instead.
2. gl_FragColor doesn't exist, same as 1
3. texture2D() has been deprecated

Fortunately most of these have been taken care of with GL3 and the shader
mangling already exists so just expand the conditions they are used in.  The
gl_FragData issue requires a new mangle pass though.  We also use this new
pass on desktop GL for consistency.
2016-04-01 15:37:04 +11:00
Matthew Waters
1fe958d6d3 glcolorconvert: don't use the predefined variable name sample
Using 'sample' as a variable name is an error in GLES3
2016-03-31 20:53:18 +11:00
Matthew Waters
9e40dd7d40 gl: add support for building against GLES3 headers
with a fallback to GLES2 headers if available.
2016-03-31 20:53:18 +11:00
Matthew Waters
9ea15579ec glmemory: add checking the read implementation format/type on gles2 platforms
By default, reading GL_RED or GL_RG us unsupported by glReadPixels unless
exposed through GL_COLOR_READ_IMPLEMENTATION_FORMAT/TYPE.  This allows
downloading multiple-planar video frames where possible.
2016-03-31 20:52:42 +11:00
Matthew Waters
afd0ce7160 glbasememory: rollback map state when subclass map fails
Otherwise our state doesn't reflect reality.
2016-03-31 20:52:42 +11:00
Matthew Waters
7685b052b8 glmemorypbo: unmap pbo memory on pbo read error
Otherwise we are returning failure with a dangling map!

Also only unset the NEED_DOWNLOAD flag in download_transfer() if the read actually
succeeds.
2016-03-31 20:52:42 +11:00
Matthew Waters
d38587c142 glshader: add glBindFragDataLocation
There are some cases where it's needed for binding in/out variables in shaders.
e.g. glsl 150 (gl 3.2) doesn't support the 'layout (location = ?)' specifiers in
the shader source so we have to bind them ourselves.
2016-03-31 20:52:42 +11:00
Sebastian Dröge
2125124755 adaptivedemux: Handle find_stream_for_pad() without g_assert_not_reached() if no pad is found
Happens e.g. if a RECONFIGURE event is sent from downstream while we're
switching pads at this very moment. The old pad is gone and the stream has a
new pad.

https://bugzilla.gnome.org/show_bug.cgi?id=764404
2016-03-31 12:21:57 +03:00
Nirbheek Chauhan
302a4a7b5c aggregator: Fix strcmp test for sink template 2016-03-28 13:46:00 +03:00
Nirbheek Chauhan
cb53a6284f aggregator: Don't try to be too smart while allocating pad names
Previously, while allocating the pad number for a new pad, aggregator was
maintaining an interesting relationship between the pad count and the pad
number.

If you requested a sink pad called "sink_6", padcount (which is badly named and
actually means number-of-pads-minus-one) would be set to 6. Which means that if
you then requested a sink pad called "sink_0", it would be assigned the name
"sink_6" again, which fails the non-uniqueness test inside gstelement.c.

This can be fixed by instead setting padcount to be 7 in that case, but this
breaks manual management of pad names by the application since it then becomes
impossible to request a pad called "sink_2". Instead, we fix this by always
directly using the requested name as the sink pad name. Uniqueness of the pad
name is tested separately inside gstreamer core. If no name is requested, we use
the next available pad number.

Note that this is important since the sinkpad numbering in aggregator is not
meaningless. Videoaggregator uses it to decide the Z-order of video frames.
2016-03-28 13:46:00 +03:00
Sebastian Dröge
10a9b78d40 player: Add is_live flag to the GstPlayerMediaInfo
https://bugzilla.gnome.org/show_bug.cgi?id=763126
2016-03-25 12:51:29 +02:00
Vineeth TM
8cdfb13658 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Matthew Waters
c02f2718b2 gl/proto: sync operations are available on GLES 3.0
Without the GST_GL_API_GLES2 bit set, we will not even attempt to look
for the function pointers in the core library and will fallback to
glFlush/glFinish.
2016-03-22 23:30:10 +11:00
Matthew Waters
a9cf8476ea glmemory: unset GL_UNPACK_ROW_LENGTH in opengl3
If the user uploads their own texture without setting the unpack length, then
then the result will have the appearance of stride mismanagement due to
an incorrect row length.
2016-03-17 22:56:05 +11:00
Matthew Waters
74bbd4c1aa glutils: remove custom code for setting caps features
Just use gst_caps_set_features() instead.
2016-03-17 03:06:05 +11:00
Matthew Waters
200767ba0e glfilter: only allow the same src/sink caps when we are in passthrough mode
If we are given caps with extra features (like the overlay composition
features), we can only deal with that when we are in passthrough mode.

Previously we were bailing entirely and not allowing passthrough filter elements
with things like textoverlay.

Fixes the following pipeline (assuming glfilter supports passthrough):
gl ! textoverlay ! glfilter ! ... ! glimagesinkelement

https://bugzilla.gnome.org/show_bug.cgi?id=763756
2016-03-17 02:37:21 +11:00
Matthew Waters
993ec87ae6 glupload: deal with the ANY caps feature correctly
When transforming, xplode it out into the necessary caps features both
with and without the passthough features.

Fixes negotiation in the following class of pipelines:

gl ! textoverlay ! glupload ! glimagesinkelement

https://bugzilla.gnome.org/show_bug.cgi?id=763756
2016-03-17 02:37:15 +11:00
Matthew Waters
5061095e05 glshader: some compatibility changes for GL 1.4
GL 1.4 (with GL_ARB_shader_objects) doesn't have glIsProgram or glIsShader
equivalents.  As they are simply assertions, skip them when there isn't a
valid function pointer.
2016-03-10 22:53:02 +11:00
Matthew Waters
92b9b57d3e glfilter: retrieve the shader attributes from the GL thread
Otherwise we will receive bogus values

https://bugzilla.gnome.org/show_bug.cgi?id=763365
2016-03-10 22:53:01 +11:00
Edward Hervey
5ebf1d477d mpegvideoparser: Handle non-hierarchical profiles again
This is a regression from since mpegvideoparser was switched to
use the codecparsing library.

The problem is that the high bit of the profile_and_level is used
to specify non-hierarchical profiles and levels. Unfortunately we
were discarding that information.

Expose that escape bit, and use it in the element

https://bugzilla.gnome.org/show_bug.cgi?id=763220
2016-03-09 15:18:42 +01:00
Matthew Waters
aa6062945c gldisplay: make readding the same context a no-op
With e38af23044 returning the correct contexts,
gst_gl_display_add_context() was susceptible to causing infinte loops when
adding the same GstGLContext more than once.  Fix and add a test for
gst_gl_display_add_context().

Fixes glvideomixer gst-validate tests.
2016-03-08 02:06:13 +11:00
Sebastian Dröge
5f925a1580 Revert "libgstgl: cocoa, eagl: don't marshal GL calls to the context thread"
This reverts commit 797d6415df.

We're frozen for 1.8.0 release and this change might have bigger impact.
2016-03-07 08:54:47 +02:00
Alessandro Decina
797d6415df libgstgl: cocoa, eagl: don't marshal GL calls to the context thread
Execute GL calls without marshalling them to the context thread. In the cocoa
and eagl backends calling gst_gl_context_activate is cheap and therefore calling
it on the current thread and serializing GL calls with a per-context lock is
more efficient (faster and has less overhead) than marshalling everything to the
context thread.

This optimization cuts a large overhead in g_poll (continuously waking up the
context thread) and in g_mutex_*/g_cond_* (waiting for results from the context
thread).
2016-03-07 16:20:17 +11:00
Mark Nauwelaerts
e38af23044 gldisplay: really retrieve glcontext for a specific thread
When requesting a glcontext (regardless of thread), the result was correct.
However, when requesting current glcontext on a specific thread, it could
come up with a glcontext active on another thread.

https://bugzilla.gnome.org/show_bug.cgi?id=763168
2016-03-06 12:10:51 +01:00
Matthew Waters
23806d4953 gl: misc docs fixes/additions 2016-03-06 19:36:17 +11:00
Matthew Waters
dff43480ee gl*memory: document new functionality and objects 2016-03-06 19:36:17 +11:00
Mark Nauwelaerts
8d8c65b6d4 glfilter: handle some more unfixed fields when fixating caps 2016-03-05 19:48:57 +01:00
Nicolas Dufresne
140815ff93 glbasememory: Don't change maxsize at run-time
Maxsize is initialized once and should never change. Allocating data
should have no impact on the selected max size for this memory. This
causing memory map failure as the maxsize would become smaller then
size. This happened when using direct rendering in avviddec on GL that
does not support PBO transfer.

https://bugzilla.gnome.org/show_bug.cgi?id=763045
2016-03-03 19:47:26 -05:00
Sebastian Dröge
c22a8a6224 adaptivedemux: Fix REMOVE_SNAP_FLAGS() macro
!(flag1 | flag2 | flag3) is always evaluation to 0. ~ was meant here
instead of !.

CID 1352032.
2016-03-02 10:41:17 +02:00
Thiago Santos
c65b0e3a57 adaptivedemux: handle snap seeking without setting any position
When the start_type is GST_SEEK_TYPE_NONE for a forward seek
(or stop_type for a reverse) is not set on a snap seeking operation,
the element should use the current position and then snap as requested.

Also fixes uninitialized variable complaint by clang about
'ts' variable.
2016-02-26 18:17:37 -03:00
Matthew Waters
37ff267ff5 eglimagememory: add compatibility definitions for EGL dmabuf
e.g. the RPi doesn't have them defined
2016-02-26 21:15:20 +11:00
Matthew Waters
abec124f69 glcontext: add a method to add a context to another share group
Intended for use with wrapped contexts that are created shared with gst's
gl contexts in order to manage the internal sharegroup state correctly.

e.g. with caopengllayer (which is used in glimagesink and caopengllayersink
on OS X), we create a CGL context from the gst context and the sharing state
was not being correctly set on either GL context and gst_gl_context_is_shared()
was always returning FALSE.

With 11fb4fff80 only flushing with multiple
shared contexts, the required flush was not occuring causing screen
corruption or stuttering.

Note: this didn't affect GST_GL_API=opengl pipelines

https://bugzilla.gnome.org/show_bug.cgi?id=762620
2016-02-26 10:59:04 +11:00
Thiago Santos
f231598370 videoaggregator: fix caps queries to allow proper renegotiation
When caps are already negotiated it should be possible to
select formats other than the one that was negotiated. If downstream
allows alpha video caps and it has already negotiated to a non-alpha
format, caps queries should still return the alpha caps as a possible
format as caps renegotiation can happen.

Includes tests (for compositor) to check that caps queries done after
a caps has been negotiated returns complete results

https://bugzilla.gnome.org/show_bug.cgi?id=757610
2016-02-25 11:43:43 -03:00
Sebastian Dröge
18ac9d239e player: Expose more GstVideoOverlay API in the GstPlayerVideoOverlayVideoRenderer
Expose the expose() and set_render_rectangle() methods. These are useful for
proper functioning of the video overlay in various situations and toolkits.
2016-02-22 12:54:05 +02:00
Matthew Waters
98752fde48 gl: fix the build
2d287812 was incomplete
2016-02-22 21:03:28 +11:00
Matthew Waters
2d2878125e gl: error out if the configured GL API is unsupported by our element
https://bugzilla.gnome.org/show_bug.cgi?id=759801
2016-02-22 20:52:54 +11:00
Scott D Phillips
cf0d45c100 codecparsers: h265: Fix initialization of slice_deblocking_filter_disabled_flag
H.265 7.4.7.1 says:

> When slice_deblocking_filter_disabled_flag is not present, it is
> inferred to be equal to pps_deblocking_filter_disabled_flag.

https://bugzilla.gnome.org/show_bug.cgi?id=762351
2016-02-20 10:55:46 +02:00
Thiago Santos
115945b663 mpeg4parser: prevent assertion when scanning for sync code
Only search if there is indeed enough data to be searched otherwise
an assertion is raised
2016-02-19 16:42:35 -03:00
Julien Isorce
0da3390692 gldebug: make sure debug is initialized when calling gst_gl_insert_debug_marker
Usually gl debug is initialized in gst_gl_context_create_thread.
But this function is not used when using the GstGLContextGPUProcess
from ChromiumGStreamerBackend.

Received signal 11 SEGV_MAPERR 000000000000
gst_debug_category_get_threshold
gst_gl_insert_debug_marker
gst_gl_base_filter_gl_start
2016-02-18 16:38:31 +00:00
Sebastian Dröge
22e75a2112 gl: Fix compiler warning about unused const variable with gcc 6
CC       libgstgl_x11_la-gstglcontext_glx.lo
In file included from gstglcontext_glx.c:39:0:
../utils/opengl_versions.h:52:43: error: ‘gles2_versions’ defined but not used [-Werror=unused-const-variable]
 static const struct { int major, minor; } gles2_versions[] = {
                                           ^~~~~~~~~~~~~~
2016-02-18 10:33:20 +02:00
Sebastian Dröge
923dd696f2 gl: Move private headers from SOURCES to noinst_HEADERS 2016-02-18 10:29:21 +02:00
Matthew Waters
d99af79a2c glfilter: insert the debug marker from the GL thread
https://bugzilla.gnome.org/show_bug.cgi?id=761538
2016-02-17 13:01:35 +11:00
Philippe Normand
0b7276d01a adaptivedemux: restore bitrate averaging support
This was accidentally removed in commit ccff3be3.
https://bugzilla.gnome.org/show_bug.cgi?id=733959
2016-02-16 17:11:03 +02:00
Philippe Normand
4d1489b3de adaptivedemux: remove queue2 overrun notification
Due to performance impact concerns this is removed. An alternative
approach would be to rely on buffering messages monitoring.

https://bugzilla.gnome.org/show_bug.cgi?id=733959
2016-02-16 17:11:03 +02:00
Sebastian Dröge
c107a4f60a gl: Remove leftover g_prints
One was commented out, but we also don't use // comments :)
2016-02-16 08:48:23 +02:00
Matthew Waters
b26301bc8d gldebug: use the correct spelling for behavior
The headers use the american spelling of behavior not the UK/AUS version with
the extra U.
2016-02-16 14:41:37 +11:00
Matthew Waters
02262a20e8 glcontext: don't enable GL debug for messages that won't be logged
This is an optimization to avoid pointless string processing.
2016-02-16 14:00:05 +11:00
Florin Apostol
88e21e6089 dashdemux: gst_dash_demux_get_live_seek_range returns positive values
https://bugzilla.gnome.org/show_bug.cgi?id=752374
2016-02-10 14:34:48 -03:00
Tim-Philipp Müller
21dd771b69 gl: syncmeta: define GL_TIMEOUT_IGNORED in more portable way 2016-02-10 10:31:19 +00:00
Alessandro Decina
7c79b33108 gstglshader: cache uniform locations
Avoid redundant calls to glGetUniformLocation. The results can be cached once
the shader has been linked.
2016-02-10 16:37:22 +11:00
Alessandro Decina
2c0aca52a8 gstglcontext: micro optimization to gst_gl_context_thread_add
Invoke the callback right away when called on the context thread. Removes
overhead when nesting libgstgl calls (for example when working with the sync
meta).
2016-02-10 13:11:35 +11:00
Matthew Waters
09c6df31e3 glsyncmeta: add compatibility definition for GL_TIMEOUT_IGNORED 2016-02-09 13:08:21 +11:00
Matthew Waters
cd4a93da3b glsyncmeta: separate out gpu/cpu waits.
CPU waits are more expensive and are only required if the CPU is ever going to
access the data. GPU waits perform inter-context synchronisation and are cheaper
as they don't require CPU intervention.
2016-02-09 12:30:25 +11:00
Luis de Bethencourt
44c0d75cff adaptivedemux: remove overwritten value
ret is overwitten before used with the return of the subclass seek.

CID #1352044
2016-02-08 23:17:40 +00:00
David Waring
90fe6c5a5b adaptivedemux: Update position in stream->segment for new stream segment message.
https://bugzilla.gnome.org/show_bug.cgi?id=761458
2016-02-05 10:47:37 -03:00
Matthew Waters
1b0198631c gl: add .def file for msvc builds
Also internalize some API from being exported.
2016-02-05 10:46:21 +11:00
Thiago Santos
731ab94cc3 adaptivedemux: handle snap seeks
Adaptive demuxers need to start downloading from specific positions
(fragments) for every stream, this means that all streams can snap-seek
to a different position when requested. Snap seeking in this case will
be done in 2 steps:

1) do the snap seeking on the pad that received the seek event and
   get the final position

2) use this position to do a regular seek on the other streams to
   make sure they all start from the same position

More arguments were added to the stream_seek function, allowing better control
of how seeking is done. Knowing the flags and the playback direction allows
subclasses to handle snap-seeking.
And also adds a new return parameter to inform of the final
selected seeking position that is used to align the other streams.

https://bugzilla.gnome.org/show_bug.cgi?id=759158
2016-02-04 14:05:08 -03:00
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