Commit graph

61 commits

Author SHA1 Message Date
Matthew Waters
e8ec52b8ef gl: remove custom control binding proxy
Use the existing GstProxyControlBinding instead.
2017-01-10 13:57:37 +11:00
Sebastian Dröge
0f4ed7e2d6 glvideomixer: Reject multiview video
glvideomixer does not support it currently and it needs special support
for handling this correctly, and is rather non-trivial to implement for
all formats.
2016-12-14 15:53:41 +02:00
Matthew Waters
0064e338a2 gl/utils: move gen_shader() to the plugin and remove del_shader()
gst_gl_context_del_shader() can be replaced by a g_object_unref().
gst_gl_context_gen_shader() should be replaced by using GstGLSLStage.
2016-11-10 20:11:03 +11:00
Matthew Waters
d0a9cc0abc gl: GST_GL_TYPE -> GST_TYPE_GL
Some deprecated symbols are kept for backwards compatibility
2016-11-03 16:16:12 +11:00
Jan Schmidt
e8a98ca5b3 gl: Update glvideomixer doc 2016-08-26 03:25:49 +10:00
Matthew Waters
5a74878988 glframebuffer: rewrite for a more consistent API
Facilities are given to create fbo's and attach GL memory (renderbuffers
or textures).  It also keeps track of the renderable size for use with
effective use with glViewport().
2016-07-26 14:07:24 +10:00
Matthew Waters
c8c016ed17 gl: use GLMemory for accessing textures everywhere
This simplifies and consolidates a lot of duplicated code creating
and modifying textures.
2016-07-26 14:07:24 +10:00
Matthew Waters
06986222c9 gl: take the affine transformation in NDC
Provide a function to get the affine matrix in the meta in terms of NDC
coordinates and use as a standard opengl matrix.

Also advertise support for the affine transformation meta in the allocation
query.
2016-05-14 16:35:29 +03:00
Matthew Waters
92245ec05f videoaggregator: repect the result of find_best_format in the default update_caps
We weren't using the result of find_best_format at all.

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

https://bugzilla.gnome.org/show_bug.cgi?id=764363
2016-04-07 20:30:25 +10:00
Matthew Waters
f2c2717ac7 glvideomixer: add support for the affine transformation meta 2016-04-05 20:50:24 +10:00
Matthew Waters
ca15a26c11 glvideomixer: signal continuation in reset
We want to iterate over all the pads, not just the first one.  Fix by returning
TRUE in the GstAggregatorPadForeachFunc.

Removes a GST_IS_GL_CONTEXT() assertion on shutdown with >2 inputs
using gst-launch.
2016-03-08 02:06:46 +11:00
Wang Xin-yu (王昕宇)
a8862ac440 glmixer: iterator didn't advance in continue statement
Leading to a deadlock.

https://bugzilla.gnome.org/show_bug.cgi?id=760873
2016-02-24 18:27:44 +11:00
Wang Xin-yu (王昕宇)
282c7eca06 glvideomixer: don't leak pad's vertex buffer on release_pad
https://bugzilla.gnome.org/show_bug.cgi?id=760873
2016-02-17 10:30:45 +11:00
Matthew Waters
03d1f755fa glmixer: Remove usage of GstGLMixerFrameData
Subclasses can just iterate over the list of pads themselves

https://bugzilla.gnome.org/show_bug.cgi?id=760873
2016-02-17 10:30:45 +11:00
Wang Xin-yu (王昕宇)
18a643d36f glvideomixer: fix checker vbo leak
https://bugzilla.gnome.org/show_bug.cgi?id=760925
2016-02-01 13:55:05 +11:00
Matthew Waters
5a7f92aa51 glvideomixer: par may not exist in the caps
Fixes a critical in the gst-validate tests:

gst_structure_fixate_field_nearest_fraction: assertion 'gst_structure_has_field
(structure, field_name)
2016-01-29 14:03:26 +11:00
Matthew Waters
f1323fb6df videoaggregator: don't do caps processing that is not overridable
Allows the subclass to completely override the chosen src caps.

This is needed as videoaggregator generally has no idea exactly
what operation is being performed.

- Adds a fixate_caps vfunc for fixation
- Merges gst_video_aggregator_update_converters() into
  gst_videoaggregator_update_src_caps() as we need some of its info
  for proper caps handling.
- Pass the downstream caps to the update_caps vfunc

https://bugzilla.gnome.org/show_bug.cgi?id=756207
2016-01-27 20:36:25 +11:00
Matthew Waters
adec074d7e gl: move control binding proxy implementation from glvideomixer
Other elements may need to use it's functionality
2016-01-27 20:01:25 +11:00
Matthew Waters
afdc81fe4d glvideomixer: implement glBlendFunc and glBlendEquation
Allows more blending options than just A over B

e.g. frame comparisons are now possible.
  glvideomixer name=m
    sink_0::zorder=0
    sink_1::zorder=1
    sink_1::blend-equation-rgb={subtract,reverse-subtract}
    sink_1::blend-function-src-rgb=src-color
    sink_1::blend-function-dst-rgb=dst-color
  ! glimagesinkelement
  videotestsrc pattern=checkers-4 ! m.sink_0
  videotestsrc pattern=checkers-8 ! m.sink_1
2016-01-13 12:00:03 +11:00
Nirbheek Chauhan
1cdc07b307 glvideomixer: Proxy the ignore-eos videoaggregator property as well
Identical to how the z-order property is proxied
2015-10-06 16:57:53 +01:00
Matthew Waters
81a78449d5 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.
2015-08-03 20:08:52 +10:00
Olivier Crête
b05002776b 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
2015-07-22 20:59:50 -04:00
Olivier Crête
50d5d0a161 glvideomixer, glmixer: Add description and klass 2015-07-03 12:28:47 -04:00
Sebastian Dröge
a3b806de4e compositor/glvideomixer: Don't calculate PAR/DAR with unset GstVideoInfos
Otherwise we divide by zero.
2015-05-21 16:24:48 +03:00
Matthew Waters
012e636e4e compositor/glvideomixer: fix up par handling
We were using the wrong formula

https://bugzilla.gnome.org/show_bug.cgi?id=749634
2015-05-21 01:04:38 +10:00
Matthew Waters
7e5123cd90 gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
We are using shaders everywhere and so they are not needed
2015-05-14 16:42:09 +10:00
Matthew Waters
930742dd5a 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.
2015-05-14 14:58:07 +10:00
Matthew Waters
7b48ab14e1 glvideomixer: implement par handling
We were previously ignoring it completely
2015-05-13 17:44:08 +10:00
Matthew Waters
2362ee8bee glvideomixer: don't upload the vertex data every frame
Add the missing cache tracking statement.
2015-05-13 17:44:04 +10:00
Sebastian Dröge
824bb6acf8 Revert "Revert "glvideomixer: implement with glmixerbin""
This reverts commit b4bd11f2f3.
2015-05-06 15:43:32 +02:00
Matthew Waters
a9fc9344a3 Revert "glvideomixer: implement with glmixerbin"
This reverts commit 0fb56738a1.
2015-04-30 11:26:33 +10:00
Edward Hervey
9a73ffcef3 glvideomixer: Don't use context if not present
Avoids assertions at runtime
2015-03-31 16:31:18 +02:00
Matthew Waters
4c72910825 gl: get the context from basemixer/basefilter 2015-03-13 12:30:20 +00:00
Matthew Waters
acd9a252c0 glvideomixer: implement with glmixerbin
The relevant properties are forwarded to/from the containing bin
and sink pads.
2015-03-12 16:45:51 +00:00
Matthew Waters
95a98d1d05 glvideomixer: don't upload if alpha <= 0
Implemented using a upload_buffer vfunc within GstGLMixer allowing
NULL uploaded buffers.
2015-01-15 09:50:02 +11:00
Tim-Philipp Müller
13af5efb07 glmixer, glvideomixer: update for GstAggregatorPadForeachFunc change 2014-12-30 19:43:43 +00:00
Nirbheek Chauhan
6351c0becc glvideomixer: Point to compositor for the pad properties documentation 2014-12-27 11:05:17 +00:00
Matthew Waters
85febbbafb gl: fixup vao and vbo usage for legacy GL 2014-12-11 19:41:23 +11:00
Matthew Waters
c90f7001b1 gldisplay: implement runtime GL api filtering
Needed so that the pipeline/application can limit the choice of GL api
to what it supports
2014-11-28 09:14:26 +11:00
Matthew Waters
ad77f0392f glvideomixer: add support for gl3 2014-11-28 09:14:25 +11:00
Matthew Waters
8bf2acba1d 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
2014-10-21 01:14:36 +11:00
Matthew Waters
65ed8ecf07 glvideomixer: update element documentation 2014-09-30 20:39:36 +10:00
Matthew Waters
bc399a0403 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).
2014-09-26 01:59:43 +10:00
Matthew Waters
e0476bf014 glvideomixer: skip input frames with an alpha of 0 2014-09-24 14:31:19 +10:00
Matthew Waters
a555c32f30 glvideomixer: don't clobber unnecessary GstVideoInfo fields
otherwise we might clobber other important fields such as the frame rate.
2014-08-19 14:44:29 +10:00
Matthew Waters
3fe5412357 glvideomixer: get the attribute from the correct shader 2014-08-19 14:43:42 +10:00
Tim-Philipp Müller
0ab1136f4e opengl: update element docs for 1.x 2014-08-10 18:07:28 +01:00
Matthew Waters
5cddc44b0a glvideomixer: add a background property
That's compatible with the compositor/videomixer property

https://bugzilla.gnome.org/show_bug.cgi?id=731954
2014-08-07 19:21:02 +10:00
Julien Isorce
b0a0974ea7 gl: enable glvideomixer on GLES2 2014-06-25 06:55:11 +01:00
Matthew Waters
7f2000a7a5 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
2014-06-25 12:00:34 +10:00