Commit graph

2820 commits

Author SHA1 Message Date
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