Commit graph

3009 commits

Author SHA1 Message Date
Matthew Waters
7c90b0435d glbufferpool: use gst_gl_base_memory_alloc as a generic GL allocation framework
Requires the usage of GstGLVideoAllocationParams however any user can set their
own parameters along with an allocator which will be used to allocate the
correct memory type.
2015-12-17 13:49:56 +11:00
Matthew Waters
d2c5fc3e87 glmemorypbo: implement GstGLBaseMemory:alloc
Uses the GstGLVideoAllocationParams parameters
2015-12-17 13:49:56 +11:00
Matthew Waters
bfb4c446bc glbuffer: implements GstGLBaseMemory::alloc
Create GstGLBufferAllocationParams which is subclass of GstGLAllocationParams
2015-12-17 13:49:56 +11:00
Matthew Waters
650e5c4fe5 glmemory: implement GstGLBaseMemory::alloc
- Create GstGLVideoAllocationParams which is a GstGLAllocationParams subclass.
- Make it possible to allocate glmemory objects directly if no frills are
  needed.
2015-12-17 13:49:55 +11:00
Matthew Waters
bd61e1274c glbasememory: add a generic interface for allocating GL memories
This is made possible by a subclassable GstGLAllocationParams that holds
the allocation parameters

Every allocation would now go through gst_gl_base_memory_alloc with the
allocation parameters now being specified in a single struct to allow
extension by different allocators.
2015-12-17 13:49:55 +11:00
Matthew Waters
640476fcba Revert "glbuffer: Don't pass allocation params"
This reverts commit 052f41e5c2.

This is incorrect and will affect any other glbuffer user that needs/wants to
perform data alignment.
2015-12-17 11:06:34 +11:00
Nicolas Dufresne
052f41e5c2 glbuffer: Don't pass allocation params
The imported memory has already been allocated, passing allocation
parameters with alignment confuses the memory which endup with a
size different from maxsize and lead to overrun when the memory
is being copied.
2015-12-16 12:07:17 -05:00
Alessandro Decina
c1720963e4 glupload: fix allocator name after GLMemory API changes 2015-12-16 17:03:03 +11:00
Nicolas Dufresne
4c19b415bd gl: Allow using non-system mesa with both GL and GLES
GCC automatically disable redundance warnings for system headers. As
soon as we start using a non-system installed mesa, we would start
having issues. The test for both wasn't setting any flags, so it would
work but then fail at runtime.

This is being fixed by disabling in the code (where needed only) that
GCC warning. The test is also fixed to avoid the false positive we had.
2015-12-15 19:28:22 -05:00
Xavier Claessens
598ddaee72 bad: Add g_autoptr() support to all types
https://bugzilla.gnome.org/show_bug.cgi?id=754464
2015-12-14 14:45:38 -05:00
Luis de Bethencourt
91eb51dda1 glviewconvert: check pointer before dereferencing
priv->primary_out could be NULL, check before dereferencing it in
GST_BUFFER_FLAG_SET ()

CID 1308945
2015-12-14 12:32:14 +00:00
Matthew Waters
41c3cb30d4 glbuffer: bind/unbind on map/unmap for GL mappings
Bind the handle to the GL target on map/unmap to save the caller from
handling this themselves.
2015-12-14 18:22:58 +11:00
Matthew Waters
5d0d2ec6ca glbuffer: remove buffer specific transfer flags
Instead rely on GstGLBaseMemory's transfer handling
2015-12-14 18:22:27 +11:00
Matthew Waters
b12f2be4b1 glmemorypbo: map/unmap pbo memory correctly for state tracking
Otherwise some downloads will fail to occur from the PBO.
2015-12-14 18:22:07 +11:00
Matthew Waters
359d0a31ee glformat: add compatibility definitions for OES/rectangle textures 2015-12-14 17:05:31 +11:00
Matthew Waters
4c8f264686 glbasebuffer: remove unsed memory subclass
The functionality has been split into GstGLBaseMemory and GstGLBuffer.
2015-12-14 16:35:34 +11:00
Matthew Waters
2b7495bbc1 glmemory: base classify and add the pbo memory on top
The base class is useful for having multiple backing memory types other
than the default.  e.g. IOSurface, EGLImage, dmabuf?

The PBO transfer logic is now inside GstGLMemoryPBO which uses GstGLBuffer
to manage the PBO memory.

This also moves the format utility functions into their own file.
2015-12-14 16:35:32 +11:00
Matthew Waters
6cf8da132b gl: add a GL buffer based GstMemory
Heavily based on GstGLBaseBuffer that is a subclass of GstGLBaseMemory.
Provides GPU and CPU accessible GL buffer objects by GL handle or by
sysmem data pointer.
2015-12-14 16:34:54 +11:00
Matthew Waters
27e724df8f gl: add a base memory object
It handles the following
- GstAllocationParams -> gst_memory_init transformation
- Makes sure that map/unmap/create/destroy happen on the GL thread with
  a GL context current.
- Holds a possible sysmem accessible data pointer with alignment.
- Holds the need upload/download transfer state
2015-12-14 13:55:16 +11:00
Matthew Waters
51636b451c gl: add convenience function for the start of a video frame
Get's the start of the video frame based on a GstVideoInfo and
GstVideoAlignment.
2015-12-14 13:55:16 +11:00
Matthew Waters
3591c6bfa0 gluploadmeta; remove convenience helper API
It was not really useful as if one knows about libgstgl, one can just use
GLMemory objects directly.
2015-12-14 13:55:16 +11:00
Matthew Waters
50337e601e gldownload: remove helper api from the library
It was never used by anyone and is not needed anymore with the element
and GstGLMemory's transparent support for downloading textures.
2015-12-14 13:55:16 +11:00
Alessandro Decina
1d862db9c1 libgstgl: gstglcontext_cocoa: kCGLPFAStereo has been deprecated in 10.11
Also since the version scheme has changed (to include the micro number) since
10.10, use the MAC_OS_X_VERSION_* macro to avoid confusion.
2015-12-10 14:46:27 +11:00
Alessandro Decina
11ca761c5d glbufferpool: relax check for multiple texture targets
Only complain about multiple texture targets when _different_ texture targets
are configured.
2015-12-10 14:46:27 +11:00
Alessandro Decina
5cd0601dd5 glmemory: take subsampling into account for rectangle textures
Rectangle textures don't use normalized coordinates so subsampling needs to be
factored in explicitly.

Fixes YUV => RGB conversion for rectangle textures.
2015-12-10 14:46:27 +11:00
Thiago Santos
2fdd5dca14 adaptivedemux: avoid pushing events with manifest lock
It can be an easy source of deadlocks. Reproducible with very
fast connections (local server).
2015-12-08 16:12:37 -03:00
Matthew Waters
44c5985edd glproto: include function definitions for GL_APPLE_sync
Provides a performance improvement on iOS where we were falling back to glFinish
on settting sync points.
2015-12-08 18:08:28 +11:00
Nicolas Dufresne
d84d1708b7 glupload: Only offer custom allocator with caps features
To use GLMemory and EGLImage allocators, one need to know the
libgstgl API. This is only expected if the associated caps features
have been negotiated. Generic element that otherwise receive those
allocators may fail, resulting in broken pieline. We don't want to
force all generic element to check if the allocator is a custom
allocator or a normal allocator (which implement the _alloc method).

https://bugzilla.gnome.org/show_bug.cgi?id=758877
2015-12-04 17:08:46 -05:00
Sebastian Dröge
280de75d89 adaptivedemux: Log PTS of buffers that are pushed downstream 2015-12-03 10:08:53 +02:00
Matthew Waters
c8099e6e71 glcolorconvert: improve the YUY2/UYVY->RGBA conversion shader
Don't offset the y-axis.  We only need to offset on the x-axis.

Removes a sawtooth pattern on horizontal and vertical edges.

https://bugzilla.gnome.org/show_bug.cgi?id=755486
2015-12-02 22:52:20 +11:00
Matthew Waters
0b11eba96a glcolorconvert: improve RGBA->YUY2/UYVY conversion shader
We should only average the chroma samples not the luma sample.

https://bugzilla.gnome.org/show_bug.cgi?id=758904
2015-12-02 22:52:20 +11:00
Jan Schmidt
08544a459b adaptivedemux: Send the bitrate of the stream as a tag
If we know or can measure the nominal bitrate of a stream,
send that info as a tag downstream
2015-12-02 22:29:38 +11:00
Reynaldo H. Verdejo Pinochet
c564a043d1 Drop usage of deprecated g-ir-scanner --strip-prefix flag 2015-12-02 00:20:01 -08:00
Tim-Philipp Müller
64adb1998d hlsdemux: fix crash when decryption key can't be downloaded
Happened with
http://sslhls.m6tv.cdn.sfr.net/hls-live/livepkgr/_definst_/m6_hls_aes/m6_hls_aes_856.m3u8
if glib-networking was not installed (since key has https uri).
2015-12-01 18:01:36 +00:00
Reynaldo H. Verdejo Pinochet
86ec812429 Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
2015-11-18 16:05:42 -08:00
Sebastian Dröge
74ab40470c glviewconvert: String literals are const
gstglviewconvert.c: In function '_mangle_extensions':
gstglviewconvert.c:1511:13: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
     ext_str = "#extension GL_OES_EGL_image_external : require\n";
             ^
2015-11-17 17:09:51 +02:00
Sebastian Dröge
e2ea7843f9 glsyncmeta: Actually return the newly created meta from gst_buffer_add_gl_sync_meta()
gstglsyncmeta.c  -fPIC -DPIC -o .libs/libgstgl_1.0_la-gstglsyncmeta.o
gstglsyncmeta.c: In function 'gst_buffer_add_gl_sync_meta':
gstglsyncmeta.c:131:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
2015-11-17 17:08:14 +02:00
Matthew Waters
67327615df glsyncmeta: add vfuncs for all operations
there could be other ways/requirements for synchronising two GPU command
streams (whether GL or platform specific).

e.g. glfencesync/eglwaitnative/cond/etc
2015-11-17 15:27:26 +11:00
Matthew Waters
79f4efb02a glviewconvert: add support rectangle/external-oes textures
https://bugzilla.gnome.org/show_bug.cgi?id=757285
2015-11-17 15:27:26 +11:00
Tim-Philipp Müller
1491d02c4e adaptivedemux: remove now-defunct "num-lookback-fragments" property
This no longer does anything, and it was marked as CONSTRUCT_ONLY
which means someone would really have to go out of their way to
be able to set this, which would only be done in very custom
scenarios, if ever, and those will likely target a specific
version of GStreamer then, so probably not much point keeping
it deprecated for a while before removing it.
2015-11-14 20:28:34 +00:00
Vineeth TM
6eae0c7e18 glsl: fix possible string overrun in gst_glsl_version_profile_from_string
given a NULL-terminated string, s.
s[i] = '\0';
i++;
does not guarentee that s[i] is NULL terminated and thus string operations
could read off the end of the array.

https://bugzilla.gnome.org/show_bug.cgi?id=758039
2015-11-13 17:00:46 +11:00
Matthew Waters
babd066b89 glshader: don't read invalid list pointers (use after free)
gst_gl_shader_detach_unlocked already removes the list entry so attempting to
use the element to iterate to the next stage could read invalid data.

Based on patch by Vineeth TM <vineeth.tm@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=758039
2015-11-13 17:00:46 +11:00
Vineeth TM
4c9ac5e474 glsl: free str while returning error
https://bugzilla.gnome.org/show_bug.cgi?id=758039
2015-11-13 17:00:46 +11:00
Vineeth TM
550ecade4d glslstage: Fix vertex_sources memory leak
vertex_sources is being allocated but not freed resulting in leak

https://bugzilla.gnome.org/show_bug.cgi?id=757974
2015-11-12 21:23:21 +11:00
Vineeth TM
591401f9e8 glcolorconvert: remove unnecessary free
version_str is already being freed. So no need to call again

https://bugzilla.gnome.org/show_bug.cgi?id=757974
2015-11-12 21:23:21 +11:00
Vineeth TM
ba4802e1e5 glcolorconvert: Fix string leak
String got using gst_glsl_version_profile_to_string, is allocated
memory and should be freed

https://bugzilla.gnome.org/show_bug.cgi?id=757974
2015-11-12 21:23:21 +11:00
Vineeth TM
b8adc98ddc glcolorconvert: Fix frag_prog and frag_body memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=757974
2015-11-12 21:23:21 +11:00
Florin Apostol
4994f068d5 adaptivedemux: fixed handling errors emitted by uri handler
https://bugzilla.gnome.org/show_bug.cgi?id=757947
2015-11-11 17:56:19 +01:00
Matthew Waters
aada44cc09 glcolorconvert: mangle gl_FragColor for GL3
Some drivers don't provide the compatibility definition and we need to provide
our own 'out vec4' variable to put the results of the fragment shader into.

https://bugzilla.gnome.org/show_bug.cgi?id=757938
2015-11-11 23:42:02 +11:00
Matthew Waters
50b59150fd glviewconvert: remove set_format
We need the caps to be able to
1. check the caps features
2. get the requested texture-target on input/output
2015-11-11 15:16:37 +11:00
Matthew Waters
f24e768cc3 glshader: properly unref the stages on failure
When failing in the varargs functions, all the stage objects not handled need to
be unreffed to prevent a leak.
2015-11-11 14:41:38 +11:00
Matthew Waters
8d8063060e glslstage: properly return an error when we could not create the shader stage
While it was erroring out correctly later, there were GLib warnings about
setting a GError over the top of another GError.
2015-11-11 11:29:35 +11:00
Matthew Waters
21bd8ee536 glshaderstrings: fixup the external-oes fragment shader
The wrong sampler type was used
s/sampler2DExternalOES/samplerExternalOES/
2015-11-11 01:27:21 +11:00
Matthew Waters
87137e3353 glcolorconvert: try to keep the same texture-target if possible
Fixes issues attempting to passthrough external-oes textures
2015-11-10 23:41:24 +11:00
Matthew Waters
6c97be6dfa glcolorconvert: fix rendering rectangular textures with GL3
Rectangular textures are unavailable in unextended
GLES2 #version 100 shaders.

Fixes
texture-target=rectangle ! glcolorconvert ! texture-target=2D

There's a couple of differences between GL3 and GLES2/GL

- varying -> in or out depending on the stage (vertex/fragment)
- attribute -> in
- filtered texture access is a single function, texture()
2015-11-10 22:47:42 +11:00
Matthew Waters
149a92f250 glcolorconvert: properly use the other texture-target on fixation 2015-11-10 22:47:42 +11:00
Matthew Waters
3d5ed23a72 glslstage: add debug as to why _set_strings() failed 2015-11-10 22:47:42 +11:00
Matthew Waters
776ccf87b5 glsl: fix check for glsl version against GL context inversion
Any GLSL version that was less than the provided GL version would fail
2015-11-10 22:47:42 +11:00
Vineeth TM
d624ba0c61 adaptivedemux: Fix pad memory leak.
The static pads got from queue and uri_handler are not being freed
resulting in memory leaks.

https://bugzilla.gnome.org/show_bug.cgi?id=757859
2015-11-10 07:06:17 -03:00
Matthew Waters
ec318cf36d gl: forward declare some enums
Specifically the GstGLTextureTarget enum
2015-11-10 15:42:35 +11:00
Matthew Waters
8acafe6f9f glslstage: expose the default shader strings as public
Add some other simple strings for external-oes textures or transforming
the texture coordinates with a transformation matrix
2015-11-10 15:42:35 +11:00
Matthew Waters
8ae7cc4ee6 glcolorconvert: wait on the sync meta for input buffers 2015-11-10 15:42:35 +11:00
Matthew Waters
df69943726 glcolorconvert: use the correct oes target string in the template caps 2015-11-10 15:42:35 +11:00
Philippe Normand
ccff3be3ab adaptivedemux: improved bitrate estimations
Bitrate estimation is now handled through a queue2 element added after
the source element used to download fragments.

Original hlsdemux patch by Duncan Palmer <dpalmer@digisoft.tv>
https://bugzilla.gnome.org/show_bug.cgi?id=733959
2015-11-06 12:34:36 -03:00
Tim-Philipp Müller
edab4deb3a glshader, tsdemux: simplify code
Jus use _delete_link() instead of _remove_link() + _free1()
2015-11-06 13:00:55 +00:00
Luis de Bethencourt
ba8b8e4677 aggregator: use GST_STIME_FORMAT for GstClockTimeDiff
No need to manually handle negative value of deadline, GST_STIME_FORMAT does
exactly this.
2015-11-05 12:36:55 +00:00
Stefan Sauer
c1fa51953c aggregator: don't compare templ instance pointers
One can pass the PadTemplate from the element_class or the one from the factory.
While they have the same content, the addresses are different.
2015-11-03 19:11:28 -08:00
Olivier Crête
41344e0315 aggregator: Set to running in a single place
Only set to running when the thread is actually started.
2015-11-03 14:42:52 -05:00
Olivier Crête
cb29839580 aggregator: Document more locking 2015-11-03 14:37:59 -05:00
Sebastian Dröge
ce61a754d8 mpegtsdescriptor: Add API for creating extended descriptors and fix writing them
https://bugzilla.gnome.org/show_bug.cgi?id=757049
2015-11-03 20:35:41 +02:00
Olivier Crête
86c33cbb6e aggregator: Hold object lock while manipulating the segment
Make sure the object lock is held when aggregator->segment is
modified.
2015-11-02 20:10:35 -05:00
Olivier Crête
9deb334251 aggregator: Remove dead code
This code will never be called as max>=min in all cases. If the upstream
latency query returned min>max, the function already returned and all
values that are added to those have max>= min.
2015-11-02 19:05:01 -05:00
Luis de Bethencourt
2288b5e9ec videoaggregator: use GST_STIME_ARGS for GstClockTimeDiff
No need to manually handle negative values of diff, GST_STIME_ARGS does
exactly this.
2015-11-02 17:00:22 +00:00
Alessandro Decina
614ea95690 gstglutils: fix shader compilation on Mountain Lion
Make gst_gl_context_gen_shader/_compile_shader assume GST_GLSL_PROFILE_ES |
GST_GLSL_PROFILE_COMPATIBILITY as the profile. Without this, the shader compiler
doesn't inject the #version tag resulting in a compilation error on Mountain
Lion.

This is a workaround for old code using gst_gl_context_gen_shader. New code
should use the gst_glsl_stage_* API directly which allows the caller to
explicitly specify version/profile.
2015-11-02 12:10:44 +11:00
Matthew Waters
dd738842e4 glbufferpool: explicitly initialize a possibly uninitialized variable
The ret variable may be uninitialized and so its contents were undefined and
the results were erratic (failing with glvideomixer, succeeding in other cases)

P.S. No idea why gcc/clang et al never picked up on this like they normally do
(probably due to some optimisation pass figuring out it's only set once...)
2015-10-31 23:32:55 +11:00
Florin Apostol
a2ffe7e979 adaptivedemux: stop task on multiple download errors
On multiple download errors, we stop the download task and change the src
element state to NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=756240
2015-10-30 12:50:10 +00:00
Vincent Penquerc'h
7d909966e5 adaptivedemux: fix a missing lock in write to stream->last_ret
https://bugzilla.gnome.org/show_bug.cgi?id=757359
2015-10-30 12:24:22 +00:00
Florin Apostol
ef466b46d3 adaptivedemux: return error if src element cannot start
https://bugzilla.gnome.org/show_bug.cgi?id=756209
2015-10-30 12:17:40 +00:00
Florin Apostol
519165e461 adaptivedemux: fixed waiting for fragment updates
https://bugzilla.gnome.org/show_bug.cgi?id=756237
2015-10-30 11:52:18 +00:00
Florin Apostol
a85b64bb6d adaptivedemux: fix header redownload in case of errors
https://bugzilla.gnome.org/show_bug.cgi?id=756239
2015-10-30 11:47:17 +00:00
Florin Apostol
e0ef335426 adaptivedemux: release manifest lock before sending flush stop event
https://bugzilla.gnome.org/show_bug.cgi?id=757337
2015-10-30 09:46:41 +00:00
Florin Apostol
e29514ea3d adaptivedemux: reset download_finished before starting the src element
https://bugzilla.gnome.org/show_bug.cgi?id=757336
2015-10-30 09:46:41 +00:00
Florin Apostol
ac58216f05 adaptivedemux: release manifest lock before changing element state
https://bugzilla.gnome.org/show_bug.cgi?id=757335
2015-10-30 09:46:41 +00:00
Matthew Waters
d07c59170a glslstage: remove typedefs from the header
They are already defined in the forward decleration header and defining them
more than once will give an error with OSX's clang about typedef redefinition
being a C11 feature.
2015-10-30 14:40:35 +11:00
Matthew Waters
8106a0931a glcolorconvert: follow the correct texture target names 2015-10-30 14:38:05 +11:00
Matthew Waters
d707038101 glupload: explicitly configure the texture target on the gl buffer pool
If we don't, then the pool could end up allocating 2D textures when the
caps explictly state they should be rectangle textures.
2015-10-30 14:24:54 +11:00
Matthew Waters
b429654a37 glbufferpool: add bufferpool options for the various texture targets
This was chosen over relying solely on the caps as glupload needs to propose an
allocation and set the texture target based on the output caps.  Setting the
caps in the config is currently pointless as they are overwritten in a lot of
element's decide_allocation functions.

This provides a mechanism for the buffer pool to be configured for a certain
texture target when none has been configured.
2015-10-30 14:24:54 +11:00
Matthew Waters
ccce217502 glcolorconvert: add support for converting texture targets
Solved with a simple shader templating mechanism and string replacements
of the necessary sampler types/texture accesses and texture coordinate
mangling for rectangular and external-oes textures.
2015-10-30 14:24:53 +11:00
Matthew Waters
e61d504556 glmemory: add support for rectangle textures
Add the various tokens/strings for the differnet texture types (2D, rect, oes)

Changes the GLmemory api to include the GstGLTextureTarget in all relevant
functions.

Update the relevant caps/templates for 2D only textures.
2015-10-30 14:24:53 +11:00
Matthew Waters
ff87ffe6e6 glcolorconvert: order the caps template so that RGBA is first
glcolorconvert ! glcolorconvert would sometimes negotiated RGB
(the first list entry) otherwise.
2015-10-30 14:24:53 +11:00
Matthew Waters
e96f454b30 glbufferpool: move typedef's into the forward decleration file
Otherwise, for example, clang will warn about typedef redefinitions
being a C11 feature.
2015-10-30 14:24:53 +11:00
Florin Apostol
60f3eb15eb dahsdemux: task is signaled to stop without stop condition being set
The gst_adaptive_demux_stream_free function is trying to stop the stream's
download task. For this, it signals the task. But it fails to also set the
stream->download_finished = TRUE, so the task will go back to sleep and
only exit when the download is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=755121
2015-10-29 11:17:48 +00:00
Florin Apostol
eab158a669 adaptivedemux: fixed multithread support
https://bugzilla.gnome.org/show_bug.cgi?id=755169
2015-10-29 10:20:45 +00:00
Víctor Manuel Jáquez Leal
d054a6918c codecparser: h264: initialize parsing structures
Initialize to 0 these parse structures before filling them: GstH264SEIMessage,
GstH264NalUnit, GstH264PPS, GstH264SPS and GstH264SliceHdr.

When calling the functions which fill those structures, they may fail, leaving
unitialized those structures. This situation may lead to future problems, such
as a segmentation fault when freeing, for example.

This patch initializes to zero these structures, before filling them.

https://bugzilla.gnome.org/show_bug.cgi?id=755161
2015-10-29 11:26:37 +02:00
Víctor Manuel Jáquez Leal
c8b3d84757 codecparser: h265: initialize parsing structures
Initialize to 0 these parse structures before filling them: GstH265SEIMessage,
GstH265NalUnit, GstH265VPS, GstH265PPS, GstH265SPS and GstH265SliceHdr.

When calling the functions which fill those structures, they may fail, leaving
unitialized those structures. This situation may lead to future problems, such
as a segmentation fault when freeing, for example.

This patch initializes to zero these structures, before filling them.

https://bugzilla.gnome.org/show_bug.cgi?id=755161
2015-10-29 11:26:36 +02:00
Julien Isorce
704d49b9c7 glslstage: initialize output params to 0 before calling gl functions
The client side API of the Chromium's GPU Process has asserts
in debug mode that check that output params are initialized to 0.
2015-10-28 14:41:54 +00:00
Matthew Waters
8b0b68c4e8 glcolorconvert: allow outputting multiple textures for gles3 contexts
the USING_GLES2 includes all GLES3 contexts as well which does support
drawing to multiple buffers.  Instead make or decision solely based on
whether glDrawBuffers is available or not.
2015-10-26 18:26:18 +11:00
Matthew Waters
09976e021b glviewconvert: expose the element on gles2 platforms
We can do everything with gles3 however gles2 restricts us not allowing
separated or frame-by-frame multiview modes due to multiple draw buffers.
2015-10-26 18:24:59 +11:00
Sebastian Dröge
4eef8424b9 aggregator: Add create_new_pad() vfunc to allow subclasses to override the default behaviour
Not all aggregator subclasses will have a single pad template called sink_%u
and might do something special depending on what the application requests.

https://bugzilla.gnome.org/show_bug.cgi?id=757018
2015-10-23 16:31:47 +03:00
Matthew Waters
0af0237c4a gl: fix usage of string.h and stdio.h functions without including the headers
e.g:
gstglcontext_egl.c:613:7: error: implicit declaration of function 'strcmp'
[-Werror=implicit-function-declaration]
   if (strcmp (G_MODULE_SUFFIX, "so") == 0)
2015-10-21 04:53:08 +11:00
Matthew Waters
80c5e60f9a gl: remove unneeded shader variable parsing code 2015-10-21 04:05:00 +11:00
Matthew Waters
3dfc6899ad gl: be consistent in gobject boilerpate
GST_GL_IS_* vs GST_IS_GL_*

git grep -l 'GST_GL_IS_' | xargs sed -i 's/GST_GL_IS_/GST_IS_GL_/g'
2015-10-19 15:15:30 +11:00
Matthew Waters
9d92326fe5 glslstage: add brackets around pointer dereference referencing an array
While technically, i is always 0 and *vertex_sources[i++] is equivalant
to (*vertex_sources)[i++].  Be future-proof in the case of code
moves/changes/etc.

CID 1327406
2015-10-16 02:57:19 +11:00
Matthew Waters
b25807c382 glshader: port to using GstGLSLStage objects for string management
A GstGLShader is now simply a collection of stages that are
compiled and linked together into a program.  The uniform/attribute
interface has remained the same.
2015-10-15 21:27:57 +11:00
Matthew Waters
cc7d1098ab glsl: add a shader stage object GstGLSLStage
Represents a stage (vertex, geometry, fragment, etc) in the shader
pipeline.
2015-10-15 21:27:57 +11:00
Matthew Waters
c79cbbdcc1 gl/shader/variables: include generic gl.h header
Otherwise we may miss some forward declarations

Fixes build error: undefined reference to GstGLSLStage
2015-10-15 21:27:57 +11:00
Matthew Waters
2e8642cc4c gl: add some GLSL utility functions
Specifically parsing/setting GLSL versions and the shader related
function table.
2015-10-15 21:27:57 +11:00
Sebastian Dröge
e523bd2a33 adaptivedemux: HTTP ranges are inclusive, GStreamer segment.stop is exclusive
Translate the values accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=748316
2015-10-14 16:57:56 +03:00
Guillaume Desmottes
5b30a8e9b2 gl: fix leak in gst_gl_insert_debug_marker()
The string allocated by g_vasprintf() was leaked.

Reproduced using the
validate.file.compositor.simple.play_15s.synchronized validate scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=756492
2015-10-14 09:55:47 +11:00
Sebastian Dröge
f5dd41d710 Update GLib dependency to 2.40.0 2015-10-02 22:24:19 +03:00
Sebastian Dröge
ced0aa800a aggregator: Convert GST_ERROR_OBJECT() for seek events to GST_DEBUG_OBJECT() 2015-10-01 17:40:59 +02:00
Sebastian Dröge
bec6d61e42 aggregator: For the start time selection, only set the segment position
segment.time and segment.start can stay the same, and were always the same
before anyway because of a mistake.

https://bugzilla.gnome.org/show_bug.cgi?id=755623
2015-10-01 17:40:59 +02:00
Matthew Waters
83c2262849 gl: move debugging related functions to their own file 2015-10-02 01:01:42 +10:00
Antoine Jacoutot
a1d39d385d gl: Pass GL_CFLAGS to g-ir-scanner
This unbreaks building when some headers are under a non-standard path.
e.g. /usr/X11R6/include as on OpenBSD.

https://bugzilla.gnome.org/show_bug.cgi?id=755850
2015-09-30 09:59:53 +01:00
Matthew Waters
b8cb829e46 glcontext: fixup strstr lengths so we don't overrun 2015-09-30 15:17:38 +10:00
Matthew Waters
49e6516550 glupload: remove useless release_buffer
It's a leftover from when we weren't outputting GstBuffer's and
returning raw texture id's.
2015-09-30 13:36:09 +10:00
Matthew Waters
6fc9630a91 glutils: use gst_element_set_context for setting display/other_context
1. So we get tracking inside GstElement properly when e.g. adding to a bin
2. Removes redundant code.  Now only one place where
   GstContext->GstGLDisplay/GstGLContext transformation occurs
3. Fixes a memory leak in the process
4. Make the retrieval of debug categories thread safe
2015-09-30 12:39:47 +10:00
John Chang
40a63d27d8 adaptivedemux: remove unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=755656
2015-09-29 14:43:07 +01:00
Tim-Philipp Müller
5409017642 videoaggregator: fix compilation with older glib version
Remove weird use of private gtype defines and fix compilation
with older glib versions such as 2.36.

https://bugzilla.gnome.org/show_bug.cgi?id=755754
2015-09-29 14:40:26 +01:00
Matthew Waters
b7aed13e71 gl/eagl: use the default GL context debug category 2015-09-29 15:38:38 +10:00
Matthew Waters
6d2104aa7c gl: set the context on the element on a context query
Otherwise it's possible to lose the context information if the
context is only propagated through queries.
2015-09-28 22:31:09 +10:00
Matthew Waters
609977a56b gl: chain up to the parent class for GstElement::set_context
https://bugzilla.gnome.org/show_bug.cgi?id=705579
2015-09-28 22:24:04 +10:00
Matthew Waters
2195dad288 gl: sprinkle some debug markers to ease debugging 2015-09-28 16:47:00 +10:00
Matthew Waters
5bf38301e1 gl/utils: add a function to insert a debug marker
These markers are visible in tools that record the GL function calls
such as apitrace, et al.

Makes it easier to match up GL draw commands with specific elements.
2015-09-28 16:47:00 +10:00
Matthew Waters
bfe8e42323 gl: add some debugging prototypes 2015-09-28 16:47:00 +10:00
Matthew Waters
27422da056 glwindow: remove unused draw_unlocked function
The functionality is provided by draw anyway and is leftover from
X11's specific threading requirements that no longer apply.
2015-09-28 16:44:05 +10:00
Sebastian Dröge
fc76c936f4 aggregator: Don't forward QOS events to sinkpads that had no buffer yet
Otherwise they will receive a QOS event that has earliest_time=0 (because we
can't have negative timestamps), and consider their buffer as too late

https://bugzilla.gnome.org/show_bug.cgi?id=754356
2015-09-25 23:56:21 +02:00
Julien Isorce
b10fe76cbf glfilter: use GL_ELEMENT_ARRAY_BUFFER for vbo indices
Fixes this error with chromium gpu process:
GL_INVALID_OPERATION, glBindBuffer: buffer bound to more than 1 target

https://bugzilla.gnome.org/show_bug.cgi?id=755618
2015-09-25 20:42:39 +10:00
Julien Isorce
04856e6c8a glmemory: fix texture leak in _gl_mem_copy
https://bugzilla.gnome.org/show_bug.cgi?id=755456
2015-09-25 20:41:33 +10:00
Matthew Waters
46e83f5d50 gl/dispmanx: fix rendering with recent resize state tracking
557ca6fda5 didn't change to the
necessary gst_gl_window_resize() call for the dispmanx backend.
2015-09-21 18:11:21 +10:00
Olivier Crête
4731451974 aggregator: Keep at least two buffers in the queue in live mode
When in live mode, the queue needs to hold the currently processed
buffer and one more at least.

https://bugzilla.gnome.org/show_bug.cgi?id=754851
2015-09-18 12:17:49 +02:00
Tim-Philipp Müller
d331f01e03 adaptivedemux: remove unprefix STATISTICS_MESSAGE_NAME after all
It was only added during 1.5.x so we might just as well remove it
immediately.

https://bugzilla.gnome.org/show_bug.cgi?id=754686
2015-09-17 17:54:36 +01:00
Philippe Normand
261d8daca0 adaptivedemux: prefix the statistics message name macro
Keep old define around for now.

https://bugzilla.gnome.org/show_bug.cgi?id=754686
2015-09-17 17:39:27 +01:00
Matthew Waters
f82840ce88 gl/caopengllayer: fix non-existent selector warning
557ca6fda5 introduced the queueResize
call without implementing the selector
2015-09-17 22:44:41 +10:00
Jan Schmidt
0f0bf863fa glwindow: Fix g_return_val_if_fail in a void function 2015-09-17 21:52:38 +10:00
Matthew Waters
3addb6bbf4 glwindow: add API to request a resize event on the next draw
- glimagesink needs to be able to resize the viewport on aspect ratio
  changes resulting from either caps changes or 3d output mode changes.
- Performing a glViewport outside the GstGLWindow::resize callback
  will not have the winsys' stack of viewports required to correctly
  place the output frame.

Provide a function to request a resize on the next draw event from the
winsys.

Also track size changes inside the base GstGLWindow class rather
than in each subclass.

https://bugzilla.gnome.org/show_bug.cgi?id=755111
2015-09-17 20:26:23 +10:00
Matthew Waters
1625f74632 gl/x11: store the correct dimension from the resize events
small typo s/width/height/
2015-09-17 20:21:43 +10:00
Vineeth T M
00438fdff0 gl: Fix GError leaks during failures
https://bugzilla.gnome.org/show_bug.cgi?id=755140
2015-09-17 11:52:55 +02:00
Sebastian Dröge
5674dd75d9 adaptivedemux: Fix playback of live streams
dashdemux seeks each live stream to its current fragment in the beginning, but
the base class does not know about this. Update the demuxer segment with this
seek so we generate the correct SEGMENT event and can actually play the
stream.

This needs some refactoring at some point.

https://bugzilla.gnome.org/show_bug.cgi?id=755047
2015-09-15 22:05:19 +02:00
Thiago Santos
0ed501ab03 adaptivedemux: Only overwrite last return if it was OK
Prevents overwriting other conditions that would be more important,
such as EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=755042
2015-09-15 12:46:31 -03:00
Tim-Philipp Müller
fe8de1857a gl: bufferpool take into account video stride alignment requirements
when allocating memory. Fixes crashes with avdec_h265 in the AVX2
code path which requires 32-byte stride alignment, but the
GstAllocationParams only specified a 16-byte alignment.

https://bugzilla.gnome.org/show_bug.cgi?id=754120
2015-09-15 16:11:23 +01:00
Sebastian Dröge
eb97bb0adb videoaggregator: Fix mixup of running times and segment positions
We have to queue buffers based on their running time, not based on
the segment position.

Also return running time from GstAggregator::get_next_time() instead of
a segment position, as required by the API.

Also only update the segment position after we pushed a buffer, otherwise
we're going to push down a segment event with the next position already.

https://bugzilla.gnome.org/show_bug.cgi?id=753196
2015-09-14 19:56:43 +02:00
Sebastian Dröge
336ca3207a aggregator: Document that get_next_time() should return running time
https://bugzilla.gnome.org/show_bug.cgi?id=753196
2015-09-14 19:56:33 +02:00
Sebastian Dröge
d1c5669a38 adaptivedemux: Properly implement timestamping of multi-period streams
Each period will start again with pts 0 + period presentation offset, which is
also going to be the presentation time inside the container stream if any.
However all periods together should form a continuous timeline, with regard to
stream time and running time.

For making this possible we keep track of the "user requested segment", i.e.
the seek events, inside the demuxer without adjusting anything and taking this
demuxer segment only as orientation for modified segments per stream.

This per stream segments will have their segment.start at pts that would be
produced for this stream in this period, and the segment.base/time adjusted so
that this pts maps to the running and stream time this period should have in
the context of all other periods.

https://bugzilla.gnome.org/show_bug.cgi?id=754222
2015-09-14 19:53:03 +02:00
Thiago Santos
ba97ec74be videoaggregator: fix caps query to properly handle alpha formats
Only accept alpha if downstream has alpha as well. It could
theoretically accept alpha unconditionally if blending is
properly implemented for handle it but at the moment this
is a missing feature.

Improves the caps query by also comparing with the template
caps to filter by what the subclass supports.

https://bugzilla.gnome.org/show_bug.cgi?id=754465
2015-09-11 18:03:26 -03:00
Sreerenj Balachandran
fcd42b7d77 codecparsers: h265: Fix the selection of Active Ref Pic Set
If short_term_ref_pic_set_sps_flag is FALSE, the ShortTermRefPicSet
structure is supposed to derive from slice header. Which means,
CurrRpsIdx is equal to num_short_term_ref_pic_sets. But the number
of refpicsets communicated via sps header is only num_short_term_ref_pic_sets - 1.
And we are using slice_header structure to reference the last entry, which is
ShortTermRefPicSet[num_short_term_ref_pic_sets].

https://bugzilla.gnome.org/show_bug.cgi?id=754834
2015-09-10 21:12:30 +02:00
Sreerenj Balachandran
81435c8891 codecparsers: h265 : Fix default scaling list values
Fix the default_scaling_list values based on Table 7-6

https://bugzilla.gnome.org/show_bug.cgi?id=754834
2015-09-10 21:10:17 +02:00
Matthew Waters
591494ff54 gl/api: use public rather than private define
HAVE_IOS is only defined for the build of this module so
attempting to use gstgl in iOS would result in incorrect GL
includes.
Use GST_GL_HAVE_PLATFORM_EAGL instead for choosing the iOS GL
header.
2015-09-10 00:33:19 +10:00
Sebastian Dröge
bab55828ae gl/eagl: Also unbind renderbuffer after setting up framebuffer
https://bugzilla.gnome.org/show_bug.cgi?id=754757
2015-09-09 10:10:47 +03:00
Sebastian Dröge
c97144b23b gl/eagl: Don't make context uncurrent just to make it current again in the next line
Also binding the framebuffer again is unnecessary then as it was just bound a
few lines before while the context was current.

https://bugzilla.gnome.org/show_bug.cgi?id=754757
2015-09-09 10:10:46 +03:00
Thiago Santos
8c5b2da124 videoaggregator: lift restriction of changing pixel-aspect-ratio
The videoaggregator can convert PAR, there is no reason for
restricting it.

https://bugzilla.gnome.org/show_bug.cgi?id=754291
2015-09-03 11:18:22 -03:00
Tim-Philipp Müller
1cb3e8c591 gtk, qt, gl: fix typo in debug and error messages 2015-08-31 18:06:31 +01:00
Olivier Crête
2fc98af421 aggregator: Also ignore start-time on seek from gst_element_send_event()
https://bugzilla.gnome.org/show_bug.cgi?id=753806
2015-08-31 11:11:48 +03:00
XuGuangxin
54c2620bdb codecparsers: h265: Fix tile row and column parsing
Section 6.5.1:  Coding tree block raster and tile scanning conversion process
Follow the equations 6-3 and 6-4

This will provide correct offset_max in slice_header for parsing
num_entry_point_offsets.

https://bugzilla.gnome.org/show_bug.cgi?id=754024

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
2015-08-26 12:24:02 +03:00
Sebastian Dröge
5c106c0c2a gl/eagl: Unref context after setting a window handle
gst_gl_window_get_context() returns a new reference.

Hopefully fixes https://bugzilla.gnome.org/show_bug.cgi?id=753758
2015-08-25 10:09:14 +03:00
lyb
497f372668 codecparsers: h265: Add APIs for up-right-diagonal/raster scan conversion
As per  7-42 and 7-43 the ScalingFactor's scanIdx is 0,
which is "up-right-diagonal" scan. Add APIs for converting
up-right-diagonal to raster and vise versa.

https://bugzilla.gnome.org/show_bug.cgi?id=754024
2015-08-24 21:28:08 +03:00
XuGuangxin
26e350f0bf codecparsers: h265: Fix the range of delta_chroma_log2_weight_denom
Being more strict on specification, According to 7.4.7.3,
delta_chroma_log2_weight_denom should be in the range of
[(0 - luma_log2_weight_denom), (7 - luma_log2_weight_denom)]

https://bugzilla.gnome.org/show_bug.cgi?id=754024
2015-08-24 21:21:29 +03:00
Nicolas Dufresne
206638c439 gl: Let base transform relay the meta api for us
During allocation query, when this element is not passthrough, it must
relay the overlay compostion meta and it's parameters. Fortunatly, base
transform can do this for us.

https://bugzilla.gnome.org/show_bug.cgi?id=753850
2015-08-22 22:15:36 -07:00
Justin Kim
85834d6bbc glcontext: add specific error message when missing GL_SHADING_LANGUAGE_VERSION
GL_SHADING_LANGUAGE_VERSION was introduced since ES 2.0, but in some
android emulator doesn't support this feature. To prevent confusion for
developer, the error message need to be more clear.

https://bugzilla.gnome.org/show_bug.cgi?id=753905
2015-08-21 18:14:15 +10:00
Matthew Waters
40d2693d07 glbasefilter: only call gl_{stop,start} if the context changed
Removes the redundant GL object creation/deletion on every
decide_allocation call which is being called for every caps change.

Thus reduces the required GL state changes on reconfigure events
which are being sent by glimagesink/xvimagesink
2015-08-20 23:25:35 +10:00
Ben Browitt
09b4f050e0 videoaggregator: Always set the pad's buffer_vinfo when storing a buffer
Otherwise it might be unset, and then the buffer is used and
gst_video_frame_map() will crash because of invalid video-info.

https://bugzilla.gnome.org/show_bug.cgi?id=753805
2015-08-20 14:22:49 +03:00
Arnaud Vrac
697f117ddd configure.ac: fix build when the uvch264 plugin is not selected
Instead of checking for the gstreamer-video-1.0 package is installed,
just assume it is since we already check for the -base dependency.

With this replace the GST_VIDEO_* variables in makefiles and directly
link with libgstvideo.

https://bugzilla.gnome.org/show_bug.cgi?id=753820
2015-08-19 16:52:03 +03:00
Nicolas Dufresne
a31a753bfd glupload: Recalculate offset and size in raw upload
As we only expose the mapped portion of the frame into the GL
memory object (and not the original padding) we need to
re-calculate the size and offset.
2015-08-16 18:13:27 +02:00
Edward Hervey
e276d02d28 adaptivedemux: Demote debugging level 2015-08-15 19:04:43 +02:00
Edward Hervey
69867f95e2 adaptivedemux: Actually wait for playlist update when requested
There are several cases where a HLS server could temporarily have wrong
fragments, or reconfigure the playlist. In those cases, when we get
fragment download failures, we *really* want to wait a bit (for the next
playlist update) before retrying to get fragments.

Previously this method was first checking to see if there was next fragments
(according to the previous manifest update) before waiting for the next update.
The problem was that if that if there is a temporary failure on the server,
that's uncorrelated to whether the manifest contains next fragments or not.
2015-08-15 19:04:42 +02:00
Nicolas Dufresne
e6bd7d2792 gloverlaycompositor: Also disable the blend when done 2015-08-15 15:55:08 +02:00
Nicolas Dufresne
f935b2c547 glsink: Enable sync meta on pools we offer
As the upload is asynchronous, we need to enable the sync meta to
gain correct rendering. The buffer pool receiver don't know about
that.
2015-08-15 15:55:08 +02:00
Sebastian Dröge
f4a76139db opengl: Change GLclampd to double
GLclampd does not exist on GLES, only desktop GL.
2015-08-15 10:03:07 +02:00
Martin Kelly
591b2e2c68 opengl: add missing ClearDepth prototype
The ClearDepth call is missing.

https://bugzilla.gnome.org/show_bug.cgi?id=753639
2015-08-15 09:28:12 +02:00
Jan Schmidt
fdac09d843 h264parse: Clear SPS info after processing.
The SPS struct might be filled out by a call to
gst_h264_parser_parse_subset_sps, which fills out
dynamically allocated data and requires a call
to gst_h264_sps_clear() to free it. Also make sure
to clear out any allocated SPS data when returning
an error.

https://bugzilla.gnome.org/show_bug.cgi?id=753306
2015-08-15 15:39:23 +10:00
Alex Ashley
93edd99bf7 dashdemux: add support for HTTP HEAD method of time sync
The urn:mpeg:dash:utc:http-head:2014 method of time synchronisation
uses an HTTP HEAD request to a specified URL and then parses the
Date: HTTP response header.

This commit adds support to dashdemux for this method of time
synchronisation by making a HEAD request and then parsing the Date:
response.

This commit adds support to gstfragment to return the HTTP headers
and to uridownloader to support HEAD requests. To avoid creating a
new API, the RANGE get function is re-used (abused?) with start=-1
and end=-1 to indicate a HEAD request.

https://bugzilla.gnome.org/show_bug.cgi?id=752413
2015-08-14 06:47:21 -03:00
Sreerenj Balachandran
8a6cc4ed27 codecparsers: h265: Fix the range of delta_chroma_log2_weight_denom
ChromaLog2WeightDenom = luma_log2_weight_denom + delta_chroma_log2_weight_denom

The value of ChromaLog2WeightDenom should be in the range of 0 to 7 and
the value luma_log2_weight_denom  should be also in the range of 0 to 7.
Which means , delta_chroma_log2_weight_denom can have values in the range
between -7 and 7.

https://bugzilla.gnome.org/show_bug.cgi?id=753552
2015-08-12 14:11:31 +02:00
Sreerenj Balachandran
b6b2e04501 codecparsers: h265: Fix the parsing of ref_pic_lists_modification
https://bugzilla.gnome.org/show_bug.cgi?id=753552
2015-08-12 14:11:26 +02:00
Nicolas Dufresne
9720c07f23 gl: Add opengl_version.h to the list of sources
Adding this private header to the list of sources. We don't want to make
this header public, but we need it in the list of sources otherwise it
won't be included in the tarball. This fixes make distcheck.

This regression was introduced by commit 1a6fe3db
2015-08-10 14:51:02 -04:00
Matthew Waters
b7777b9181 gl: use gles2 shaders everywhere
This effectively limits a glfilter subclass to be > GL(ES) 2.0.
rather than a possible GL 1.4.
2015-08-10 16:38:32 +02:00
Matthew Waters
1a6fe3db40 glcontext/wgl: implement gl3 core profile context selection 2015-08-10 15:46:13 +02:00
Nicolas Dufresne
d6baf8dcc7 gloverlaycompositor: Add shader to convert BGRA/ARGB -> RGBA
Depending on the bytes order we will get BGRA (little) and ARGB (big)
from the composition overlay buffer while our GL code expects RGBA. Add
a fragment shader that do this conversion.

https://bugzilla.gnome.org/show_bug.cgi?id=752842
2015-08-08 16:32:53 -04:00
Matthew Waters
69a90b5bfe gl/syncmeta: implement synchronisation without glFenceSync
Uses glFinish as that's the best we have for lesser OpenGL versions.
2015-08-08 17:30:42 +02:00
Matthew Waters
83995c0935 context/glx: only use glXCreateContextAttribs for OpenGL 3 contexts
mesa for example when creating a GL 3.1 compatibility context
overrides our context profile selection to create a core context.
2015-08-08 15:32:17 +02:00
Olivier Crête
6efc106a67 aggregator: Queue "latency" buffers at each sink pad.
In the case where you have a source giving the GstAggregator smaller
buffers than it uses, when it reaches a timeout, it will consume the
first buffer, then try to read another buffer for the pad. If the
previous element is not fast enough, it may get the next buffer even
though it may be queued just before. To prevent that race, the easiest
solution is to move the queue inside the GstAggregatorPad itself. It
also means that there is no need for strange code cause by increasing
the min latency without increasing the max latency proportionally.

This also means queuing the synchronized events and possibly acting
on them on the src task.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête
e4a1db2287 videoaggregator: Remove broken _clip vfunc
It never does anything.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête
69fa4f9a5b aggregator: Default to "zero" start time selection mode as documented 2015-07-29 20:07:09 -04:00
Olivier Crête
50b7d1d577 aggregator: Ignore the "first" mode if the segment not a time segment 2015-07-29 20:06:11 -04:00
Sebastian Dröge
b21f01276c glupload: Remove debug output from gst_gl_upload_transform_caps()
We can't know if the GstGLUpload type is initialized at this point already,
and thus our debug category might not be initialized yet... and cause an
assertion here.

As we don't print debug output for any of the other transform functions, let's
defer this problem for now.
2015-07-29 19:11:58 +01:00
Sebastian Dröge
fab880fddc aggregator: Add property to select how to decide on a start time
Before aggregator based elements always started at running time 0,
now it's possible to select the first input buffer running time or
explicitly set a start-time value.

https://bugzilla.gnome.org/show_bug.cgi?id=749966
2015-07-29 14:35:50 +01:00
Jan Schmidt
c1b0d818bb h264parse: Add more NAL types for debugging output.
Register more NAL unit types so that they are dumped
by name in the debug output instead of being labelled
'Invalid'
2015-07-29 23:10:49 +10:00
Sebastian Dröge
730b5c8aa2 aggregator: Query the peer latency again on the next opportunity after a pad was added or removed
Adding a pad will add a new upstream that might have a bigger minimum latency,
so we might have to wait longer. Or it might be the first live upstream, in
which case we will have to start deadline based aggregation.

Removing a pad will remove a new upstream that might have had the biggest
latency, so we can now stop waiting a bit earlier. Or it might be the last
live upstream, in which case we can stop deadline based aggregation.
2015-07-28 23:23:32 +01:00
Nicolas Dufresne
f79cad55e2 glupload: Add fixme about using bufferpool for raw
http://bugzilla.gnome.org/show_bug.cgi?id=752937
2015-07-28 08:59:48 -04:00
Nicolas Dufresne
adbd9d3c05 glupload: Keep input frame mapped as long as needed
When performing a raw upload, we need to keep the raw data mapped as
long as needed.

https://bugzilla.gnome.org/show_bug.cgi?id=752937
2015-07-28 08:54:29 -04:00
Nicolas Dufresne
eb4d3c352a Revert "glupload: memcpy on raw data upload"
This reverts commit 82c0189b28.

https://bugzilla.gnome.org/show_bug.cgi?id=752937
2015-07-28 08:54:29 -04:00
Matthew Waters
ee94aa003a glcontext/wgl: fix defenition of gst_gl_context_wgl_new
gstglcontext_wgl.c: In function 'gst_gl_context_wgl_new':
gstglcontext_wgl.c:83:40: error: 'display' undeclared (first use in this function)
2015-07-27 21:54:27 +10:00
Matthew Waters
1137ed3e45 gl/cocoa: fix definition of gst_gl_context_new
gstglcontext_cocoa.m:75:1: error: conflicting types for 'gst_gl_context_cocoa_new'
2015-07-27 20:03:05 +10:00
Matthew Waters
2beaabea12 gl/win32: fix definition of gst_gl_window_win32_new 2015-07-27 20:00:47 +10:00
Matthew Waters
4d9ae8ebba wayland: fail window open if the display is the correct type
Errors out cleanly if a wayland compositor is not running
2015-07-27 18:23:33 +10:00
Matthew Waters
3b89d8a23c glwindow: pass display to implementation's _new()
So they have to opportunity to fail if they cannot handle the
display connection.

https://bugzilla.gnome.org/show_bug.cgi?id=752743
2015-07-27 18:23:29 +10:00
Matthew Waters
dbcae77e02 glcontext: pass display to implentation's _new()
This allows the context to fail creation based on incompatible
display type's. e.g. glx context with an wayland display handle.

https://bugzilla.gnome.org/show_bug.cgi?id=752743
2015-07-27 18:23:17 +10:00
Julien Isorce
5e4b94c1bb gl: support cgl, egl and glx within a same build
On osx, with the same build,
gst-launch-1.0 videotestsrc ! glimagesink works with:

GST_GL_PLATFORM=egl GST_GL_WINDOW=x11 GST_GL_API=gles2
GST_GL_PLATFORM=egl GST_GL_WINDOW=x11 GST_GL_API=opengl

GST_GL_PLATFORM=glx GST_GL_WINDOW=x11 GST_GL_API=opengl

GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa GST_GL_API=opengl
GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa GST_GL_API=opengl3

https://bugzilla.gnome.org/show_bug.cgi?id=752743
2015-07-27 09:03:58 +01:00
Jan Schmidt
45f8a27211 glupload: Check that caps contain desired caps features
Use 'contains' checks instead of equality checks on caps features
to allow for uploading when caps also contain GstVideoOverlayComposition
meta.

https://bugzilla.gnome.org/show_bug.cgi?id=752912
2015-07-27 17:21:33 +10:00
Julien Isorce
90a1ff1383 gl: move GL_NUM_EXTENSIONS definition after gl.h
https://bugzilla.gnome.org/show_bug.cgi?id=752743
2015-07-24 00:03:26 +01:00
Luis de Bethencourt
7ecf6b0d6c glupload: fix memory leak
GstCapsFeatures need to be freed with gst_caps_features_free() after use.

CID #1312136, CID #1312136
2015-07-23 10:58:21 +01:00