Matthew Waters
3ba30d42a4
gl: use gles2 shaders everywhere
...
This effectively limits a glfilter subclass to be > GL(ES) 2.0.
rather than a possible GL 1.4.
2017-12-09 19:32:07 +00:00
Lubosz Sarnecki
6a58c684a7
gltransformation: implement pivot point for rotation and scale
...
https://bugzilla.gnome.org/show_bug.cgi?id=744763
Add a pivot vector for setting the origin of rotations and scales.
With the pivot point the rotation and scale operations can have
different origins. This adds the ability to rotate around different points.
Currently the default (0, 0) pivot point is possible,
a rotation around the center, and zooming into and out of the center.
With an pivot point this is optional.
I defined the following image coordinates for the pivot point:
(-1,1) ------------------------- (1,1)
| |
| |
| |
| (0,0) |
| |
| |
| |
(-1,-1) ------------------------- (1,-1)
Example:
Rotate the video at the bottom left corner
gst-launch-1.0 videotestsrc \
! gltransformation \
scale-x=0.5 \
scale-y=0.5 \
rotation-z=25.0 \
pivot-x=-1.0 \
pivot-y=-1.0 \
! glimagesink
The pivot-z option defines the pivot point in 3D space.
This only affects rotation, since we have no Z data to scale.
With this option a video can be rotated around a point in 3D space.
Example:
Rotate around point behind the video:
gst-launch-1.0 videotestsrc \
! gltransformation \
rotation-x=10.0 \
pivot-z=-4.0 \
! glimagesink
2017-12-09 19:32:07 +00:00
Matthew Waters
dec64d9036
glvideomixer: swap control binding proxy
...
The ref_object and object parameters were the wrong way around.
For the typical use case where an application is setting a
GstControlBinding on the returned ghost pad:
1. our control binding would be removed when the new one was set
2. sync_values calls were not being forwarded from the internal
pad to the ghost pad.
If an application attempts to perform other control binding
operations (get_* family of functions) on the internal pad, they
will also be forwarded to the ghost pad where a possible
GstControlBinding will provide the necessary values.
2017-12-09 19:32:07 +00:00
Luis de Bethencourt
b9a7cefae6
gstglfilterbin: remove unused variable
...
res is set multiple times but never used or returned. Removing it.
2017-12-09 19:32:07 +00:00
Luis de Bethencourt
52a9fe006f
glstereomix: remove redundant initialization
...
v is initialized in the for loop init, no need to do it twice. Removing
first initialization.
2017-12-09 19:32:07 +00:00
Julien Isorce
485ad4f5c1
caopengllayersink: remove unused label context_creation_error
...
Build error introduced by commit
5457e55f25
https://bugzilla.gnome.org/show_bug.cgi?id=750310
2017-12-09 19:32:06 +00:00
Tim-Philipp Müller
0a2f2426b0
glimagesink: fix allocation meta structure leak
...
gst_query_add_allocation_meta() does not take ownership
of the structure, for some reason.
CID 1312135
2017-12-09 19:32:06 +00:00
Olivier Crête
f59948c5c0
glvideomixer: Add GstControlBinding proxy
...
This is used to proxy GstControlBinding to the pad on the
parent object. This avoid having to sync the values in the proxy pad,
this is too early if you have a queue between the pad and the actual
aggregation operation.
https://bugzilla.gnome.org/show_bug.cgi?id=734060
2017-12-09 19:32:06 +00:00
Nicolas Dufresne
4cf2d84315
glupload: Forward composition meta even without params
...
When the sink does not know the window size (e.g not created yet)
it will not add any param to the the composition meta. This is no
reason not to forward this meta API. Fixes issue where it could not
attach until we resize the window.
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Nicolas Dufresne
1812c19291
composition-overlay: Positions are relative to texture
...
The coordinate are relative to the texture dimension and not
the window dimension now. There is no need to pass the window
dimension or to update the overlay if the dimension changes.
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Lubosz Sarnecki
8abd2bbe35
gloverlaycompositor: Create own shader object
...
Make gloverlaycompositor independent of the shader used in the sink.
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Nicolas Dufresne
1fae4b199a
glimagesink: Properly handle compsositor life time
...
Should be created in READY_TO_PAUSED, not PAUSED_TO_PLAYING.
Should be cleared in PAUSED_TO_READY.
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Julien Isorce
32ddcf102c
caopengllayersink: use gst_gl_display_create_context
...
https://bugzilla.gnome.org/show_bug.cgi?id=750310
2017-12-09 19:32:06 +00:00
Julien Isorce
6e7dc76b56
glstereosplit: use gst_gl_display_create_context
...
Also unlock the lock on error.
https://bugzilla.gnome.org/show_bug.cgi?id=750310
2017-12-09 19:32:06 +00:00
Julien Isorce
f068020645
gl: use gst_gl_display_create_context in more elements.
...
glbasefilter, glbasemixer and gltestsrc.
https://bugzilla.gnome.org/show_bug.cgi?id=750310
2017-12-09 19:32:06 +00:00
Lubosz Sarnecki
91d4cfe2b0
glimagesink: Send reconfigure event when window size changes
...
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Lubosz Sarnecki
052b0a1caf
glimagesinkbin: Add allocation query for GstVideoOverlayComposition
...
Adds an GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE query to glupload
and glimagesink. Detects the query from the downstream elements, so
it is executed only when downstream supports the overlay API.
This makes pipelines with textoverlay ! glupload ! gldownload ! xvimagesink possible.
Uses allocation meta struct for passing the window size upstream.
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Lubosz Sarnecki
dc47e6d3c0
glimagesinkbin: Add GstVideoOverlayCompositionMeta caps features
...
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Lubosz Sarnecki
1c0ddbd9a8
glimagesink: Upload and draw overlays with GstGLOverlayCompositor
...
Receives the GstOverlayComposition buffer in the glimagesink and draws them.
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Matthew Waters
36408736c0
glcolorconvertelement: propagate failure to convert buffer upstream
...
Rather than just silently continuing
2017-12-09 19:32:05 +00:00
Nicolas Dufresne
5f38bcf905
uploadelement: Protect against NULL pointer
...
I notice that if you stop the pipeline during a renegotiation
the upload may be NULL while an allocation query is being run.
In that scenario, returning FALSE to the allocation query is the
best thing.
2017-12-09 19:32:05 +00:00
Matthew Waters
b7a3b54b2a
download: only start a download transfer for sysmem caps features
2017-12-09 19:32:05 +00:00
Matthew Waters
e4af6201c0
gltransformation: correct vao usage
...
keep the vao bound after uploading the new vertex data
fixes a mesa GL error "no vertex array object bound" on caps changes
2017-12-09 19:32:05 +00:00
Matthew Waters
afcb6aa1da
gl: consolidate egl header includes to egl-only headers
...
They may conflict with other headers.
2017-12-09 19:32:05 +00:00
Olivier Crête
1c99bc92ca
glvideomixer, glmixer: Add description and klass
2017-12-09 19:32:05 +00:00
Nicolas Dufresne
b8d3c2d2a5
gl: Don't leak pool if set_config failed
2017-12-09 19:32:05 +00:00
Vineeth TM
5229b50125
glimagesink: use g_clear_error instead of g_error_free
...
replace g_error_free with g_clear_error, as it internally
checks if error variable is valid or not.
https://bugzilla.gnome.org/show_bug.cgi?id=751823
2017-12-09 19:32:05 +00:00
Luis de Bethencourt
237af0d21c
gl: add missing break
...
gst_gl_view_convert_element_set_property() is missing a break at the end
of the PROP_OUTPUT_DOWNMIX_MODE case. Adding it.
CID #1308949
2017-12-09 19:32:05 +00:00
Nicolas Dufresne
0f3c34f05f
glimagesink: Don't leak pool
...
gst_query_add_allocation_pool is transfer none. Also unref
if there was a configuration error.
2017-12-09 19:32:05 +00:00
Julien Isorce
76983d4454
gldisplay: add gst_gl_display_create_context
...
It also emits a create-context signal so that an application
can provide an external GstGLContext backend.
https://bugzilla.gnome.org/show_bug.cgi?id=750310
2017-12-09 19:32:04 +00:00
Julien Isorce
e29e67fa6e
Revert "gl: add GstGLContextGPUProcess backend"
...
This reverts commit b377112ee3
.
2017-12-09 19:32:04 +00:00
Jan Schmidt
dad74d40e1
glimagesink: Remove duplicate, useless line of code
2017-12-09 19:32:04 +00:00
Nicolas Dufresne
44a1492c30
opengl: glstero* are only built with full OpenGL
...
Don't try to register the elements unless they are built.
2017-12-09 19:32:04 +00:00
Jan Schmidt
020c7f1303
gl: Add glviewconvert, glstereomix and glstereosplit elements
...
Conversion elements for transforming multiview/stereoscopic video
https://bugzilla.gnome.org/show_bug.cgi?id=611157
2017-12-09 19:32:04 +00:00
Jan Schmidt
77676ffc90
glimagesink: Support multiview/stereoscopic video
...
Support video with multiview info in the caps, transform
it to mono anaglyph by default, but allow for configuring
other output modes and handoff to the app via
the draw signal.
https://bugzilla.gnome.org/show_bug.cgi?id=611157
2017-12-09 19:32:04 +00:00
Matthew Waters
5276b7ccbf
glimagesink: add missing handle-events/ignore-alpha property to the bin
2017-12-09 19:32:04 +00:00
Matthew Waters
8c36e5193e
glmixerbin: implement proper dynamic pad removal
...
https://bugzilla.gnome.org/show_bug.cgi?id=750881
2017-12-09 19:32:04 +00:00
Nicolas Dufresne
ccc410e73c
glimagesink: Don't do pool caching
...
We now know that pool caching can cause renegotiation issues
when an element in the pipeline change from passthrough to not
passthrough. As it's not needed, don't cache existing pools.
https://bugzilla.gnome.org/show_bug.cgi?id=748344
2017-12-09 19:32:04 +00:00
Matthew Waters
2210ba5d46
glmemory: separate pbo transfer from texture transfers
...
When supported, the potentially longer pbo upload/download can be
initiated before the texture upload/download, potentially increasing
throughput.
2017-12-09 19:32:04 +00:00
Matthew Waters
dffa2857d7
gl: move basesink properties from glimagesinkbin to glsinkbin
2017-12-09 19:32:04 +00:00
Sebastian Dröge
3bfe8fcb5b
gl: Use gst_object_ref_sink() for gl{filter,mixer,src}bin too
2017-12-09 19:32:04 +00:00
Sebastian Dröge
25c554a5e4
glsinkbin: Use gst_object_ref_sink() for consistency with the video-sink property on playbin
2017-12-09 19:32:04 +00:00
Thiago Santos
33b5cd5426
Fix a common typo: retreive -> retrieve
...
Seems to have been copy pasted around a few places
2017-12-09 19:32:03 +00:00
Matthew Waters
1e9f7b6303
gl: consolidate internal_rgba_format into glmemory
...
Expose some useful value format conversion functions available in
GstGLMemory.
2017-12-09 19:32:03 +00:00
Matthew Waters
6c56aba687
glwindow: handle gst_video_overlay_set_render_rectangle
2017-12-09 19:32:03 +00:00
Julien Isorce
238edceda4
gl: add GstGLContextGPUProcess backend
...
It builds its GL vtable from a proc address provided
by the application.
2017-12-09 19:32:02 +00:00
Julien Isorce
fce0e0ba3c
gl: add and use gst_gl_internal_format_rgba
...
Previously when compiling GstGL with both GL and GLES2,
GL_RGBA8 was picked from GL/gl.h. But a clash may happen at
runtime when one is selecting GLES2.
gst_gl_internal_format_rgba allows to check at runtime
if it should use GL_RGBA or GL_RGBA8.
2017-12-09 19:32:02 +00:00
Luis de Bethencourt
7361160673
gleffects: 'for' loop initial declaration
...
'for' loop initial declarations are not allowed in C89, moving the declarations
to before the 'for' loops.
2017-12-09 19:32:02 +00:00
Xavier Claessens
0280be02ca
gloverlay: fix a leak
...
https://bugzilla.gnome.org/show_bug.cgi?id=749846
2017-12-09 19:32:02 +00:00
Xavier Claessens
01177670ea
gloverlay: properly handle errors while loading file
...
Post an error on the bus if anything bad happens while reading
and parsing the image file.
https://bugzilla.gnome.org/show_bug.cgi?id=749846
2017-12-09 19:32:02 +00:00
Xavier Claessens
80914d1731
gloverlay: remove unused type_file field
...
https://bugzilla.gnome.org/show_bug.cgi?id=749846
2017-12-09 19:32:02 +00:00
Matthew Waters
c55790143f
gleffects: properly initialize the shaders across contexts implementing multiple API's
2017-12-09 19:32:02 +00:00
Matthew Waters
b53178f724
gleffects_laplacian: fix shader compilation in gl3/gles2
...
https://bugzilla.gnome.org/show_bug.cgi?id=748393
2017-12-09 19:32:02 +00:00
Matthew Waters
1d796508e8
gltransformation: fix DrawElements call for element array buffers
...
https://bugzilla.gnome.org/show_bug.cgi?id=749734
2017-12-09 19:32:02 +00:00
Sebastian Dröge
5503937337
compositor/glvideomixer: Don't calculate PAR/DAR with unset GstVideoInfos
...
Otherwise we divide by zero.
2017-12-09 19:32:02 +00:00
Matthew Waters
44153e637b
compositor/glvideomixer: fix up par handling
...
We were using the wrong formula
https://bugzilla.gnome.org/show_bug.cgi?id=749634
2017-12-09 19:32:01 +00:00
Matthew Waters
f0ed0b728d
caopengllayersink: static const the indices array
...
the contents will never change anyway.
2017-12-09 19:32:01 +00:00
Matthew Waters
56bd10a392
caopengllayersink: correctly use the sync meta across multiple contexts
...
1. Set the sync point after the (possible) upload has occured
2. Wait in the correct GL context (the draw context)
Note: We don't add the GL sync meta to the input buffer as it's not
writable and a copy would be expensive.
Similar to the change with the same name for glimagesink
2017-12-09 19:32:01 +00:00
Matthew Waters
d6c4f850ea
caopengllayersink: update for GL3 element array buffer usage
...
fixes blank output
2017-12-09 19:32:01 +00:00
Matthew Waters
f272500ccb
glimagesink: correctly use the sync meta across multiple contexts
...
1. Set the sync point after the (possible) upload has occured
2. Wait in the correct GL context (the draw context)
Note: We don't add the GL sync meta to the input buffer as it's not
writable and a copy would be expensive.
2017-12-09 19:32:01 +00:00
Matthew Waters
0e2fe3c2e9
glimagesink: free the vertex buffer when done
...
fixes a memory leak
2017-12-09 19:32:01 +00:00
Matthew Waters
72993f54fa
gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
...
We are using shaders everywhere and so they are not needed
2017-12-09 19:32:01 +00:00
Matthew Waters
ac793f691d
glimagesink: cleanup properties
...
remove unused "display-name"
ensure defaults between the bin/element are the same
2017-12-09 19:32:01 +00:00
Matthew Waters
6c9f648462
gleffects: only try the GL2 shader init path if we have a GL2 context
2017-12-09 19:32:01 +00:00
Matthew Waters
65c57b77ff
gl: element buffers are part of vao state
...
Use them as such. They are also required for GL3 core profile support
with glDrawElements on OS X.
2017-12-09 19:32:01 +00:00
Matthew Waters
50d3161ac5
gl: don't deadlock on context creation failure
...
https://bugzilla.gnome.org/show_bug.cgi?id=749284
2017-12-09 19:32:01 +00:00
Sebastian Dröge
9336d8fa80
glmixerbin: Don't unref pad templates
...
Otherwise we unref the reference that is owned by the element class.
2017-12-09 19:32:01 +00:00
Matthew Waters
06cbb3389b
glvideomixer: implement par handling
...
We were previously ignoring it completely
2017-12-09 19:32:01 +00:00
Matthew Waters
5d3dd13433
glvideomixer: don't upload the vertex data every frame
...
Add the missing cache tracking statement.
2017-12-09 19:32:01 +00:00
Nicolas Dufresne
95eb2ef8df
gluploadelement: Remove uneeded header and defines
2017-12-09 19:32:01 +00:00
Nicolas Dufresne
685250928f
gltestsrc: Use default get_caps implementation
...
The custom code is wrong as it ignores the templates, which leads to
missing fields in the result. Instead, simply use the default get_caps
implementation which does it correctly (get the template, intersect
with filter and return).
https://bugzilla.gnome.org/show_bug.cgi?id=749237
2017-12-09 19:32:00 +00:00
Sebastian Dröge
eb626d8ddc
glmixer: Implement GstVideoAggregator::find_best_format()
...
Without this, we will fixate weird pixel-aspect-ratios like 1/2147483647. But
in the end, all the negotiation code in videoaggregator needs a big cleanup
and videoaggregator needs to get rid of the software-mixer specific things
everywhere.
2017-12-09 19:32:00 +00:00
Matthew Waters
b3bf122c94
gl: demote upload/convert/download elements to none
...
Copy paste error
2017-12-09 19:32:00 +00:00
Matthew Waters
41d3ca819d
gl: expose internal glvideomixerelement\
...
We might want more control over the exact pipeline
Also reduces overhead
2017-12-09 19:32:00 +00:00
Matthew Waters
dfddc4b910
gl: expose internal glimagesinkelement
...
We might want more control over the exact pipeline.
Also reduces overhead.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
3353667212
Revert "Revert "glimagesink: add pixel-aspect-ratio property on the bin""
...
This reverts commit d96e43b034
.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
b189e3fec3
Revert "Revert "glimagesink: forward ALL the properties on the bin""
...
This reverts commit 59fb0f830f
.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
7304d3cc75
Revert "Revert "glimagesink: implement as a bin""
...
This reverts commit be938f92d9
.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
51d3a0a059
Revert "gl: readd glupload/download onto element pads"
...
This reverts commit 87d8270f30
.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
3d6031b75c
Revert "Revert "glvideomixer: implement with glmixerbin""
...
This reverts commit b4bd11f2f3
.
2017-12-09 19:32:00 +00:00
Matthew Waters
296397a8b1
glimagesink: handle the local_context query
...
so that upstream elements can get the GL context from glimagesink
2017-12-09 19:32:00 +00:00
Matthew Waters
343947f383
gl: readd glupload/download onto element pads
...
Allows insertion of gl elements into non-gl pipelines without converter
(upload/download) elements.
https://bugzilla.gnome.org/show_bug.cgi?id=743974
2017-12-09 19:32:00 +00:00
Matthew Waters
eb5d578a95
Revert "glvideomixer: implement with glmixerbin"
...
This reverts commit 0fb56738a1
.
2017-12-09 19:32:00 +00:00
Matthew Waters
d9737138ef
Revert "glimagesink: implement as a bin"
...
This reverts commit 8a0017e21d
.
2017-12-09 19:32:00 +00:00
Matthew Waters
3b0efeb731
Revert "glimagesink: forward ALL the properties on the bin"
...
This reverts commit 4be45e5f30
.
2017-12-09 19:32:00 +00:00
Matthew Waters
0da6dbce81
Revert "glimagesink: add pixel-aspect-ratio property on the bin"
...
This reverts commit 2ba6bb9b93
.
2017-12-09 19:32:00 +00:00
Jan Schmidt
7a61e0eca4
glimagesink: Cache caps for passing to the client draw call
...
Don't convert the GstVideoInfo to caps on every draw call,
just cache the caps and pass them into the GstSample.
2017-12-09 19:32:00 +00:00
Matthieu Bouron
dc36647d78
glimagesink: Use gst_pad_get_pad_template_caps in ::get_caps()
2017-12-09 19:32:00 +00:00
Matthew Waters
c902a6f525
glupload: provide the sink template caps that could be used
...
https://bugzilla.gnome.org/show_bug.cgi?id=746399
2017-12-09 19:32:00 +00:00
Matthieu Bouron
41015eb331
glfiltercube: Don't initialize multiple shaders on renegotiation
2017-12-09 19:32:00 +00:00
Matthieu Bouron
3a124511bb
glimagesink: Remove unused stop function
2017-12-09 19:32:00 +00:00
Matthew Waters
45b50cbb72
glimagesink: unref the pool in the correct place
...
Otherwise we could hold a pool to a context that is never going to be used.
https://bugzilla.gnome.org/show_bug.cgi?id=748405
2017-12-09 19:32:00 +00:00
Matthieu Bouron
cf438d7def
gltransformation: Unref shader in ::stop()
2017-12-09 19:32:00 +00:00
Matthew Waters
f4f3284161
gl: unref display/other-context in the correct place
...
Otherwise state changes from PLAYING->READY->PAUSED will cause there to
to be no display configured on the element.
https://bugzilla.gnome.org/show_bug.cgi?id=748405
2017-12-09 19:32:00 +00:00
Sebastian Dröge
ee6bfe0127
glfilter: De-camelcase onInitFBO() vfunc
2017-12-09 19:31:59 +00:00
Sebastian Dröge
3613ecfd0a
glfilter: Remove onStart/onStop vfuncs, and unused onReset()
...
onStart/onStop are just duplicates of the basetransform ones, onReset
was never called but was used everywhere when stop should've been used.
2017-12-09 19:31:59 +00:00
Lubosz Sarnecki
590c7032d8
gltransformation: don't initialize multiple shaders on renegotiation
...
https://bugzilla.gnome.org/show_bug.cgi?id=748407
* delete shader if one exists
* set it to NULL after unrefing
2017-12-09 19:31:59 +00:00
Sebastian Dröge
c75f6b347f
glcolorconvert: Fix compiler warning
...
gstglcolorconvertelement.c:230:19: error: unused variable 'in_structure'
[-Werror,-Wunused-variable]
GstStructure *in_structure = gst_caps_get_structure (caps, 0);
^
2017-12-09 19:31:59 +00:00
Matthieu Bouron
4e05044734
glcolorconvert: Keep colorimetry and chroma-site fields if passthrough
...
https://bugzilla.gnome.org/show_bug.cgi?id=748141
2017-12-09 19:31:59 +00:00
Matthew Waters
5fbc9bd5e0
glimagesink: balance change_state display ref/unref
...
the display was being unreffed on the incorrect state change causing
invalid state when changing from PLAYING/PAUSED->READY->PAUSED/PLAYING.
2017-12-09 19:31:59 +00:00
Matthieu Bouron
6d75eaf005
glupload: Release glupload buffer when caps are changed
...
https://bugzilla.gnome.org/show_bug.cgi?id=748371
2017-12-09 19:31:59 +00:00
Vineeth T M
41af2f4ad8
glmixer: Possible null pointer dereference
...
While printing error message when context fails, error variable is not being used anymore
so it will lead to null pointer dereference
https://bugzilla.gnome.org/show_bug.cgi?id=748287
2017-12-09 19:31:59 +00:00
Michał Dębski
7ec1246730
gleffects: Create element for each effect
...
https://bugzilla.gnome.org/show_bug.cgi?id=746209
2017-12-09 19:31:59 +00:00
Michał Dębski
afdc3c8ee3
gleffects: Merge laplacian filter into effects
...
https://bugzilla.gnome.org/show_bug.cgi?id=746209
2017-12-09 19:31:59 +00:00
Michał Dębski
befbf3733b
gleffects: Merge sobel filter into effects
...
https://bugzilla.gnome.org/show_bug.cgi?id=746209
2017-12-09 19:31:59 +00:00
Michał Dębski
208b5f999e
gleffects: Merge blur filter into effects
...
https://bugzilla.gnome.org/show_bug.cgi?id=746209
2017-12-09 19:31:59 +00:00
Michał Dębski
a2ef6757f0
gleffects: Correct attributes for hconv and vconv shaders
...
Width and height were switched for glow shaders. For blur
filter attributes names were obsolete.
https://bugzilla.gnome.org/show_bug.cgi?id=746209
2017-12-09 19:31:59 +00:00
Michał Dębski
eb326ba4c2
gleffects: Fix fisheye shader - pass float to sqrt
...
On OSX passing literal int to sqrt() in GLSL results in error.
https://bugzilla.gnome.org/show_bug.cgi?id=746209
2017-12-09 19:31:59 +00:00
Lubosz Sarnecki
85d9185b0c
gltransformation: fix shader memory leak
2017-12-09 19:31:59 +00:00
Matthew Waters
03908c679e
gldisplay: synchronize the searching and creation of GstGLContext's
...
Ootherwise we could end up with multiple elements in different chains
each creating a context. Fixes context creation with glvideomixer.
2017-12-09 19:31:59 +00:00
Guillaume Desmottes
e6c5410a2a
glmixer: fix caps leak in gst_gl_mixer_pad_sink_getcaps()
...
Caps refcounting was all wrong in this function. Rewrote it and add some
comments to make it clearer.
Fix caps leaks with the
validate.file.glvideomixer.simple.play_15s.synchronized scenario.
https://bugzilla.gnome.org/show_bug.cgi?id=747915
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2017-12-09 19:31:59 +00:00
Guillaume Desmottes
ce76c66f92
glmixer: unref owned caps when finalizing the mixer
...
Fix a caps leak with the
validate.file.glvideomixer.simple.play_15s.synchronized scenario.
https://bugzilla.gnome.org/show_bug.cgi?id=747915
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2017-12-09 19:31:59 +00:00
Guillaume Desmottes
0511d12e4a
glmixer: pass the proper free function to frames and buffers array
...
'array_buffers' contain borrowed GstBuffer and so shouldn't have a free
function. 'frames' is the one containing GstGLMixerFrameData and so should use
_free_glmixer_frame_data as free function.
Fix GstGLMixerFrameData leaks with the
validate.file.glvideomixer.simple.play_15s.synchronized scenario.
https://bugzilla.gnome.org/show_bug.cgi?id=747913
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2017-12-09 19:31:59 +00:00
Sebastian Dröge
3acaa0eb0f
gldownloadelement: Download *from* OpenGL, not into
2017-12-09 19:31:59 +00:00
Matthieu Bouron
15785f794e
gluploadelement: Unref GstGLUpload object and caps in ::stop()
...
Fix leak of the GstGLUpload object.
https://bugzilla.gnome.org/show_bug.cgi?id=748033
2017-12-09 19:31:59 +00:00
Sebastian Dröge
bff8cde2ea
gl: Remove some empty ::finalize() implementations
2017-12-09 19:31:59 +00:00
Sebastian Dröge
c4713af2ef
gldownloadelement: Fix element description
2017-12-09 19:31:59 +00:00
Sebastian Dröge
f8d2219c44
gldownloadelement: Remove unused ::finalize() implementation
2017-12-09 19:31:59 +00:00
Sebastian Dröge
4ccf151d15
glcolorconvertelement: Also unref caps in ::stop() already
...
They are not useful anymore afterwards, so keeping them until ::finalize()
might only cause someone to use them later and then fail.
2017-12-09 19:31:59 +00:00
Guillaume Desmottes
3294854c6d
glcolorconvertelement: fix GstGLColorConvert leak
...
convert->convert was never unreffed.
This can be reproduce with the
validate.file.glvideomixer.simple.play_15s.synchronized scenario.
https://bugzilla.gnome.org/show_bug.cgi?id=747911
2017-12-09 19:31:59 +00:00
Sebastian Dröge
af77f6467f
glimagesink: Disconnect mouse/key event signal handlers from window when shutting down context
2017-12-09 19:31:58 +00:00
Sebastian Dröge
39c72f324b
glimagesink: Guard against disconnecting invalid signal ids
2017-12-09 19:31:58 +00:00
Edward Hervey
36419f2f79
glvideomixer: Don't use context if not present
...
Avoids assertions at runtime
2017-12-09 19:31:58 +00:00
Anton Obzhirov
9294e84334
gleffects: port all effects to GLES2.0
...
https://bugzilla.gnome.org/show_bug.cgi?id=745955
2017-12-09 19:31:58 +00:00
Nicola Murino
1af4a1f759
glimagesink: fix caps leak
...
https://bugzilla.gnome.org/show_bug.cgi?id=746541
2017-12-09 19:31:58 +00:00
Víctor Manuel Jáquez Leal
55dbb25dcc
glupload: move meta-data copy into gst-gl library
...
In some upload implementations the out buffer has more than one references,
turning the buffer not writable, so it won't be possible to modify its
meta-data.
This patch moves the meta-data copy before increasing the reference of the out
buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=746173
2017-12-09 19:31:58 +00:00
Julien Isorce
5f7aaba2d5
glimagesink: keep window invisible when sharing output
...
https://bugzilla.gnome.org/show_bug.cgi?id=739681
2017-12-09 19:31:58 +00:00
Julien Isorce
1d88b95201
glimagesink: provide GstSample in client-draw signal
...
Instead of prividing texture and size directly.
And apply changes to examples.
https://bugzilla.gnome.org/show_bug.cgi?id=739681
2017-12-09 19:31:58 +00:00
Matthew Waters
93968916a4
glsyncmeta: make context to wait and set sync explicit
...
otherwise we may wait on a sync object in same context by accident
2017-12-09 19:31:58 +00:00
Nicolas Dufresne
c68af4d6fc
glimagesink: Add NULL check in error case
...
Other context may be NULL if something went wrong. Avoid trying to unref
a NULL pointer.
2017-12-09 19:31:58 +00:00
Matthew Waters
f58b5b65f1
glupload/colorconvert: only copy timestamps if the input buffer != output
2017-12-09 19:31:58 +00:00
Matthew Waters
15fd4e164a
glshader: attribute locations are -1 on error
2017-12-09 19:31:57 +00:00
Jan Schmidt
bf0440f97b
GL: Remove annoying printf in the filterbin class_init
2017-12-09 19:31:57 +00:00
Matthew Waters
23e2d74112
glimagesink: add pixel-aspect-ratio property on the bin
2017-12-09 19:31:57 +00:00
Matthew Waters
3aad6d73f1
glimagesink: forward ALL the properties on the bin
2017-12-09 19:31:57 +00:00
Matthew Waters
3d8eb44b7c
gluploadelement: properly unref buffers that are the same as the input
...
basetransform doesn't unref equal input and output buffers
2017-12-09 19:31:57 +00:00
Matthew Waters
92f0aa9bd8
gl: get the context from basemixer/basefilter
2017-12-09 19:31:57 +00:00
Matthew Waters
51620950e4
gl: retreive the gldisplay/app gl context as soon as possible
...
fixes the usage of gst_gl_display_filter_gl_api
2017-12-09 19:31:57 +00:00
Matthew Waters
95756a5413
caopengllayersink: implement as a bin like glimagesink
2017-12-09 19:31:57 +00:00
Matthew Waters
35476a4cb4
gl/cocoa: avoid deadlock when creating context on the main thread.
...
Make window/view creation async so that it is possible to
gst_gl_context_create from the main thread.
2017-12-09 19:31:57 +00:00
Matthew Waters
813fb633b4
gl: store the list of contexts within gldisplay
...
Removes the reliance on the allocation query to propogate GL contexts.
Allows thread safely getting a context for the a specific thread.
2017-12-09 19:31:57 +00:00
Matthew Waters
2e16961ab3
glimagesink: unset the current shader after rendering
...
fixes gltestsrc ! glimagesink when gltestsrc doesn't use a shader
2017-12-09 19:31:57 +00:00
Matthew Waters
909b69fad4
gltestsrc: remove usage of gldownload library object
2017-12-09 19:31:57 +00:00
Matthew Waters
abe21912f5
gl: new glsrcbin element
2017-12-09 19:31:57 +00:00
Matthew Waters
b42e4ba079
glvideomixer: implement with glmixerbin
...
The relevant properties are forwarded to/from the containing bin
and sink pads.
2017-12-09 19:31:57 +00:00
Matthew Waters
c562a7e2d9
glmixer: remove usage of upload/download objects
2017-12-09 19:31:57 +00:00
Matthew Waters
e85c7f84db
gl: new glmixerbin element
2017-12-09 19:31:57 +00:00
Matthew Waters
1b0d2b1338
glimagesink: implement as a bin
...
glupload ! glcolorconvert ! sink
Some properties are manually forwarded. The rest are available using
GstChildProxy.
The two signals are forwarded as well.
2017-12-09 19:31:57 +00:00
Matthew Waters
1412e9c764
gl: new glsinkbin element
...
similar to glfilterbin but for sinks
2017-12-09 19:31:57 +00:00
Matthew Waters
fe36f0b065
gl: new element glfilterbin
...
It encapsulates a confiurable GL processing element in the
upload/colorconvert/download dance required to transparently process
the majority of GstBuffer's.
2017-12-09 19:31:57 +00:00
Matthew Waters
df50ba0491
gl: add new gldownloadelement
...
Simply transforms caps to/from raw/glmemory capsfeatures
2017-12-09 19:31:57 +00:00
Matthew Waters
782b343f7d
gl: add a new glcolorconvert element based on the glcolorconvert library object
2017-12-09 19:31:57 +00:00
Matthew Waters
6b6d26fd8f
gl: add a new glupload element based on the glupload library object
2017-12-09 19:31:56 +00:00
Matthew Waters
66b349f100
gl: add a new glbasemixer class below glmixer
...
It deals with propagating the gl display/contexts throughout the
application/pipeline
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
ccdd4d48a0
glmixer: Don't share our downstream pool with upstream
...
Pool cannot have multiple owner. This can lead to spurious
pool was flushing error.
https://bugzilla.gnome.org/show_bug.cgi?id=74570
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
bc92b41c7b
glimagesink: Only cache pool, don't manage it
...
GLImage does not use any kind of internal pool. There was some
remaining code and comment stating that it was managing the
pool, and it was in fact setting the active state when doing
to ready state.
* Only create the pool if requested and in propose_allocation
* Cache the pool to avoid reallocation on spurious reconfigure
* Don't try to deactivate the pool (we don't own it)
https://bugzilla.gnome.org/show_bug.cgi?id=745705
2017-12-09 19:31:56 +00:00
Sebastian Dröge
cb59ace574
gl: Remove format info in glcolorconvert's transform_caps function instead of on every caller
...
... and let glmixer actually transform the caps it is supposed to transform
instead of inventing new caps.
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
2729949b39
gloverlay: Fix upside down and miss-aligned JPEG
...
LibJPEG uses macroblock of 8x8 sample. In this element we use RGB and
Y444, two 24bit formats that are stored in 32bit pixels. This mean we
have 32x32 bytes macroblocks. For this reason, we need to allocate
our buffer slightly larger. We also need to pass the line pointer in
the right order, otherwise the image endup upside-down.
https://bugzilla.gnome.org/show_bug.cgi?id=745109
2017-12-09 19:31:56 +00:00
Xavier Claessens
7fac5085e6
gltransformation: normalize translations
...
https://bugzilla.gnome.org/show_bug.cgi?id=744763
* Lubosz: use maxfloat for transformation range
2017-12-09 19:31:56 +00:00
Xavier Claessens
1250285b30
gltransformation: Fix doc typo
...
https://bugzilla.gnome.org/show_bug.cgi?id=744763
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
de79830b05
glmemory: Add GstAllocationParams and alignment support
...
This implements support for GstAllocationParams and memory alignments.
The parameters where simply ignored which could lead to crash on
certain platform when used with libav and no luck.
https://bugzilla.gnome.org/show_bug.cgi?id=744246
2017-12-09 19:31:55 +00:00
Nicolas Dufresne
d3c7f20aee
opengl: Clean Makefile.am
...
+ Split headers from source
+ Remove uneeded AM_CFLAGS, AM_LDFLAGS
+ Always set OBJCFLAGS
Due to the presence of a .m and regardless of the conditional values,
automake will promote the link command to OBJC using OBJCFLAGS. Only
the basic flags (like warnings and optimization) are going to make a
difference though.
This cleanup builds up the makefile with less specific files first
toward more specific file. FLAGS are built with the basic that unused
flags will have empty variable.
2017-12-09 19:31:55 +00:00
Xavier Claessens
c8e43e5581
glimagesink: cosmetic cleanup
...
https://bugzilla.gnome.org/show_bug.cgi?id=745105
2017-12-09 19:31:55 +00:00
Tim-Philipp Müller
d9455d9c0e
opengl: don't add --tag=CC twice to LIBTOOLFLAGS
2017-12-09 19:31:55 +00:00
Nicolas Dufresne
c998b21de9
opengl: Add --tag=CC to LIBTOOLCLFAGS
...
This is required for static build.
2017-12-09 19:31:55 +00:00
Matthew Waters
b09971445e
caopengllayersink: render black when we don't have a texture to display
...
Like when the winsys asks us to redraw before the pipeline has started
2017-12-09 19:31:55 +00:00
Matthew Waters
e5708eb453
new caopengllayersink element
...
renders gstreamer gl scene/video frames to a caopengllayer retreivable
from the "layer" property.
2017-12-09 19:31:55 +00:00
Julien Isorce
975df8b648
glmixer: fix some compiler warnings
...
i686-apple-darwin11-llvm-gcc-4.2
gstglmixer.h:43: error: redefinition of typedef ‘GstGLMixer’
gstglmixerpad.h:32: error: previous declaration of ‘GstGLMixer’ was here
gstglmixer.h:46: error: redefinition of typedef ‘GstGLMixerFrameData’
gstglmixerpad.h:33: error: previous declaration of ‘GstGLMixerFrameData’ was here
2017-12-09 19:31:55 +00:00
Nicolas Dufresne
345f1dfb64
gltransform: Fix includes of graphene headers
...
The graphene-1.0 part should not be in the source code. This directory
is part of the cflags include. This is similar to gstreamer-1.0/
directory. This break compilation if the include directory where
graphene is installed is not in your include path.
2017-12-09 19:31:55 +00:00
Edward Hervey
fcdfdfbfdf
glimagesink: Fix debug statement
2017-12-09 19:31:54 +00:00
Edward Hervey
6882d034f3
glimagesink: Sprinkle more debug
2017-12-09 19:31:54 +00:00
Matthew Waters
d44fb3962e
glimagesink: log the converted caps
2017-12-09 19:31:54 +00:00
Matthew Waters
17dba52ff3
gl: remove the egl caps from the src pads
...
we don't actually support producing EGLImage buffers anywhere.
2017-12-09 19:31:54 +00:00
Matthew Waters
68dc0fef6d
glcolorconvert: put GstGLSyncMeta on output buffers
...
allows thread safely using the provided output buffer in a separate
thread
2017-12-09 19:31:54 +00:00
Matthew Waters
530ae2cbb0
glupload/download/convert: provide transform_caps functions
...
Allows finer grain decisions about formats and features at each
stage of the pipeline.
Also provide propose_allocation for glupload besed on the supported
methods.
2017-12-09 19:31:54 +00:00
Matthew Waters
157170011d
glimagesink: clobber the alpha channel by default
...
this can be disabled with the ignore-alpha property
2017-12-09 19:31:54 +00:00
Alessandro Decina
966cad27d7
gl: initial support for texture targets other than GL_TEXTURE_2D
...
Make GstGLMemory hold the texture target (tex_target) the texture it represents
(tex_id) is bound to. Modify gst_gl_memory_wrapped_texture and
gst_gl_download_perform_with_data to take the texture target as an argument.
This change is needed to support wrapping textures created outside libgstgl,
which might be bound to a target other than GL_TEXTURE_2D. For example on OSX
textures coming from VideoToolbox have target GL_TEXTURE_RECTANGLE.
With this change we still keep (and sometimes imply) GL_TEXTURE_2D as the
target of textures created with libgstgl.
API: modify GstGLMemory
API: modify gst_gl_memory_wrapped_texture
API: gst_gl_download_perform_with_data
2017-12-09 19:31:53 +00:00
Matthew Waters
598715fc4b
glwindow: make showing a window explicit
...
Also fixes the cgl context always displaying a window to render to for
every GstGLContextCocoa created
2017-12-09 19:31:53 +00:00
Edward Hervey
2833e8c63a
gltestsrc: Ensure variable is initialized before usage
...
Coverity CID: 1256569
2017-12-09 19:31:53 +00:00
Matthew Waters
019367c128
glwindow: remove width/height from _draw()
...
Depending on the platform, it was only ever implemented to 1) set a
default surface size, 2) resize based on the video frame or 3) nothing.
Instead, provide a set_preferred_size () that elements/applications
can use to request a certain size which may be ignored for
videooverlay/other cases.
2017-12-09 19:31:53 +00:00
Sebastian Dröge
39e719fb33
Constify some static arrays everywhere
2017-12-09 19:31:53 +00:00
Nicola Murino
dd928efa51
glimagesink: fix memleak
...
https://bugzilla.gnome.org/show_bug.cgi?id=743142
2017-12-09 19:31:52 +00:00
Matthew Waters
02fdc64844
glvideomixer: don't upload if alpha <= 0
...
Implemented using a upload_buffer vfunc within GstGLMixer allowing
NULL uploaded buffers.
2017-12-09 19:31:52 +00:00
Matthew Waters
1dfeae2c42
gl: split glcolorconvert usage from glupload
...
the separation allows the transfer operation to occur in a separate
thread/time which may increase performance in specific circumstances.
2017-12-09 19:31:52 +00:00
Tim-Philipp Müller
3c3ca1c842
glmixer, glvideomixer: update for GstAggregatorPadForeachFunc change
2017-12-09 19:31:52 +00:00
Tim-Philipp Müller
36b4984be2
glmixer: update for aggregator start/stop vfunc change
2017-12-09 19:31:52 +00:00
Nirbheek Chauhan
c1b1f546d5
glvideomixer: Point to compositor for the pad properties documentation
2017-12-09 19:31:52 +00:00
Nicolas Dufresne
a1e02726ee
gl: Add support for GstVideoAlignment
...
This allow saving a copy with libav video decoders or decoders with
similar padding requirement.
https://bugzilla.gnome.org/show_bug.cgi?id=740900
2017-12-09 19:31:52 +00:00
Matthew Waters
f8611d79d7
glfiltercube: use a shader everywhere
2017-12-09 19:31:52 +00:00
Matthew Waters
ba3a3cd783
gl: fixup vao and vbo usage for legacy GL
2017-12-09 19:31:52 +00:00
Matthew Waters
b428dec737
gleffects: don't abort when setting the effect to 0,1,2
2017-12-09 19:31:52 +00:00
Ramprakash Jelari
67b47921ca
gl: Rename gst-launch-0.10 to gst-launch-1.0 in docs
2017-12-09 19:31:51 +00:00
Matthew Waters
dee5943c0e
glimagesink: properly handle the !opengl3 case
...
https://bugzilla.gnome.org/show_bug.cgi?id=740012
2017-12-09 19:31:51 +00:00
Tim-Philipp Müller
fb6a514562
glfilterapp: fix unused variable compiler warning
...
When GST_GL_HAVE_OPENGL is 0 or unset.
2017-12-09 19:31:51 +00:00
Matthew Waters
869106454a
glfilterapp is now available on gles2 as well so build it
2017-12-09 19:31:51 +00:00
Matthew Waters
83b6572928
gl: fix typo in #if
...
GST_GL_API_HAVE_OPENGL doesn't exist
2017-12-09 19:31:51 +00:00
Matthew Waters
3be1edc634
gl: fix various build errors without desktop gl
2017-12-09 19:31:51 +00:00
Matthew Waters
4bd62ebb03
gldisplay: implement runtime GL api filtering
...
Needed so that the pipeline/application can limit the choice of GL api
to what it supports
2017-12-09 19:31:51 +00:00
Matthew Waters
892d056a44
gl: remove the use of glu
2017-12-09 19:31:51 +00:00
Matthew Waters
6bb113f685
gl: add a sync meta for synchronizing across GL contexts
...
A context can create a GLsync object that can be waited on in order
to ensure that GL resources created in one context are able to be
used in another shared context without any chance of reading invalid
data.
This meta would be placed on buffers that are known to cross from
one context to another. The receiving element would then wait
on the sync object to ensure that the data to be used is complete.
2017-12-09 19:31:51 +00:00
Matthew Waters
f016bc4679
glfilterapp: port to gles2 and gl3
2017-12-09 19:31:51 +00:00
Matthew Waters
eff381b93d
gloverlay: support gl3
2017-12-09 19:31:51 +00:00
Matthew Waters
65c89e07fb
glvideomixer: add support for gl3
2017-12-09 19:31:51 +00:00
Matthew Waters
cc2eb41497
glfiltercube: add a gl3 code path
2017-12-09 19:31:51 +00:00
Matthew Waters
9dfd234fec
glfiltershader: support gl3
2017-12-09 19:31:51 +00:00
Matthew Waters
f99e9d01a9
gltransformation: support gl3
2017-12-09 19:31:51 +00:00
Matthew Waters
a82db7eb9e
gleffects: support gl3 whereever gles2 is supported
2017-12-09 19:31:51 +00:00
Matthew Waters
7ffe6fa93e
glcolorscale: support gl3
2017-12-09 19:31:51 +00:00
Matthew Waters
96e5304517
glimagesink: use vbo's and vao's for gl3
2017-12-09 19:31:50 +00:00
Thibault Saunier
d3fef37d61
videoaggregator: Expose vmethods to set converters and prepare/clean frames
...
This gives more flexibility to the subclasses and permits to remove the
GstVideoAggregatorClass->disable_frame_conversion ugly API.
WARNING: This breaks the API as it removes the disable_frame_conversion
field
API:
+ GstVideoAggregatorClass->find_best_format
+ GstVideoAggregatorPadClass->set_format
+ GstVideoAggregatorPadClass->prepare_frame
+ GstVideoAggregatorPadClass->clean_frame
- GstVideoAggregatorClass->disable_frame_conversion
https://bugzilla.gnome.org/show_bug.cgi?id=740768
2017-12-09 19:31:50 +00:00
Matthew Waters
55977523b0
glimagesink: only attempt a resize when the window has already resized
...
fixes a black startup screen on wayland
2017-12-09 19:31:50 +00:00
Matthew Waters
00506bf183
glupload: rearchitecture for non GLMemory inputs/outputs
...
Allows other memory types to be implemented/returned/used by the caller.
2017-12-09 19:31:50 +00:00
Vineeth T M
1716e8c481
glimagesink: critical error while seek playback-test(stop state)
...
If we seek when media is in stop state, playback-test gives
critical error, since context of glimagesink is destroyed during stop.
But since context is not present, we need not handle send_event in glimagesink
Hence adding a condition to check if context is valid.
https://bugzilla.gnome.org/show_bug.cgi?id=740305
2017-12-09 19:31:50 +00:00
Matthew Waters
3455b050c2
glmixer: add read-only context property
2017-12-09 19:31:50 +00:00
Matthew Waters
f0c118c77a
glimagesink: don't set the upload to NULL on the drain query
...
https://bugzilla.gnome.org/show_bug.cgi?id=732694
2017-12-09 19:31:50 +00:00
Julien Isorce
c72498af92
glimagesink: release stored buffers on drain query
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732694
2017-12-09 19:31:49 +00:00
Matthew Waters
af9b73043e
gl: remove the width/height fields from the caps to support frame resizing
...
It was previously only occuring with sysmem caps features
https://bugzilla.gnome.org/show_bug.cgi?id=739334
2017-12-09 19:31:49 +00:00
Alessandro Decina
c3612847ef
glimagesink: don't make gst_glimage_sink_handle_events call _ensure_gl_setup
...
gst_glimage_sink_handle_events can be called from the overlay interface and from
the main thread before GL is setup. Before this change, that would call
_ensure_gl_setup() and deadlock on OSX.
Change things so that it's always safe to call gst_glimage_sink_handle_events()
without stuff deadlocking.
2017-12-09 19:31:49 +00:00
Alessandro Decina
ab8990c89f
glimagesink: fix possible deadlock on osx
...
Remove gst_glimage_sink_handle_events call in gst_glimage_sink_init. It was
unnecessary and when the element was instantiated from the main thread, caused a
deadlock in OSX creating the context (thread).
2017-12-09 19:31:49 +00:00
Matthew Waters
d9b724a3d2
glimagesink: clamp the resize width/height to >= 1 to avoid a GL error
2017-12-09 19:31:49 +00:00
Lubosz Sarnecki
64dd17bde6
glimagesink: implement gst_video_overlay_handle_events
...
https://bugzilla.gnome.org/show_bug.cgi?id=736035
2017-12-09 19:31:49 +00:00
Matthew Waters
0fa95fe809
glimagesink: resize the viewport correctly on a caps change
...
with force-aspect-ratio=true, if the width or height changed, the
viewport wasn't being updated to respect the new video width and height
until a resize occured.
2017-12-09 19:31:49 +00:00
Matthew Waters
b06ca547d6
glmixer: advertise support for changing input caps mid-stream
...
https://bugzilla.gnome.org/show_bug.cgi?id=739334
2017-12-09 19:31:49 +00:00
Matthew Waters
4a8b7c9193
glmixer: don't get the current caps from GstVideoInfo for the srcpad
...
It's missing the caps features needed.
2017-12-09 19:31:49 +00:00
Lubosz Sarnecki
e173ab2b9d
satisfy gst-indent
2017-12-09 19:31:49 +00:00
Jan Schmidt
1a25f7e44a
glfiltercube: Fix typo in property description
2017-12-09 19:31:49 +00:00
Wang Xin-yu (王昕宇)
10eb848d57
glmixer:fix incorrect parameter passed to handle_set_context
2017-12-09 19:31:48 +00:00
Matthew Waters
0b2e5c3f95
glmixer: override the caps query in order to 'convert' capsfeatures
...
Otherwise, it is only possible for the sink pads and the src pads to
have the exact same caps features. We can convert from any feature
to another feature so support that.
2017-12-09 19:31:48 +00:00
Matthew Waters
1bd6e87cfc
glmixer: override the accept caps query in order to 'convert' capsfeatures
...
Otherwise, it is only possible for the sink pads and the src pads to
have the exact same caps features. We can convert from any feature
to another feature so support that.
2017-12-09 19:31:48 +00:00
Matthew Waters
62e3c40d97
gl: propogate other-context using GstContext
2017-12-09 19:31:48 +00:00
Matthew Waters
f0426043ce
glmixer: fixup eglimage include path
2017-12-09 19:31:48 +00:00
Matthew Waters
0806de5c75
glbufferpool: add the GstVideoGLTextureUploadMeta buffer pool option
2017-12-09 19:31:48 +00:00
Matthew Waters
3cccd77d5d
videoaggregator: operate on caps rather than video info
...
Otherwise the CapsFeatures will be lost along with the possibility
of multiple output types and formats.
https://bugzilla.gnome.org/show_bug.cgi?id=738129
2017-12-09 19:31:48 +00:00
Matthew Waters
ed6be7fead
gldeinterlace: ref the uploaded buffer
...
Instead of the possibly non-GL input buffer.
2017-12-09 19:31:48 +00:00
Sebastian Dröge
22a1ec13b6
glimagesink: Only finalize the other context in finalize()
...
Otherwise we change a value of a property when going to READY state,
which is unexpected behaviour.
2017-12-09 19:31:48 +00:00
Sebastian Dröge
3eab72f409
glmixer: Call the pad's parent class finalize method
2017-12-09 19:31:48 +00:00
Sebastian Dröge
aed7da3d12
glmixer: Only finalize the other context in finalize()
...
Otherwise we change a value of a property when going to READY state,
which is unexpected behaviour.
2017-12-09 19:31:48 +00:00
Sebastian Dröge
c46c642fd3
gltestsrc: Add other-context property
2017-12-09 19:31:48 +00:00
Sebastian Dröge
3b9b30563e
glimagesink: Don't leak other-context
2017-12-09 19:31:48 +00:00
Sebastian Dröge
9d1df014fd
glmixer: Add other-context property
2017-12-09 19:31:48 +00:00
Vivia Nikolaidou
4fa5392e14
gloverlay: And fix another unused variable compiler warning
2017-12-09 19:31:48 +00:00
Vivia Nikolaidou
53213d924e
gloverlay: Fix unused variable compiler warning when compiling without desktop GL
2017-12-09 19:31:48 +00:00
Wang Xin-yu (王昕宇)
924e017bda
gltestsrc: implement checkers pattern with GLSL
...
https://bugzilla.gnome.org/show_bug.cgi?id=737505
2017-12-09 19:31:48 +00:00
Lubosz Sarnecki
28d4d57180
gltransformation: graphene multiplication order has changed
...
https://bugzilla.gnome.org/show_bug.cgi?id=733510
2017-12-09 19:31:47 +00:00
Matthew Waters
d30a476c1c
glvideomixer: update element documentation
2017-12-09 19:31:47 +00:00
Matthew Waters
aeb60d850d
Revert accidental push: "gltestsrc: implement checkers pattern with GLSL"
...
This reverts commit eae09179f0
.
2017-12-09 19:31:47 +00:00
Wang Xin-yu (王昕宇)
14f297b61c
gltestsrc: implement checkers pattern with GLSL
2017-12-09 19:31:47 +00:00
Matthew Waters
7d99c66ca5
gloverlay: fix zero output frames with YUY2/UYVY
...
also, be nice and disable blending for other elements
2017-12-09 19:31:47 +00:00
Matthew Waters
0e89ab4c91
gloverlay: protect desktop gl specific tokens with #if
2017-12-09 19:31:47 +00:00
Matthew Waters
f4afec4657
gloverlay: free the image memory every time the location changes
...
fixes a memory leak
2017-12-09 19:31:47 +00:00
Sebastian Dröge
17fa8eac04
gloverlay: Include into the build with GLES2 only too
2017-12-09 19:31:47 +00:00
Matthew Waters
1c4e5c2aeb
gltestsrc: free the shader on stop
2017-12-09 19:31:47 +00:00
Matthew Waters
f5006bdf09
glvideomixer: fix blending with low-alpha sources
...
We also need to apply the blend paramaters to the alpha channel otherwise
the output of the blend will appear black at low alpha values (< 0.2).
2017-12-09 19:31:46 +00:00
Matthew Waters
96208c1694
gloverlay: reimplement everything
...
- update for shaders
- add alpha property
- image placement properties shamelessly borrowed from gdkpixbufoverlay
- image placement properties are GstController able
- use GstGLMemory for the overlay image data
- add support for gles2
2017-12-09 19:31:46 +00:00
Matthew Waters
07489f7b76
glvideomixer: skip input frames with an alpha of 0
2017-12-09 19:31:46 +00:00
Matthew Waters
ae919f4475
gl: download whenever we have sysmem capsfeatures
...
Otherwise we could pass on a RGBA formatted buffer and downstream would
misinterpret that as some other video format.
Fixes pipelines of the form
gleffects ! tee ! xvimagesink
2017-12-09 19:31:46 +00:00
Lubosz Sarnecki
3fcfcbbb87
gltestsrc: add Mandelbrot fractal pattern.
...
https://bugzilla.gnome.org/show_bug.cgi?id=735131
2017-12-09 19:31:46 +00:00
Lubosz Sarnecki
67732e4883
gltestsrc: implement snow pattern with GLSL.
...
https://bugzilla.gnome.org/show_bug.cgi?id=735131
2017-12-09 19:31:46 +00:00
Matthew Waters
6491af9ffc
glupload: provide the output buffer that is rendered into
...
Allows callers to properly reference count the buffers used for
rendering.
Fixes a redraw race in glimagesink where the previous buffer
(the one used for redraw operations) is freed as soon as the next
buffer is uploaded.
1. glimagesink uploads in _prepare() to texture n
1.1 glupload holds buffer n
2. glimagesink _render()s texture n
3. glimagesink uploads texture n+1
3.1 glupload free previous buffer which deletes texture n
3.2 glupload holds buffer n+1
4. glwindow resize/expose
5. glimagesink redraws with texture n
The race is that the buffer n (the one used for redrawing) is freed as soon as
the buffer n+1 arrives. There could be any amount of time and number of
redraws between this event and when buffer n+1 is actually rendered and thus
replaces buffer n as the redraw source.
https://bugzilla.gnome.org/show_bug.cgi?id=736740
2017-12-09 19:31:46 +00:00
Sanjay NM
4f6e9f4e41
gl: Removed unreachable break, unused variable
...
https://bugzilla.gnome.org/show_bug.cgi?id=736957
2017-12-09 19:31:46 +00:00
Ognyan Tonchev
3a70f04113
gltestsrc: do not leak pool in error cases
...
https://bugzilla.gnome.org/show_bug.cgi?id=736730
2017-12-09 19:31:46 +00:00
Ognyan Tonchev
276b682559
glmixer: do not leak pool in error cases
...
https://bugzilla.gnome.org/show_bug.cgi?id=736729
2017-12-09 19:31:46 +00:00
Lubosz Sarnecki
e3aa918032
gltransformation: fix issues and expose mvp matrix
...
* aspect should not be 0 on init
* rename fovy to fov
* add mvp to properties as boxed graphene type
* fix transformation order. scale first
* clear color with 1.0 alpha
https://bugzilla.gnome.org/show_bug.cgi?id=734223
2017-12-09 19:31:46 +00:00
Sebastian Dröge
2c0f8e1107
glimagesink: Add missing break to switch
...
CID 1232801
2017-12-09 19:31:46 +00:00
Lubosz Sarnecki
e266f6517d
glimagesink: expose context
...
* expose context in draw / reshape callbacks
* add context property
https://bugzilla.gnome.org/show_bug.cgi?id=734482
2017-12-09 19:31:45 +00:00
Matthew Waters
94efcd2595
glmixer: unref the GstGLUpload in the pad if freed while running
...
Dynamic pipelines that get and release the sink pads will finalize
the pad without going through gst_gl_mixer_stop() which is where the
upload object is usually freed. Don't leak objects in such case.
2017-12-09 19:31:45 +00:00
Wang Xin-yu (王昕宇)
922cb97758
glvideomixer: avoid gl resource race condition between different thread
...
https://bugzilla.gnome.org/show_bug.cgi?id=734830
2017-12-09 19:31:45 +00:00
Matthew Waters
c9d63878dd
glvideomixer: don't clobber unnecessary GstVideoInfo fields
...
otherwise we might clobber other important fields such as the frame rate.
2017-12-09 19:31:45 +00:00
Matthew Waters
fc1b2298d6
glvideomixer: get the attribute from the correct shader
2017-12-09 19:31:45 +00:00
Matthew Waters
beb9b95d39
glimagesink: unref the window on navigation event
...
plugs a memory leak
2017-12-09 19:31:45 +00:00
Tim-Philipp Müller
6bbcefe029
opengl: update element docs for 1.x
2017-12-09 19:31:45 +00:00
Matthew Waters
e18905d057
glvideomixer: add a background property
...
That's compatible with the compositor/videomixer property
https://bugzilla.gnome.org/show_bug.cgi?id=731954
2017-12-09 19:31:45 +00:00
Vasilis Liaskovitis
7b1a853888
GstGLWindow, GstGLImagesink, x11: Scale navigation events on resized windows
...
If window is resized, GstStructure pointer values have to be rescaled to
original geometry. A get_surface_dimensions GLWindow class method is added for
this purpose and used in the navigation send_event function.
https://bugzilla.gnome.org/show_bug.cgi?id=703486
2017-12-09 19:31:45 +00:00
Matthew Waters
d3804ee7aa
gl: document GST_GL_* environment variables
...
https://bugzilla.gnome.org/show_bug.cgi?id=733245
2017-12-09 19:31:45 +00:00
Matthew Waters
84a50aefe1
glimagesink: keep the uploaded buffer around on successful redisplay
...
We might need it later to perform a redisplay. GstGLUpload will take
of releasing the previous buffer when it receives a new buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=733726
2017-12-09 19:31:44 +00:00
Matthew Waters
e6d5dd04d5
glimagesink: silence gsignal warning
...
instance '0xblah' has no handler with id '13'
2017-12-09 19:31:44 +00:00
Matthew Waters
884be3de11
glimagesink: remove extra argument from debug call
2017-12-09 19:31:44 +00:00
Vasilis Liaskovitis
c064e4e75e
glimagesink: Add navigation interface and callbacks for GstGLWindow mouse/key signals
...
https://bugzilla.gnome.org/show_bug.cgi?id=703486
2017-12-09 19:31:44 +00:00
Wang Xin-yu (王昕宇)
2ce11e4bac
gl: fix multi gl object leaks
...
1. fix FBO leaks in decide_allocation
2. fix texture leaks in decide_allocation and reset
3. fix texture leaks in FBO incomplete error path
2017-12-09 19:31:44 +00:00
Sebastian Dröge
f942221ebd
gl: Always build gstglmixer, not only when full OpenGL support is enabled
2017-12-09 19:31:44 +00:00
Sebastian Dröge
b02a6a98b2
gl: Link to all required libraries but not more
2017-12-09 19:31:44 +00:00
Sebastian Dröge
ab7a152cd4
gl: Move GstGLMixer to the plugin for now
...
It depends on GstAggregator and we don't want to install headers
for that yet.
https://bugzilla.gnome.org/show_bug.cgi?id=732207
2017-12-09 19:31:44 +00:00
Nicolas Dufresne
8196b9629c
glimagesink: Keep aspect ratio by default
...
The expected default behaviour for video sink is to maintain the
aspect ratio. Fix the default value to reflect this. The property
default was already TRUE, but the value was not initially TRUE.
2017-12-09 19:31:44 +00:00
Sebastian Dröge
23eb9beef8
glimagesink: Chain up to the parent class' finalize function
2017-12-09 19:31:44 +00:00
Sebastian Dröge
8f6224c0ed
glimagesink: Make sure to always unref the display
...
Even if we didn't create a context yet.
2017-12-09 19:31:44 +00:00
Matthew Waters
025d6a87ba
glshader: enable glshader on GLES2
2017-12-09 19:31:43 +00:00
Julien Isorce
e5c3605056
glcolorscale: do passthrough on same caps
...
See https://bugzilla.gnome.org/show_bug.cgi?id=732178
2017-12-09 19:31:43 +00:00
Julien Isorce
c18a109b42
gl: enable glvideomixer on GLES2
2017-12-09 19:31:43 +00:00
Matthew Waters
d86208e6ad
glvideomixer: bas output width/height on the pad properties
...
Allows automatic negotiation of the size in the following case:
gst-launch-1.0 glvideomixer name=m sink_0::xpos=0 sink_1::xpos=320 ! glimagesink \
videotestsrc ! m. \
videotestsrc pattern=1 ! m.
https://bugzilla.gnome.org/show_bug.cgi?id=731878
2017-12-09 19:31:43 +00:00
Matthew Waters
dc4f9575b1
glvideomixer: don't clobber already allocated shader
2017-12-09 19:31:43 +00:00
Matthew Waters
3e092e1579
gl: XInitThreads when env variable is set
...
This is too allow gst-launch debugging with multiple GL contexts as
well as avoiding segfaulting innocent gtk+ apps that have not called
XInitThreads.
https://bugzilla.gnome.org/show_bug.cgi?id=731525
2017-12-09 19:31:43 +00:00
Sebastian Dröge
c88abf6ac2
gl: Need to link to new badvideo library for the video aggregator base class
2017-12-09 19:31:43 +00:00
Thibault Saunier
097373ed19
gl:glvideomixer: Add the Compositor in the element metadata class
...
So it is possible to pick one compositing element from the registry
2017-12-09 19:31:43 +00:00
Thibault Saunier
30a9ef3768
gl: Port glmixer to the GstVideoAggregator baseclass
...
https://bugzilla.gnome.org/show_bug.cgi?id=731921
2017-12-09 19:31:43 +00:00
Lubosz Sarnecki
7e6962c95e
opengl: add element for transforming video geometry
...
* add graphene as soft dependency for linear algebra
2017-12-09 19:31:43 +00:00
Matthew Waters
918ff5b25f
glfiltershader: port to GLES2
...
Provide a time variable
2017-12-09 19:31:43 +00:00
Matthew Waters
21c0eed027
glvideomixer: silence incorrect number of arguments in format warning
2017-12-09 19:31:43 +00:00
Matthew Waters
b1e3630974
glvideomixer: wire up the alpha pad property
2017-12-09 19:31:43 +00:00
Matthew Waters
8226bb24cc
glvideomixer: support input frame scaling
2017-12-09 19:31:43 +00:00
Matthew Waters
fc45211a9d
glvideomixer: add positioning of input streams
...
https://bugzilla.gnome.org/show_bug.cgi?id=729798
2017-12-09 19:31:43 +00:00