Commit graph

194 commits

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