Commit graph

3595 commits

Author SHA1 Message Date
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
Matthew Waters
e7cc498fb6 glfilterapp: actually emit the client-draw signal 2017-12-09 19:31:43 +00:00
Matthew Waters
e523cdd21a glfilterapp: remove the reshape/draw properties
The reshape property was never used.
Replace the draw property with a signal.

Based on patch by Mathieu Duponchelle <mathieu.duponchelle@epitech.eu>

https://bugzilla.gnome.org/show_bug.cgi?id=704507
2017-12-09 19:31:42 +00:00
Matthew Waters
90b86e73e7 glimagesink: replace pointer properties with signals
Based on patch by Mathieu Duponchelle <mathieu.duponchelle@epitech.eu>

https://bugzilla.gnome.org/show_bug.cgi?id=704507
2017-12-09 19:31:42 +00:00
Matthieu Bouron
f34864fb87 glimagesink: improve state change debug message 2017-12-09 19:31:42 +00:00
Matthew Waters
e425bd31a1 glimagesink: unref the old buffer outside the lock
it could very well deadlock

https://bugzilla.gnome.org/show_bug.cgi?id=723529
2017-12-09 19:31:42 +00:00
Matthew Waters
98e9ca7270 Revert "[880/906] glimagesink: remove unused stored_buffer field"
This reverts commit af3a68db7d.

Conflicts:
	ext/gl/gstglimagesink.c

https://bugzilla.gnome.org/show_bug.cgi?id=723529
2017-12-09 19:31:42 +00:00
Matthew Waters
4a8b31afd6 glfeature: remove GST_GL_API_GLES3
instead check the gl version using gst_gl_context_check_gl_version()
2017-12-09 19:31:42 +00:00
Matthew Waters
32343333aa gl/upload: add GstGLUploadMeta object
That simply deals with the provider aspect of GstVideoGLTextureUploadMeta.
2017-12-09 19:31:41 +00:00
Julien Isorce
1c14c43c90 glimagesink: make it actually honor show-preroll-frame property
https://bugzilla.gnome.org/show_bug.cgi?id=730802
2017-12-09 19:31:41 +00:00
Matthew Waters
51fdeef98b gl/eglimage: add eglimage context feature
Allows us to selectively use EGLImages only when available

https://bugzilla.gnome.org/show_bug.cgi?id=728234
2017-12-09 19:31:41 +00:00
Sebastian Dröge
8b7d8a95ea glimagesink: Check if context creation failed before trying to use it
Otherwise we will cause assertions everywhere by passing NULL to functions
and eventually crash when dereferencing a NULL pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=730069
2017-12-09 19:31:40 +00:00
Matthew Waters
9172cb8839 gl/download: update to be similar to the glupload semantics 2017-12-09 19:31:40 +00:00
Julien Isorce
17946cc0a9 gleffects: use gl_vtable 2017-12-09 19:31:40 +00:00
Matthew Waters
6c1a4e30c4 gl/upload: implement lazy init
Rename init_format to set_format
2017-12-09 19:31:39 +00:00
Matthew Waters
8fd450b941 gl: advertise GstGLMemory usage in the caps as capsfeatures
https://bugzilla.gnome.org/show_bug.cgi?id=729658
2017-12-09 19:31:39 +00:00
Matthew Waters
a865a931fc gl/sink: make sure we always initialize the upload object
https://bugzilla.gnome.org/show_bug.cgi?id=729542
2017-12-09 19:31:39 +00:00
Matthew Waters
bf9c8544e3 gl: use the bufferpool's upload when available
Avoids duplicating GL resources

https://bugzilla.gnome.org/show_bug.cgi?id=728872
2017-12-09 19:31:39 +00:00
Matthew Waters
b1fc846f83 glcolorscale: fix operation with dual GL, GLES2 libgstgl 2017-12-09 19:31:38 +00:00
Julien Isorce
2a12e57a9f glcolorscale: use a shader on GLESv2
Otherwise you only see black frames

Fix https://bugzilla.gnome.org/show_bug.cgi?id=728947
2017-12-09 19:31:38 +00:00
Julien Isorce
0455cb610a glimagesink: use new helper function to avoid duplicating default shader text 2017-12-09 19:31:38 +00:00
Julien Isorce
2b8de2d1bc gleffects: use new helper functions to avoid duplicating the same vertex shader text
And also use the default fragment shader text for the identity effect
2017-12-09 19:31:38 +00:00
Julien Isorce
391661b626 gl: use gst_gl_platform_from_string because we support gl shareList on all platforms 2017-12-09 19:31:38 +00:00
Julien Isorce
c52dd44e60 gl: fails glimagesink when shader compilation went wrong
Those shaders are fixed and very simple so it should not fail
but it's worth to handle a such case.
2017-12-09 19:31:37 +00:00
Julien Isorce
4844c53017 gl: call glClearColor before glClear 2017-12-09 19:31:37 +00:00
Sebastian Dröge
569f1363f4 glimagesink: Use the pixel-aspect-ratio adjusted width/height when centering the frame in the display area
Makes sure we actually keep the display aspect ratio
2017-12-09 19:31:37 +00:00
Sebastian Dröge
889e92e738 glimagesink: By default keep the display aspect ratio
Also the default for the pixel-aspect-ratio should be 1/1, not 0/1.
2017-12-09 19:31:37 +00:00
Sebastian Dröge
7f7ceea8de gltestsrc: Unref context when creation failed and guard against that in fill() 2017-12-09 19:31:37 +00:00
Sebastian Dröge
fc607b3c53 glimagesink: Call gst_object_unref() on the GstGL GObjects again
While they're plain GObjects it does not hurt to call gst_object_unref()
on them and potentially allows to debug reference leaks a bit easier.
2017-12-09 19:31:37 +00:00
Sebastian Dröge
2b38f86b4e glimagesink: If creating a context or upload failed, destroy it
Fixes deadlocks in error cases when later code assumes the broken
context is actually usable.

https://bugzilla.gnome.org/show_bug.cgi?id=728761
2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
f230f758e7 gl: a couple spelling/grammar fixes 2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
d6a87fb0c3 gl: guard against using a NULL window pointer
Coverity 1195145
2017-12-09 19:31:37 +00:00
Matthew Waters
9eb5001e02 glimagesink: remove unused texture 2017-12-09 19:31:36 +00:00
Matthew Waters
57b4bd6905 glimagesink: move upload into _prepare() 2017-12-09 19:31:36 +00:00
Sebastian Dröge
a05928ba62 gl: Set glimagesink rank to SECONDARY
This is a full-featured video sink now and especially should be
used instead of osxvideosink on OSX if available.
2017-12-09 19:31:36 +00:00
Sebastian Dröge
aab3ef1b5d glimagesink: First handle GL window setup, then create the context and its thread 2017-12-09 19:31:36 +00:00
Matthew Waters
30c6efc432 gl/mem: allocate the memory per plane
This patch provides the basic infrastructure required for this.
Upload and Download has been ported to this.

Has the nice effect of allowing GstGLMemory to be our
refcounted texture object for any texture type (not just RGBA).

Should not lose any features/video formats.
2017-12-09 19:31:36 +00:00
Matthew Waters
fba49c3463 gl: add colorconvert object that converts between color spaces/formats
Currently used by both upload and download objects separately.
2017-12-09 19:31:36 +00:00
Vincent Penquerc'h
2767aae4e2 gl: pass large structure by const pointer, not value
Avoids large pointless memcpy.

Coverity 206236, 206237
2017-12-09 19:31:36 +00:00
Vincent Penquerc'h
07565d0ff7 gl: test for frame NULLness before dereferencing it
Coverity 1195172, 1195171
2017-12-09 19:31:36 +00:00
Sebastian Dröge
4ecffcf76b glimagesink: Create GL context and set up window from the streaming thread
gst_gl_context_create() might need to dispatch some operations to the
application's main thread, and calling this in the change_state function
can cause deadlocks.
2017-12-09 19:31:36 +00:00
Matthew Waters
a20a5d36e2 gl: pass video info's by reference 2017-12-09 19:31:35 +00:00
Matthew Waters
173b234ed2 gl: fix array initialization 2017-12-09 19:31:35 +00:00
Matthew Waters
394128a4db glbumper: remove redundant check 2017-12-09 19:31:35 +00:00
Matthew Waters
b70069bc61 gl: fix assignment of temporary variables 2017-12-09 19:31:35 +00:00
Matthew Waters
71548893bf gl: avoid adding a NULL pool to propose allocation 2017-12-09 19:31:35 +00:00
Julien Isorce
0233939eaa gl: only set CAPS_FEATURE_MEMORY_EGL_IMAGE on egl platform 2017-12-09 19:31:35 +00:00
Julien Isorce
6614df6478 gl: let the user includes itself our egl headers if needed
Forgot to address this change.

https://bugzilla.gnome.org/show_bug.cgi?id=703343
2017-12-09 19:31:35 +00:00
Julien Isorce
c2471aec81 gl: add EGLImage support
* picked from old libgstegl:
  - GstEGLImageMemory
  - GstEGLImageAllocator
  - last_buffer management from removed GstEGLImageBufferPool

* add-ons:
  - GstEGLImageMemory now old a reference on GstGLContext
    so that it can delete the EGLImage and its gltexture source
    while having the associated gl context being current.
  - add EGLImage support for GstVideoGLTextureUploadMeta which
    mainly call EGLImageTargetTexture2D
  - GstGLBufferPool now supports GstEGLImageAllocator
  - glimagesink / glfilters / etc.. now propose GstEGLImageAllocator
    to upstream

https://bugzilla.gnome.org/show_bug.cgi?id=703343
2017-12-09 19:31:35 +00:00
Gwenole Beauchesne
14521a89cb gl: fix out-of-source builds.
Always use the locally generated <gst/gl/gstglconfig.h> file.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2017-12-09 19:31:35 +00:00
Matthew Waters
a9070713a2 gl: silence a critical if upstream does not provide us with meta params 2017-12-09 19:31:35 +00:00
Julien Isorce
19d138601b gl: silence warnings building for RPI related to 'vcos_*'
Similar than 1190a79b19
2017-12-09 19:31:34 +00:00
Julien Isorce
b30d15d4b8 gl: keep only one occurence of '#include <EGL/egl.h>'
To simply maintainance if we need to put specific includes around it.
2017-12-09 19:31:34 +00:00
Matthew Waters
e225af3e0d gl: silence all the compiler warnings 2017-12-09 19:31:34 +00:00
Matthew Waters
a884d6feee move gl elements to ext subdirectory 2017-12-09 19:31:34 +00:00
Tim-Philipp Müller
0ef44cefc9 alsamidisrc: unlock create function on shutdown
Fixes occasional hang in generic/states unit test or

GST_CHECKS=test_state_changes_up_and_down_seq make forever
2017-12-08 10:35:43 +00:00
Edward Hervey
a28880b458 oggdemux: Check encoder name is valid
Encoder names should be valid utf-8, if not just ignore them
2017-12-08 10:38:20 +01:00
Edward Hervey
427df2d5d9 ogmparse: Make sure we set valid string on caps
the fourcc might not contain printable characters, use the convenience
macro to turn it into a printable fourcc, like it's done in
gstogmparse
2017-12-06 14:23:49 +01:00
Edward Hervey
c3875a236b alsamidisrc: Don't assume a clock has been set
Can happen in testing scenarios for example
2017-11-30 10:47:12 +01:00
Antonio Ospite
feacb875a4 alsamidisrc: Improve buffer timestamping
Make buffer timestamps more accurate and, more importantly, actually
representative of the MIDI events timing.

Previously, buffers were only sent with timetamps aligned at a 10ms
boundary which was just wrong, now the buffer timestamp represents the
real time of the MIDI event.

Conveniently, the ALSA sequencer API supports scheduling events in the
future so the sequencer infrastructure can be used to have the tick
delivered at the right time, avoiding any custom scheduling mechanism.

The ticks scheduling starts on the first transition to PLAYING, and the
delay is also calculated when the pipeline goes into PLAYING.

https://bugzilla.gnome.org/show_bug.cgi?id=787683
2017-11-29 21:13:38 -05:00
Antonio Ospite
3a64ed723a alsamidisrc: Expand snd_seq_create_simple_port() and use a queue for timestamps
Events are timestamped with a real-time value representing the time
passed since the queue timer was started.

The timestamp is not used just yet.

https://bugzilla.gnome.org/show_bug.cgi?id=787683
2017-11-29 21:13:38 -05:00
Antonio Ospite
132ead36c1 alsamidisrc: Merge prepare_buffer() and push_buffer()
The separation is not very useful since push_buffer() is the only user
of prepare_buffer().

https://bugzilla.gnome.org/show_bug.cgi?id=787683
2017-11-29 21:13:38 -05:00
Antonio Ospite
b5060f16d9 alsamidisrc: Don't set buffer offset and duration
They are not relly needed for a live source.

https://bugzilla.gnome.org/show_bug.cgi?id=787683
2017-11-29 21:13:38 -05:00
Antonio Ospite
3c5aa0a786 alsamidisrc: Fix a memory leak when setting the "ports" property
When setting the "ports" property the value is duplicated but it's not
freed when the elements stops.

Reported by Valgrind (example run with "alsamidisrc ports=128:0"):

  6 bytes in 1 blocks are definitely lost in loss record 30 of 1,911
     at 0x4C2BBEF: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
     by 0x5411528: g_malloc (gmem.c:94)
     by 0x542A9FE: g_strdup (gstrfuncs.c:363)
     by 0x775211E: gst_alsa_midi_src_set_property (gstalsamidisrc.c:284)
     by 0x5184A4D: object_set_property (gobject.c:1439)
     by 0x5184A4D: g_object_setv (gobject.c:2245)
     by 0x51859DD: g_object_set_property (gobject.c:2529)
     by 0x4F0474C: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1203.0)
     by 0x4F065C8: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1203.0)
     by 0x4F07557: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1203.0)
     by 0x4EFE3EE: gst_parse_launch_full (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1203.0)
     by 0x4EFE673: gst_parse_launchv_full (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1203.0)

https://bugzilla.gnome.org/show_bug.cgi?id=787683
2017-11-29 21:13:38 -05:00
Antonio Ospite
f671026f11 alsamidisrc: Prevent Valgrind from reporting cached config as memory leaks
See http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=MEMORY-LEAK;hb=HEAD

This allows to have cleaner Valgrind reports about alsamidisrc and make
it easier to spot actual problems.

https://bugzilla.gnome.org/show_bug.cgi?id=787683
2017-11-29 21:13:38 -05:00
Antonio Ospite
8638d81eb3 alsamidisrc: Improve a comment and remove one trailing space
https://bugzilla.gnome.org/show_bug.cgi?id=787683
2017-11-29 21:13:38 -05:00
Mathieu Duponchelle
14f886b7b0 aggregator: Remove klass->sinkpads_type
This posed problems for the python bindings (and possibly others).

Instead, subclasses now use add_pad_template_with_gtype.

https://bugzilla.gnome.org/show_bug.cgi?id=789986
2017-11-22 16:52:29 +01:00
Edward Hervey
51eeb4534a ogmparse: Set caps after sending pending events
Avoids sending STREAM_START before CAPS
2017-11-15 10:55:55 +01:00
Edward Hervey
6c6d8b0b95 oggstream: Demote error to warning 2017-11-15 10:55:55 +01:00
Edward Hervey
25fa4802fe oggdemux: Move mutex/cond initialization/release
We only need to initialize the mutex/cond once when creating the
element and then release them when we are done with the element.

Avoids weird "mutex_clear called when still locked" issues
2017-11-15 10:55:55 +01:00
Edward Hervey
c7917df7e2 theoradec: Handle negotiation failure
Avoids a trove of random issues afterwards (due to decoder not
*actually* being initialized/negotiated).
2017-11-11 07:47:52 +01:00
Edward Hervey
895d884701 oggdemux: Solidify gst_ogg_demux_loop_push() some more
There were still some races going on where seeking events wouldn't
be properly intercepted/executed by this thread.

* Instead of always waiting for the GCond to be emitted, first just
  check if there is an event available
* Take ownership of the event *while* the lock is taken and not
  after releasing/reacquiring it
* Finally acquire lock at the very top and release it at the end
  to make it a bit more streamlined

This removes the remaining issues with seeks not being executed
2017-11-08 17:51:52 +01:00
Edward Hervey
9f678bb27f oggdemux: Don't double-unlock
The previous branch will release the lock in the call to
gst_ogg_demux_seek_back_after_push_duration_check_unlock()

Only unlock it if we didn't call that function
2017-11-08 17:51:51 +01:00
Edward Hervey
c86df789ed oggdemux: Drop data before new segment
When calculating duration in push-mode we seek to a certain position
and discard any data until we get data from that requested position.

The problem is that basing ourselves solely on offset to determine
whether we reached the target offset is wrong since the source might
be fast enough  to send us that target position *before* it processed
the requested seek.

This would end up in a situation where:
* We think we're done with duration estimate
* We fire a seek back to "0" in the loop thread
* We resume normal processing
* ... except that we're still getting data from too far ahead which
  we decide to process.
* And we start doing totally wrong granule/time/duration calculation
  and pushing wrong data.

Instead of this confusion, wait until we receive data from the requested
seek. We do that by using the fact that the seqnum in
seek_event_drop_til will be non-zero until the SEGMENT corresponding
to the requested SEEK has been received.

Bonus: makes startup slightly faster
2017-11-07 15:16:52 +01:00
Edward Hervey
0a49b93ade oggdemux: Wait for push loop to be started
Code using the push_loop_thread (using for sending seeks) assumes
that the thread was properly started, except that this isn't always
true and the thread might not have completely started.

Instead wait for the thread to properly start before doing anything
else.
2017-11-07 15:16:52 +01:00
Edward Hervey
5e373936bb oggstream: Ensure enough bytes for fishead header parsing 2017-11-06 14:29:26 +01:00
Edward Hervey
af48682d44 oggstream: Use proper type for sample calculation
If we are going to return a (potentially) 64bit integer, don't use
a 32bit one for calculation, otherwise we could end up exceeding
the maximum size of a 32bit int.
2017-11-05 12:16:13 +01:00
Edward Hervey
7f5ffcaa49 oggstream: More fixes for invalid granuleshift
Don't use granuleshift if it wasn't set
2017-11-05 12:15:33 +01:00
Edward Hervey
2cf5d596ee oggstream: Fix default granuleshift usage
For stream mappers that don't set a specific granuleshift, it will
have the default value of -1.

Protect the code for that and return the granule value as-is
2017-11-04 11:50:13 +01:00
Edward Hervey
1172e5efc7 oggdemux: Protect against invalid granule positions
Only valid values are -1, 0 or positive values. Anything else is
most likely corrupted data streams
2017-11-04 11:50:10 +01:00
Tim-Philipp Müller
b798cfbece gl: use new gst_element_foreach_sink_pad()
Instead of gst_aggregator_iterate_sinkpads() which will
soon be removed.

https://bugzilla.gnome.org/show_bug.cgi?id=785679
2017-11-02 12:47:28 +00:00
Edward Hervey
33dfed5af8 oggdemux: Only track time for initialized streams
in push-mode we only can track time (or most operations on streams
for that matter) if the underlying GstOggMap was properly initialized.
2017-11-01 18:39:26 +01:00
Edward Hervey
c3006b17d1 oggstream: Add a default GstOggMap
Since the default value of a GstOggPad.map.map was 0 ... we would
end up using wrong functions from mappers() if the stream wasn't
initialized yet.

Instead of that, use a default blank/empty first entry.
2017-11-01 18:39:26 +01:00
Edward Hervey
f1c44332d5 ogmparse: Ensure we don't create bogus fractions
The clamping of the fraction denominator was bogus (it needs to
be >0)
2017-11-01 11:19:58 +01:00
Edward Hervey
eb8bf0f162 oggdemux: Fix chain leak in push mode
In some corner cases we end up with the building chain not being
properly tracked (and therefore not properly freed).

Add a FIXME so it can later be fixed, but for now just fix the leak
2017-11-01 11:18:12 +01:00
Edward Hervey
0297bc2a4f ogmparse: Error out if we can't figure out the format
In some cases we might not be able to figure out the fixed format
from the header.

Properly error out in those cases.
2017-11-01 10:32:54 +01:00
Edward Hervey
e638f81165 ogg: Don't add tags to empty taglist 2017-10-31 11:57:19 +01:00
Edward Hervey
90106b6bf2 oggdemux: Don't forget to reacquire lock when needed
Fixup to ef93130cf0

I overlooked the issue. There is a case when the lock is released
and we need to reacquire it
2017-10-26 10:07:15 +02:00
Edward Hervey
6fd8d78d8b oggdemux: Don't drop sticky events
Previous commit was wrong. We should still send all events to the
pad (so that sticky events get attached to it and sent when pad
gets added).
2017-10-24 11:05:20 +02:00
Edward Hervey
e8a60b3de9 oggdemux: Improve handling of EOS without source pads
We might have a chain to use, but it might not have any active pads

Properly detect that and send an error message on EOS
2017-10-24 10:56:00 +02:00
Edward Hervey
f902286a26 oggdemux: Error out on EOS if we have no chains to use
There are not active and pending chains, if we get EOS we need to
inform the user via an error message
2017-10-20 18:41:52 +02:00
Edward Hervey
ef93130cf0 oggdemux: Don't double lock
The lock was already taken just before this block and is released after
2017-10-20 18:41:46 +02:00
Mathieu Duponchelle
8598f08278 opusenc: Allow unpositioned channels.
The input will be treated as a set of mono channels,
and the channel-mapping-family will be set to 255
(no defined channel meaning)

https://bugzilla.gnome.org/show_bug.cgi?id=788720
2017-10-11 19:42:39 +02:00
Ponnam Srinivas
0e8a510eda alsasink: Fix Memory leak in payload not succuss case
https://bugzilla.gnome.org/show_bug.cgi?id=788114
2017-09-26 11:18:09 +03:00
Ponnam Srinivas
0ffa10652a glmixer: Unmap video frame in error case
https://bugzilla.gnome.org/show_bug.cgi?id=788127
2017-09-26 11:12:04 +03:00
Haihua Hu
0fc911c7fe glvidemixer: need reconfigure output gemotry after caps renegotiated 2017-09-21 11:59:32 +10:00
Matthew Waters
12c8a7c0af Revert "glvideomixer: need update output geometry after src caps reconfigure"
This reverts commit d6e538dc56.
2017-09-21 11:59:22 +10:00
Haihua Hu
88fff68fc0 glvideomixer: need update output geometry after src caps reconfigure
Need update output geometry when sink caps changed and use
gst_structure_set to update caps if structure is fixed

https://bugzilla.gnome.org/show_bug.cgi?id=787820
2017-09-21 11:56:13 +10:00
Nicolas Dufresne
c1f524f3a8 Request minimum buffer even if need_pool is FALSE
When tee is used, it will not request a pool, but still it wants to
know how many buffers are required.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-06 14:19:37 -04:00
Julien Isorce
3573238683 gl: do not include GL headers in public gstgl headers
Except for gst/gl/gstglfuncs.h

It is up to the client app to include these headers.
It is coherent with the fact that gstreamer-gl.pc does not
require any egl.pc/gles.pc. I.e. it is the responsability
of the app to search these headers within its build setup.

For example gstreamer-vaapi includes explicitly EGL/egl.h
and search for it in its configure.ac.

For example with this patch, if an app includes the headers
  gst/gl/egl/gstglcontext_egl.h
  gst/gl/egl/gstgldisplay_egl.h
  gst/gl/egl/gstglmemoryegl.h
it will *no longer* automatically include EGL/egl.h and GLES2/gl2.h.
Which is good because the app might want to use the gstgl api only
without the need to bother about gl headers.

Also added a test: cd tests/check && make libs/gstglheaders.check

https://bugzilla.gnome.org/show_bug.cgi?id=784779
2017-08-22 10:00:19 +01:00
Mark Nauwelaerts
20705f01fc textoverlay: ensure text buffer has writable metadata when modifying 2017-07-01 17:45:36 +02:00
Mark Nauwelaerts
bd940e7126 textoverlay: adjust a valid text buffer duration to fall within segment
... as expected later on when end time is used to determine end running time.
Otherwise the latter is determined as NONE and the resulting text buffer is
then used indefinitely.
2017-07-01 17:44:22 +02:00
Mark Nauwelaerts
9c95303f3a textoverlay: make debug statement more informative 2017-07-01 17:16:33 +02:00
Thibault Saunier
dd1e4f5ebb alsasrc: Handle newly added GstStateChange values
https://bugzilla.gnome.org/show_bug.cgi?id=783798
2017-06-20 09:19:53 -04:00
Tim-Philipp Müller
e774d1ca4b meson: use dep.get_pkgconfig_variable()
instead of calling pkg-config ourselves.
2017-06-05 23:57:48 +01:00
Vincent Penquerc'h
bb0abf8558 oggdemux: fix artifacts at chain boundaries
https://bugzilla.gnome.org/show_bug.cgi?id=782132
2017-05-29 16:22:04 +01:00
Edward Hervey
62df7fdaba pango: Handle failure to multiply fractions
And set PAR back to the default value of 1:1

CID #1409851
2017-05-26 18:02:12 +02:00
Vincent Penquerc'h
523e98396f oggdemux: fix clipping more samples than exist in the first packet
This can happen in Opus (and maybe other codecs ?), and would cause
failure to play.

https://bugzilla.gnome.org/show_bug.cgi?id=782157
2017-05-26 14:41:47 +01:00
Olivier Crête
1dc6f66310 glbasemixer: Remove unused negotiated member
This is now all handled in GstAggregator, so this code is not
called anymore.
2017-05-21 18:31:59 +02:00
Olivier Crête
a2b0f2771a gl*mixer: Use propose_allocation from the GstAggregator base class
https://bugzilla.gnome.org/show_bug.cgi?id=782918
2017-05-21 18:17:54 +02:00
Olivier Crête
b2d4a6835b glbasemixer: Remove own decide_allocation, use GstAggregator's
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-05-21 13:24:29 +02:00
Olivier Crête
d456da5cbf glbasemixer: Use aggregator for allocation handling
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-05-21 13:24:29 +02:00
Olivier Crête
4a571db4c7 videoaggregator: Get the buffer from the pool if available
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-05-21 13:24:29 +02:00
Mark Nauwelaerts
6d6a6bc3d8 textoverlay: optionally scale text to ensure proper display text aspect ratio
... by prescaling with an inverse aspect scaling as applied by video scaling
2017-05-21 12:46:36 +02:00
Matthew Waters
719498601f aggregator: add simple support for caps handling
Modelled off the videoaggregator caps handling as that seems the most
mature aggregtor-using implementation that has caps handling there is.

https://bugzilla.gnome.org/show_bug.cgi?id=776931
2017-05-20 16:21:17 +02:00
vijay
f460d7d184 alsa: Add mapping for PCM F32/F64 formats
Fix enables float pcm formats for both the alsasrc and alsasink

https://bugzilla.gnome.org/show_bug.cgi?id=782695
2017-05-17 10:33:52 -04:00
Nicolas Dufresne
e0d793f793 alsasink: Accept MPEG 1 layer 3 version 2.5
https://bugzilla.gnome.org/show_bug.cgi?id=781929
2017-05-16 15:37:16 -04:00
Nicolas Dufresne
8e6c6266d7 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 13:42:07 -04:00
Tim-Philipp Müller
a82c4e1fed glvideomixer: fix whole example launch line actually 2017-05-07 11:47:40 +01:00
Tim-Philipp Müller
449a1b391b glvideomixer: remove extraneous \ from example launch line in docs 2017-05-07 11:42:34 +01:00
Vitor Massaru Iha
c579a4298b textoverlay: Removing duplicated command.
gst-launch-1.0 was duplicated on textoverlay example.

https://bugzilla.gnome.org/show_bug.cgi?id=782018
2017-05-01 18:52:42 +01:00
Thibault Saunier
2bf2696945 docs: Port all docstring to gtk-doc markdown 2017-04-12 12:57:57 -03:00
Tim-Philipp Müller
4246198fb3 No need for newlines in debug log statements 2017-04-12 09:58:49 +01:00
Thibault Saunier
099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Jan Schmidt
8596ec23cb oggdemux: Fix reverse playback
Fix various issues with reverse playback by clearing tracking
vars when working in reverse, and where possible using the
timestamp interpolation code to generate timestamps for
outgoing buffers. Make sure to mark things as discontinuous
only when looping backward to a new position and fix seeking
to the next page when starting.
2017-03-04 00:30:37 +11:00
Jan Schmidt
fe1f47aa17 oggdemux: Timestamp tracking fixes
In gst_ogg_demux_do_seek() when calculating the
keyframe time, account for a non-zero start-time

Handle a discontinuous first packet in
gst_ogg_demux_setup_first_granule() because that's pretty
normal after a seek. Also differentiate between a genuinely
truncated first packet and just bailing out early, by not using
granule = -1 as an error code.

Make the debug output logs clearer about which timestamps
are stream times (PTS) and which are ogg timestamps.
2017-03-04 00:30:37 +11:00
Jan Schmidt
342132a700 oggdemux: Don't arbitrarily guess a timestamp of 0
When we haven't managed to manufacture a timestamp for
a packet, don't just guess '0', leave it at none and
let downstream decide
2017-03-04 00:30:37 +11:00
Jan Schmidt
924c44f369 theoradec: Make the keyframe condition check clearer
Make the keyframe checking if statement easier to
read, and add some debug when detecting a keyframe
2017-03-04 00:30:37 +11:00
Edward Hervey
e575be6dc6 vorbisdec: Reset decoder in more situations
This is a followup commit to b95725c37e

* Resetting the decoder should only happen when we get a new initialization
header (0x01) and not on the other headers
* The initialized variable only gets set to TRUE once all headers have
been parsed. Also check if the vorbis_info struct has been properly resetted
also. Failure to do that would cause vorbisdec to error if it got
two initialization header in a row (the first would configure the underlying
library and the second one would error out because it's already initialized)

https://bugzilla.gnome.org/show_bug.cgi?id=779515
2017-03-03 10:56:22 +01:00
Sebastian Dröge
aee020c26f glvideomixer/compositor: Correctly error out if calculating DAR fails
CID 1320700
2017-02-28 13:06:41 +02:00
Sebastian Dröge
12540146ea gl: Rename gst_gl_get_affine_transformation_meta_as_ndc_ext() to prevent symbol conflict
The same symbol also exists in libgstgl, although marked as private and
internal. This has no effect when doing static linking and there's a
symbol conflict.
2017-02-28 10:55:10 +02:00
Jochen Henneberg
b95725c37e vorbisdec: reset decoder on vorbis headers update
if the vorbis encoder receives new headers it must be
reset and re-initialized to continue decoding, e. g.
for live streams
2017-02-27 19:17:58 +02:00
Sebastian Dröge
bb051c14b3 vorbisenc: Resend (new, updated) headers when the caps are changing
The headers are usually changing together with the caps, and they are
nedeed for correct decoding.
2017-02-27 19:04:30 +02:00
Jochen Henneberg
0c2c82ad69 vorbis: Fix channel reorder map for 5.1, 6.1 and 7.1 2017-02-20 13:45:09 +02:00
Matthew Waters
c6bf4b36e6 glmixer: ensure caps are writable after intersection
gst_caps_intersect () may return an increased reference of one of the
input caps.

Fixes critical in the simple-launch-lines test:

Unexpected critical/warning: gst_caps_set_features: assertion 'IS_WRITABLE (caps)' failed
2017-01-18 15:07:48 +11:00
Matthew Waters
7fcbfe1234 gl/utils: also take care of the local GL context in query functions
Simplifies a deduplicates a lot of code in elements retrieving/setting
the local OpenGL context.
2017-01-13 11:20:51 +11:00
Matthew Waters
b4301e2235 glutils: remove trivial helper function
gst_gl_caps_replace_all_caps_features() is only used in two places and can
be trivially reproduced.
2017-01-13 11:20:51 +11:00
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
Sebastian Dröge
9795115564 gst: Don't declare variables inside the for loop header
This is a C99 feature.
2016-12-13 22:26:08 +02:00
Jan Schmidt
226dfc3f32 ogg: Fix element factory klass for OGM parsers
They're parsers, not decoders, so fix the klass info
accordingly.
2016-12-09 18:06:35 +11:00
Sebastian Dröge
732ecf0925 oggdemux: Don't end up ignoring caps just because there are no headers for this stream
https://bugzilla.gnome.org/show_bug.cgi?id=775459
2016-12-01 15:12:59 +02:00
Sebastian Dröge
d34e326425 textoverlay: Mark pad as needing reconfiguration again if it failed
And return FLUSHING instead of NOT_NEGOTIATED on flushing pads.

https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:04:27 +02:00
Scott D Phillips
115ccfe679 meson: vorbis: Add -DTREMOR to flags for gstivorbisdec
Matching the flags set by Makefile.am

https://bugzilla.gnome.org/show_bug.cgi?id=774445
2016-11-15 12:45:42 +11:00
Scott D Phillips
ab3c8caeed Remove 'return' from void functions
https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-12 10:51:30 +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
Vincent Penquerc'h
9121131f31 opusdec: fix 120 ms buffers being wrongly emitted
Using the max 120 ms buffer size to ensure we have enough space
for decoded data meant that Opus could actually return 120 ms'
worth of data.

https://bugzilla.gnome.org/show_bug.cgi?id=771723
2016-11-04 16:59:26 +00: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
Vincent Penquerc'h
b0866b9cc1 opusdec: interpret zero duration as unknown
This fixes missing audio when we get buffers with zero
duration, denoting unknown duration. When several such
buffers are received in a row, they're all at the same
timestamp, with zero duration.

https://bugzilla.gnome.org/show_bug.cgi?id=771723
2016-11-01 19:58:42 +02:00
Vincent Penquerc'h
a6ced9cbc8 opusdec: fix "buffer too small" error
Always supply a buffer with max size to the decoder, as we
can't really decide how many samples will be in the lost packet
based on the timestamps we get.

https://bugzilla.gnome.org/show_bug.cgi?id=771723
2016-11-01 19:58:42 +02:00
Nicolas Dufresne
7a40442ad5 video: Add VYUY pixel format
This format is sometimes the output of JPEG decoders. It is the same as
YUY2 and UYVY but with a different component order.

https://bugzilla.gnome.org/show_bug.cgi?id=767450
2016-11-01 19:55:20 +02:00
Vincent Penquerc'h
667931e52a vorbisenc: correct codebooks packet identifier from 3 to 5
https://bugzilla.gnome.org/show_bug.cgi?id=768763
2016-10-07 12:54:12 +01:00
Vincent Penquerc'h
9599c3416c opusenc: remove segment stop modification on eos
https://bugzilla.gnome.org/show_bug.cgi?id=768763
2016-10-05 14:49:52 +01:00
Vincent Penquerc'h
a30c713e43 oggmux: take audio clip meta into account for buffer duration
https://bugzilla.gnome.org/show_bug.cgi?id=768763
2016-10-05 14:49:52 +01:00
Vincent Penquerc'h
1a4ba79044 vorbisenc: strip after-eos samples from the end of the eos buffer
https://bugzilla.gnome.org/show_bug.cgi?id=768763
2016-10-05 14:49:52 +01:00
Vincent Penquerc'h
31438ef49b oggdemux: safety for failing to determine time length in push mode
If we can't find a valid granule near the end of the file, we
disable seeking. This guards against the whole file being then
read and never going to PLAYING.

https://bugzilla.gnome.org/show_bug.cgi?id=770314
2016-09-05 11:42:44 +01:00
Vincent Penquerc'h
6f856cb54d oggdemux: increase EOS granpos detection chunk size
This can be too small on some files to find a valid granule.

https://bugzilla.gnome.org/show_bug.cgi?id=770314
2016-09-05 11:41:43 +01:00
Thibault Saunier
bc6aae6ca7 Use the new API to post flow ERROR messages on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=770158
2016-08-26 19:23:24 -03:00
Jan Schmidt
e8a98ca5b3 gl: Update glvideomixer doc 2016-08-26 03:25:49 +10:00
Jan Schmidt
4e925aa854 gl: Add/update docs for glviewconvert, glstereomix
Add some example pipelines for glstereomix, and fix up
the example pipelines for glviewconvert
2016-08-26 03:25:49 +10:00
Jan Schmidt
3010a28f07 glstereomix: Fix caps negotiation
The videoaggregator negotiation sequence changed some time
back and broke glstereomix. Instead of doing nego incorrectly
in the find_best_format() vfunc, do it directly in the
update_caps() method.
2016-08-26 03:25:49 +10:00
Nirbheek Chauhan
5c4f4ac1bd Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:09:51 +01:00
Vincent Penquerc'h
273d35ce20 oggdemux: remove eos avoidance workaround
This workaround tried to avoid an EOS event when seeking to the
end of an Ogg stream in order to find its duration. At some point,
an EOS event there would cause any queue2 upstream to pause and
not restart on a seek back to the beginning. This now appears to
not be the case anymore, and so the workaround can be removed.

https://bugzilla.gnome.org/show_bug.cgi?id=767689
2016-08-05 07:50:35 +02:00
Vivia Nikolaidou
a993dd40b6 timeoverlay: Add support to display timecode
Choosing time-mode=time-code will display the time code attached to the
buffer, or 00:00:00:00 if no time code is found.

https://bugzilla.gnome.org/show_bug.cgi?id=766419
2016-08-04 18:59:57 +03:00
Luis de Bethencourt
7ae577dc3a ogg: check return values in gst_ogg_parse_new_stream
Return NULL in gst_ogg_parse_new_stream when either ogg_stream_pagein() or
gst_ogg_stream_setup_map() failed.

https://bugzilla.gnome.org/show_bug.cgi?id=769299
2016-08-03 17:12:55 +01:00
Luis de Bethencourt
5cab723651 ogg: fix memory leak in gst_ogg_parse_new_stream
Avoid leaking the stream object

https://bugzilla.gnome.org/show_bug.cgi?id=769299
2016-08-03 17:12:43 +01: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
Arun Raghavan
6c84f4e743 Revert "vorbisenc: push an updated segment stop time when we know it"
This reverts commit a16cd5d2a5.

Setting the stop time on the segment breaks reconfiguration, as the
encoder signals an EOS, but we reconfigure it an continue to produce
buffers.

This information  should not be required via the segment downstream
since we already have the sample count being used to generate buffer
durations.

https://bugzilla.gnome.org/show_bug.cgi?id=768763
2016-07-21 15:26:21 +05:30
Vincent Penquerc'h
714e3b9741 oggdemux: fix unknown duration playing Ogg over HTTP
If the duration is not known from the chain, it might be known
by the startup seek.

This fixes failure to seek.

Merged with a patch from Tim-Philipp Müller <tim@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=768991
2016-07-21 10:40:07 +01:00
Jan Schmidt
614ddaa739 alsasink: Remove unused hwparam/swparam pointers
The ALSA params structures aren't kept. The pointers
aren't used anywhere, so remove them from the struct.
2016-07-15 22:51:35 +10:00
Vincent Penquerc'h
528f030eff oggdemux: demote an expected error to debug
Dropping a buffer because we have a seek pending is normal,
and will now happen when we trigger a seek while going through
the packets in a page. So this should not be an error.
2016-06-23 10:24:55 +01:00
Vincent Penquerc'h
6bc6b6ebbf opusdec: handle missing buffers with no duration
If buffer duration is missing, it is parsed from the packet data.
This is not foolproof, since Opus can change durations on the
fly.

https://bugzilla.gnome.org/show_bug.cgi?id=767826
2016-06-21 10:48:40 +01:00
Vincent Penquerc'h
2ac5bd293b oggdemux: fix audio glitches with low bitrate vorbis
A low bitrate stream which can pack more than 2 seconds of audio
in a page would cause the stream's position to be updated not
often enough, and would trigger a spurious "jump" via a GAP
event. Instead, we update the stream position after calculating
the new overall segment position.

https://bugzilla.gnome.org/show_bug.cgi?id=764966
2016-06-16 11:10:08 +01:00
Guillaume Desmottes
afdb7d3f32 opusenc, subtitleoverlay: use MAY_BE_LEAKED flag
Flag caps that are cached locally and will never be freed.

https://bugzilla.gnome.org/show_bug.cgi?id=767155
2016-06-02 13:11:11 +01:00
Tim-Philipp Müller
eb9750d96e textoverlay: enable shaded background drawing for new IYU2 format 2016-06-01 12:36:38 +01:00
Matthew Waters
11bb4454a8 glvideomixer: fix race retrieving the GL context from the display
_get_gl_context() can be called concurrently from either propose_allocation() or
decide_allocation().  If it so happens that this happens at the same time,
the check for whether we already had a GL context was outside the lock.  Inside
the lock and loop, the first thing that happens is that we unref the current GL
context (if valid) as if there was a conflict adding it to the display.  If the
timing was unlucky, subsequent use of the GL context would be referencing an
already unreffed GL context object resulting in a critical:

g_object_ref: assertion 'object->ref_count > 0' failed

https://bugzilla.gnome.org/show_bug.cgi?id=766703
2016-05-25 18:28:20 +10:00
Nirbheek Chauhan
ba9bf26f4b libvisual: Factor out endian-order RGB formats
MSVC seems to ignore preprocessor conditionals inside static
pad templates. Also remove unnecessary quotes inside caps strings.
2016-05-24 19:49:38 +01:00
Tim-Philipp Müller
108c7d6b3c opus: use default error messages in some more cases 2016-05-23 19:28:39 +01:00
Tim-Philipp Müller
c056b99f94 opusdec: use default error message strings in more cases
Details should go into the debug message. We should probably
make up new codes for encoder/decoder lib init failures too.
2016-05-23 15:36:47 +01:00
Guillaume Desmottes
396932f412 glmosaic: fix shader leak
gst_gl_mosaic_init_shader() is called twice with test_glmosaic so the
first shader was leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=766661
2016-05-20 17:09:25 +02:00
Olivier Crête
0bfed26f56 opus: Post error message on GST_FLOW_ERROR
https://bugzilla.gnome.org/show_bug.cgi?id=766265
2016-05-19 12:27:57 -04:00
Olivier Crête
1a700c3ae6 opusdec: Use GST_AUDIO_DECODER_ERROR
This way, the first invalid stream won't break all decoding.

https://bugzilla.gnome.org/show_bug.cgi?id=766265
2016-05-18 15:25:38 -04:00
Edward Hervey
98c9eb9858 oggdemux: Reset keyframe_granule when needed
This avoids ending up with bogus values when doing flushing seeks
in push-mode.

https://bugzilla.gnome.org/show_bug.cgi?id=766467
2016-05-15 14:39:25 +02: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
96682c41d4 glbasemixer: actually attempt to propose an allocation upstream
We were always failing the allocation query as a flag was never being set to
signal a successful negotiation.  Fix by setting the required flag on a
successful caps event from upstream.
2016-05-14 16:35:29 +03:00
Matthew Waters
0283c3d8aa gl/egl: replace gsteglimagememory with an EGLImage wrapper
That can be passed to GstGLMemoryEGL.

This also ports the dmabuf uploader to GstEGLImage and GstGLMemoryEGL.
2016-05-04 13:31:48 +10:00
Thiago Santos
60c765174f opusdec: intersect with the filter before returning on getcaps
So upstream gets a smaller set to decide upon as it is what it requested
with the filter

https://bugzilla.gnome.org/show_bug.cgi?id=765684
2016-05-02 14:29:25 -03:00
Thiago Santos
7a5797d3a6 opusdec: improve getcaps to return all possible rates
The library is capable of converting to different rates.

Includes tests.

https://bugzilla.gnome.org/show_bug.cgi?id=765684
2016-05-02 14:29:25 -03:00
Thiago Santos
823832e293 opusdec: remove artificial restriction on rate negotiation
Remove restrictions when rate is 48000, the underlying lib supports
converting any of the input to any of the output rates.

https://bugzilla.gnome.org/show_bug.cgi?id=765684
2016-05-02 14:29:25 -03:00
Thiago Santos
b1153e0f7d opusdec: refactor getcaps repeated code into a function
Easier to read and maintain
2016-05-02 14:23:54 -03:00
Guillaume Desmottes
8d6e315b01 opusdec: fix caps leaks
The caps returned by gst_pad_get_allowed_caps() was leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=765706
2016-04-28 09:18:53 +01:00
Guillaume Desmottes
6e7fa6659f alsa: properly convert position-less channels from ALSA
The only way for ALSA to expose a position-less multi channels is to
return an array full of SND_CHMAP_MONO. Converting this to a
GST_AUDIO_CHANNEL_POSITION_MONO array would be invalid as
GST_AUDIO_CHANNEL_POSITION_MONO is meant to be used only with one
channel.

Fix this by using GST_AUDIO_CHANNEL_POSITION_NONE which is meant to be
used for position-less channels.

https://bugzilla.gnome.org/show_bug.cgi?id=763799
2016-04-12 14:48:30 -04:00
Guillaume Desmottes
eef7312169 alsa: add some debugging output to alsa_detect_channels_mapping()
https://bugzilla.gnome.org/show_bug.cgi?id=763985
2016-04-12 14:48:30 -04:00
Guillaume Desmottes
d9268a50f1 alsa: factor out alsa_detect_channels_mapping()
This code was duplicated in alsasrc and alsasink.

https://bugzilla.gnome.org/show_bug.cgi?id=763985
2016-04-12 14:34:13 -04:00
Guillaume Desmottes
592b87a463 alsa: coding style fix
Was using tabs instead of spaces.

https://bugzilla.gnome.org/show_bug.cgi?id=763985
2016-04-12 14:34:13 -04:00
Matthew Waters
5e11ec7164 glbasemixer: chain up to the parent implementation 2016-04-12 09:39:32 +10: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
71877db25f glmixer: set the current texture to 0 before mapping
If we fail mapping, we don't want to use undefined video data in the subclass.
2016-04-05 16:24:53 +10:00
Matthew Waters
efc1299426 glmixerbin: proxy the start-time-* properties from aggregator 2016-04-04 20:54:23 +10:00
Vineeth TM
8741806671 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Vineeth TM
44b70ca3a1 base: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763075
2016-03-24 14:25:41 +02:00
Matthew Waters
81d724a325 glstereo{mix,split}: allow running on GLES 2/3
It's mostly supported for GLES 2.x, fully supported on GLES 3.x
2016-03-17 02:28:32 +11:00
Lubosz Sarnecki
8a443784c4 basetextoverlay: Add new properties and alignment type for unclamped absolute positions
Introduces [x-absolute, y-absolute] properties
for positioning in +/- MAX_DOUBLE range.

Adds new (h/v)alignment type "absolute" where coordinates
map the text area to be exactly inside of video canvas for [0, 0] - [1, 1]:

[0, 0]: Top-Lefts of video and text are aligned
[0.5, 0.5]: Centers are aligned
[1, 1]: Bottom-Rights are aligned

https://bugzilla.gnome.org/show_bug.cgi?id=761251
2016-03-11 13:20:26 +00:00
Tim-Philipp Müller
241fcaa645 Revert "textoverlay: Do not limit positioning to video area."
This reverts commit a48daf6dd8.

This changed behaviour in a way that's not always
backwards-compatible.

https://bugzilla.gnome.org/show_bug.cgi?id=761251
2016-03-11 13:15:53 +00:00
Tim-Philipp Müller
aade5515ac theora: fix performance category initialisation
Remove unused _register() functions and look up the performance
debug category in a function that's actually called at some point.
2016-03-09 09:56:52 +00: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
Vincent Penquerc'h
603e2fe24a oggdemux: fix chaining causing running time to restart from 0
This fixes:
gst-play-1.0 http://relay-nyc.gameowls.com:8000/chiptune.ogg

https://bugzilla.gnome.org/show_bug.cgi?id=758282
2016-03-04 12:18:53 +00:00
Havard Graff
461cdd8c26 opusdec: plug caps leak
https://bugzilla.gnome.org/show_bug.cgi?id=763059
2016-03-03 20:10:09 +00:00
Vincent Penquerc'h
625bd68da7 opus: fix mono<->stereo up/down-mixing
https://bugzilla.gnome.org/show_bug.cgi?id=761588
2016-02-26 16:15:20 +00:00
Tim-Philipp Müller
8b48fc1569 opusenc: remove deprecated "cbr", "audio", and "constrained-vbr" properties
They have been replaced by "audio-type" and "bitrate-type".

https://bugzilla.gnome.org/show_bug.cgi?id=756282
2016-02-26 06:51:17 +00:00
Tim-Philipp Müller
f331412a37 opus: move Opus audio decoder and encoder from -bad to -base
Hook into build system after moving history.

https://bugzilla.gnome.org/show_bug.cgi?id=756282
2016-02-26 00:20:10 +00:00
Tim-Philipp Müller
a2eb430010 Merge branch 'plugin-move-opus'
Move Opus decoder and encoder from -bad to -base.

https://bugzilla.gnome.org/show_bug.cgi?id=756282
2016-02-25 23:51:42 +00: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
Matthew Waters
0d50d92279 gl: error out if the configured GL API is unsupported by our element
https://bugzilla.gnome.org/show_bug.cgi?id=759801
2016-02-22 20:52:54 +11:00
Tim-Philipp Müller
a62c7bd54c Fix use of undeclared core debug category symbols
libgstreamer currently exports some debug category
symbols GST_CAT_*, but those are not declared in any
public headers.

Some plugins and libgstvideo just use GST_DEBUG_CATEGORY_EXTERN()
to declare and use those, but that's just not right at
all, and it won't work on Windows with MSVC. Instead look
up the categories via the API.
2016-02-20 11:31:43 +00: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
Matthew Waters
a3b2d36abd glmixer: don't hold the object lock while calling into GL
Doing so can deadlock between the GL thread and the object lock e.g.
when performing reconfigure events in glimagesink on a resize event.

https://bugzilla.gnome.org/show_bug.cgi?id=760559
2016-02-17 10:30:45 +11:00
Lubosz Sarnecki
8e07203798 textoverlay: Expose rendering dimensions as properties.
In order to detect graphical user input on the
textoverlay, the resulting rendering properties
need to be exposed to applications.

Fixes delayx property declaration.

https://bugzilla.gnome.org/show_bug.cgi?id=761251
2016-02-04 13:25:48 +01:00
Lubosz Sarnecki
a48daf6dd8 textoverlay: Do not limit positioning to video area.
The current position property is limited to X,Y positions
in the range of [0, 1]. This patch allows full control
over the overlay position, including partially outside
of the video area.

https://bugzilla.gnome.org/show_bug.cgi?id=761251
2016-02-04 13:25:48 +01:00
Vincent Penquerc'h
1ef601e7d3 opus: fix FEC
FEC may only be used when PLC is enabled on the audio decoder,
as it relies on empty buffers to generate audio from the next
buffer. Hooking to the gap events doesn't work as the audio
decoder does not like more buffers output than it sends.

The length of data to generate using FEC from the next packet
is determined by rounding the gap duration to nearest. This
ensures that duration imprecision does not cause quantization
to 2.5 milliseconds less than available. Doing so causes the
Opus API to fail decoding. Such duration imprecision is common
in live cases.

The buffer to consider when determining the length of audio
to be decoded is the previous buffer when using FEC, and the
new buffer otherwise. In the FEC case, this means we determine
the amount of audio from the previous buffer, whether it was
missing or not (and get the data either from this buffer, or
the current one if the previous one was missing).
2016-02-03 16:36:10 +00:00
Vincent Penquerc'h
8e9345ec86 opusdec: fix wrong buffer being checked for missing data
This caused a decoding error if the resulting (wrong) buffer size
was passed to the Opus decoding API.

https://bugzilla.gnome.org/show_bug.cgi?id=758158
2016-02-02 15:22:55 +00: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
Arun Raghavan
af091928f3 alsa: Trivial doc update
alsasink now does more than just raw audio.
2016-01-25 18:31:17 +05:30
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
Vineeth TM
95bf0ae2ae plugins-bad: Fix example pipelines
rename gst-launch --> gst-launch-1.0
replace old elements with new elements(ffmpegcolorspace -> videoconvert, ffenc_** -> avenc_**)
fix caps in examples

https://bugzilla.gnome.org/show_bug.cgi?id=759432
2015-12-15 10:30:49 +00:00
Nicolas Dufresne
e7a59d2e08 Revert "alsasrc: Disable HW timestamp"
This reverts commit 3642e9a391.
2015-12-14 13:59:02 -05:00
Nicolas Dufresne
3642e9a391 alsasrc: Disable HW timestamp
This is a workaround for broken pulse module.
2015-12-14 13:39:02 -05:00
Matthew Waters
353b105816 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
Reynaldo H. Verdejo Pinochet
71c2ddd07d Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
2015-11-18 16:05:42 -08:00
Luis de Bethencourt
6463ff198e opusenc: avoid potential overflow expression
The result of the two expressions will be promoted to guint64 anyway,
perform all the arithmetic in 64 bits to avoid potential overflows.

CID 1338690, CID 1338691
2015-11-12 12:29:33 +00:00
Matthew Waters
c5f2c56fe2 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
Jan Schmidt
797a0ca376 vorbisdec: Re-init on new caps
If we get new input caps, then reset the decoder
ready for new headers and fresh data. Makes
chained oggs work when reusing the decoder.
2015-11-11 01:33:55 +11:00
Tim-Philipp Müller
2dd8148b30 glmixerbin: fix minor leak
Don't leak removed list node.
2015-11-06 13:00:55 +00:00
Sebastian Dröge
dd741e6412 opusdec: Update sink pad templates
We always require the channel-mapping-field. If it's 0 we require nothing
else, otherwise we need channels, stream-count and coupled count to be
available.
2015-11-05 12:11:19 +01:00
Sebastian Dröge
85984fa946 opusenc: Create an empty taglist if there is none
There always have to be 2 buffers in the streamheaders, even if
the comment buffer is basically empty.
2015-11-04 00:14:13 +02:00
Sebastian Dröge
4ca84a9b1a opus: Add proper support for multichannel audio
https://bugzilla.gnome.org/show_bug.cgi?id=757152
2015-11-03 20:35:41 +02:00
Sebastian Dröge
fc475ce01a opusdec: Handle GstAudioClippingMeta instead of the pre-skip field in the OpusHead
oggdemux is outputting the meta now, and only outputs if it should really
apply to the current buffer. Previously we would skip N samples also if we
started the decoder in the middle of the stream.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
328f9088f3 opusenc: Add GstAudioClippingMeta to buffers that need to be clipped
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
6b751360ae opusenc: Disable granule position calculations by the base class
It is doing the wrong thing because of the Opus pre-skip: while the timestamps
are shifted by the pre-skip, the granule positions are not shifted.

oggmux is doing the right thing here already.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
7773e1eb58 opusenc: Add some FIXME comments about calculating padding with LPC
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
4df2ffaad6 opusenc: Encode exactly the amount of samples we got as input and put correct timestamps on it
The first frame has lookahead less samples, the last frame might have some
padding or we might have to encode another frame of silence to get all our
input into the encoded data.

This is because of a) the lookahead at the beginning of the encoding, which
shifts all data by that amount of samples and b) the padding needed to fill
the very last frame completely.

Ideally we would use LPC to calculate something better than silence for the
padding to make the encoding as smooth as possible.

With this we get exactly the same amount of samples again in an
opusenc ! opusdec pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
6ffb90e037 opusenc: Put lookahead/pre-skip into the OpusHead header
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
cab8671f0c oggdemux: Create full Opus caps with all fields
https://bugzilla.gnome.org/show_bug.cgi?id=757152
2015-11-03 20:35:33 +02:00
Sebastian Dröge
0fa8d284c7 oggmux: Use GstAudioClippingMeta for Opus for accurate end clipping
... instead of relying on the segment. For the clipping at the start we assume
a proper value in the OpusHead, as generated by opusparse or opusenc.

Transmuxing in general is not guaranteed to produce the correct values, or
even have a OpusHead (e.g. when having RTP input).

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:33 +02:00
Sebastian Dröge
a135868262 oggdemux: Add GstAudioClippingMeta for Opus for accurate start/end clipping
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:33 +02:00
Sebastian Dröge
8a3be7323a oggdemux: Allow start clipping for Opus
The granulepos does not have the pre-skip subtracted while timestamps do,
and the last granulepos will be shorter by the number of samples that should
be dropped because of padding in the end.

As such, extrapolating the granule of the beginning of the first frame will
lead to a negative value, which is not a problem but intentional.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:33 +02:00
Luis de Bethencourt
2206ba473f oggmux: Print GstClockTimeDiff as a signed integer in debug logs 2015-11-02 16:36:35 +00:00
Luis de Bethencourt
799020804f oggdemux: Use GstClockTimeDiff and print signed integer in debug logs
Use GstClockTimeDiff and Clock macros to print signed integer time
differences in the debug logs.

https://bugzilla.gnome.org/show_bug.cgi?id=757480
2015-11-02 16:10:07 +00:00
Sebastian Dröge
9c195e37da opusdec: Assume 48kHz if no sample rate is given in the header 2015-11-02 09:36:46 +02:00
Sebastian Dröge
7cadfcb0b0 opusenc: Place 48kHz first in the caps
For all the other sample rates the encoder will have to resample internally.
2015-11-02 09:36:43 +02:00
Matthew Waters
5b07a52038 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
Sebastian Dröge
4fe12c1b09 alsa: Use 8 bit pointer type for byte-based pointer arithmetic
Usually these loops only run once, so there's no problem here. But sometimes
they run twice, and by adding the number of bytes to a 16 bit pointer type we
would advance twice as much as we should.

Also use snd_pcm_frames_to_bytes() in alsasrc to calculate
the number of bytes to skip, same as we do in alsasink.

Thanks to Lucio A. Hernandez <lucio.a.hernandez@gmail.com> for reporting.
2015-10-14 00:33:49 +03: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
Antonio Ospite
2c7ed42292 midi: add an ALSA MIDI sequencer source
The alsamidisrc element allows to get input event from ALSA MIDI
sequencer devices, and possibly convert them to sound using some
downstream element like fluiddec.

Fixes #738687
2015-10-01 21:43:21 +02:00
Luis de Bethencourt
8ae0fd3990 visual: merge audiovisalizer base classes
Move the audiovisualizer base class to pbutils, so it can be used by plugins
from other modules

https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-10-01 16:05:58 +01:00
Matthew Waters
a238af84a0 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
Prashant Gotarne
e58ad7a2b4 basetextoverlay: fix typo in debug log message
https://bugzilla.gnome.org/show_bug.cgi?id=755198
2015-09-18 08:50:52 +01:00
Jan Schmidt
d5f2742ad0 Don't throw compiler warnings with G_DISABLE_ASSERT
Disable code that warns about unused variables when G_DISABLE_ASSERT
is defined, as it is in tarballs and pre-releases.
2015-09-18 00:29:51 +10:00
Vineeth T M
78e07d02eb gl: Fix GError leaks during failures
https://bugzilla.gnome.org/show_bug.cgi?id=755140
2015-09-17 11:52:55 +02:00
Thiago Santos
54a5859960 opusdec: remove check for number of channels
opus decoder can convert from different number of channels, no
need to check, just let it negotiate and create a new decoder if
needed.

https://bugzilla.gnome.org/show_bug.cgi?id=755059
2015-09-15 16:00:43 -03:00
Miguel París Díaz
a4ffb14c55 opusenc: improve deprecated properties docs
https://bugzilla.gnome.org/show_bug.cgi?id=754819
2015-09-11 23:33:19 +02:00
Miguel París Díaz
16e93d206f opusenc: do not throw g_warning when getting deprecated properties
https://bugzilla.gnome.org/show_bug.cgi?id=754819
2015-09-11 23:33:19 +02:00
Prashant Gotarne
7447736be9 basetextoverlay: FIX crash if padding greater than video size
Skipping rendering of textimage if overlay is completely
outside video frame.

https://bugzilla.gnome.org/show_bug.cgi?id=754429
2015-09-03 10:15:39 -04:00
Thiago Santos
f1cbca9480 audioencoders: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and
should be enough

Elements: faac, gsmenc, opusenc, sbcenc, voamrwbenc, adpcmenc, sirenenc
2015-08-17 10:07:54 -03:00
Thiago Santos
14867e4ebb vorbisenc: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and
should be enough
2015-08-16 12:30:30 -03:00
Thiago Santos
6a26a42ffd vorbisenc: use more accurate sink pad template caps
Removes the need for custom caps query handling and makes it more
correct from the beginning on the template. It is a bit uglier
to read because there is 1 entry per channel but makes code easier
to maintain.
2015-08-16 12:30:30 -03:00
Thiago Santos
cd7c7dba70 theoraenc: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and
should be enough
2015-08-16 12:30:30 -03:00
Thiago Santos
eada1366bc audiodecoders: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an
accept-caps query

Elements: dtsdec, faad, gsmdec, mpg123audiodec, opusdec,
          sbcdec, adpcmdec, sirendec
2015-08-15 13:51:16 -03:00
Thiago Santos
065968c3fc vorbisdec: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an
accept-caps query
2015-08-15 13:44:35 -03:00
Thiago Santos
0ea4430522 theoradec: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an
accept-caps query
2015-08-15 13:44:35 -03:00
Tim-Philipp Müller
741d23f06c theoraenc: mention videorate is often needed in docs
https://bugzilla.gnome.org/show_bug.cgi?id=748877
2015-08-11 15:10:19 +01:00
Olivier Crête
4665c0802a oggdemux: Set chain pointers to NULL
Otherwise, they will refer to freed memory

https://bugzilla.gnome.org/show_bug.cgi?id=753078
2015-08-06 17:40:40 +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
315857dce6 oggdemux: Return FLUSHING if pad if flushing
If the initial seek fails because the pad is
flushing, then return GST_FLOW_FLUSHING instead
of an error.
2015-07-30 18:43:19 -04:00
Luis de Bethencourt
7e67bcba2f glstereomix: remove redundant initialization
v is initialized in the for loop init, no need to do it twice. Removing
first initialization.
2015-07-29 17:49:01 +01:00
Sebastian Dröge
5830db7050 textoverlay: Query downstream caps for checking if caps features are supported, not just accept-caps
accept-caps is not recursive and might stop at the next downstream element,
while caps queries are generally recursive. The next element might accept any
capsfeatures we want, but that doesn't mean that further downstream it will
also work.

Additionally for the future:
We should probably check if downstream *prefers* the
overlay meta, and only enforce usage of it if we can't handle
the format ourselves and thus would have to drop the overlays.
Otherwise we should prefer what downstream wants here.
2015-07-28 14:14:50 +03:00
Nirbheek Chauhan
f04d4dd7c8 opuscommon: Use GString instead of snprintf for concating
Safer, easier to understand, and more portable. Also, skip
all this if the log level is too low.
2015-07-27 15:24:19 +01:00
Nicolas Dufresne
d4759f05f1 basetextoverlay: Use the extents rectangle for positioning
the extents rectangle is what you need to know to properly position
a buffer that has been rendered in a surface of the ink rectangle
size. This patch make the placement on par with the placement we had
before without having to over allocate.

This patch also enable placement for vertical rendering. Note that
the halginement, valighment and line-alignment default are set to
the previous default when this property is set. This is for backward
compatibility, you can change the value after setting vertical render.

https://bugzilla.gnome.org/show_bug.cgi?id=728636
2015-07-24 16:43:59 -04:00
Nicolas Dufresne
7569a2e932 basetextoverlay: Fix clipping issues
This patch uses the ink rectangle in order to compute the size
of the surface require to render. It also correctly compute the
transformation matrix as the ink_rect position might not be at
0, 0. Additionally, shadow_offset and outline_offset (which is
in fact the diameter of a dot, not a really an offset) is now
taken into account. Redundant matrix operation has been removed
for the vertical rendering.

Take note that the matrix operation in cairo are excuted in
reverse order.

https://bugzilla.gnome.org/show_bug.cgi?id=728636
2015-07-24 16:43:59 -04: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
Nicolas Dufresne
f9e6d38bf9 basetextoverlay: Improve further the negotiation function
* Only send the caps event once if the query had support for the
  overlay composition meta.
* Only do the allocation query if it is supported through caps.
* Send overlay_caps before doing allocation query rather then normal
  caps

https://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-22 17:01:03 -04:00
Rico Tzschichholz
c549523e7b basetextoverlay: Add missing linking against -lm 2015-07-22 14:51:29 -04:00
Nicolas Dufresne
48f877ea91 basetextoverlay: Ensure meta coordinate are in stream scale
The GstVideoOverlayComposition meta coordinates should always be
in stream scale, regardless of the window size downstream. This
way the sink can always scale the composition if the window size
have changed after a buffer (with his meta) was rendered before.

https://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-22 13:24:04 -04:00
Nicolas Dufresne
db81a73dba basetextoverlay: Reorder and cleanup class attribute
Also add a minimum amount of comment so we can understand what
is doing what.

https://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-22 13:24:04 -04:00
Julien Isorce
884e68c713 gl: use gst_gl_display_create_context in more elements.
glbasefilter, glbasemixer and gltestsrc.

https://bugzilla.gnome.org/show_bug.cgi?id=750310
2015-07-21 11:37:21 +01:00
Nicolas Dufresne
a2e4ccc38b basetextoverlay: Fix upstream composition handling
We need to update the render when upstream composition changes
or if it was removed.

http://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 16:26:39 -04:00
Nicolas Dufresne
d10959fd36 basetextoverlay: Clear reconfigure flags before negotation
This avoids negotiating twice. Current the _setcaps() patch does
not clear the initial reconfigure flags, which lead to systematic
double renegotiation.

http://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 16:26:33 -04:00
Nicolas Dufresne
2308014963 basetestoverlay: Always query window dimension
Remove the optimization to skip allocation query so we can
always have the latest window size information. Also, correctly
deal with the case where there is no window size information.

http://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 16:26:19 -04:00
Nicolas Dufresne
a64a343077 basetextoverlay: Send caps before doing allocation query
This is currently a limitation of BaseTransform base class. Which means
pretty much every filters out there.

http://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 15:11:06 -04:00
Lubosz Sarnecki
d1808a5dbf basetextoverlay: Log GstVideoOverlayComposition negotiation
https://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 15:09:22 -04:00
Lubosz Sarnecki
91a615fa89 basetextoverlay: Receive window size event and adjust rendering
* cache window size event and update handle ratio
* init width with 1, don't use 0
* don't update overlay when receiving same window size
* receive window size from allocation query

https://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 15:09:22 -04:00
Lubosz Sarnecki
f128666834 basetestoverlay: Pass down meta buffers from upstream that supports GstVideoOverlayComposition
This makes pipelines with multiple textoverlay elements possible.
The meta data is collected from the upstream textoverlay element,
merged into a new GstVideoOverlayComposition and passed down downstream.

https://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 15:09:22 -04:00
Carlos Rafael Giani
e5409361b8 opusdec: Fix PLC frame size calculations
Previously, PLC frames always had a length of 120ms, which caused audio
quality degradation and synchronization errors. Fix this by calculating an
appropriate length for the PLC frame.

The length must be a multiple of 2.5ms. Calculate a multiple of 2.5ms that
is nearest to the current PLC length. Any leftover PLC length that didn't
make it into this frame is accumulated for the next PLC frame.

https://bugzilla.gnome.org/show_bug.cgi?id=725167
2015-07-20 13:25:43 -04:00
Tim-Philipp Müller
6020b0cf2b Update mailing list address from sourceforge to freedesktop 2015-07-16 17:17:16 +01:00
Stefan Sauer
75cc08d451 docs: order and canonicalize the -sections.txt file
Have all sections in alphabetical order. Also make the macro order consistent.
This is a preparation for generating the file. Remove GET_CLASS macro for
some elements, since it is not used and the header is not installed.
2015-07-03 21:16:27 +02:00
Stefan Sauer
26f7fb9697 cdparanoiasrc: remove unused defines 2015-07-03 21:09:29 +02:00
Olivier Crête
50d5d0a161 glvideomixer, glmixer: Add description and klass 2015-07-03 12:28:47 -04:00
Nicolas Dufresne
91f2f1874c basetextoverlay: Fix bug with unused upstream_has_meta
The intention was to skip the allocation query if upstream has decided
to use the overlay meta feature in the caps. We can safely assume that
upstream have done that query already before making this decision. This
is an optimization since doing allocation queries is relatively
expensive.

CID #1308943
2015-07-02 10:47:45 -04:00
Nicolas Dufresne
828f0291bf Revert "basetextoverlay: remove dead code"
This reverts commit e863e5f8a9.
2015-07-02 10:27:39 -04:00
Luis de Bethencourt
e863e5f8a9 basetextoverlay: remove dead code
upstream_has_meta is set to FALSE and never changed. The two checks for if
upstream_has_meta will never go to the true branch. Removing the boolean
and the true branches of these checks.

CID #1308943
2015-07-02 14:58:38 +01:00
Nicolas Dufresne
1c66a33c56 gl: Don't leak pool if set_config failed 2015-07-02 09:40:05 -04:00
Guillaume Desmottes
a5dcce98aa oggdemux: set building_chain to NULL when deactivating chain
The chain is about to be invalidated so we shouldn't keep it around.
Prevent a double free crash when the demuxer is being finalized.

https://bugzilla.gnome.org/show_bug.cgi?id=751000
2015-06-22 14:09:51 +02:00
Mersad Jelacic
de5500b6a9 opusenc: Add bitrate to the tags
https://bugzilla.gnome.org/show_bug.cgi?id=750992
2015-06-22 13:49:34 +02:00
Jan Schmidt
92aacf5760 gl: Add glviewconvert, glstereomix and glstereosplit elements
Conversion elements for transforming multiview/stereoscopic video

https://bugzilla.gnome.org/show_bug.cgi?id=611157
2015-06-19 01:49:33 +10:00
Lazar Claudiu
f5906122fb basetextoverlay: add "draw-shadow" and "draw-outline" properties
https://bugzilla.gnome.org/show_bug.cgi?id=749823
2015-06-14 17:56:29 +01:00
Matthew Waters
acd6b876db glmixerbin: implement proper dynamic pad removal
https://bugzilla.gnome.org/show_bug.cgi?id=750881
2015-06-13 18:47:13 +10:00
Nicolas Dufresne
7e47aaf1b9 basetextoverlay: Rewrite negotiation method
This cleanup the negotiation function by properly splitting the probe
and the decisions. This allow handling correctly pipeline where upstream
caps have special memory type. An example pipeline is:

  gltestsrc ! textoverlay text=bla ! fakesink

The upstream caps will be memory:GLMemory, which isn't supported by the
blitter.

https://bugzilla.gnome.org/show_bug.cgi?id=749243
2015-06-12 19:58:39 -04:00
Sebastian Dröge
2014cb4aa7 gl: Use gst_object_ref_sink() for gl{filter,mixer,src}bin too 2015-06-11 15:22:04 +02:00
Carlos Rafael Giani
8f339c0932 alsa: report recoverable device failures to base class
This gives custom slave methods in the base class a chance to
resynchronize themselves

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>

https://bugzilla.gnome.org/show_bug.cgi?id=708362
2015-06-09 21:51:05 +10:00
Luis de Bethencourt
7423eafa85 libvisual: clean dereferences of private structures
https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-06-07 18:49:48 +01:00
Luis de Bethencourt
380d68fbe5 libvisual: make private all variable subclasses don't need
https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-06-07 18:23:23 +01:00
Thiago Santos
e9f055f95b Fix a common typo: retreive -> retrieve
Seems to have been copy pasted around a few places
2015-06-05 09:43:35 -03:00
Sebastian Dröge
0ea7a89c14 opusdec: If channel/rate negotiation fails, fall back to stereo and 48kHz 2015-06-04 11:54:24 +02:00
Sebastian Dröge
cecb83e590 opusdec: gst_structure_fixate_field_nearest_int() only works if the structure has this field
Just set the rate/channels directly if the caps don't have this field.
2015-06-04 11:45:05 +02:00
Claudiu Florin Lazar
af7a311c1c basetextoverlay: make deltax and deltay properties controllable
This will be more useful once we have absolute direct
control bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=749824
2015-05-26 09:24:16 +01:00
Guillaume Desmottes
1c10b58cce oggdemux: fix chain leak
Don't leak the building_chain when destroying.

Fix leaks with the validate.http.playback.reverse_playback.vorbis_theora_1_ogg
scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=748964
2015-05-26 08:28:23 +01: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
Tim-Philipp Müller
0a3b584aa0 Revert "oggdemux: Prevent seeks when _SCHEDULING_FLAG_SEQUENTIAL is set"
This reverts commit 76647f2710.

Avoiding pull mode activation is a feature regression, and
demuxers should always use pull mode where that is possible,
e.g. if there's an upstream queue2 with a ring buffer or
a download buffer.

This patch made reverse playback no longer possible over http.

If the goal is to minimise seeks, then that can still be done
by making the demuxer behave differently in pull mode if
the SEQUENTIAL flag is set. If there are bugs, like the demuxer
needlessly scanning the entire file on start-up in pull mode,
then those should be fixed instead.

https://bugzilla.gnome.org/show_bug.cgi?id=746010
2015-05-20 10:28:30 +01: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
d3d7498878 gl: don't deadlock on context creation failure
https://bugzilla.gnome.org/show_bug.cgi?id=749284
2015-05-13 23:56:48 +10:00
Sebastian Dröge
e6859acff2 glmixerbin: Don't unref pad templates
Otherwise we unref the reference that is owned by the element class.
2015-05-13 15:42:50 +03: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
fa6dbaeb6c 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.
2015-05-11 16:34:26 +03:00
Tim-Philipp Müller
4343c3bff8 docs: fix up example pipeline 2015-05-10 11:42:21 +01:00
Tim-Philipp Müller
ec5c93f169 docs: update element example pipelines
- gst-launch -> gst-launch-1.0
- use autoaudiosink and audiovideosink more often
- review pipeline examples and descriptions
2015-05-10 11:38:19 +01:00
Sebastian Dröge
ee275a167d Revert "gl: readd glupload/download onto element pads"
This reverts commit 87d8270f30.
2015-05-06 15:46:49 +02:00
Sebastian Dröge
824bb6acf8 Revert "Revert "glvideomixer: implement with glmixerbin""
This reverts commit b4bd11f2f3.
2015-05-06 15:43:32 +02:00
Jose Antonio Santos Cadenas
8dde6b170b opusheader: Do not include rate in caps if it is 0
As expressed in gst_opus_header_create_caps, value 0 means unset.
Setting rate value to 0 make negotiation with decoder fail.

https://bugzilla.gnome.org/show_bug.cgi?id=748875
2015-05-04 10:50:42 +02:00
Young Han Lee
bd40d2e33f oggdemux: remove unused code
These lines have done nothing for about 10 years.

https://bugzilla.gnome.org/show_bug.cgi?id=748820
2015-05-03 13:33:01 +01:00
Matthew Waters
2c7c82d748 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
2015-04-30 11:26:33 +10:00
Matthew Waters
a9fc9344a3 Revert "glvideomixer: implement with glmixerbin"
This reverts commit 0fb56738a1.
2015-04-30 11:26:33 +10:00
Tim-Philipp Müller
97c3e548d6 opus: fix includes and compilation against opus in non-standard prefix
https://bugzilla.gnome.org/show_bug.cgi?id=748594
2015-04-28 17:24:04 +01:00
Mersad Jelacic
443cc3baab opus: don't use deprecated gst_buffer_new_and_alloc
Use the helper function available in the base class instead.

https://bugzilla.gnome.org/show_bug.cgi?id=748585
2015-04-28 16:36:02 +01:00
Matthew Waters
993e682a4b glupload: provide the sink template caps that could be used
https://bugzilla.gnome.org/show_bug.cgi?id=746399
2015-04-28 20:13:48 +10:00
Matthew Waters
8930bf7c07 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
2015-04-27 15:20:56 +10:00
Tim-Philipp Müller
c680e324bc Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:42:34 +01:00
Stefan Sauer
7e8e020cfd audiovisualizer: fix the license from GPL to LGPL
This was a copy'n'paste buf in the initial commit done by myself.
2015-04-25 18:45:50 +02:00
Guillaume Desmottes
d31472fde7 oggdemux: fix event leaks
gst_event_replace() takes its own reference on the event so we should drop
ours after creating and storing an event using it.

This fix leaks which can be reproduced using the
validate.http.media_check.vorbis_theora_1_ogg scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=748247
2015-04-23 11:02:45 +01:00
Vineeth T M
52a40dfc48 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
2015-04-22 22:33:28 +10:00
Matthew Waters
66a5cad6c1 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.
2015-04-21 12:55:24 +10:00
Guillaume Desmottes
9827138061 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>
2015-04-20 09:05:11 +01:00
Guillaume Desmottes
516dc5e302 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>
2015-04-17 14:28:37 +01:00
Guillaume Desmottes
293d6a7ebe 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>
2015-04-17 14:28:25 +01:00
Sebastian Dröge
78a1841c86 gl: Remove some empty ::finalize() implementations 2015-04-17 14:09:47 +02:00
Guillaume Desmottes
e9a6cafa13 basetextoverlay: fix buffer leak in chain function
If we don't consume the buffer by passing its reference to
overlay->text_buffer then we need to unref it.

Fix a leak with validate.file.playback.fast_forward.test5_mkv
when running inside Valgrind.

https://bugzilla.gnome.org/show_bug.cgi?id=747602
2015-04-10 10:12:19 +01:00
Vincent Penquerc'h
a44258dbe8 oggdemux: fix wrong duration on partial streams with a skeleton index
When a stream has a skeleton index, the stream time is taken from that
index. However, when part of the stream is captured, the index is
invalid as its offsets are now wrong. To avoid this, we ignore the index
when the last offset points beyond the end of the stream (when its
byte length is known).

https://bugzilla.gnome.org/show_bug.cgi?id=744070
2015-04-03 16:40:04 +01:00
Vincent Penquerc'h
b247001aa9 textoverlay: fix disappearing text with high deltax
When deltax is large enough to cause the text to push past the
width of the frame, it would disappear due to a bug in setting
the layout width.

While there, fix a log printing an incorrect width to set.

https://bugzilla.gnome.org/show_bug.cgi?id=739689
2015-04-03 16:14:23 +01:00
Vincent Penquerc'h
b590a843f4 oggmux: fix deadlock when not pulling a buffer from collectpads
oggmux keeps a cached buffer per pad, and pulls buffers from
collectpads to this cached buffer for all pads before processing
the best pad. In some cases, the move from collectpads buffer
to cached buffer is delayed till next call. However, when there
is only one pad, this can't be delayed till next call as there
will be a deadlock since collectpads has no other pad to push to.

https://bugzilla.gnome.org/show_bug.cgi?id=740565
2015-04-03 15:52:54 +01:00
Arun Raghavan
20af81edb5 opus: Fix incorrect fall-through condition in property getter 2015-04-03 11:47:09 +05:30
Guillaume Desmottes
452d7b04e3 oggdemux: don't use GST_ERROR() for debug messages
Fix https://bugzilla.gnome.org/show_bug.cgi?id=746457
2015-04-01 16:06:42 +01:00
Edward Hervey
9a73ffcef3 glvideomixer: Don't use context if not present
Avoids assertions at runtime
2015-03-31 16:31:18 +02:00
Mark Nauwelaerts
d1f91723be oggdemux: resurrect some flow return handling
https://bugzilla.gnome.org/show_bug.cgi?id=744572
2015-03-29 13:51:05 +02:00
Nicolas Dufresne
6ba8d385e3 Revert "theoradec: Disable usage of crop meta"
This reverts commit da52868f46.
2015-03-24 15:47:20 -04:00
Nicolas Dufresne
da52868f46 theoradec: Disable usage of crop meta
This is a temporary workaround that simply disables usage of crop
meta for now.

https://bugzilla.gnome.org/show_bug.cgi?id=741030
2015-03-24 14:36:12 -04:00
Luis de Bethencourt
56485e3b14 opusenc: fall through switch statement
Adding a comment makes coverity happy and quells the issue.

CID 1291629
2015-03-24 15:14:05 +00:00
Sebastian Dröge
6f33c20b00 opusenc: Set output format immediately after creating the encoder instance
We know the caps by then, there's no need to wait until we actually receive
the first buffer.
2015-03-23 13:15:30 +01:00
Sebastian Dröge
78634dc2c3 opusenc: Remove another unused variable 2015-03-23 13:13:35 +01:00