Commit graph

6995 commits

Author SHA1 Message Date
Matthew Waters
ca476f03a8 glcontext: fixup error in sharegroup comment 2017-12-09 19:31:47 +00:00
Matthew Waters
817417c005 glcontext: detect the sharegroup case where the context are in different chains
In the end they will lead to the same root context in the tree so check that
for equality.
2017-12-09 19:31:47 +00:00
Matthew Waters
80be2d046b glfilter: silence a warning with empty input caps
discovered with the doublecube example

gst_caps_get_features: assertion 'index < GST_CAPS_LEN (caps)' failed
2017-12-09 19:31:47 +00:00
Sebastian Dröge
ec0d04acec gl/cocoa: Switch from our custom main loop to a GMainLoop
Simplifies code a lot and makes it more similar to the other backends.
2017-12-09 19:31:46 +00:00
Sebastian Dröge
6c8f7f9dd5 gl/cocoa: Clear the current GL context when it should happen 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
Matthew Waters
ccf8f014f0 glupload: fallback to upload if contexts cannot share GL resources
Fixes pipelines of the form

    gleffects ! tee ! glimagesink

as tee does not pass on the allocation query.
2017-12-09 19:31:46 +00:00
Matthew Waters
14630fac38 glcontext: add gst_gl_context_can_share
Which determines whether two GstGLContext's can share sharable
OpenGL resources.
2017-12-09 19:31:46 +00:00
Sebastian Dröge
9dd4f40ad6 gl: Let gst_gl_context_get_thread() return a new reference to the GThread
Otherwise it might go away in the meantime and the caller has some random pointer.
2017-12-09 19:31:46 +00:00
Anuj Jaiswal
e9e84da30a gl: consecutive return, break statement
Signed-off-by: Anuj Jaiswal <anuj.jaiswal@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=736939
2017-12-09 19:31:46 +00:00
Matthew Waters
678e7b49b2 gl/debug: desktop GL does not have the KHR suffixes 2017-12-09 19:31:46 +00:00
Tim-Philipp Müller
9cccbb315c gl: add since markers for new API 2017-12-09 19:31:46 +00:00
Matthew Waters
a793bda9b4 glmemory: add debug line for freeing textures 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
Matthew Waters
4e75ceba46 glcontext: add API to retreive the thread that context is active in 2017-12-09 19:31:46 +00:00
Ognyan Tonchev
7e21e35eac glfilter: do not leak pool in error cases
https://bugzilla.gnome.org/show_bug.cgi?id=736732
2017-12-09 19:31:46 +00:00
Vasilis Liaskovitis
f803a9e746 GstGLWindow: Introduce navigation thread
This thread dispatches navigation events. It is needed to avoid deadlocks
between window backend threads that emit navigation events (e.g. X11/GMainLoop
thread) and consumers of navigation events such as glimagesink, see
https://bugzilla.gnome.org/show_bug.cgi?id=733661

GstGlWindow_x11 thread is changed to invoke the navigation thread for navigation
dispatching, instead of emiting the event itself. Othe backends beside X11 do
not dispatch navigation events yet, but should use this thread when dispatching
these events in the future.

The navigation thread is currently part of GstGLWindow and not implemented in
separate subclasses / backends. This will be needed in the future.

gst_gl_window_x11_get_surface_dimensions is also changed to use a cached value
of the window's width, height. These values are now retrieved in the X11
thread, function gst_gl_window_x11_handle_event. This change is needed because
otherwise the XGetWindowAttributes gets called from the navigation thread,
leading to xlib aborting due to multithreaded access (if XInitThreads is not
called before, as is the case for gst-launch)
2017-12-09 19:31:46 +00:00
Wang Xin-yu (王昕宇)
62bebdb4e6 gl: Add GSTGLAPI macro to the debug callback function
Fixes the Windows build.

https://bugzilla.gnome.org/show_bug.cgi?id=735565
2017-12-09 19:31:46 +00:00
Jan Schmidt
2d928bad1c egl: Wrap KHR_create_context flags in an ifdef
EGL_CONTEXT_FLAGS_KHR and EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR
don't exist in the Android NDK. Wrap their usage in an #ifdef
EGL_KHR_create_context to fix the build there.
2017-12-09 19:31:45 +00:00
Matthew Waters
f6930bc0b4 egl: fallback to a non-debug context if a debug one fails
The text for EGL_KHR_create_context added the possiblity for ES
contexts to ask for a debug context however that has not been
fully realized by all implementations.  Fallback to a non-debug
context when the implementation errors.
2017-12-09 19:31:45 +00:00
Lubosz Sarnecki
30591d664c gstopengl: add introspection support
https://bugzilla.gnome.org/show_bug.cgi?id=734482
2017-12-09 19:31:45 +00:00
Lubosz Sarnecki
67b9f71619 glshader: expose opengl handle in getter
https://bugzilla.gnome.org/show_bug.cgi?id=734482
2017-12-09 19:31:45 +00:00
Wang Xin-yu (王昕宇)
c8d1e4ad5f gl: check null before unref GstGLDisplay 2017-12-09 19:31:45 +00:00
Matthew Waters
ac2fdb0aed gl: add prototype definition for KHR_debug 2017-12-09 19:31:45 +00:00
Matthew Waters
61b95b0300 glcontext: implement the debug callback
For both GL_KHR_debug and ARB_debug_output.  This allows us to
receive errors and other hints from the GL instead of querying after
every GL operation.
2017-12-09 19:31:45 +00:00
Matthew Waters
d7a465f9da gl: add prototypes for KHR_debug/ARB_debug_output 2017-12-09 19:31:45 +00:00
Matthew Waters
a76fe07919 gl: don't take an extra ref on the display on set_context
gst_context_get_gl_display() returns a ref.  Don't take another in
gst_object_replace().
2017-12-09 19:31:45 +00:00
Tim-Philipp Müller
15cd3d3d5c glbufferpool: fix allocator leak in some cases
Spotted by Sebastian Rasmussen.

https://bugzilla.gnome.org/show_bug.cgi?id=734523
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
Wang Xin-yu (王昕宇)
f322a331c8 glupload: don't determine if frame needs upload by pointer compare
https://bugzilla.gnome.org/show_bug.cgi?id=734269
2017-12-09 19:31:45 +00:00
Matthew Waters
fab6790c7f gl/docs: remove superflous 'the' 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
4277d2742a glcontext: add a destroy function
that just calls the subclass
2017-12-09 19:31:45 +00:00
Matthew Waters
d3077a890c gl/x11: silence runtime warning
g_main_loop_quit: assertion 'loop != NULL' failed
2017-12-09 19:31:45 +00:00
Matthew Waters
9426c0793e glmemory: use the plane offsets to compute the size of the data pointer
Certain elements expect that there be a certain number of lines
that they can write into.  e.g. for odd heights, I420, YV12, NV12,
NV21 (and others) Y lines are expected to have exactly twice the
number of U/UV lines.

https://bugzilla.gnome.org/show_bug.cgi?id=733717
2017-12-09 19:31:45 +00:00
Matthew Waters
c216799b20 glmemory: use GstVideoInfo everywhere
Simplifies a lot of the calling code

https://bugzilla.gnome.org/show_bug.cgi?id=733717
2017-12-09 19:31:45 +00:00
Matthew Waters
2b82b78ef5 glmemory: reenable the texture_rg support for !eagl
The GST_GL_HAVE_PLATFORM_EAGL is always defined we need to compare
against the value instead.
2017-12-09 19:31:44 +00:00
Vasilis Liaskovitis
b1e821f731 glwindow/11: Emit signals for mouse and key navigation events
https://bugzilla.gnome.org/show_bug.cgi?id=703486
2017-12-09 19:31:44 +00:00
Sebastian Dröge
307db954fd glwindow: Constify string parameters to the send_*_event() functions 2017-12-09 19:31:44 +00:00
Vasilis Liaskovitis
6b38d58427 GstGLWindow : Add mouse-event and key-event signals for navigation
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
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
Julien Isorce
62ac6db6a0 glcocoa: initalize NSApp asap when using gst-launch
See https://bugzilla.gnome.org/show_bug.cgi?id=732661
2017-12-09 19:31:44 +00:00
Sebastian Dröge
f6ae4ab243 eagl: Disable usage of R and RG textures on iOS
They don't work currently and just render zeroes, while the
fallback code path with LUM and LUM_ALPHA textures still works.

https://bugzilla.gnome.org/show_bug.cgi?id=732390
2017-12-09 19:31:44 +00:00
Matthew Waters
216b5ec9a8 glcolorconvert: free pixel swizzling information 2017-12-09 19:31:44 +00:00
Matthew Waters
251c8a98ed glmixer: remove redundant/unused lock
Use the GstObject lock instead
2017-12-09 19:31:44 +00:00
Matthew Waters
21ea062cc8 glmixer: remove redundant creation and free of GPtrArrays
Also plugs a memory leak
2017-12-09 19:31:44 +00:00
Matthew Waters
4131456751 glmixer: plug a memory leak for the caps
gst_query_set_caps_result() takes a ref on the caps
2017-12-09 19:31:44 +00:00
Matthew Waters
6cea67b92a glmixer: intersect with the filtercaps if available 2017-12-09 19:31:44 +00:00
Matthew Waters
1e49da469d gl: update gles2 compatability header 2017-12-09 19:31:44 +00:00
Matthew Waters
730b88a677 glfilter: pass through the allocation query when in passthrough mode
Otherwise two GL elements on either side will fail to use the same
GL context.
2017-12-09 19:31:44 +00:00
Matthew Waters
3a20e70cbd glfilter: prefer passthrough for non-sysmem caps 2017-12-09 19:31:43 +00:00
Julien Isorce
7cdce1bdfc glfilter: handle NULL decide_query which means passthrough
See https://bugzilla.gnome.org/show_bug.cgi?id=732178
2017-12-09 19:31:43 +00:00
Julien Isorce
e016324d31 glfilter: prepend intersection to src caps
Prefer to stay in the same memory space if possible.
Also it let a chance to do passthrough.

See https://bugzilla.gnome.org/show_bug.cgi?id=732178
2017-12-09 19:31:43 +00:00
Matthew Waters
bcce615263 gl: add a scary note about initializing thread support for the winsys
We cannot do it as the winsys may crash if we initialize too late.

Example, GLX contexts with Intel drivers:
Intel requires the X Display to be the same in order to share GL
resources across GL contexts.  These GL contexts are generally
accessed from different threads.  Without winsys support it is
nearly impossible to guarentee that concurrent access will not
occur.  This concurrent access could result in crashes or abortion
by the winsys (xcb).

https://bugzilla.gnome.org/show_bug.cgi?id=731525
2017-12-09 19:31:43 +00:00
Matthew Waters
5fd0dc505e gluploadmeta: reenable GLMemory upload path 2017-12-09 19:31:43 +00:00
Matthew Waters
1f8c784131 gl: move gles2 compat header to glprototypes 2017-12-09 19:31:43 +00:00
Matthew Waters
ec8f3e58de glbufferpool: provide a consistent API regardless of platform 2017-12-09 19:31:43 +00:00
Matthew Waters
c399908c4b gl: mark library as API unstable 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
Matthew Waters
b2eb1b305c glframebuffer: don't segfault needlessly with GLES2
gst_gl_framebuffer_use_v2 was using a function that is not available
with GLES2
2017-12-09 19:31:43 +00:00
Matthew Waters
58fbcfdf1f gldownload: plug a memory leak 2017-12-09 19:31:43 +00:00
Matthew Waters
a656e76ac9 glmixer: allow the subclass to choose the sink pad type
Allows custom properties to be placed on the sink pads by subclasses
2017-12-09 19:31:43 +00:00
Matthew Waters
90eefa6e5a glmixer: send the stream-start event
and the caps event after.

https://bugzilla.gnome.org/show_bug.cgi?id=730944
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
6a7ccd6f3e glmixer: lock the size of mix->frames to the number of pads
Fixes a segfault with decodebin ! glmixer where the request pads on
both sides were being requested after the state change to PAUSED.

Also fixes dynamically adding and removing pads while glmixer is
in a state >= PAUSED.
2017-12-09 19:31:42 +00:00
Matthew Waters
5433010ab5 gl/wayland: create a dummy display instead of an EGLDisplay
Currently, GstGLWindowWaylandEGL holds the wayland display connection
If we create the EGLDisplay at the GstDisplay creation time, then
libEGL will internally open another connection to the wayland server.
These two display connections are unable to communicate resulting in
no window output/display and hangs inside libEGL.

Eventually we will move the wl_display from GstGLWindow to GstGLDisplay.
2017-12-09 19:31:42 +00:00
Matthew Waters
57a54e9de4 glupload: always release the previous buffer
Fixes the case where _perform_with_buffer() is called without
intervening calls to _release_buffer() as is the case on start up
with glimagesink.

Also release the buffer when reseting the upload.

https://bugzilla.gnome.org/show_bug.cgi?id=731107
2017-12-09 19:31:42 +00:00
Sebastian Dröge
188ae1c3b0 glcontext: Handle (unlikely) NULL return of gl->GetString (GL_VERSION) more gracefully
CID 1219858
2017-12-09 19:31:42 +00:00
Matthew Waters
ea8c49f106 glmemory: remove uneeded gl api ifdefs 2017-12-09 19:31:42 +00:00
Matthew Waters
384434b060 glwindow_x11: allow expose events to redraw our window
otherwise we will not update the window contents on low framerate
streams until the next buffer

https://bugzilla.gnome.org/show_bug.cgi?id=723529
2017-12-09 19:31:42 +00:00
Matthew Waters
b534e7e7af glcontext: fix up assertion
error: 'return' with no value, in function returning non-void
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
bfd8550bff glcontext: check for GLES versions 2017-12-09 19:31:42 +00:00
Matthew Waters
babef3069b gl/context: add check_gl_version 2017-12-09 19:31:42 +00:00
Edward Hervey
2ee94d606c glcontext: Try GLX support before EGL support
If available, glx has got a better chance of being the Gl platform
we want to use compared to EGL
2017-12-09 19:31:42 +00:00
Edward Hervey
14f844e1e9 glcontext: Try to open lib{EGL|GL|GLESv2}.so.1 before lib{EGL|GL|GLESv2}
Fixes issues with .so (without numbering) being installed for development
(such as from mesa-dev) but actual driver (with numbering) coming from
some other place (like nvidia drivers)
2017-12-09 19:31:42 +00:00
Sebastian Dröge
631278270f glupload: Fix assertion after API changes 2017-12-09 19:31:42 +00:00
Matthew Waters
5009338a50 gl/colorconvert: keep our private pointer
again, avoid to much trigger
2017-12-09 19:31:42 +00:00
Matthew Waters
04b2144ff1 gl/colorconvert: use GstObject's lock instead of our own 2017-12-09 19:31:42 +00:00
Matthew Waters
1544f66f26 gl/colorconvert: remove unnecassary pointer inderection 2017-12-09 19:31:42 +00:00
Matthew Waters
a22cb227a9 gl/upload: re add the upload meta to the private struct
try and avoid being to trigger happy
2017-12-09 19:31:42 +00:00
Matthew Waters
8b50888179 gl/upload: small code cleanup and gst-indent 2017-12-09 19:31:42 +00:00
Matthew Waters
82910401c8 gl/download: use GstObject's lock instead of out own 2017-12-09 19:31:42 +00:00
Matthew Waters
a147b2258b gl/upload: use GstObject's lock instead of our own 2017-12-09 19:31:42 +00:00
Matthew Waters
30a9843c02 gl/filter: also remove the width/height in transform_caps
allows scaling in the filters
2017-12-09 19:31:42 +00:00
Matthew Waters
8cf3a3a4f4 gl/colorconvert: optimise the same format case
simply return the input buffer unchanged
2017-12-09 19:31:41 +00:00
Matthew Waters
4fe67d48be gl/colorconvert: fix YUY2/UYVY download for RG/LA textures 2017-12-09 19:31:41 +00:00
Matthew Waters
8ac92cd90d gl/colorconvert: allocate output buffers
Allows the nop optimisation by simply reffing the input buffer.
2017-12-09 19:31:41 +00:00
Matthew Waters
738ebcaaba gl/upload: fix incorrect type in macros 2017-12-09 19:31:41 +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
Matthew Waters
1f6fceafa4 gl/win32: make send_message reentrant
I could not find a comparable win32API function so keep the running
thread pointer to compare against.

https://bugzilla.gnome.org/show_bug.cgi?id=730782
2017-12-09 19:31:41 +00:00
Tim-Philipp Müller
06351d4d9b glcolorconvert: fix compiler warning
gstglcolorconvert.c:1133:11: error: 'j' may be used uninitialized in this function

Was used uninitialized when jumping to out label
in error case.
2017-12-09 19:31:41 +00:00
Matthew Waters
625efc1757 gl/colorconvert: operate on buffers instead of memories 2017-12-09 19:31:41 +00:00
Julien Isorce
67c18fee19 gl: add missing cgl and eagl context type
https://bugzilla.gnome.org/show_bug.cgi?id=729245
2017-12-09 19:31:41 +00:00
Julien Isorce
b84a2eaf9f gl: rename platform cocoa to cgl
Before:
GST_GL_PLATFORM=cocoa GST_GL_WINDOW=cocoa
gst-launch-1.0 videotestsrc ! glimagesink

After:
GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa
gst-launch-1.0 videotestsrc ! glimagesink

but still pass --enable-cocoa to configure script
because currently it can only be used with cocoa API.

We could later have cgl/gstglcontext_cgl.h that manages
a CGLContextObj directly and cocoa/gstglcontext_cocoa.h
would just wrap it.
So that it could be used with other Apple's window APIs.

https://bugzilla.gnome.org/show_bug.cgi?id=729245
2017-12-09 19:31:41 +00:00
Matthew Waters
9349d39023 gl/mixer: don't segfault when we don't have a buffer
https://bugzilla.gnome.org/show_bug.cgi?id=729257
2017-12-09 19:31:41 +00:00
Matthew Waters
e502311ce4 gl/window_x11: avoid BadDrawable error on shutdown 2017-12-09 19:31:41 +00:00
Matthew Waters
f2bf233ce4 gl/context_egl: pass the vars in the right order to DestroySurface
https://bugzilla.gnome.org/show_bug.cgi?id=728514
2017-12-09 19:31:41 +00:00
Nicolas Dufresne
d85c344204 glfilter: Remove format information to allow color convert again
We also need to remove the format information,  as glfilter can do
color convertion. This code was imported from videoconvert.

https://bugzilla.gnome.org/show_bug.cgi?id=729861
2017-12-09 19:31:41 +00:00
Matthew Waters
ee04a6e6eb gl/memory: allocate the correct memory size
and avoid wasting resources we will never need

https://bugzilla.gnome.org/show_bug.cgi?id=730703
2017-12-09 19:31:41 +00:00
Nicolas Dufresne
73c73470a0 glcolorconvert: Fix YUY2 and UYVY support with luminance_alpha
https://bugzilla.gnome.org/show_bug.cgi?id=730666
2017-12-09 19:31:41 +00:00
Matthew Waters
146c666ba2 gl/memory: provide compatability defines
fixes build on android/OS X
2017-12-09 19:31:41 +00:00
Matthew Waters
2279713aa0 gl/colorconvert: remove scratch texture for YUY2/UYVY
We can get all our data from the one RG/LA texture with some shader magic.

https://bugzilla.gnome.org/show_bug.cgi?id=728890
2017-12-09 19:31:41 +00:00
Matthew Waters
b3d9563d6b gl/memory: RGBA/UNSIGNED_BYTE only format supported by ReadPixels GLES2
Error out in case we attempt to read with any other invalid format.
2017-12-09 19:31:41 +00:00
Matthew Waters
b3df031908 gl/memory: generate textures with a sized internal format
Required in order to generate RG and RED textured with GLES3.
2017-12-09 19:31:41 +00:00
Matthew Waters
132a233f7b gl/memory: implement GL_EXT_texture_rg support
Which is used by default over the Luminance formats due to it
being color renderable with fbos (and deprecation/removal with
GL 3.x).

https://bugzilla.gnome.org/show_bug.cgi?id=729750
https://bugzilla.gnome.org/show_bug.cgi?id=704222
https://bugzilla.gnome.org/show_bug.cgi?id=728890
2017-12-09 19:31:41 +00:00
Matthew Waters
4435c1c289 gl/context: add gl extension checking to check_feature()
Useful for extensions that do not define any new GL API entrypoints
but can still modify behaviour when used.
2017-12-09 19:31:41 +00:00
Matthew Waters
63831b7dd2 gl/download: fixup YUY2/UYVY download
Regression from 2da979831e as it did
not update the download code to reflect the change in texture format.
2017-12-09 19:31:41 +00:00
Matthew Waters
9cfd5e5d04 gl/filter: fixup passthrough bufferpool
In a pipeline like so:
  videotestsrc ! gleffects ! videoconvert ! sink
gleffects was simply passing the videoconvert bufferpool to videotestsrc
and not creating a glbufferpool. videobufferpool would then fail
to allocate from the glallocator.
2017-12-09 19:31:41 +00:00
Matthew Waters
313dfbb500 gl/upload: switch the 'master' texture for YUY2, UYVY
From d4bcef3204 on, using a RGBA
texture to hold the data causes the glmemory to have half width
and a scaling of [2, 1].  Using a LA texture solves this problem
however cannot be attached to the framebuffer for copying into
a RGBA texture.  Which will be solved by moving to EXT_texture_rg.

https://bugzilla.gnome.org/show_bug.cgi?id=728890
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
Matthew Waters
166d7b505c gl/context: add generic feature checking
At the moment it simply delegates to the subclass.
2017-12-09 19:31:40 +00:00
Sebastian Dröge
9fd7e34fee glcontext: Add more assertions to make sure that everything sets the GError during context creation if something fails 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
Matthew Waters
5efb69304a gl/colorconvert: fix up alpha clobbering
Previously it would only work if the alpha value was in the last
component (RGBx, BGRx).  Now it works wherever the alpha value may
be (xRGB, xBGR, etc).
2017-12-09 19:31:40 +00:00
Nicolas Dufresne
b4a0a26ddd glfilter: Fix building without EGL support
This fixes the OSX build and any builds with --disable-egl. That issue
was introduced in "glfilter: rewrite transform_caps to preserve caps fields".

https://bugzilla.gnome.org/show_bug.cgi?id=729861
2017-12-09 19:31:40 +00:00
Julien Isorce
a7156df9f4 glfilter: rewrite transform_caps to preserve caps fields
https://bugzilla.gnome.org/show_bug.cgi?id=729861
2017-12-09 19:31:40 +00:00
Matthew Waters
07b6bfeaa7 gl/colorconvert: use the texture scaling from the gl memory
The colorconvert values were not being used at all.

https://bugzilla.gnome.org/show_bug.cgi?id=729896
2017-12-09 19:31:40 +00:00
Nicolas Dufresne
157607989a glmemory: Fix handling of stride with alignement larger then 8
Setting a scaled factor for X coordinate is not enough as the indexer
will still think stride is shorter and will not fully skip it. Instead,
update width, so the lines are as expected. Combined with the scale, it
will hide the cropped portion.

https://bugzilla.gnome.org/show_bug.cgi?id=729896
2017-12-09 19:31:40 +00:00
Nicolas Dufresne
030fc8b7d0 glupload: Ensure we still have a texture after upload_set_format()
gst_gl_upload_set_format() resets the upload, hence the texture.
So we need to ensure we have a texture after this call when
uploading.
2017-12-09 19:31:40 +00:00
Nicolas Dufresne
b70edbff15 glupload: Correctly update the video info from video meta
Using gst_video_info_set_format() isn't complete when updating
a video info from video meta.
2017-12-09 19:31:40 +00:00
Nicolas Dufresne
2f705ac9ca glupload: Correctly update video info in upload fallback
When the upload accelerated method fails, we fallback to an upload,
but the video info was not correctly updated.
2017-12-09 19:31:40 +00:00
Julien Isorce
c16ab9e66b gl/upload: set out_tex after reset, not before
Fix a regression introduced recently with the lazy init.
It was happening when calling gst_video_gl_texture_upload_meta_upload
from an aplication. So not using gst_gl_upload_perform_with_buffer.
2017-12-09 19:31:40 +00:00
Matthew Waters
5cdfd51172 gl/upload: update the video info on mapping a video frame
The buffer should contain the most specific data on how the data is
formatted.  We should use this information.

https://bugzilla.gnome.org/show_bug.cgi?id=729896
2017-12-09 19:31:40 +00:00
Matthew Waters
480784e368 gl/convert: clobber alpha channel when needed
Needed in the conversion from padded RGB formats to formats with an
alpha channel.  e.g. BGRx -> ABGR, etc

https://bugzilla.gnome.org/show_bug.cgi?id=729742
2017-12-09 19:31:40 +00:00
Matthew Waters
59c388abca gl/upload: avoid performing color conversion when there is no need
One such example is when the buffer contains GstGLMemory in the
RGBA format

https://bugzilla.gnome.org/show_bug.cgi?id=729278
2017-12-09 19:31:40 +00:00
Matthew Waters
ae283ec9da gl/colorconvert: choose the right alpha component for AYUV -> RGBA 2017-12-09 19:31:40 +00:00
Matthew Waters
9fffa2cbc6 gl/upload: update the respective state when we cache textures/data 2017-12-09 19:31:40 +00:00
Matthew Waters
484ae5a8c5 gl/upload: cache the textures that we are using 2017-12-09 19:31:40 +00:00
Matthew Waters
a64efacd0e gl/upload: avoid recreating the GLMemory struct for output textures 2017-12-09 19:31:40 +00:00
Nicolas Dufresne
5c8acc21fe gl: Fix some of the error handling 2017-12-09 19:31:40 +00:00
Nicolas Dufresne
94aa3ea228 glupload: Update GstVideoInfo after the buffer is mapped
gst_video_frame_map() will store an updated video info base
on the video meta. In order to have the right stride and offset
we should update that video info accordingly.
2017-12-09 19:31:40 +00:00
Sebastian Dröge
43866270ef gl: Fix memory leak
CID #1212171
2017-12-09 19:31:40 +00:00
Matthew Waters
f213321083 gl/colorconvert: preserve alpha in AYUV <-> RGBA conversions
https://bugzilla.gnome.org/show_bug.cgi?id=729743
2017-12-09 19:31:40 +00:00
Matthew Waters
977c326c59 gl/colorconvert: implement lazy init 2017-12-09 19:31:40 +00:00
Julien Isorce
17ba668c7a gl/upload: set initted to TRUE when _init_upload succeeded 2017-12-09 19:31:40 +00:00
Sebastian Dröge
228eccdbdf gldisplay: Use GST_STR_NULL() for printing possibly NULL strings and print all variables we use
Fixes compiler warning about set but not used platform_choice variable
among other things.
2017-12-09 19:31:40 +00:00
Matthew Waters
83c2b906d1 gl/upload: fix compilation on OS X 2017-12-09 19:31:40 +00:00
Matthew Waters
862df41b2d gl/upload: fail propoerly if init fails 2017-12-09 19:31:39 +00:00
Matthew Waters
857200ff40 gl: make all GObjects inherit from GstObject
Aids memory leak debugging with GST_TRACE=mem-live
2017-12-09 19:31:39 +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
cda89d7ce0 gl/upload: add get_format method
Simply retreives the format set by init_format
2017-12-09 19:31:39 +00:00
Matthew Waters
6e5494d729 gl/filter: attempt to passthrough the pool if the caps are the same
Reduces the number of glbufferpool instances required for >=2
consecutive GL elements in a pipeline.
2017-12-09 19:31:39 +00:00
Matthew Waters
6872ad5ff5 gl/filter: always initialize the upload object 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
90bf46484d gl/display: avoid endless recursion for cocoa 2017-12-09 19:31:39 +00:00
Julien Isorce
d7c5444447 gl: do not allocate the target texture of an EGLImage
The target texture of an EGLImage is the texture bind just
before calling glEGLImageTargetTexture2D.

As we currently only support a gl texture as the source of an EGLImage
the gl texture is actually already allocated when creating the eglimage.

I also see some cases where it fails to upload an eglimage when
glTexImage2D is called on the target.
2017-12-09 19:31:39 +00:00
Julien Isorce
4bc96ae4cd gl: allow to avoid calling glTexImage2D(w, h, NULL) when generating a texture
Just pass 0 as width or height to gst_gl_context_gen_texture.
2017-12-09 19:31:39 +00:00
Julien Isorce
88864ea2cc gl: no need to initialize a frame buffer object to upload an eglimage
Fix https://bugzilla.gnome.org/show_bug.cgi?id=729588
2017-12-09 19:31:39 +00:00
Julien Isorce
bcc633ed2c gl: use GST_CAT_ERROR instead of GST_ERROR_OBJECT
It fixes segault when GST_DEBUG is at least level 1 and eglCreateImage fails
2017-12-09 19:31:39 +00:00
Julien Isorce
dd1c2b4c4c gl: delete texture used with GstVideoGLTextureUploadMeta 2017-12-09 19:31:39 +00:00
Julien Isorce
4b0e037fa4 gl: use gst_gl_context_gen_shader helper instead of duplicating code 2017-12-09 19:31:39 +00:00
Matthew Waters
59592f9bfc gl/display: clean up pre gstglcontext api and struct fields
https://bugzilla.gnome.org/show_bug.cgi?id=729551
2017-12-09 19:31:39 +00:00
Matthew Waters
f6ed9a685b gl/display: add get_handle_type
https://bugzilla.gnome.org/show_bug.cgi?id=729551
2017-12-09 19:31:39 +00:00
Matthew Waters
c5a11aa448 gl/display: avoid opening the X11 display on systems with Cocoa (OS X)
https://bugzilla.gnome.org/show_bug.cgi?id=729551
2017-12-09 19:31:39 +00:00
Matthew Waters
6a2f2088e9 gl/window: fix string length check for eagl 2017-12-09 19:31:39 +00:00
Matthew Waters
320ceef471 gl/display: check the correct env variable for choosing an egl display
GST_GL_WINDOW is used for window system specific choices.
An EGLDisplay can be created from window systems with egl support by using
eglGetDisplay().

https://bugzilla.gnome.org/show_bug.cgi?id=729551
2017-12-09 19:31:39 +00:00
Edward Hervey
47a4be4721 gl/cocoa: Use OBJCFLAGS where needed
Should fix usage of c-compiler-only flags with an objective-c compiler
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
Julien Isorce
2fed41dc30 gl: show internal cocoa window on top of others
Useful when your OSX terminal is fullscreen

https://bugzilla.gnome.org/show_bug.cgi?id=728127
2017-12-09 19:31:39 +00:00
Matthew Waters
db544c3c1f gl/pool: init the upload object on start
Theoretically, set_config could be called multiple times
2017-12-09 19:31:38 +00:00
Sebastian Dröge
8c56e1bba7 gl: Try harder to load symbols from the correct place
This commit makes the loading of the GModules threadsafe, and
always first tries to load the symbol for the GL library that
is selected for the current context. Only then it falls back
to looking into the current module (NULL), and only as a last
resort the context specific function (e.g. eglGetProcAddress())
is called.

Also add configure parameters to select the names of the library
modules instead of using the defaults, and let the defaults be
independent of the G_MODULE_SUFFIX.

https://bugzilla.gnome.org/show_bug.cgi?id=728753
2017-12-09 19:31:38 +00:00
Matthew Waters
33091ff6a5 gl/mem: implement texture copying between formats with strides properly
Previously, we used the width to determine the amount of data to be
copied using pbos.  This, makes it allocate enough data for the
the strides as well.
2017-12-09 19:31:38 +00:00
Matthew Waters
8638a5638c gl/mem: pad the public struct 2017-12-09 19:31:38 +00:00
Nicolas Dufresne
1e8fc49203 gl: no need to provide full lib path to load symbols
- Make gstgl work on Mali
- Keep it work on RPI
- fallback to NULL name module if fails with usual lib name

https://bugzilla.gnome.org/show_bug.cgi?id=728753
2017-12-09 19:31:38 +00:00
Julien Isorce
cebcc837de gl: add convenient functions to setup default vertex and fragment shaders
Most of our 2D filters use the same simple vertex shader.
Also define the default fragment shader as the identity.

Avoid duplicating the same vertex and fragment shader text.
2017-12-09 19:31:38 +00:00
Philippe Normand
95290346c6 gl: add missing G_BEGIN/END_DECLS in utils header 2017-12-09 19:31:38 +00:00
Jan Schmidt
cf018389e1 gl: Reduce noisy Info level output to LOG 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
c441afdc6b glfilter: only warn when other_context attribute is set
Fix false positive
2017-12-09 19:31:38 +00:00
Julien Isorce
959aae65c0 gl: fix string literal warning
warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
2017-12-09 19:31:38 +00:00
Nicolas Dufresne
801f11e36b gl/x11: Removed unused variable 2017-12-09 19:31:37 +00:00
Sebastian Dröge
8f156591e5 gl/x11: Get rid of unneeded second display connection and do everything from the main loop 2017-12-09 19:31:37 +00:00
Sebastian Dröge
a0a133288e gl/x11: Block rendering until swapbuffers is called and don't go via X11 events as unneeded indirection
This should fix QoS problems, where basesink believed it was rendering with
20FPS but actually we were just queueing up X11 Expose events and only once
in a while something was rendered.
2017-12-09 19:31:37 +00:00
Julien Isorce
c9d2f8ee94 gl/rpi: do not scale to full screen
Having a 640x360 movie being scaled to 1900x1200 does not look nice
2017-12-09 19:31:37 +00:00
Julien Isorce
7a77d435c1 gl/rpi: change dispmanx attributes of existing element instead of creating a new one
I was lucky that:
e1 = vc_dispmanx_element_add ()
eglCreateWindowSurface (e1)
vc_dispmanx_element_remove (e1)
e2 = vc_dispmanx_element_add ()

resulted in having e2 equal to e1. And also having the egl surface
that does not allocate its buffers before the first draw.
2017-12-09 19:31:37 +00:00
Julien Isorce
33a60e238c gl/rpi: ensure the dispmanx element to be opaque
So that we ensure it does not get alpha composited with other
dispmanx elements like the desktop.
2017-12-09 19:31:37 +00:00
Julien Isorce
2cd72a49ec gl/cocoa: pass a NSView to set_window_handle instead of a NSWindow
Fix backwards compatibility

https://bugzilla.gnome.org/show_bug.cgi?id=728451
2017-12-09 19:31:37 +00:00
Julien Isorce
9db9834128 gl/cocoa: only draw once the window has been resized
It avoids to draw the first frame with an incorrect view port.
2017-12-09 19:31:37 +00:00
Julien Isorce
545bed3c7a gl/cocoa: set the view to use for drawing by the context
It avoids to draw to an invalid buffer.
Withtout this the default frame buffer is undefined:
glBindFramebuffer (GL_FRAMEBUFFER, 0)

Visually you could see some white frames at the beginning
when lunching videotestsrc ! glimagesink

With OpenGL Profiler from XCode you could see some
GL_INVALID_FRAMEBUFFER_OPERATION for the first frames
2017-12-09 19:31:37 +00:00
Julien Isorce
e4b832db90 gl: fix declaration-definition mismatch for _init_upload 2017-12-09 19:31:37 +00:00
Julien Isorce
213590c79c gl/bufferpool: do not reset upload when set_config does not change the caps
With videotestsrc ! glimagesink it was reset 3 times
2017-12-09 19:31:37 +00:00
Julien Isorce
bc52c7bb00 gl: use #ifdef instead of #if for __APPLE__
warning: "__APPLE__" is not defined [-Wundef]

with gcc version 4.7.2 20120731 (prerelease)
    (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08)
2017-12-09 19:31:37 +00:00
Nicolas Dufresne
4372ba8999 glmemory: User g_slice_new0 to ensure fully initilized structure
The pbo pointer not being initialized would trigger a use of unitilialized variable
in valgrind.
2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
c728fd3b8d gl: prevent division by 0 on unsupported texture type
Coverity 1199697
2017-12-09 19:31:37 +00:00
Jan Schmidt
c891eedb79 glcolorconvert: Fix bt709 conversion matrices.
Fix the sign on one entry in the bt.709 YUV->RGB conversion
matrix, and the corresponding inverse matrix. Fixes really
wrong colouring of some videos.
2017-12-09 19:31:37 +00:00
Julien Isorce
d539fd4a54 gl: allow to include GLES/gl.h
https://bugzilla.gnome.org/show_bug.cgi?id=703343
2017-12-09 19:31:37 +00:00
Sebastian Dröge
2843ca2066 gl/eagl: Fix compilation 2017-12-09 19:31:37 +00:00
Sebastian Dröge
a6f5b079d8 gl/eagl: Notify the window's resize callback about surface dimension changes
https://bugzilla.gnome.org/show_bug.cgi?id=728107
2017-12-09 19:31:37 +00:00
Sebastian Dröge
d462e7f6df gl/eagl: Remove spurious private struct pointer 2017-12-09 19:31:37 +00:00
Sebastian Dröge
6fb0f1d1c7 gl/android: Notify the window's resize callback about surface dimension changes
https://bugzilla.gnome.org/show_bug.cgi?id=728107
2017-12-09 19:31:37 +00:00
Matthew Waters
175ca3f7b0 gl/context: output available extensions 2017-12-09 19:31:36 +00:00
Matthew Waters
1460d22e92 gl/context: provide get_gl_version 2017-12-09 19:31:36 +00:00
Julien Isorce
9062658bc7 gl/color: restore viewport dimensions when fbo done
Regression introduced by 95abfda139.
It caused to display the wrong frame size when resizing the window.
2017-12-09 19:31:36 +00:00
Sebastian Dröge
b83d2df47d gl: Import QuartzCore/QuartzCore.h for CAEAGLLayer on older iOS versions 2017-12-09 19:31:36 +00:00
Sebastian Dröge
3770d2a406 gl: Add support for iOS EAGL platform
https://bugzilla.gnome.org/show_bug.cgi?id=703341
2017-12-09 19:31:36 +00:00
Julien Isorce
9d396a2495 gl/cocoa: make gst_gl_window_cocoa_send_message_async re-entrant
Backends that use g_main_context_invoke are re-entrant.

Il allows to call two nested gst_gl_context_thread_add.
ex: init_upload / init_colorconvert
2017-12-09 19:31:36 +00:00
Julien Isorce
3819fbef46 gl/cocoa: fix NSAutoreleasePool initialization 2017-12-09 19:31:36 +00:00
Julien Isorce
08cce2cd5b gl/cocoa: ensure to call NSApplication:sharedApplication in the main thread
"(NSApplication *)sharedApplication This method also makes a connection
to the window server and completes other initialization"
The implicit thing which is not mentioned is that it required
to be called in the main thread.

Fix a regression introduces by 82b7c915bb
When using with gst-launch, it was not possible to click on the close
cross of the window anymore which is a bit anoying and also because
it's was possible before.

Prior to this commit the GstGLContextCocoaClass was initialized
in the main thread because gst_gl_context_new was called in the
state change function from going from ready to paused.

From this commit this call is done from the streaming thread.
So that the call to [NSApplication sharedApplication];
was not done in the main thread anymore.

We now ensure that by assuming there is a GMainLoop running.
It's for debugging purpose so that's ok to do that. Also
note we already do this assumtion to run app itereations.

The regression had no consequence on the cocoa/videooverlay example
(that should be moved from gst-plugins-gl to -bad) because the
application is responsible for that necessary call.
2017-12-09 19:31:36 +00:00
Julien Isorce
e7dc1d787e gl/color: fix warning type qualifiers ignored
i686-apple-darwin11-llvm-gcc-4.2
"warning: type qualifiers ignored on function return type"
2017-12-09 19:31:36 +00:00
Matthew Waters
a321fa998a gl/color: remove if statement with no effect
Coverity 1199698
2017-12-09 19:31:36 +00:00
Matthew Waters
92c243be62 gl/color: pass large value by reference
Coverity 1199700
2017-12-09 19:31:36 +00:00
Matthew Waters
6c73fa0b5f gl/mem: cache the stride/unpack length for upload 2017-12-09 19:31:36 +00:00
Matthew Waters
1ce0c5356f gl/color: explicitly map the buffers we are copying into
Otherwise it may not be downloaded at all.
2017-12-09 19:31:36 +00:00
Matthew Waters
50ff50c10e gl/color: cache the temporary textures 2017-12-09 19:31:36 +00:00
Matthew Waters
94371dc204 gl/mem: provide defines for tokens not defined in GLES2/ancient platforms 2017-12-09 19:31:36 +00:00
Matthew Waters
7c77c31afd gl: fixup incorrect number of arguments 2017-12-09 19:31:36 +00:00
Matthew Waters
12ecf507b8 gl: fix incorrect usage of g_return_if_fail 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
ea2d4cb446 gl/eglimage: #if 0 unused code 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
7de81a33ca gl: fix leaks
As the relevant variables are initialized to 0/NULL, we can loop
over the full range and make sure we free partial allocations
when an error happens partway through initialization.
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
ff52514714 gl/glx: use the context's display rather than asking for the window's 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
Matthew Waters
790f34c7a6 gl: fix detection of extensions with GL versions < 3
Mesa, for example returns valid pointers for glGetIntegerv and
glGetStringi even if the gl version is less than that required for
both those functions to supposedly exist.

https://bugzilla.gnome.org/show_bug.cgi?id=727324
2017-12-09 19:31:35 +00:00
Tim-Philipp Müller
82555e80ba gl: egl: fix distcheck and out of source build 2017-12-09 19:31:35 +00:00
Rico Tzschichholz
34a4eef1ec build: Fix make dist 2017-12-09 19:31:35 +00:00
Matthew Waters
6491e4d275 gl: fix out-of-source builds pt2
21b897de2f did this for x11 and wayland.
Do it for the other backends as well.
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
Julien Isorce
cb9521ab05 gl: deploy egl headers in gst/gl/egl instead of gst/gl
https://bugzilla.gnome.org/show_bug.cgi?id=703343
2017-12-09 19:31:35 +00:00
Julien Isorce
f55e8b3ea8 gl: remove commented and unsued code in x11 Makefile.am
https://bugzilla.gnome.org/show_bug.cgi?id=703343
2017-12-09 19:31:35 +00:00
Julien Isorce
3e3b573503 gl: fix crash if _build_extension_string is not called
On GLES2 then (gl->GetIntegerv && gl->GetStringi) is false
regression introduced by cc6df204e2

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
adebb3b7f8 gl/download: add support for the bt709 color matrix 2017-12-09 19:31:35 +00:00
Matthew Waters
ee0c102ac5 gl/upload: add support for the bt709 color matrix 2017-12-09 19:31:35 +00:00
Matthew Waters
0fa966bb3d gl: remove explicit reference to X_CFLAGS
They are in GL_CFLAGS if required
2017-12-09 19:31:35 +00:00
Matthew Waters
16a30a12aa gl/upload: remove the legacy GL 1.x upload path
uploading requires shaders and fbos available in GL2.
2017-12-09 19:31:35 +00:00
Julien Isorce
da24ea1956 gl: fallback to glGetString if GL_NUM_EXTENSIONS fails
Need it on MacOSX 10.7.5
2017-12-09 19:31:35 +00:00
Matthew Waters
3c27e588c3 gl: and update the Makefile 2017-12-09 19:31:35 +00:00
Matthew Waters
45c71eb3e1 gl: reorganize the extension headers by function rather than api 2017-12-09 19:31:35 +00:00
Matthew Waters
350981b14c gl/win32: use the correct include and gst-indent 2017-12-09 19:31:35 +00:00
Wang Xin-yu (王昕宇)
369bee2031 gl: use wglCreateContextAttribsARB to create share context
https://bugzilla.gnome.org/show_bug.cgi?id=726494
2017-12-09 19:31:35 +00:00
Matthew Waters
d3a823c459 gl/mixer: fix download check for failure 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
Руслан Ижбулатов
8c2c3d8dbf gl: fix the use of always-defined macros
After 2a0f0399ae GST_GL_* macros are always
defined to 0 or 1. Don't use #ifdef ... or #if defined() on them.

https://bugzilla.gnome.org/show_bug.cgi?id=726591
2017-12-09 19:31:34 +00:00
Matthew Waters
4a28b62d5a gl: add GModule libs for win32 2017-12-09 19:31:34 +00:00
Matthew Waters
9b5a5a3c37 gl: only link against gstegl if we are using egl
Assuming if we are building egl that the egl library is built
2017-12-09 19:31:34 +00:00
Matthew Waters
f98fee49c2 gl: add path of the gstegl library
Temporary until we merge the two libraries
2017-12-09 19:31:34 +00:00
Matthew Waters
891f7e2ce8 Revert "gl: add dep on gstegl"
It was already in _LIBADD

This reverts commit b10a353080.
2017-12-09 19:31:34 +00:00
Matthew Waters
95e7f50355 gl: add dep on gstegl
Temporary until we merge the two libraries
2017-12-09 19:31:34 +00:00
Edward Hervey
3ab0b67318 gl/cocoa: Fix debug statements and platform 2017-12-09 19:31:34 +00:00
Edward Hervey
46034834e0 gl: Fix static build with objective-C
--tag=CC is needed for static build
2017-12-09 19:31:34 +00:00
Matthew Waters
894035f0d7 gl: Add EGLDisplay display subclass 2017-12-09 19:31:34 +00:00
Matthew Waters
1af7847fdc gl/window: add a dummy window class
Effective for the case where we have a platform that does not
require a native window.  We require a mainloop to run the GL
commands which is currently operated by GstGLWindow.
2017-12-09 19:31:34 +00:00
Matthew Waters
d55eb1e859 gl: fix undeclared symbol when building without GST_DEBUG 2017-12-09 19:31:34 +00:00
Matthew Waters
e51e0a8869 gl: fix a double unref of the query when building without X 2017-12-09 19:31:34 +00:00
Matthew Waters
312741634d gl: silence a compiler warning about missing prototypes 2017-12-09 19:31:34 +00:00
Matthew Waters
f64292325d gl/utils: add x11 GstContext handling
https://bugzilla.gnome.org/show_bug.cgi?id=726360
2017-12-09 19:31:34 +00:00
Matthew Waters
1732e378f1 gl: define GL_NUM_EXTENSIONS if not defined 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
4a18aa4b70 [906/906] filter: warn about trying to share with multiple contexts at once 2017-12-09 19:31:34 +00:00
Matthew Waters
3f5b68b072 [905/906] Add GL context sharing support for non-gstgl elements 2017-12-09 19:31:34 +00:00
Matthew Waters
344ad5fe6f [904/906] mixer: ask for display handles on pad activation 2017-12-09 19:31:34 +00:00
Matthew Waters
f772bc1afc [903/906] api: add GstGLPlatform to/from string 2017-12-09 19:31:34 +00:00
Matthew Waters
d6e6ac471d [902/906] context: implement glGetStringi handling for GL core contexts/GLES3 2017-12-09 19:31:34 +00:00
Matthew Waters
6300c2ef1b [901/906] glx: use the display handle from the global display
Intel drivers require the display handles be the same for context
sharing to occur.  Also solves some cases of use after free of the
display when integrating with gstreamer-vaapi.

See https://bugs.freedesktop.org/show_bug.cgi?id=41736 for the intel bug.
2017-12-09 19:31:34 +00:00
Matthew Waters
07ed5dd637 [899/906] egl: warn if we resort to display handles from the window 2017-12-09 19:31:34 +00:00
Matthew Waters
e64051fd1f [897/906] api: plugin a small memory leak
Found by adrien.schwartzentruber@gmail.com
2017-12-09 19:31:34 +00:00
Matthew Waters
0fb0776432 [896/906] utils: use the vtable for deleting the texture 2017-12-09 19:31:34 +00:00
Matthew Waters
4b42da6141 [895/906] context: call window_class->close last
We should destroy resources before closing the display connection

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725048
2017-12-09 19:31:33 +00:00
Wang Xin-yu (王昕宇)
af033ae60a [894/906] gl: add missing G_BEGIN_DECLS/G_END_DECLS
https://bugzilla.gnome.org/show_bug.cgi?id=725111
2017-12-09 19:31:33 +00:00
Matthew Waters
8f29fffc2f [893/906] x11: close both of the display's we use
(the comment doesn't seem to apply anymore)

https://bugzilla.gnome.org/show_bug.cgi?id=725048
2017-12-09 19:31:33 +00:00
Matthew Waters
d169aa05dc [892/906] silence a compiler warning on older gcc versions (4.6) 2017-12-09 19:31:33 +00:00
Matthew Waters
97f6bc0bfc [891/906] context: add support for wrapping external contexts 2017-12-09 19:31:33 +00:00
Matthew Waters
303b77eeff [890/906] x11: add display subclass
GstGLDisplayX11 holds the display connection and name.  Each thread requires
it's own X11 Display connection (initialised from name) due to the fact that
we do not want to call XInitThreads().  Doing so would result in segfaults
when integrating with GUI toolkits Gtk, Qt, etc.

The Display connection is for OpenGL platforms where a constant display is
required in order to share contexts (egl).  In the case of a wrapped context
(added later), we do not have GstGLWindow to retreive the display from so a
'master' connection is used instead.
2017-12-09 19:31:33 +00:00
Matthew Waters
adfbafe36c [889/906] display: add display type enum 2017-12-09 19:31:33 +00:00
Adrien SCH
d382eab15e [888/906] correct error handling in gstgldownload.c 2017-12-09 19:31:33 +00:00
Matthew Waters
1e5851fa00 [887/906] mixer: fixup a memory leak of the context in the GLTextureUploadMeta path
gst_structure_get returns a reference to the object and we asked
for another with gst_object_replace.

https://bugzilla.gnome.org/show_bug.cgi?id=724816
2017-12-09 19:31:33 +00:00
Matthew Waters
3c9f5e6e5e [886/906] fixup a memory leak of the context in the GLTextureUploadMeta path
gst_structure_get returns a reference to the object and we asked
for another with gst_object_replace.

https://bugzilla.gnome.org/show_bug.cgi?id=724816
2017-12-09 19:31:33 +00:00
Matthew Waters
c2e1e6a2d1 [885/906] filter: free our data
plugs some memory leaks

https://bugzilla.gnome.org/show_bug.cgi?id=724816
2017-12-09 19:31:33 +00:00
Matthew Waters
f292e785ce [884/906] filter: return the pad template caps in transform_caps
We can transform from any input in our caps to any output.
With the following pipeline snippet:

  ... ! vaapidecode ! glcolorscale ! xvimagesink

GstVideoGLTextureUploadMeta was being used on both src and sink
pads causing linking to fail.  This allows the usage of the meta
on either pad without affecting whether the meta is chosen on the
other pad.
2017-12-09 19:31:33 +00:00
Matthew Waters
cd53fbba24 [883/906] api: provide from_string()
Also s/gst_gl_api_string/gst_gl_api_to_string/g
2017-12-09 19:31:33 +00:00
Matthew Waters
6c594a0b15 [881/906] upload: restore default values for unpack_length
fixes elements that upload a supplementary texture (glbumber,
gldifferencematte, etc)
2017-12-09 19:31:33 +00:00
Matthew Waters
10f18a151e [879/906] build: don't add X_CFLAGS to CFLAGS
It should already be included if needed inside GL_CFLAGS
2017-12-09 19:31:33 +00:00
Chris Paulson-Ellis
b6f6d585c3 [877/906] x11: Use correct format string for guintptr
https://bugzilla.gnome.org/show_bug.cgi?id=723537
2017-12-09 19:31:33 +00:00
Matthew Waters
d233bb66a9 [876/906] glmem: use GstVideoInfo for format configuration
Allows use of strides
2017-12-09 19:31:33 +00:00
Matthew Waters
d84bb0b3b2 [875/906] upload: support for arbitrary strides
Using GL_UNPACK_ALIGNMENT for GLES2 and GL_UNPACK_ROW_LENGTH for everything else
2017-12-09 19:31:33 +00:00
Matthew Waters
8daa7693cf [874/906] filter: implement draw_texture for GLES2
(taken from gleffects)
2017-12-09 19:31:33 +00:00
Matthew Waters
2eb7938db9 [873/906] upload: use GstVideoInfo for choosing the format 2017-12-09 19:31:33 +00:00
Matthew Waters
a9f6679e90 [872/906] upload: consolidate data _fill 2017-12-09 19:31:33 +00:00
Matthew Waters
bc8b4085b5 [871/906] upload: fix texture scaling for YUY2/UYVY with GLES2
Another artifact from the transition to GL_TEXTURE_2D
2017-12-09 19:31:33 +00:00
Matthew Waters
1f4d041d5b [870/906] upload: remove superflous g_mutex_init 2017-12-09 19:31:33 +00:00
Matthew Waters
970fbacf96 [869/906] tests: add some upload tests 2017-12-09 19:31:33 +00:00
Matthew Waters
8d67249633 [868/906] upload: fix compilation for GLES2 2017-12-09 19:31:33 +00:00
Wang Xin-yu (王昕宇)
5168d86d9e [867/906] glupload: Add GRAY8/GRAY16LE/BE upload support to glimagesink
the 16bit data is uploaded as LUMINANCE_ALPHA, then expanded, composed
in shader. value weight is a little complicate, high byte weight is
255*256/65535 (denormalize to [0~255] ,shift to high byte,then normalize
to [0~1]), low byte weight is 255/65535(similar)

https://bugzilla.gnome.org/show_bug.cgi?id=722670
2017-12-09 19:31:33 +00:00
Matthew Waters
95833db905 [866/906] upload: update some docs 2017-12-09 19:31:33 +00:00
Matthew Waters
89a203abe3 [865/906] glmem: report successful copy to the caller 2017-12-09 19:31:33 +00:00
Matthew Waters
253fe220df [863/906] window: hold a ref to our GstGLDisplay 2017-12-09 19:31:33 +00:00
Matthew Waters
2026f60879 [862/906] window: remove set_need_lock
No-one is using it.  The only code that did was the x11 one which
doesn't need it anymore.
2017-12-09 19:31:33 +00:00
Wang Xin-yu (王昕宇)
0f4c10aed9 [861/906] glprototypes: Add missing glScalef declare
https://bugzilla.gnome.org/show_bug.cgi?id=721903
2017-12-09 19:31:33 +00:00
Matthew Waters
8cc37b903c [860/906] docs: misc updates 2017-12-09 19:31:32 +00:00
Matthew Waters
dadce598ba [859/906] window: provide some documetation 2017-12-09 19:31:32 +00:00
Matthew Waters
148607f6da [858/906] glmem: update the docs 2017-12-09 19:31:32 +00:00
Matthew Waters
54923d1909 [857/906] display: document the new GstContext api 2017-12-09 19:31:32 +00:00
Matthew Waters
d6bdcbe751 [856/906] context: document it 2017-12-09 19:31:32 +00:00
Matthew Waters
1e02438715 [855/906] upload: add support for GstVideoGLTextureUploadMeta 2017-12-09 19:31:32 +00:00
Matthew Waters
2623734d19 [854/906] use the allocation query to propogate GstGLContext
uses the GstVideoGLTextureUploadMeta api type for the query
2017-12-09 19:31:32 +00:00
Matthew Waters
84425ad43d [853/906] display: remove _{set,get}_context
A GstGLDisplay doesn't need a GstGLContext and its use
was cause a reference cycle
2017-12-09 19:31:32 +00:00
Matthew Waters
64fad7a6d2 [852/906] use GstContext for GstGLDisplay propogation
implements the hooks required in GstElement::set_context and the context query
2017-12-09 19:31:32 +00:00
Matthew Waters
f15206082a [850/906] glupload: Remove texture scaling artifacts from the TEXTURE_RECTANGLE -> TEXTURE_2D transition
fixes the funky colours in some of the yuv formats

https://bugzilla.gnome.org/show_bug.cgi?id=721155
2017-12-09 19:31:32 +00:00
Matthew Waters
689e722dfa [848/906] filter: a little code cleanup 2017-12-09 19:31:32 +00:00
Matthew Waters
ad315254e9 [847/906] mixer: unmap the video frames we map
plugs a memory leak
2017-12-09 19:31:32 +00:00
Matthew Waters
5ee09b36fa [846/906] mixer: handle 0/1 framerate better in caps 2017-12-09 19:31:32 +00:00
Matthew Waters
4b8019b12c [845/906] filter: handle capsfeatures properly 2017-12-09 19:31:32 +00:00
Matthew Waters
2cb2a3951b [844/906] mixer: give access to the pads at render time
allows us to move the video frame mapping somewhere else
2017-12-09 19:31:32 +00:00
Matthew Waters
36c62b32e5 [843/906] memory: provide copy_into_texture 2017-12-09 19:31:32 +00:00
Tim-Philipp Müller
b0999fbc03 [842/906] Fix gstglconfig.h-related 'make distcheck' issues
Fix srcdir vs. builddir issue in docs and 'files left after
disclean' issue for gstglconfig.h
2017-12-09 19:31:32 +00:00
Julien Isorce
e42b5bc985 [841/906] osx: allow x11/glx backend and set default runtime to cocoa/nsgl
https://bugzilla.gnome.org/show_bug.cgi?id=719757
2017-12-09 19:31:32 +00:00
Julien Isorce
be87f6096b [839/906] cocoa: allow to call set_window_handle before to create glcontext
So that it actually make cocoa videooverlay example work again.

Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=719758
2017-12-09 19:31:32 +00:00
Matthew Waters
efa22442a9 [838/906] gl: Use GL_TEXTURE_2D instead of GL_TEXTURE_RECTANGLE
We create our textures (in Desktop GL) with GL_TEXTURE_RECTANGLE,
vaapi attempts to bind our texture to GL_TEXTURE_2D which throws a
GL_INVALID_OPERATION error and as thus, no video.

Also, by moving exclusively to GL_TEXTURE_2D and the npot extension
we also remove a difference between the Desktop GL and GLES2 code.

https://bugzilla.gnome.org/show_bug.cgi?id=712287
2017-12-09 19:31:32 +00:00
Matthieu Bouron
32265d7e4e [837/906] cocoa: resize OpenGL view size each time the window is resized
Fixes glitches that can appear when the OpenGL view has not been resized
after a window resize.

https://bugzilla.gnome.org/show_bug.cgi?id=711672
2017-12-09 19:31:32 +00:00
Matthieu Bouron
cc0b1f3e05 [836/906] cocoa: only use GSRegisterCurrentThread with GNUStep environment 2017-12-09 19:31:32 +00:00
Julien Isorce
6a5bd364a4 [835/906] gstglwindow: remove unused fields 2017-12-09 19:31:32 +00:00
Julien Isorce
4d6de2ce1b [834/906] gstglwindow: clear mutex 2017-12-09 19:31:32 +00:00
Julien Isorce
42f1d66bc6 [833/906] gstglcontext: initialize window to NULL 2017-12-09 19:31:32 +00:00
Julien Isorce
0a2787863b [832/906] x11: ignore Expose events not initiated by gst_gl_window_draw 2017-12-09 19:31:32 +00:00
Julien Isorce
66d7d4712e [831/906] glimagesink: avoid to overload the drawer if already drawing
Especially if the application calls gst_video_overlay_expose a lot
2017-12-09 19:31:32 +00:00
Matthew Waters
7b7e7bb8d0 [829/906] mixer: error out properly on flushing 2017-12-09 19:31:32 +00:00
Matthew Waters
ac0db99c94 [828/906] context: refcount the display 2017-12-09 19:31:32 +00:00
Matthew Waters
b91eb6b557 [827/906] mixer: don't unref the query in the default case
The element/application performing the query is responsible for the
de/allocation
2017-12-09 19:31:32 +00:00
Matthew Waters
bf610e210a [826/906] upload: free our mutex 2017-12-09 19:31:32 +00:00
Julien Isorce
0da88c6516 [825/906] glwindow_x11: check if the loop exists
It happens when calling set_window_handle before to reach GST_STATE_READY.
In this case the parent is set when creating the internal window.
2017-12-09 19:31:32 +00:00
Matthew Waters
266ffc48be [824/906] android: Build fixes
https://bugzilla.gnome.org/show_bug.cgi?id=709786
2017-12-09 19:31:31 +00:00
Julien Isorce
ab5a3e310d [823/906] wayland_egl: make the wayland backend actually work on Raspberry Pi
Fix resizing and can now move the window
2017-12-09 19:31:31 +00:00
Julien Isorce
64a05da4fe [822/906] gstglcontext_egl: avoid non working EGL confs on rpi/wayland 2017-12-09 19:31:31 +00:00
Julien Isorce
6e732b0408 [821/906] tests: fix test_share on GLESv2 2017-12-09 19:31:31 +00:00
Julien Isorce
e1eb30005c [820/906] gstglwindow: if available use wayland instead dispmanx on rpi 2017-12-09 19:31:31 +00:00
Matthew Waters
56384a0db3 [819/906] make gen_texture/del_texture threadsafe
Use stack allocated instead of static variables

Conflicts:
	gst-libs/gst/gl/gstglutils.c
2017-12-09 19:31:31 +00:00
Matthew Waters
3b1ec77cf8 [818/906] window: add send_message_async vmethod
- provide a default synchronous send_message
- make context creation threadsafe again
2017-12-09 19:31:31 +00:00
Matthew Waters
2a937dd96a [817/906] make the state change test pass 2017-12-09 19:31:31 +00:00
Matthew Waters
f7c8658464 [816/906] x11: fix make check segfault 2017-12-09 19:31:31 +00:00
Matthew Waters
4bec88ea28 [815/906] fix some refcount errors 2017-12-09 19:31:31 +00:00
Matthew Waters
a44517a1e8 [814/906] mixer: timestamp buffers 2017-12-09 19:31:31 +00:00
Matthew Waters
fa02b04292 [813/906] unref the pool on shutdown 2017-12-09 19:31:31 +00:00
Matthew Waters
711ad485b2 [812/906] move the GL vtable from GstGLDisplay to GstGLContext
Conflicts:
	tests/check/libs/gstglcontext.c
2017-12-09 19:31:31 +00:00
Julien Isorce
b54293266d [810/906] gstglutils: use gl_vtable for glDeleteTextures 2017-12-09 19:31:31 +00:00
Matthew Waters
704f231343 [808/906] x11: remove dead code 2017-12-09 19:31:31 +00:00
Matthew Waters
d9cc31aca0 [807/906] context: Move some window error enums to context 2017-12-09 19:31:31 +00:00
Matthew Waters
57c32baab7 [806/906] egl: doesn't require the EGLConfig from the other context
libEGL should give us the same or similar EGLConfig from the
EGLDisplay we have.
2017-12-09 19:31:31 +00:00
Matthew Waters
0f8fc0881a [805/906] glfilter: rename external-opengl-context prop to other-context
It now requires a GstGLContext instead of a handle
2017-12-09 19:31:31 +00:00
Julien Isorce
cc38e16ef2 [804/906] rpi: call bcm_host_init in plugin_init 2017-12-09 19:31:31 +00:00
Julien Isorce
dd679dee25 [803/906] raspberrypi: add support for dispmanx
See https://bugzilla.gnome.org/show_bug.cgi?id=703342
2017-12-09 19:31:31 +00:00
Matthew Waters
48cd6ac353 [801/906] context: Reimplement GL context sharing
https://bugzilla.gnome.org/show_bug.cgi?id=704806
2017-12-09 19:31:31 +00:00
Matthew Waters
40a2c12495 [798/906] build: install needed header 2017-12-09 19:31:31 +00:00
Matthew Waters
72cc3c4815 [797/906] x11: fix build for clang 2017-12-09 19:31:31 +00:00
Matthew Waters
b8b9fced19 [796/906] move egl into its own directory 2017-12-09 19:31:31 +00:00
Matthew Waters
83ac943fc4 [795/906] android: port to GstGLContext
not tested
2017-12-09 19:31:31 +00:00
Matthew Waters
9cbb652b66 [794/906] context: add subclasses for the different platforms (egl, glx, wgl, etc)
- most code taken from the Window subclasses
- tested combinations: xEGL, GLX, Wayland+EGL, Cocoa (under GNUStep), WGL (Wine)
2017-12-09 19:31:30 +00:00
Matthew Waters
e80533dcee [793/906] add a GstGLContext object that will be the basis of OpenGL contexts
At the moment it just sits in between GstGLDisplay and GstGLWindow
performing some of the stuff that GstGLWindow used to do.
2017-12-09 19:31:30 +00:00
Matthew Waters
175f28848c [792/906] build: use our own in tree headers before system ones
allows us to develop against the tree rather than what may be installed
2017-12-09 19:31:30 +00:00
Julien Isorce
b56bf26dce [791/906] glwindow/x11: remove X11EventSource as soon as the window is deleted
gst_gl_window_x11_send_message do not use XSendEvent anymore
2017-12-09 19:31:30 +00:00
Sebastian Dröge
4e8c78a4da [789/906] egl: Create a window surface if necessary 2017-12-09 19:31:30 +00:00
Tonu Jaansoo
431ce49db3 [788/906] osx: Fix compilation 2017-12-09 19:31:30 +00:00
Tonu Jaansoo
c304635ecf [787/906] gl: The GLSL rectangle resampler does not always work with int tex coords
Use floats instead.
2017-12-09 19:31:30 +00:00
Sebastian Dröge
396717587e [786/906] glprototypes: Add support for NV extensions for DrawBuffers and ReadBuffer 2017-12-09 19:31:30 +00:00
Sebastian Dröge
b6207a10a2 [785/906] egl: Use EGL_KHR_surfaceless_context instead of creating a useless surface if available 2017-12-09 19:31:30 +00:00
Sebastian Dröge
82eb297aba [782/906] gldownload: Use strlen() instead of sizeof(char*)
gstgldownload.c:846:22: error: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
2017-12-09 19:31:30 +00:00
Matthew Waters
e32e8f45e0 [781/906] download: propogate errors from the GL thread 2017-12-09 19:31:30 +00:00
Matthew Waters
7c4d51edf4 [780/906] up/download: check return values
So we fail properly
2017-12-09 19:31:30 +00:00
Matthew Waters
13d487741a [779/906] download: remove _thread variants of the API 2017-12-09 19:31:30 +00:00
Matthew Waters
1f19143837 [778/906] upload: remove _thread variants of the API 2017-12-09 19:31:30 +00:00
Matthew Waters
d009a216e6 [777/906] upload: overhaul and addition of new video formats
use the shaders from eglglessink (adapted for Desktop GL)
error out properly
2017-12-09 19:31:30 +00:00
Matthew Waters
0df6a5e963 [776/906] download: fix compiler warning about missing string format 2017-12-09 19:31:30 +00:00
Sebastian Dröge
e4f45140d6 [775/906] configure: Check for GLeglImageOES and others again
https://bugzilla.gnome.org/show_bug.cgi?id=704498
2017-12-09 19:31:30 +00:00
Sebastian Dröge
fe0ad33572 [774/906] win32: Fix some compiler errors/warnings 2017-12-09 19:31:30 +00:00
Mathieu Duponchelle
47b9fb1d49 [773/906] glfilters: Mark writable-only properties as readable as well
https://bugzilla.gnome.org/show_bug.cgi?id=704429
2017-12-09 19:31:30 +00:00
Sebastian Dröge
8efcecb98c [771/906] gl: Some less long/ulong/gulong usage 2017-12-09 19:31:30 +00:00
Matthew Waters
49951beac8 [766/906] utils: generate a RGBA texture in all cases 2017-12-09 19:31:30 +00:00
Matthew Waters
d492036322 [765/906] wayland: remove fullscreen 2017-12-09 19:31:30 +00:00
Matthew Waters
2c6f8de516 [764/906] filter: fix pad template caps
upload is for the sink template
download is form the src template
2017-12-09 19:31:30 +00:00
Matthew Waters
8577de136e [763/906] memory: copy properly depending on where the most recent data is 2017-12-09 19:31:30 +00:00
Sebastian Dröge
5b1dd556de [762/906] glimagesink: Fix some memory leaks and properly set up the buffer pool 2017-12-09 19:31:30 +00:00
Sebastian Dröge
4f23429abb [761/906] x11: Protect event display connection with a mutex
We use it from different threads and need to serialize the
accesses to it.
2017-12-09 19:31:30 +00:00
Sebastian Dröge
9810469db0 [760/906] x11: Always use the same display connection from the GL thread
The other display connection might be used by async calls from elsewhere
at the same time.

https://bugzilla.gnome.org/show_bug.cgi?id=704247
2017-12-09 19:31:30 +00:00
Sebastian Dröge
bb4414ac7f [759/906] gldownload: #ifdef some GLES2 specific code to fix compilation 2017-12-09 19:31:30 +00:00
Sebastian Dröge
a41b21f4a5 [758/906] android: Don't require a window to be set
This allows the filters to be usable without a GL sink downstream.
2017-12-09 19:31:30 +00:00
Sebastian Dröge
0a6359fc59 [757/906] egl: Create an offscreen surface if no window was provided 2017-12-09 19:31:30 +00:00
Sebastian Dröge
1de089fe81 [756/906] gldownload: Reset the viewport after download RGB via GLES2 2017-12-09 19:31:29 +00:00
Sebastian Dröge
85a4f1042b [755/906] gldownload: Unbind framebuffer after downloading RGB with GLES2 2017-12-09 19:31:29 +00:00
Sebastian Dröge
f804d53a9c [754/906] gldownload: Add support for RGB reordering when using GLES2 2017-12-09 19:31:29 +00:00
Sebastian Dröge
b3eef9dd15 [753/906] gldisplay: Sending a message is synchronous, we can allocate the memory on the stack 2017-12-09 19:31:29 +00:00
Sebastian Dröge
b2934152ce [752/906] glwindow: Add destroy notifies for the data of the callbacks
And actually call the close callback when the window is closed.
2017-12-09 19:31:29 +00:00
Sebastian Dröge
ef68e5ade2 [751/906] gldisplay: Don't hold lock while sending a message to the GL thread
https://bugzilla.gnome.org/show_bug.cgi?id=704247
2017-12-09 19:31:29 +00:00
Sebastian Dröge
15438d5b7f [750/906] glupload: Add support for RGB reordering when using GLES2 2017-12-09 19:31:29 +00:00
Sebastian Dröge
9d4f99b8bb [749/906] glshader: Add some more debug output 2017-12-09 19:31:29 +00:00
Sebastian Dröge
b28a1e943d [748/906] glupload: GL_STENCIL_ATTACHMENT is needed for desktop GL, not GLES 2017-12-09 19:31:29 +00:00
Sebastian Dröge
6c5ce0ee99 [747/906] gl: Constify YUV conversion shaders 2017-12-09 19:31:29 +00:00
Sebastian Dröge
90450a39b7 [746/906] android: Add comment to clarify the type of a variable 2017-12-09 19:31:29 +00:00
Sebastian Dröge
d0293d9f0c [745/906] gl: Simplify and optimize YUV conversion shaders a bit 2017-12-09 19:31:29 +00:00
Sebastian Dröge
bbd9dd465c [744/906] gl: Use __GST_GL_H__ instead of __GL_H__ as a multi-include guard
GL/gl.h might use the latter already.
2017-12-09 19:31:29 +00:00
Sebastian Dröge
29874d3be6 [743/906] win32: Allow setting window handle before creating the context 2017-12-09 19:31:29 +00:00
Sebastian Dröge
bd60dd7f22 [742/906] cocoa: Allow setting window handle before creating the context 2017-12-09 19:31:29 +00:00
Sebastian Dröge
d937a7e899 [741/906] wayland: Don't leak main context and loop 2017-12-09 19:31:29 +00:00
Sebastian Dröge
09795ef023 [740/906] x11: Allow setting window handle before creating the context 2017-12-09 19:31:29 +00:00
Sebastian Dröge
764e682cd0 [739/906] x11: Don't leak main context and main loop 2017-12-09 19:31:29 +00:00
Sebastian Dröge
52b44e4c07 [738/906] gl: Include glu.h after gl.h 2017-12-09 19:31:29 +00:00
Sebastian Dröge
192b37980f [735/906] gl: Add support for Android
https://bugzilla.gnome.org/show_bug.cgi?id=703340
2017-12-09 19:31:29 +00:00
Sebastian Dröge
6a5bebebb9 [734/906] win32: Make automake happy by using noinst_HEADERS 2017-12-09 19:31:29 +00:00
Sebastian Dröge
f7998a2e98 [733/906] gl: Major header and include cleanup 2017-12-09 19:31:29 +00:00
Julien Isorce
d17a4381b1 [732/906] build: fix repeated typedefs
Write forward declarations in another way to avoid
repeated typedefs "error: redefinition of typedef".
Raised when using i686-apple-darwin11-llvm-gcc-4.2
It seems that C apple compiler does not support
C11 feature.

https://bugzilla.gnome.org/show_bug.cgi?id=703885
2017-12-09 19:31:29 +00:00
Julien Isorce
d4a8451c11 [731/906] cocoa: fix build when GNUSTEP is not defined 2017-12-09 19:31:29 +00:00
Sebastian Dröge
61dfdc19b9 [730/906] glcompat: Properly check for GLchar and other types
On Android for example these are no #defines but typedefs
2017-12-09 19:31:29 +00:00
Sebastian Dröge
341210eaa6 [729/906] gl: Include config.h everywhere 2017-12-09 19:31:29 +00:00
Sebastian Dröge
92c66f55bc [727/906] egl: Refactor EGL logic into a helper object 2017-12-09 19:31:29 +00:00
Matthew Waters
ac1a2297f5 [726/906] window: don't call a NULL destroy function 2017-12-09 19:31:29 +00:00
Matthew Waters
3c2810c3d6 [725/906] x11: use GMainContext/GMainLoop
allows us to be reentrant

https://bugzilla.gnome.org/show_bug.cgi?id=703445
2017-12-09 19:31:29 +00:00
Matthew Waters
17e4fe41d3 [724/906] wayland: make reentrant
https://bugzilla.gnome.org/show_bug.cgi?id=703445
2017-12-09 19:31:29 +00:00
Julien Isorce
bbc71ed90f [723/906] gstglwindow: close has to be called in the glthread.
Indeed 'glXMakeCurrent (window_x11->device, None, NULL);'
has to be called in the thread where the glcontext is actually
current.
Otherwise glXDestroyContext may crash.
2017-12-09 19:31:28 +00:00
Руслан Ижбулатов
9af1cee2f7 [722/906] gl: Fix build on Win32
1) Need to include GL/glext.h on W32 to provide necessary macros
2) W32 macros that pre-processor has by default are different for different
   toolchains. Borland uses __WIN32__, everyone else has _WIN32, so check both.

Side-note: glext.h is not supplied by mingw-w64 at the moment, but can be
downloaded from http://www.opengl.org/registry/

https://bugzilla.gnome.org/show_bug.cgi?id=703364
2017-12-09 19:31:28 +00:00
Sebastian Dröge
6c89d7e839 [721/906] glfilter: Use uint64 for the OpenGL context property
ulong/long properties are deprecated and should not be used anymore
for portability reasons.
2017-12-09 19:31:28 +00:00
Sebastian Dröge
685d855ded [719/906] gl: Fix compilation with GLES2 2017-12-09 19:31:28 +00:00
Matthew Waters
5b13d0ebf4 [718/906] shader: make it possible to unref in the non-GL thread 2017-12-09 19:31:28 +00:00
Matthew Waters
71c8edf9c0 [717/906] remove outdated cmake build files 2017-12-09 19:31:28 +00:00
Matthew Waters
bc5d65928f [716/906] wayland: properly choose EGL_RENDERABLE_TYPE
based on the gl api we chose
2017-12-09 19:31:28 +00:00
Matthew Waters
5ec9f248a1 [715/906] display: inherit from the right object class 2017-12-09 19:31:28 +00:00
Matthew Waters
1c84c0fb96 [714/906] Add GstGLFramebuffer to replace _display_gen_fbo and friends
This version is simply API compatible with _display_gen_fbo.
The next version will likely revamp the API
2017-12-09 19:31:28 +00:00
Matthew Waters
d7f5cac7ce [713/906] shader: make it possible to create the object in a non-GL thread 2017-12-09 19:31:28 +00:00
Matthew Waters
ef6b1ca760 [712/906] wayland: shutdown properly
We cannot use _finalize as this will be called before GstGLWindow's
_finalize.  This causes us to try and perform operations with the
wayland server when the connection has been severed.
2017-12-09 19:31:28 +00:00
Matthew Waters
380f918802 [711/906] wayland: support choosing Desktop GL as the api 2017-12-09 19:31:28 +00:00
Matthew Waters
951daee416 [710/906] window: fail if the user specifies an GL api that we cannot work with
It would've been caught later in an g_assert anyway.
2017-12-09 19:31:28 +00:00
Matthew Waters
2ae5b50fa4 [709/906] display: some more cleanups 2017-12-09 19:31:28 +00:00
Matthew Waters
6e86d0e920 [708/906] display: a cleanup and removal of old code 2017-12-09 19:31:28 +00:00
Matthew Waters
bdf5b5be0f [707/906] display: move error_message to utils 2017-12-09 19:31:28 +00:00
Matthew Waters
5bc069a5d5 [706/906] display: move activate_context into utils 2017-12-09 19:31:28 +00:00
Matthew Waters
4f117323b8 [705/906] x11: don't shutdown in _finalize
The window's loop could be still running when _finalize is called
and if we destroy the display connection it will never be closed.

Add _open and _close vfuncs to GstGLWindow so that subclasses can
start up and shutdown at the right time.
2017-12-09 19:31:28 +00:00
Matthew Waters
761bc0156a [704/906] Use gst_object_[un]ref so we can get refcounts in the log 2017-12-09 19:31:28 +00:00
Matthew Waters
9e7af77dc8 [703/906] x11: don't segfault if destroy_cb is NULL 2017-12-09 19:31:28 +00:00
Matthew Waters
5818b015d6 [702/906] x11: fix segfault if the x11 backend is instantiated but not used 2017-12-09 19:31:28 +00:00
Matthew Waters
c6988cb064 [701/906] display: move context creation into window 2017-12-09 19:31:28 +00:00
Matthew Waters
9c633e658a [700/906] display: move most of the code into utils for sorting later
This contains a hack that essentially requires one GstGLDisplay
per process.
2017-12-09 19:31:28 +00:00
Matthew Waters
38e0434d95 [699/906] display: remove list of upload and download objects
and only create an up/download object when needed.
2017-12-09 19:31:28 +00:00
Matthew Waters
81334a1af0 [698/906] move sink-specific stuff from GstGLDisplay into glimagesink 2017-12-09 19:31:28 +00:00
Matthew Waters
ad31c9f8e2 [697/906] display: allow the user to try and choose the GL api we use via env variable
GST_GL_API=opengl,opengl3,gles2,gles3
2017-12-09 19:31:28 +00:00
Matthew Waters
f5472457bf [696/906] glapi: fix memory leak from not freeing a string 2017-12-09 19:31:28 +00:00
Matthew Waters
06eb6f4965 [695/906] build: remove libtool warning about -version-info not used in convenience libraries 2017-12-09 19:31:28 +00:00
Matthew Waters
696477bbf6 [693/906] x11_glx: ask for a 3.0 GL Context
(falling back if needed)
2017-12-09 19:31:27 +00:00
Matthew Waters
957b4cf08b [692/906] window_x11: add XError trapping
some functions in GLX can fail if the implementation does not support
certain features we ask for (i.e. GL 3) bringing down the entire
application
2017-12-09 19:31:27 +00:00
Matthew Waters
d88a9c0044 [691/906] feature: make gst_gl_check_extension public
prevents duplication of code of extension string parsing in GstGLWindow's
2017-12-09 19:31:27 +00:00
Matthew Waters
df675e7335 [690/906] windowx11glx: use fbconfigs if supported 2017-12-09 19:31:27 +00:00
Matthew Waters
d71ab51c9f [688/906] display: properly shutdown if we error after context creation
The _finalize() code checks to see if the context was created before
attempting to destroy it.  We never did say that we had created the context.
2017-12-09 19:31:27 +00:00
Matthew Waters
01518880fa [685/906] filter: improve error handling 2017-12-09 19:31:27 +00:00
Matthew Waters
a9b5bfe9d7 [684/906] display: lack of format-string causing a compiler warning 2017-12-09 19:31:27 +00:00
Matthew Waters
94d1326a7f [683/906] feature: remove double free 2017-12-09 19:31:27 +00:00
Matthew Waters
1a04002052 [681/906] win32: fix gl api calls on 32-bit
win has the bright idea of having 5 different calling conventions.
we should probably use the right one so we don't crash from stack
corruption.
2017-12-09 19:31:27 +00:00
Matthew Waters
31a5beb3f3 [680/906] overlay: tentative port to new GstGLFuncs API 2017-12-09 19:31:27 +00:00
Matthew Waters
b9a10f8e15 [678/906] window_win32_wgl: implement wglGetProcAddress for extension functions 2017-12-09 19:31:27 +00:00
Matthew Waters
ed98971953 [677/906] memory: fix GSIZE printf format on win32 2017-12-09 19:31:27 +00:00
Matthew Waters
8d07dcbd5e [676/906] windwo_win32: port to new API 2017-12-09 19:31:27 +00:00
Matthew Waters
72ac429e57 [675/906] upload: provide nicer debugging 2017-12-09 19:31:27 +00:00
Matthew Waters
6e8099fa20 [674/906] feature: try and catch more GL extension functions
if we don't find the extension in core GL, try the extension version anyway
2017-12-09 19:31:27 +00:00
Matthew Waters
1198b27830 [673/906] feature: add gstreamer license 2017-12-09 19:31:27 +00:00
Matthew Waters
792f055db4 [672/906] display: constify GstGLFuncs *gl 2017-12-09 19:31:27 +00:00
Matthew Waters
267bf848de [671/906] win32: #include GL/glext.h on windows
also add some GL default variables if some GL types are not defined
2017-12-09 19:31:27 +00:00
Matthew Waters
dba83ebbd3 [670/906] display: replace glib deprecated api 2017-12-09 19:31:27 +00:00
Matthew Waters
7d4d1f50d4 [669/906] window: seperate object creation and context creation 2017-12-09 19:31:27 +00:00
Matthew Waters
63a5d9e981 [668/906] shader: fix gles2 segfault 2017-12-09 19:31:27 +00:00
Matthew Waters
0cc3150e37 [658/906] mixer: fix eos timestamp check 2017-12-09 19:31:27 +00:00
Matthew Waters
535074cc87 [655/906] download: remove erronous ReadBuffer call
- it was causing segfaults in mesa
- we didn't set the readbuffer so we shouldn't reset it
2017-12-09 19:31:27 +00:00
Matthew Waters
ccfa7d674a [652/906] bumper: port to non-GLEW + arrays 2017-12-09 19:31:27 +00:00
Matthew Waters
847e6540fb [651/906] up/download: fix some typos when removing GLEW 2017-12-09 19:31:27 +00:00
Matthew Waters
173467e48a [650/906] filter: fix _draw_texture()'s wrong vertices 2017-12-09 19:31:27 +00:00
Matthew Waters
6bee9b9c93 [647/906] remove dependecy on glew 2017-12-09 19:31:27 +00:00
Matthew Waters
17fdb480d0 [646/906] some gl header fixes/additions 2017-12-09 19:31:27 +00:00
Matthew Waters
2f2916dd50 [645/906] fix gles2 compilation 2017-12-09 19:31:27 +00:00
Matthew Waters
57e209a423 [644/906] update .gitignore for some new files 2017-12-09 19:31:27 +00:00
Matthew Waters
c692a610de [643/906] display: privatise most of the struct 2017-12-09 19:31:26 +00:00
Matthew Waters
e983f02e87 [642/906] add gstglconfig.h for apps to find out what our capabilites are
ie libgstgl can be compiled with any combination of opengl/gles2
2017-12-09 19:31:26 +00:00
Matthew Waters
8375116c4b [641/906] display: feature check for GL extension functions 2017-12-09 19:31:26 +00:00
Matthew Waters
a87b070abb [640/906] build: add missing file to built sources 2017-12-09 19:31:26 +00:00
Matthew Waters
4a886e91e4 [639/906] add get_proc_address implementations for egl and glx 2017-12-09 19:31:26 +00:00
Matthew Waters
4a024734da [638/906] window: add get_proc_address + stub for retrieving gl functions 2017-12-09 19:31:26 +00:00
Matthew Waters
87e5cd6777 [637/906] x11_egl: add prelim support for choosing opengl or gles 2017-12-09 19:31:26 +00:00
Matthew Waters
59cb56fa4d [636/906] window_x11: compact debug info 2017-12-09 19:31:26 +00:00
Matthew Waters
17e6d70dba [635/906] fixup compile errors 2017-12-09 19:31:26 +00:00
Matthew Waters
68b4ddff12 [634/906] wayland egl: deactivate context before we destroy it
avoids a segfault with dri drivers
2017-12-09 19:31:26 +00:00
Matthew Waters
db236c510f [633/906] display: fail properly in context creation in order to minimize a race condition
previously, on context creation, when we failed to get a valid context
we would still atempt to run the window mainloop as well as setting an error
on the display. This would cause the calling element to finalize the display
and therefore attempt to quit the window mainloop.  However the mainloop
may not have started running.  Thus when the window mainloop ran it would
never a get a quit message and never end.
2017-12-09 19:31:26 +00:00
Matthew Waters
12b045af81 [631/906] remove redefinition warnings in compiling tests 2017-12-09 19:31:26 +00:00
Matthew Waters
1ec4ffc824 [630/906] display: add gl api checking
i.e. check for cases where the window wants a different API than
what the library was compiled with
2017-12-09 19:31:26 +00:00
Matthew Waters
c3526080aa [629/906] window: add GError for error handling of context creation 2017-12-09 19:31:26 +00:00
Matthew Waters
6c0e32864a [627/906] shader: check for invalid objects 2017-12-09 19:31:26 +00:00
Matthew Waters
fd06db00b0 [625/906] add vtable for opengl functions
The vtable provides the ability for one to compile (but not link)
against both OpenGL and GL|ES and starts the move away from GLEW
2017-12-09 19:31:26 +00:00
Matthew Waters
344253e860 [624/906] OPENGL_ES2 => HAVE_GLES2 and add HAVE_OPENGL
use GstGLAPI to determine which code paths to execute.
perform some cleanups
2017-12-09 19:31:26 +00:00
Matthew Waters
ee992ec531 [623/906] move GL includes into a single file 2017-12-09 19:31:26 +00:00
Matthew Waters
4e46ef4a3f [622/906] add missing GL_STENCIL_ATTACHMENT for gles2 compatability 2017-12-09 19:31:26 +00:00
Matthew Waters
0be301af24 [621/906] GstGLRendererAPI => GstGLAPI and get GstGLAPI from a window 2017-12-09 19:31:26 +00:00
Matthew Waters
e1ec48b6cf [620/906] wayland_egl: attempt at resizing the video 2017-12-09 19:31:26 +00:00
Matthew Waters
62e6b36cd0 [619/906] fix typo for win32 debug variables 2017-12-09 19:31:26 +00:00
Matthew Waters
ccabf4545a [618/906] add wayland-egl window backend 2017-12-09 19:31:26 +00:00
Matthew Waters
d169907472 [617/906] fix 'set but not used' compiler warnings 2017-12-09 19:31:26 +00:00
Matthew Waters
80fdf4c30c [616/906] move window-specific code into seperate subfolders 2017-12-09 19:31:26 +00:00
Matthew Waters
cc1f734857 [615/906] preliminary support for Win32 EGL 2017-12-09 19:31:26 +00:00
Matthew Waters
d378a9d1d9 [614/906] try GLX first when using ANY | OPENGL | OPENGL3 2017-12-09 19:31:26 +00:00
Matthew Waters
fc4619f8a9 [613/906] window_cocoa: fix segfault with gst-launch-1.0 -e ... and sending SIGINT (Ctrl-C)
GNUstep has a signal handler for SIGINT which runs in the main thread.
However that thread has never been 'registered' with GNUstep so
the autorelease magic of objective-c causes a segfault from accessing
a null NSThread object somewhere deep in GNUstep.
2017-12-09 19:31:26 +00:00
Matthew Waters
517db226fe [612/906] remove GNUstep makefiles 2017-12-09 19:31:26 +00:00
Matthew Waters
b36b9f4a4a [611/906] cocoa port of determining gl platform at runtime 2017-12-09 19:31:25 +00:00
Matthew Waters
22aa2e093d [610/906] WindowX11EGL: remove get_platform call 2017-12-09 19:31:25 +00:00
Matthew Waters
d857c58015 [609/906] win32 port of determining GL platform at runtime
- add GstGLWindowWin32 and GstGLWindowWin32WGL along the same lines as the
  X11 variants
2017-12-09 19:31:25 +00:00
Matthew Waters
4d88e9977e [608/906] add GST_GL_PLATFORM_ANY for choosing any platform 2017-12-09 19:31:25 +00:00
Matthew Waters
af658df918 [607/906] remove get_platform and get_window_handle vfuncs
- rename choose_visual() to choose_format() for later incorporating
  win32 changes and new GstGLPlatform for WGL, EGL, GLX, etc.
2017-12-09 19:31:25 +00:00
Matthew Waters
538643e3c0 [606/906] determine the GL platform to use at runtime
- Make GstGLWindow subclassablerather than specified at compile time.
- Add GstGLWindowX11 for x11 windows and two subclasses, GstGLWindowX11GLX
  and GstGLWindwX11EGL for GLX and EGL repectively. (win32 and cocoa
  ports to come)
- Also cleanup GL library detection in configure.ac
2017-12-09 19:31:25 +00:00
Matthew Waters
9dd6570ca9 [605/906] shader: move to gst debugging 2017-12-09 19:31:25 +00:00
Matthew Waters
4c35d682c9 [603/906] update FSF address 2017-12-09 19:31:25 +00:00
Matthew Waters
9267372466 [601/906] fix typo causing shader compilation failure for uploading I420 2017-12-09 19:31:25 +00:00
Matthew Waters
d55bbf7f55 [600/906] docs: add docs for new objects and expand on some existing ones 2017-12-09 19:31:25 +00:00
Matthew Waters
7baddfbcbe [599/906] GL|ES2: fix typos from recent changes and make downloading RGB formats work again 2017-12-09 19:31:25 +00:00
Matthew Waters
2a8de21658 [594/906] filter: update for up/download API changes and scaling fixes 2017-12-09 19:31:25 +00:00
Matthew Waters
09b60b563c [592/906] memory: update for up/download API changes 2017-12-09 19:31:25 +00:00
Matthew Waters
776a5e536f [591/906] mixer: save the upload object instead of querying for it every frame 2017-12-09 19:31:25 +00:00
Matthew Waters
39866ea830 [590/906] up/download: fix scaling on transfer
i.e. uploading from a 10x10 video frame to a 20x20 texture into another 30x30 videoframe
2017-12-09 19:31:25 +00:00
Matthew Waters
89569276c5 [587/906] mixer: mirror the changes done for filter 2017-12-09 19:31:25 +00:00
Matthew Waters
67f5b303c8 [586/906] fix up some debug statements to get them into the right categories 2017-12-09 19:31:25 +00:00
Matthew Waters
c7f49800e3 [583/906] deinterlace: change for new API
also allow elements to call the _filter_texture vfunc if they want
2017-12-09 19:31:25 +00:00
Matthew Waters
eed7e15ed2 [581/906] filter: add seperate filter function for operating on textures instead of buffers 2017-12-09 19:31:25 +00:00
Matthew Waters
fa5d1efaa3 [580/906] bufferpool: remove obselete gl meta buffer pool options 2017-12-09 19:31:25 +00:00
Matthew Waters
9306c201f8 [579/906] download: fix YV12 format
same as I420 but plane 1+2 swapped
2017-12-09 19:31:25 +00:00
Matthew Waters
75734e663c [578/906] {up,down}load: add variants that can be called in the gl thread 2017-12-09 19:31:25 +00:00
Matthew Waters
574612f129 [576/906] remove uneeded GstGLMeta (use GstVideoMeta) 2017-12-09 19:31:25 +00:00
Matthew Waters
2de5a925c1 [575/906] filter: port to new upload/download 2017-12-09 19:31:25 +00:00
Matthew Waters
84ec07072d [574/906] memory: implement transperent upload/download for data
(not async yet)
2017-12-09 19:31:25 +00:00
Matthew Waters
3ee54d3135 [573/906] add upload and download library objects
allows multiple upload pipelines that previously wasn't possible
 (i.e. upload RGB and I420 and ... on the same GstGLDisplay)
2017-12-09 19:31:25 +00:00
Matthew Waters
3283e9e7de [571/906] mixer: fix deadlock on shutdown
didn't reiterate over the sinkpad's displays and reactivate them causing a deadlock
2017-12-09 19:31:25 +00:00
Matthew
2dff52334c [568/906] window: fix public definitions 2017-12-09 19:31:25 +00:00
Matthew
4a424d6d2c [567/906] fix OpenGL|ES2 ifdef'ed code 2017-12-09 19:31:25 +00:00
Matthew Waters
6e6ee999a9 [564/906] glmemory: remove unused typedef 2017-12-09 19:31:24 +00:00
Matthew Waters
c4332505a9 [563/906] readd support for hanging GL pipelines e.g. ... ! gleffects ! fakesink 2017-12-09 19:31:24 +00:00
Matthew Waters
a1a653c8ed [562/906] gldisplay: fix download of YUV formats 2017-12-09 19:31:24 +00:00
Matthew Waters
c0235ddafa [561/906] gldisplay: fix endianess issues on RGB download 2017-12-09 19:31:24 +00:00
Matthew Waters
23ec206053 [559/906] glmixer: pass the mixpad's display to the querying element 2017-12-09 19:31:24 +00:00
Matthew Waters
9761f2cfa1 [555/906] Make the query for a GstGLDisplay a pad peer query
Allows the query to pass through bin boundaries and makes it possible for
arbitrary gl elements to be placed in bins.
2017-12-09 19:31:24 +00:00
Matthew Waters
c7ddead74b [554/906] GstGLMemory: update for GstAllocator API changes 2017-12-09 19:31:24 +00:00
Matthew Waters
56bf6e2fb3 [544/906] fix memory leaks from not g_free()ing string returned by gst_element_get_name 2017-12-09 19:31:24 +00:00
Matthew Waters
7a79d684e2 [543/906] GstGLDisplay: fix segfault from GST_PTR_FORMAT trying to expand the object 2017-12-09 19:31:24 +00:00
Matthew Waters
83401761eb [542/906] GstGLMixer: add allocation and bufferpool methods
based off GstBaseTransform
2017-12-09 19:31:24 +00:00
Matthew Waters
3f174671ec [532/906] GstGLFilter: implement allocation vfuncs 2017-12-09 19:31:24 +00:00
Matthew Waters
e02e620055 [528/906] GstGLMeta: seperate upload/download/normal GL caps video formats
differentiate between upload, download and GL caps
2017-12-09 19:31:24 +00:00
Matthew Waters
38b6bdfa8b [527/906] GstGLDisplay: add some trace debugging 2017-12-09 19:31:24 +00:00
Matthew Waters
0d5b8bbc38 [524/906] GstGLDisplay: rework the download code
data paramaters now take GstVideoFrame
remove redundant parameters
2017-12-09 19:31:24 +00:00
Matthew Waters
be177b01b7 [522/906] GstGLDisplay: add forgotten function definition 2017-12-09 19:31:24 +00:00
Matthew Waters
fe216ac6b2 [521/906] GstGLMemory: update for GstAllocator changes 2017-12-09 19:31:24 +00:00
Matthew Waters
590cf80c31 [520/906] GstGLMixer: fix for GstChildProxy changes 2017-12-09 19:31:24 +00:00
Matthew Waters
a8b1853755 [517/906] add GstGLBufferPool
which adds GstGLMeta to buffers
2017-12-09 19:31:24 +00:00
Matthew Waters
8527e1cd66 [516/906] add skeleton GstGLMeta
the GstVideoMeta _map/unmap functions still need implementing
2017-12-09 19:31:24 +00:00
Matthew Waters
6528aba8c9 [515/906] GstGLDisplay: rework gen_texture and upload
rename functions so that other code can create textures in the GL thread
change upload functions to take a GstVideoFrame
default to GLSL for upload conversion
2017-12-09 19:31:24 +00:00
Matthew Waters
ffdc6d496e [514/906] add GstGLMemory and allocator
implement custom GstMemory for GL textures
currently map/unmap returns NULL although it might be favourable to upload/download/cache the image data
2017-12-09 19:31:24 +00:00
Matthew Waters
eb362969f1 [513/906] Remove GstGLBuffer (to be replaced by GstGLMeta) 2017-12-09 19:31:24 +00:00
Matthew Waters
25aa8a4042 [512/906] GstGLMixer: update for 1.0 based on the videomixer2 element in -good 2017-12-09 19:31:24 +00:00
Matthew Waters
3e18471e8e [509/906] GstGLDisplay: update for 1.0 2017-12-09 19:31:24 +00:00
Matthew Waters
683c001f91 [504/906] GstGLFilter: update for 1.0
-fix up function definitions
-remove _prepare_output_buffer (functionality taken over by GstBufferPool).
2017-12-09 19:31:24 +00:00
Matthew Waters
f7bc5dcf83 [503/906] Rename GST_BOILERPLATE_* to G_DEFINE_TYPE_* and move _base_init into _class_init 2017-12-09 19:31:24 +00:00
Matthew Waters
1a034ba18d [502/906] Update versioning for gstreamer 1.0
Renames GST_MAJORMINOR to GST_API_VERSION in build files
removes -lgstinterfaces from _LDADD flags
2017-12-09 19:31:24 +00:00
Raimo Järvi
563f0f2e57 [501/906] Fix building on 64 bit mingw-w64
https://bugzilla.gnome.org/show_bug.cgi?id=676428
2017-12-09 19:31:24 +00:00
Julien Isorce
20c429684e [500/906] gldisplay: do not call glCheckFramebufferStatus if 0 is bound
Indeed it may return GL_FRAMEBUFFER_UNDEFINED if there is no
default framebuffer.
It seems to be the case on MacOSX
2017-12-09 19:31:24 +00:00
Julien Isorce
67bc74ec3f [498/906] gldisplay: don't pass non-constant strings as printf format strings
Fixes 'format not a string literal and no format arguments' on darwin
2017-12-09 19:31:23 +00:00
Julien Isorce
e25b142e24 [497/906] filtershader: fix format compiler warnings 2017-12-09 19:31:23 +00:00
Julien Isorce
83b2f12c12 [495/906] glES2.0: properly use glDeleteShader 2017-12-09 19:31:23 +00:00
Julien Isorce
46eea6f943 [494/906] cmake build: use config.h from win32/common and add some guidelines 2017-12-09 19:31:23 +00:00
Julien Isorce
bd0982d057 [492/906] glwindow: properly fails if resource not found 2017-12-09 19:31:23 +00:00
Julien Isorce
badaaaec34 [491/906] glES2.0: properly fails if driver/kernel inconsistency 2017-12-09 19:31:23 +00:00
Julien Isorce
07df6a220d [490/906] gldisplay: error out instead of g_assert 2017-12-09 19:31:23 +00:00
Julien Isorce
ef87b0e70d [488/906] libvisual-gl: full compatibility with projectM-libvisual if libprojectM >= 2.0.1
Fix bug #310775
2017-12-09 19:31:23 +00:00
Julien Isorce
74526865c6 [486/906] libvisual-gl: add minimal support to libvisual plugins that uses Framebuffer objects
Fix bug #310775

gst-launch audiotestsrc ! libvisual_gl_projectM ! glimagesink is working
but for now you cannot append any other opengl filters between
libvisual_gl_projectM and glimagesink because our FBO is turned OFF.

It would require that libvisual allows to split rendering between
pass1,2,3... and final rendering. In order to unbind our FBO before
the passN, and then rebind it just before the final libvisual rendering.
2017-12-09 19:31:23 +00:00
Julien Isorce
0f54271129 [485/906] gstgldisplay: turn off texture binding and read buffer when downloading rgb is done
It fixes: (black image before)
gst-launch-0.10 audiotestsrc ! libvisual_gl_lv_gltest ! gldownload ! ximagesink
and
gst-launch-0.10  audiotestsrc ! libvisual_gl_lv_gltest ! gldownload ! glimagesink
2017-12-09 19:31:23 +00:00
Julien Isorce
96cce45c38 [483/906] glelements: do not leak parent when using gst_pad_get_parent 2017-12-09 19:31:23 +00:00
Julien Isorce
7c79cc5c41 [481/906] feature checking: error out instead of doing nothing if an OpenGL feature is not present
Fix bug #572767
2017-12-09 19:31:23 +00:00
Julien Isorce
b30da1699a [480/906] win32 builds: add glshader filter sources to vs9 and codeblocks
Also fix some warnings from msvc9 and mingw-3.4.5
2017-12-09 19:31:23 +00:00
Руслан Ижбулатов
c0ebeccb8c [479/906] gstglshadervariables: strtok_r is not multiplatform
Fix bug #664367
2017-12-09 19:31:23 +00:00
Wei Feng
aefca52574 [478/906] OpenGL ES 2.0: include glib.h to use G_BEGIN_DECLS in gstgles2.h
Fix bug #631019
2017-12-09 19:31:23 +00:00
Julien Isorce
ccaa9e883f [477/906] OpenGL ES 2.0: fix build since glfiltershader changes 2017-12-09 19:31:23 +00:00
Antoni Silvestre
4ea2bf2087 [476/906] OpenGL ES 2.0: fix build and disable some examples
Fix bug #631019
2017-12-09 19:31:23 +00:00
Luc Deschenaux
500210b354 [471/906] glshader: add dynamic fragment shader filter
Also add fragment shader parser
Fix bug #600195
2017-12-09 19:31:23 +00:00
Julien Isorce
f008fa71ab [467/906] tests: various build fixes
- cmake could not find glib
 - put gtk variables at the beginning to avoid GL conflicts
 - update examples to clutter-1.8
 - use const instead of deprecated G_CONST_RETURN
 - set max pending events to 0 to make cube example works again
2017-12-09 19:31:23 +00:00
Tim-Philipp Müller
4f09396824 [463/906] Add some more G_{BEGIN,END}_DECLS to public headers
https://bugzilla.gnome.org/show_bug.cgi?id=637260
2017-12-09 19:31:23 +00:00
Stefan Kost
df480f3530 [462/906] various: add missing G_PARAM_STATIC_STRINGS flags
Canonicalize property names as needed. Includes some gst-indent changes as well :/
2017-12-09 19:31:23 +00:00
Jan Schmidt
e013586f46 [459/906] Fix distcheck. 2017-12-09 19:31:23 +00:00
Julien Isorce
769e43a2e0 [456/906] glfilter/glmixer/gltestsrc/glupload: throw an element error if no parent bin
Fixes bug #602153
2017-12-09 19:31:23 +00:00
Julien Isorce
ade2526b8f [455/906] glimagesink: handle pixel-aspect-ratio 2017-12-09 19:31:23 +00:00
Filippo Argiolas
306526a19f [443/906] sobel: move some highly duplicated code into glfilter
Add a new convenience function in GstGLFilter that just draws an input
texture to a target texture using a simple shader with just a "tex"
uniform sampler.
Move draw_texture from glfiltersobel to glfilter. Still need to update
other plugins to this.
2017-12-09 19:31:23 +00:00
Julien Isorce
c390c30aac [432/906] GstGLDisplay: this is GL_DEPTH24_STENCIL8_EXT, not GL_DEPTH24_STENCIL8_EXT 2017-12-09 19:31:23 +00:00
Pierre Pouzol
c9dfa9c111 [431/906] GstGLDisplay: enable stencil buffer when using framebuffer objects.
Fixes Bug #612159
2017-12-09 19:31:23 +00:00
Nicholas Panayis
dfc2d42b7a [415/906] gstglwindow_win32: share opengl context in correct order
Allow to use the opengl context sharing feature if the original
context has been used already.
This is only possible on win32 with wglShareLists because on other
backends, the sharing is made when a context is created.
This new feature is only usefull when using external context
because gst-gl internally makes sure that the orginal context is not
already used when sharing it.

Fix bug #611067
2017-12-09 19:31:23 +00:00
Julien Isorce
b36b45e437 [412/906] Cocoa backend: improve support on GNUStep 2017-12-09 19:31:23 +00:00
Julien Isorce
0b6112c4a0 [411/906] gstglmixer: copy/past recent changes from gstvideomixer 2017-12-09 19:31:23 +00:00
Julien Isorce
4874b35304 [410/906] gstglmixer: inactivate shared gl context before to release ours
First, inactivate shared gl contexts known by each sink pad.
Then, destroy the gl context known by the glmixer.
Finally, re-activate shared gl contexts.
This is to satisfy the fact that no shared gl context must be current
when an opengl context is destroyed.
Moreover the application may hang or crash without those steps.
2017-12-09 19:31:23 +00:00
Julien Isorce
727191d7b6 [407/906] winCE backend: fix build 2017-12-09 19:31:22 +00:00
Julien Isorce
36a51c6e02 [406/906] glimagesink: add a client-data property
Also add it to glfilterapp.

Fixes #559131
2017-12-09 19:31:22 +00:00
Julien Isorce
32203f94ea [405/906] glfilter: add external-opengl-context property
It repairs the cluttershare and sdlshare example
2017-12-09 19:31:22 +00:00
Jan Schmidt
3672b5922f [403/906] gstglmixer: Initialise the debug category
Initialise the gstglmixer debug category before using it.
2017-12-09 19:31:22 +00:00
Julien Isorce
e70ed87aa8 [400/906] gstgldisplay: no need the I420 work around if ATI Mobility
fix #588653
2017-12-09 19:31:22 +00:00
Julien Isorce
f23b6144d5 [399/906] glmixer: fix when no more gl elements after it
For example:
videotestsrc ! glupload ! ... ! glfiter ! ... ! glmosaic ! fakesink
Usefull when using glmixer inside cluttershare or sdlshare cases.
2017-12-09 19:31:22 +00:00
Pratheesh Gangadhar
f93bb87e77 [394/906] gstgldisplay: use of GL_DEPTH_COMPONENT16 if OpenGL ES 2.0
glRenderbufferStorage does not accept GL_DEPTH_COMPONENT in
OpenGL ES 2.0.

Fix bug #593786
2017-12-09 19:31:22 +00:00
Julien Isorce
8fdf415fb7 [393/906] glmosaic: for now it's a cube mosaic
Also use GPtrArray instead of GArray in glmixer.
And add a pipeline to tests/pieplines
2017-12-09 19:31:22 +00:00
Julien Isorce
9e9b114010 [391/906] Cocoa: fix backend since recent changes
Before, the window size was given at its creation. Now, it's done at
the drawing step because it's only relevant when there is a glimagesink
element in the pipeline.
2017-12-09 19:31:22 +00:00
Julien Isorce
9741435b21 [389/906] fix codeblocks build on win32 2017-12-09 19:31:22 +00:00
Julien Isorce
525701cfca [388/906] just fix builds and indent 2017-12-09 19:31:22 +00:00
Julien Isorce
b85ffef956 [387/906] glmixer: add a glmixer base element
glmixer can be seen as a glfilter except it handles N requested
sink pads.
Each sink pad and the src pad are video/x-raw-gl.
glmixer is responsible for managing different framerates from inputs.
It uses OpenGL context sharing. It means that each input is in its
own OpenGL context shared together and shared with the OpenGL context
of the ouput gl chain.
Also add a glmosaic which is an example of implementation of glmixer.
For now glmosaic is a cube but it will be fixed in the next commits.
For now the glmixer has some weird behaviours in some configurations
but it will be improved in the next commits.
The autotools builds is temporarly broken since those changes
have been made on win32.
2017-12-09 19:31:22 +00:00
Julien Isorce
8c33ba0ba6 [385/906] rewrite the way a gstgldisplay is transmited to the gl elements
Before, a gstgldisplay was instancied by the gl src in terms of gl chain.
And then the next element got it through the first gstglbuffer.
Now, this is done though queries.
All glelements get their ref on a gstgldisplay in READY state.
This rewrite is mainly a first step to be able to share OpenGL context hold
by the gstgldisplay using more complex glelements.
For example, with a glvideomixer. The associated gstgldisplay of each gl chain
of the sink pads will share their OpenGL context.
2017-12-09 19:31:22 +00:00
Stefan Kost
2b9ff50feb [384/906] build: use <stdio.h> / "stdio.h" 2017-12-09 19:31:22 +00:00
Stefan Kost
c218748bc2 [383/906] build: include <stdio.h> when using printf & co. 2017-12-09 19:31:22 +00:00
Julien Isorce
8f6927c70a [382/906] ES2.0: remove warnings
Partially fix #593786
2017-12-09 19:31:22 +00:00
Julien Isorce
b639781471 [381/906] EGL and GLX:: set a minimum depth size 2017-12-09 19:31:22 +00:00
Julien Isorce
95dbe51fef [378/906] gldisplay: avoid to request gl thread when deleting a texture
A texture is not destroyed when when we are done with it.
This texture is just added to the texture pool in order to be
re-used. In this case no OpenGL code is executed so we do not need to
request gl thread.
2017-12-09 19:31:22 +00:00
Julien Isorce
fa41020ee4 [377/906] gldisplay: avoid to request gl thread when generating a texture
Thanks to the texture pool the gl textures are re-used.
When re-using one, no opengl code is executed so do not need
to request gl thread.
2017-12-09 19:31:22 +00:00
Stefan Kost
fa9177d037 [376/906] build: support openGLES on linux via autofoo. Partialy fixes #593786
Add a pkg-config check for opengl and if not found assume opengl-es. If user has
none of both one still get build error later on (there is no pkg-config for
opengl-es).
Add more files to EXTRA dist and build the opengles variant if selected.
Simmilar changes could be done for the winCE backend.
2017-12-09 19:31:22 +00:00
Julien Isorce
8bed6a5e85 [369/906] define missing glew macro on older versions 2017-12-09 19:31:22 +00:00
Julien Isorce
2e22bb4560 [368/906] Cocoa backend: fix crash when resizing
Default implementation of NSOpenglView::update is not safe because it
just calls update on the opengl context whereas we are not in the gl thread.
Also fix the white flickering when resizing, because now we need to call
the draw callback manually when resizing.
2017-12-09 19:31:22 +00:00
Julien Isorce
e467ea29e9 [365/906] Cocoa backend: make sure that nsapp is initialized
gst-launch-0.10 videotestsrc ! tee name=t ! queue ! glimagesink t. ! queue ! glimagesink
now works properly on MacOSX
2017-12-09 19:31:22 +00:00
Julien Isorce
8d6e91838a [364/906] make the cmake build work on MacOSX
We can now generate a Xcode project (or Unix Makfiles),
see INSTALL file
2017-12-09 19:31:22 +00:00
Julien Isorce
54ba5bccf5 [363/906] Cocoa backend: fix crash when closing
- All gstglwindow members are now modified only in the gl thread
to avoid thread concurrency
- OpenGL context is now properly clean
- fix a couple of things in implementation of xoverlay interface
2017-12-09 19:31:22 +00:00
Julien Isorce
b7162375a3 [362/906] make cocoa backend work on MacOSX
It works with both gst-launch and a cocoa app (non-embedded and embedded)
But there is still some problems:
  - sometimes crash when closing
  - flickering when resizing
  - embedded mode not perfect

I will first make the CMake build work with cocoa backend
in order to generate a XCode project.
Then it should be easier to fix those issues.
2017-12-09 19:31:22 +00:00
Jan Schmidt
8884cfefa8 [358/906] gstgldisplay: Close a small race starting the display thread
Take the display lock before signalling the create-context cond
to ensure the caller has dropped the lock and is therefore listening
for the signal.
2017-12-09 19:31:22 +00:00
Jan Schmidt
4ddbded3a8 [357/906] x11: Don't crash when the X11 display is not available.
Error out cleanly instead of crashing when the X11 display can't
be contacted.
2017-12-09 19:31:22 +00:00
Jan Schmidt
3fbe0f0a98 [352/906] fix typo
Change GST_GL_DISPLAY_PROJECTION_PERSPECIVE to
GST_GL_DISPLAY_PROJECTION_PERSPECTIVE.

Re-indent a couple of files that needed it.
2017-12-09 19:31:22 +00:00
Julien Isorce
f3fef483ec [350/906] fix window position when using xoverlay
x, y are the coordinates of the position inside
the new parent window.

Fixes #584877
2017-12-09 19:31:22 +00:00
Julien Isorce
ca1a2d33ca [349/906] can switch xoverlays while playing
Fixes bug #584877

Before this commit calling "gst_x_overlay_set_xwindow_id" more
than one time, had no effect.
It mainly affects the glimagesink implementation.
But on win32 (and CE), some stuff has to be done to
release the old parent.

And add a switchxoverlay example where the user
can click on left/right part of the main window to
switch the xoverlay.
2017-12-09 19:31:21 +00:00
LRN
389982df17 [347/906] fix miscast of a pointer in SetWindowLongPtr
GCC 4.4.0 complains error: cast from pointer to integer of different size
Fixes #584678.
2017-12-09 19:31:21 +00:00
Sebastian Dröge
3b0dacd8d6 [346/906] Fix linking by providing libtool the correct --tag parameter 2017-12-09 19:31:21 +00:00
Julien Isorce
de9f763bff [337/906] Improve cluttershare example
Use clutter_threads_API.
When just using glupload from rgb, we have to be sure that
the upload texture is not in use in our gst gl context.
2017-12-09 19:31:21 +00:00
Julien Isorce
9f8473cce0 [336/906] [x11/x11ES] fix some pointer cast warnings 2017-12-09 19:31:21 +00:00
Julien Isorce
0a649b133d [335/906] [cocoa] update since interface changed 2017-12-09 19:31:21 +00:00
Julien Isorce
f631cf4976 [334/906] [win32/winCE] fix some pointer cast warnings with mingw
And turn off deprecated Wp64 msvc compiler option.
2017-12-09 19:31:21 +00:00
Julien Isorce
d43fdd3daf [333/906] add force-aspect-ratio support 2017-12-09 19:31:21 +00:00
Julien Isorce
d1bd71e82b [331/906] indent and fix some compiler warnings 2017-12-09 19:31:21 +00:00
Julien Isorce
2eb9cb551c [330/906] Can now share textures with an external gl context
The external opengl context must be specify when creating
our OpenGL context (glx) or just after (wgl).
When calling glXCreateContext or wglShareLists, the
external opengl context must not be current.
Then our gl context can be current in the gl thread while
the external gl context is current in an other thread.
See tests/examples/clutter/cluttershare.c
2017-12-09 19:31:21 +00:00
David Schleef
09704b9e70 [329/906] Build for Cocoa on darwin, with various fixes 2017-12-09 19:31:21 +00:00
Julien
095be23366 [327/906] fix init FBO's texture attachment on ES 2.0 2017-12-09 19:31:21 +00:00
Julien
fd2028d109 [326/906] add X backend for OpenGL ES 2.0 2017-12-09 19:31:21 +00:00
Julien Isorce
ad8b227ff7 [322/906] [download YUY2/UYVY] fix a regression
The call to glLoadIdentity was removed by mistake during
OpenGL ES 2.0 integration.
2017-12-09 19:31:21 +00:00
Julien Isorce
61a8f34442 [321/906] add OpenGL ES 2.x support.
In OpenGL 2.x for Embedded System, a lot of basic scene/draw functions
have been removed. It means that everything is made using vertex and
fragment shaders.
I have also added a gstglwindow backend for winCE that uses EGL
(Native Platform Graphics Intercace) (which is a full part of
OpenGL ES specification). It remove the use of wgl/glx functions.
2017-12-09 19:31:21 +00:00
Julien Isorce
3c92a741a4 [320/906] fix position and content rect 2017-12-09 19:31:21 +00:00
Julien Isorce
8a77e2d859 [319/906] [win32 backend] fix transmition message to the parent.
The Qt mouvexoverlay example shows how to rotate the cube
by moving (+click) the mouve over a qwidget using xoverlay
interface.
2017-12-09 19:31:21 +00:00
Julien Isorce
dbdc0fb9eb [318/906] rename GNUmakefile(s) to GNUmakefile(s).gnustep 2017-12-09 19:31:21 +00:00
Julien Isorce
4ccd32c444 [317/906] implement gstglwindow for Cocoa (MacOS and GNUstep) 2017-12-09 19:31:21 +00:00
Julien Isorce
573f54433c [315/906] add GNUstep build 2017-12-09 19:31:21 +00:00
David Schleef
2e2213fbd7 [310/906] Global reindent
Indent parameters:
INDENT_PARAMETERS="--braces-on-if-line \
        --case-brace-indentation0 \
        --case-indentation2 \
        --braces-after-struct-decl-line \
        --line-length80 \
        --no-tabs \
        --cuddle-else \
        --dont-line-up-parentheses \
        --honour-newlines \
        --continuation-indentation4 \
        --tab-size8 \
        --indent-level2"
2017-12-09 19:31:21 +00:00
Sebastian Dröge
10494006b8 [309/906] Replay: Fix callbacks passed over XEvents on 64 bit architectures
Althought the XEvent's xclient.data.l array is an array of
longs they will be constrained to 32 bit by the X11 protocol.
On 64 bit architectures use two elements of the array to store
one pointer.
This fixes segfaults that happen at least for every example
on startup.
2017-12-09 19:31:21 +00:00
Julien Isorce
c83cbcd398 [306/906] fix CMake build and frozen CodeBlocks build 2017-12-09 19:31:21 +00:00
Julien Isorce
3b8429c2df [304/906] only load RGBA files.png 2017-12-09 19:31:21 +00:00
Julien Isorce
c060a8896d [301/906] depends on libpng instead of gdk_pixbuf 2017-12-09 19:31:21 +00:00
David Schleef
f0b62d760f [298/906] Revert "Fix indention"
This reverts commit 96e4ab18c2cf9876f6c031b9aba6282d0bd45a93.

You should have asked first.  And you would have been told "no",
because it causes people on development branches to do a huge
amount of extra work.
2017-12-09 19:31:21 +00:00
David Schleef
2f0e5b1dc4 [297/906] Revert "Fix callbacks passed over XEvents on 64 bit architectures"
This reverts commit 280771d09b58617b27201027de0e1194da376e72.
2017-12-09 19:31:21 +00:00
Sebastian Dröge
babd51c58f [296/906] Fix callbacks passed over XEvents on 64 bit architectures
Althought the XEvent's xclient.data.l array is an array of
longs they will be constrained to 32 bit by the X11 protocol.
On 64 bit architectures use two elements of the array to store
one pointer.
This fixes segfaults that happen at least for every example
on startup.
2017-12-09 19:31:21 +00:00
Sebastian Dröge
809c2ec04c [295/906] Fix indention 2017-12-09 19:31:21 +00:00
Sebastian Dröge
0068125ec8 [294/906] Fix format string compiler warnings by using G_GUINT64_FORMAT 2017-12-09 19:31:20 +00:00
David Schleef
71db1285d8 [291/906] Add check for GLEW_EXT_framebuffer_object 2017-12-09 19:31:20 +00:00
David Schleef
d98d188ad7 [290/906] Set GL_LIBS correctly in configure.ac
This doesn't detect the existence of libraries, which needs to
be fixed.
2017-12-09 19:31:20 +00:00
David Schleef
978ded841c [289/906] build fixes for Windows libraries 2017-12-09 19:31:20 +00:00
Julien Isorce
e184ad8a58 [288/906] add more debug ouputs about GLSL and mesa 2017-12-09 19:31:20 +00:00
julien
20298ee810 [287/906] fix a regression about glXChooseVisual which failed when using mesa, so attributes must be less restrictives. 2017-12-09 19:31:20 +00:00
Julien Isorce
76b6fcab5b [286/906] [win32] Register window class in gst_gl_window_class_init 2017-12-09 19:31:20 +00:00
Julien Isorce
6d2b8da3da [285/906] fix gl framerate in gst caps. Consider position in xoverlay. Fix inversion bettween COLS and ROWS, and move windows. 2017-12-09 19:31:20 +00:00
Julien Isorce
0867343017 [284/906] workaround about the ATI shader compiler on linux (setlocale) 2017-12-09 19:31:20 +00:00
Julien Isorce
1087da7753 [283/906] better result in cube and doublecube example. And some clean up debug and comments 2017-12-09 19:31:20 +00:00
Julien Isorce
121153fd21 [282/906] update CMake build 2017-12-09 19:31:20 +00:00
Julien Isorce
a50b222367 [281/906] Make cube example work on x11. Finish TODO task 9. 2017-12-09 19:31:20 +00:00
Julien Isorce
e1fd4232ad [280/906] Remove set_visible, because it's now automatically done when the first post redisplay comes. 2017-12-09 19:31:20 +00:00
Julien Isorce
7e3bc563e1 [279/906] finish set_xwindow_id (gst_gl_window_set_external_win_id): child is resized at the same time as the parent is. 2017-12-09 19:31:20 +00:00
Julien Isorce
1daf54222f [278/906] Implement set_xwindow_id (gst_gl_window_set_external_window_id). 2017-12-09 19:31:20 +00:00
Julien Isorce
aab706c46c [277/906] open x client connection for sender only at start up 2017-12-09 19:31:20 +00:00
Julien Isorce
312d0f588a [276/906] better deal with last pending custom cb and destroy_context_cb 2017-12-09 19:31:20 +00:00
Julien Isorce
128315ae60 [275/906] Make sure the gl ressoures are destroyed before to destroy gl window 2017-12-09 19:31:20 +00:00
Julien Isorce
b19684bbd0 [274/906] add some other debug outputs and checks 2017-12-09 19:31:20 +00:00
Julien Isorce
158f30bab1 [273/906] add some debug outputs about Visual and XVisualInfo 2017-12-09 19:31:20 +00:00
Julien Isorce
8840d306c4 [272/906] add a visible member to deal better with the first expose events 2017-12-09 19:31:20 +00:00
Julien Isorce
f878b84f90 [271/906] revert last commit because the crash comes from libselinux 2017-12-09 19:31:20 +00:00
Julien Isorce
daa5e24b41 [270/906] fix use of different Display structures which point on the same display name 2017-12-09 19:31:20 +00:00
Julien Isorce
c487389cfe [269/906] Better deal with XNextEvent and XSendEvent 2017-12-09 19:31:20 +00:00
Julien Isorce
57488b1a32 [268/906] Better deal with Atoms 2017-12-09 19:31:20 +00:00
Julien Isorce
51231595c7 [267/906] Get ride of calling sleep in gl thread X loop 2017-12-09 19:31:20 +00:00
Julien Isorce
80efa96e52 [266/906] secure close when clicking on the cross 2017-12-09 19:31:20 +00:00
Julien Isorce
3f54cd9d94 [264/906] Rewrite gstglwindow_x11.c because X API is not thread safe. 2017-12-09 19:31:20 +00:00
Julien Isorce
14d3d10e07 [263/906] discard x custom messages which are of date 2017-12-09 19:31:20 +00:00
Julien Isorce
745e20a2e1 [262/906] Works on linux but still some bugs. Fix autotools build. 2017-12-09 19:31:20 +00:00
Julien Isorce
5ec4972d3d [261/906] implement quit x message loop 2017-12-09 19:31:20 +00:00
Julien Isorce
baedf3a65b [260/906] try to make XSendEvent blocker (as win32 SendMessage is) 2017-12-09 19:31:19 +00:00
Julien Isorce
cb83e88c0c [259/906] continue x implementation (but still not tested) 2017-12-09 19:31:19 +00:00
Julien Isorce
bbc1c6b14f [258/906] setup x message loop 2017-12-09 19:31:19 +00:00
Julien Isorce
da3c0fd570 [257/906] begin gstglwindow_x11.c implementation 2017-12-09 19:31:19 +00:00
Julien Isorce
c4200fe1a0 [256/906] fix CMake an CodeBlocks builds 2017-12-09 19:31:19 +00:00
Julien Isorce
85fa075eae [255/906] fix window closure when using gst xoverlay interface 2017-12-09 19:31:19 +00:00
Julien Isorce
9169b822e7 [254/906] Better handle when the parent window is resizing, and cleanup some code 2017-12-09 19:31:19 +00:00
Julien Isorce
c7ca0d5c2f [253/906] win32: re-implement supports for gst xoverlay interface, on this branch 2017-12-09 19:31:19 +00:00
Julien Isorce
f9756b85d2 [252/906] avoid a dead lock on window closure 2017-12-09 19:31:19 +00:00
Julien Isorce
fc9479d289 [251/906] Properly clean OpenGL contexts 2017-12-09 19:31:19 +00:00
Julien Isorce
a6fdb20154 [250/906] win32: basic stuffs are working now on this branch with this new deep design (gstglwindow) 2017-12-09 19:31:19 +00:00
Julien Isorce
c4c9897f16 [249/906] begin GstGLWindow in order to totally remove gstfreeglut 2017-12-09 19:31:19 +00:00
Filippo Argiolas
32de0e6e91 [243/906] Support for missing videoformats in glupload
Add support for missing alpha channeled videoformats (RGBA, BGRA,
ARGB, ABGR) in gst_gl_display_do_upload_fill.
2017-12-09 19:31:19 +00:00
Julien Isorce
3d54d22894 [242/906] Fix crash in filters when going to NULL with no display 2017-12-09 19:31:19 +00:00
Filippo Argiolas
f18ba293cb [233/906] no need to explicit set the debug category if default one is used 2017-12-09 19:31:19 +00:00
Filippo Argiolas
6c04333f11 [230/906] explicit check g_getenv return value to be not NULL 2017-12-09 19:31:19 +00:00
Julien Isorce
ec8aa615e5 [229/906] update authors from the CVS repository 2017-12-09 19:31:19 +00:00
Filippo Argiolas
34663eccd9 [228/906] output shaders info log only if GST_GL_SHADER_DEBUG env variable is set. Should fix TODO task 18 2017-12-09 19:31:19 +00:00
Julien Isorce
cd20053491 [226/906] check on win32 that every tests/pipelines and tests/examples (generic, gtk, qt) still work 2017-12-09 19:31:19 +00:00
Julien Isorce
40cd0281a4 [225/906] fix a regression that made the gltestsrc element not working 2017-12-09 19:31:19 +00:00
Julien Isorce
a125004d82 [224/906] fix a regression about MESA YCbCr colorspace conversion 2017-12-09 19:31:19 +00:00
Julien Isorce
ff87048836 [223/906] fix a regression (sometimes a FBO is needed even if the video source is rgb) 2017-12-09 19:31:19 +00:00
Julien Isorce
69159fa0af [222/906] Finish TODO task 17 2017-12-09 19:31:19 +00:00
Julien
5759b60ba3 [221/906] fix g_int_hash -> g_direct_hash 2017-12-09 19:31:19 +00:00
Julien Isorce
bb8ba84647 [220/906] Use a better key for the pool of textures 2017-12-09 19:31:19 +00:00
Julien Isorce
cdffac5606 [219/906] Use a gst debug category for GstGLDisplay instead of g_print, gst-launch-0.10 --gst-debug=gldisplay:3 videotestsrc ! glimagesink 2017-12-09 19:31:19 +00:00
Julien
88b6f0a3cf [218/906] The CMake build now works on my Kubuntu-KDE4.1.1 2017-12-09 19:31:19 +00:00
Julien Isorce
3d6116ee45 [217/906] Add cmake build http://www.cmake.org. See CMake install instructions in the INSTALL file. (I have not correctly configured yet the CMake build for unix, BE patient) 2017-12-09 19:31:19 +00:00
Julien Isorce
0d6c956cfb [212/906] add a glbumper (bump mapping filter through GLSL) that exposes how to use both vertex and fragment shaders 2017-12-09 19:31:19 +00:00
Julien Isorce
b4c0527eff [211/906] Fix upload AYUV and YV12 (a regression in last commits) 2017-12-09 19:31:18 +00:00
julien User
97a78f8580 [210/906] get ride of a wrong color on nvidia/linux when converting yv12 to rgb through GLSL 2017-12-09 19:31:18 +00:00
julien User
5d93e53f47 [209/906] fix warnings 2017-12-09 19:31:18 +00:00
Julien Isorce
a0cd1d279f [208/906] fix upload AYUV, regression during the 2 last commits 2017-12-09 19:31:18 +00:00
Julien Isorce
ddf4cdd2df [207/906] oups, fix my mistake on last commit 2017-12-09 19:31:18 +00:00
unknown
1b8b53fb1c [206/906] Do not use frame buffer object when "input video is RGB" or when "GLSL is not available and YCbCr is available". So frame buffer object is not a plugin requirement anymore. So I decreased the OpengGL version from 1.4 to 1.2 (maybe less?) 2017-12-09 19:31:18 +00:00
Julien Isorce
35d1c73109 [205/906] use a GHash table instead of a GData for the texture pool 2017-12-09 19:31:18 +00:00
Julien Isorce
2f01ea128f [204/906] get ride of a bug on ATI related to YV12 to rgb conversion through GLSL and add an example 2017-12-09 19:31:18 +00:00
Filippo Argiolas
0adee75dce [201/906] fix a signedness warning 2017-12-09 19:31:18 +00:00
Julien Isorce
3ae1ec7c00 [200/906] get ride of a ATI bug related to GLSL colorspace conversion for I420 and YV12 to rgb 2017-12-09 19:31:18 +00:00
Filippo Argiolas
4440a3cfed [171/906] import fxtest (little gtk app to easily test effects) from cvs branch, fixed rgbtocurve. 2017-12-09 19:31:18 +00:00
Julien Isorce
91870f6d34 [157/906] move thread_do_upload_make from thread_do_upload to thread_init_upload 2017-12-09 19:31:18 +00:00
Julien Isorce
e6db0628e8 [156/906] fix a crash that could happens when using at least 2 gl context and when closing a window on linux 2017-12-09 19:31:18 +00:00
Filippo Argiolas
52a646f240 [153/906] Try to genereate textures within gstglfilterblur to see if the new thread_use_fbo works both with textures from the pool and custom ones 2017-12-09 19:31:18 +00:00
Filippo Argiolas
dbcb82d8b2 [152/906] remove an unneeded (really?) glTexImage 2017-12-09 19:31:18 +00:00
Julien Isorce
712e7626b7 [151/906] ISO C90 2017-12-09 19:31:18 +00:00
Julien Isorce
1a7a34b5c0 [150/906] glTexImage2D(w, h, NULL) is now called only one time (mem alloc) 2017-12-09 19:31:18 +00:00
Filippo Argiolas
46812f8be9 [149/906] same as previous commit 2017-12-09 19:31:18 +00:00
Filippo Argiolas
6a9d6de71f [148/906] Fix rgb issue. Current program should always be set to 0 when a new texture is attached to a fbo. 2017-12-09 19:31:18 +00:00
Julien Isorce
4629bf1bc5 [146/906] remove filteredge 2017-12-09 19:31:18 +00:00
Filippo Argiolas
ce17f1a2db [143/906] Add init and reset callbacks in GstGLFilter to run arbitrary gl code at start and stop. Useful to init and cleanup custom gl resources. 2017-12-09 19:31:18 +00:00
Filippo Argiolas
a54a462705 [142/906] Add a generic action to be able to execute arbitrary gl code within the gl thread with less pain 2017-12-09 19:31:18 +00:00
Filippo Argiolas
4eb4c0beea [141/906] some steps towards simplification. added a convenience function to gstglfilter and some comment here and there 2017-12-09 19:31:18 +00:00
Filippo Argiolas
7ea58ac050 [140/906] Fix GL_STACK_OVERFLOW 2017-12-09 19:31:18 +00:00
Julien Isorce
e0f1cfeac5 [139/906] fix warnings when compiling upload/download shaders 2017-12-09 19:31:18 +00:00
Filippo Argiolas
b384525a55 [138/906] is that videoformat pointer really needed? 2017-12-09 19:31:18 +00:00
Filippo Argiolas
14849d65ea [137/906] Don't reallocate texture memory every time in upload_* functions. 2017-12-09 19:31:18 +00:00
Filippo Argiolas
395ea4fa2a [136/906] reindent gstgldisplay with gstreamer-c-mode 2017-12-09 19:31:18 +00:00
Julien Isorce
db7490cd72 [133/906] finish todo task 4 2017-12-09 19:31:18 +00:00
Julien Isorce
d0e63e68ac [132/906] make the plugin properly shutdown when one of the check requirements failed 2017-12-09 19:31:18 +00:00
Filippo Argiolas
9b45dcae3e [131/906] fix warnings (unused vars) 2017-12-09 19:31:18 +00:00
Julien Isorce
ffbc182446 [130/906] use GstGLShader in the GLSL colorspace conversion 2017-12-09 19:31:17 +00:00
Julien Isorce
de6eb8677e [128/906] add GstGLShader stuffs in the vs8 project, fix laplacian fragment code to make it compile on ATI, and fix check function about Opengl and Glew version 2017-12-09 19:31:17 +00:00
Filippo Argiolas
c47fa4dc62 [127/906] Imported GstGLShader from cvs branch. Added a demo laplacian convolution filter to demonstrate how this can be integrated with minimum effort. 2017-12-09 19:31:17 +00:00
David Schleef
4f39df0532 [126/906] Change some guints to GLuints because of warnings on OS/X. 2017-12-09 19:31:17 +00:00
David Schleef
9f305eecb8 [125/906] Add libraries as appropriate to fix compilation 2017-12-09 19:31:17 +00:00
Julien Isorce
69abbdd760 [123/906] X Specific: better implementation of the gst_gl_set_window_id
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@584 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
a5bf134265 [122/906] better implementation of gst_gl_display_set_window_id for win32. (change the window of the current wglcontext instead of reinit everything, and so avoid some problems about opengl objects that could be init in the previous wglcontext and so no usable in the newer wglcontext, it what the case for the first texture) This newer implementation has not been made yet on linux
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@582 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
ed46d70150 [121/906] avoid use of GLSL functions when fragment_shader is not available
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@581 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
cbd66b24c8 [120/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@580 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
8b14eea6ec [119/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@579 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
f4b54bd934 [118/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@573 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
7a063dd47f [116/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@563 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
908e74de67 [115/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@556 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
a192d39638 [114/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@555 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
a903f96e15 [113/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@554 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
8807e62119 [112/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@552 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
edda6cc72d [111/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@548 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
886bd3ee7d [109/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@543 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
49e944778e [108/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@540 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
18177e6c46 [107/906] fix opengl version checker
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@534 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
49970b27aa [105/906] up Sobel filter and gl/glew version checker
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@518 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
8685e547b4 [104/906] start to add a glfilteredge that proceeds edge detection using GLSL
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@517 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
e9f924910c [096/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@508 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
e74175e328 [095/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@507 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
e34a278e35 [094/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@506 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
b63a97c50c [092/906] Finish to revive the gltestsrc. Next step is to do some refactoring.
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@504 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
bca92ed962 [091/906] start to revive the gltestsrc
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@503 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
f5f2e51a31 [088/906] fix some caps negociations those pipelines works fine : gst-launch-0.10 -v videotestsrc ! video/x-raw-yuv, width=320, height=240 ! glgraphicmaker ! video/x-raw-gl, width=720 , height=576 ! glfiltercube ! glimagesink and gst-launch-0.10 -v videotestsrc ! video/x-raw-yuv, width=320, height=240 ! glgraphicmaker ! video/x-raw-gl, width=720 , height=576 ! glimagesink
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@500 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
1e2ca1dfde [087/906] glfilter can accept to have an input size different than the out put size : video/x-raw-gl, width=w1, height=w1 ! glfilter ! video/x-raw-gl, width=w2, height=w2 ! (fix every examples)
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@499 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
2c12b6f41e [086/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@498 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
4fb5b5bde1 [085/906] fix regressions about glvideomaker.
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@497 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
7973568f07 [084/906] add a glfilterapp which holds the client draw and reshape callbacks (some "wanted" regressions about the glvideomaker, have been done with this version. Will be fix in next commits)
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@496 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
dc4119eafe [083/906] finish to implement the glfilter: example : gst-launch-0.10 videotestsrc num_buffers = 100 ! glgraphicmaker ! glfiltercube ! glimagesink
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@495 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
f580bb77f4 [082/906] glfilter can request, use and reject a FBO (step 1)
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@494 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
d01ae3ed0b [081/906] start to add a glfilter
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@493 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
392ab37b94 [080/906] fix gstfreeglut linux implementation to correctly handle the gstxoverlay interface
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@486 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
89cd65d3ae [079/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@478 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
74a71c67c2 [077/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@475 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
0c83068521 [076/906] check OpenGL and Glew versions
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@474 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
890ca473e1 [075/906] indent
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@451 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
60498e3370 [074/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@446 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
a32ff29e64 [073/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@445 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
d7d5b16051 [072/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@438 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
a9686159a3 [071/906] remove all warnings
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@437 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
7ce0cbad40 [070/906] implement and fix onClose: when a user click on the cross of an internal window (there is not this issue when using the gstxoverlay interface)
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@436 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
ee488f6e6f [069/906] add gstreamer license
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@435 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
708918b3ec [066/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@430 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
f386219271 [065/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@428 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
124521e2de [063/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@423 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
f0e8c70845 [062/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@421 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:16 +00:00
David Schleef
98e2942fed [061/906] First SVN commit. This commit is a hack to make git-rebase work 2017-12-09 19:31:16 +00:00
Tim-Philipp Müller
01d6f2818c [060/906] * gst-libs/gst/gl/gstglbuffer.c: (gst_gl_buffer_format_from_video_format): Fix compiler warning if there are video format enums gstglbuffer doesn't know about yet. * gst-libs/gst/gl/gstgldisplay.c: (gst_gl_display_upload_texture_rectangle), (gst_gl_display_draw_texture): Fix printf format for 64-bit integers. 2017-12-09 19:31:16 +00:00
Tim-Philipp Müller
71e5427e06 [058/906] * gst-libs/gst/gl/Makefile.am: The library needs to link against libgstvideo-0.10. * gst/gl/Makefile.am: The plugin does not (I think) need to link against GL or libgstvideo, since our new gstreamer GL library already does that, but it does need to link against our brand-new libgstgl-0.10. 2017-12-09 19:31:16 +00:00
David Schleef
894db7a964 [056/906] * configure.ac: Readd pre-pkgconfig OpenGL detection, since pkgconfig requires Mesa from git master. * gst/gl/glimagesink.c: * gst/gl/gstopengl.c: Move debug category initialization to element. * gst-libs/gst/gl/Makefile.am: * gst-libs/gst/gl/gstglfilter.c: * gst-libs/gst/gl/gstglfilter.h: * gst/gl/gstglfilter.c: * gst/gl/gstglfilter.h: Move glfilter to library. * pkgconfig/gstreamer-plugins-gl.pc.in: Add gstreamer-base-0.10 as a requirement. * po/en.po: Update. 2017-12-09 19:31:16 +00:00
Tim-Philipp Müller
2134ce8c9c [055/906] * configure.ac: * docs/Makefile.am: * gst-libs/Makefile.am: * gst-libs/gst/gl/Makefile.am: * gst/gl/Makefile.am: * tests/Makefile.am: Fix compilation in uninstalled setup and some distcheck-y bits (not all though). 2017-12-09 19:31:16 +00:00
David Schleef
e0f6fa8e62 [054/906] Fixes to make project compile. Probably still doesn't work. * configure.ac: * gst-libs/gst/Makefile.am: * gst-libs/gst/gl/Makefile.am: * gst/Makefile.am: * gst/gl/Makefile.am: * gst/gl/gstgltestsrc.c: * po/LINGUAS: * win32/MANIFEST: 2017-12-09 19:31:16 +00:00
David Schleef
d2dd3ef923 [053/906] Add project infrastructure. Not complete, doesn't work. * .cvsignore: * AUTHORS: * COPYING: * COPYING.LIB: * INSTALL: * Makefile.am: * NEWS: * README: * RELEASE: * REQUIREMENTS: * autogen.sh: * configure.ac: * docs/.cvsignore: * docs/Makefile.am: * docs/libs/Makefile.am: * docs/plugins/Makefile.am: * docs/version.entities.in: * ext/Makefile.am: * gst-libs/Makefile.am: * gst-libs/gst/Makefile.am: * gst-libs/gst/gl/Makefile.am: * gst-plugins-gl.doap: * gst-plugins-gl.spec.in: * gst/Makefile.am: * m4/.cvsignore: * m4/Makefile.am: * pkgconfig/.cvsignore: * pkgconfig/Makefile.am: * pkgconfig/gstreamer-plugins-gl-uninstalled.pc.in: * pkgconfig/gstreamer-plugins-gl.pc.in: * sys/Makefile.am: * tests/Makefile.am: * tests/check/Makefile.am: * tests/examples/Makefile.am: * tests/icles/Makefile.am: * tools/Makefile.am: * win32/common/config.h.in: 2017-12-09 19:31:16 +00:00
David Schleef
e0fc0cebe6 [052/906] * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldisplay.c: * sys/glsink/gstgldisplay.h: * sys/glsink/gstglupload.c: Handle xoverlay exposes correctly. This means glimagesink works correctly most of the time in totem (fullscreening being an execption). Doesn't handle expose events directly to the GL window. 2017-12-09 19:31:16 +00:00
David Schleef
45d3247a68 [051/906] * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/gstgldisplay.c: * sys/glsink/gstgldisplay.h: * sys/glsink/gstopengl.c: Reenable video/x-raw-rgb and x-raw-yuv for glimagesink. Enable vblank synchronization. Remove unused code. 2017-12-09 19:31:16 +00:00
David Schleef
6fd801ba2a [049/906] * configure.ac: * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstglconvert.c: * sys/glsink/gstgldisplay.c: * sys/glsink/gstgldisplay.h: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglfilter.h: * sys/glsink/gstglfilterexample.c: * sys/glsink/gstgltestsrc.c: * sys/glsink/gstglupload.c: Major cleanup of code. Convert glupload to BaseTransform. Handle caps negotiation mostly correctly. Reenable in build. 2017-12-09 19:31:16 +00:00
David Schleef
2a6bf50ba7 [047/906] * sys/glsink/gltestsrc.c: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglfilterexample.c: * sys/glsink/gstgltestsrc.c: * sys/glsink/gstglupload.c: Convert gldownload to BaseTransform. Make glfilterexample visually interesting. Add support for various formats to downloading. Fix a few places where we leak GL state to other elements (bad, but hard to prevent). 2017-12-09 19:31:15 +00:00
David Schleef
5e620c9673 [046/906] * sys/glsink/BUGS: * sys/glsink/Makefile.am: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstglconvert.c: * sys/glsink/gstgldisplay.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglfilter.h: * sys/glsink/gstglfilterexample.c: * sys/glsink/gstgltestsrc.c: * sys/glsink/gstglupload.c: * sys/glsink/gstopengl.c: Remove code that handles non-texture buffers. Add a GstGLBufferFormat type that corresponds to how to use the texture, not the original video format. Convert gstflfilter.c into a base class, add glfilterexample and glconvert elements. * sys/glsink/color_matrix.c: Minor ramblings about color conversion matrices. 2017-12-09 19:31:15 +00:00
David Schleef
c46924bb35 [045/906] * sys/glsink/Makefile.am: * sys/glsink/gltestsrc.c: * sys/glsink/gltestsrc.h: * sys/glsink/gstgldisplay.c: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstgltestsrc.c: * sys/glsink/gstgltestsrc.h: * sys/glsink/gstglupload.c: * sys/glsink/gstopengl.c: Add gltestsrc element, a duplicate of videotestsrc that uses GL rendering to create images. More cleanup. 2017-12-09 19:31:15 +00:00
David Schleef
f19f6cc1ab [044/906] * sys/glsink/gstglbuffer.c: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: Clean up code. Fix a few leaks. 2017-12-09 19:31:15 +00:00
David Schleef
de7967f306 [043/906] * sys/glsink/Makefile.am: * sys/glsink/glimagesink.h: * sys/glsink/glvideo.c: * sys/glsink/glvideo.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldisplay.c: * sys/glsink/gstgldisplay.h: Rename glvideo.[ch] to gstgldisplay.[ch]. 2017-12-09 19:31:15 +00:00
David Schleef
7e42503811 [042/906] * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/glvideo.c: * sys/glsink/glvideo.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglupload.c: Rewrite a bunch of code to use textures as the intermediate instead of renderbuffers. upload, download, filtering all work. 2017-12-09 19:31:15 +00:00
David Schleef
c4a58e40e1 [041/906] * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glvideo.c: * sys/glsink/glvideo.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstgldownload.c: * sys/glsink/gstglupload.c: A careful read of the documentation reveals that I can't use renderbuffers as textures. Duh. Checkpoint because I'm about to rewrite a bunch of code. 2017-12-09 19:31:15 +00:00
David Schleef
4c892cb683 [040/906] * sys/glsink/Makefile.am: * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/glvideo.c: * sys/glsink/glvideo.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglupload.c: * sys/glsink/gstopengl.c: Switch to using framebuffer_objects instead of GLXPixmaps, because that's what my driver supports. Remove GLDrawable, since GstGLDisplay now has a default drawable and context. 2017-12-09 19:31:15 +00:00
David Schleef
d41abaed50 [037/906] * sys/glsink/Makefile.am: * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glvideo.c: Add vblank synchronization. Isn't really working on my driver. :( 2017-12-09 19:31:15 +00:00
Tim-Philipp Müller
b60cc0274c appsrc: add support for pushing buffer lists
And samples that carry buffer lists.

https://bugzilla.gnome.org/show_bug.cgi?id=752363
2017-12-09 11:09:16 +00:00
Matt Staples
4b4f8d1a05 rtsp: Register GstRTSPMessage as a boxed type
Registering GstRTSPMessage as a boxed type allows it to be conveniently
used as an argument to signals, a-la GstSDPMessage, and general usage
from bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=762884
2017-12-06 10:40:55 +02:00
Havard Graff
1066690b14 audiodecoder: fix buffer leak in error code path 2017-12-05 20:10:58 +00:00
Thibault Saunier
a37f4eeff8 audio: Add missing G_BEGIN/END_DECLS 2017-12-01 10:15:56 -03:00
Thiago Santos
17e1e308a3 codec-utils: add some missing gi annotations
Missing some array and out parameters annotations

https://bugzilla.gnome.org/show_bug.cgi?id=790950
2017-11-30 01:24:14 -08:00
Julien Isorce
8af7b1f70b appsink: fix end condition of query drain handler
The while loop should end when all buffers "and" the preroll
buffer are consumed but this means to continue waiting if there
are still some pending buffers "or" preroll buffer.

The unit test was correct but racy because of this mistake.
I.e. because of the wrong "and" the while could finish too early.

cd tests/check && GST_CHECKS=test_query_drain make elements/appsink.forever

https://bugzilla.gnome.org/show_bug.cgi?id=789763
2017-11-29 15:09:04 +00:00
Tim-Philipp Müller
4bfba1dcda video: add missing GST_EXPORT 2017-11-26 18:14:39 +00:00
Sebastian Dröge
d33c407f6b rtp: Require gconstpointer instead of gpointer for gst_rt[c]p_buffer_new_copy_data() 2017-11-17 14:14:55 +02:00
Edward Hervey
4c2f91d69e discoverer: Don't remove element when switching to PLAYING
There is a race going on somewhere when we attempt to remove elements
*while* the parent container is switching to PLAYING.

In order to avoid this issue with discoverer, make sure we never
remove elements while switching to PLAYING.
2017-11-15 10:55:56 +01:00
Edward Hervey
9c4b3b1ee7 discoverer: Don't add pads/elements when cleaning up
There is no need to add more pads/elements since we are already done.
2017-11-15 10:55:55 +01:00
Edward Hervey
4636b8dd6f discoverer: Remove probe when done 2017-11-15 10:55:55 +01:00
Sebastian Dröge
b9aaa7f4f2 audiobasesink: Print signed time offset as a signed number 2017-11-08 19:24:55 +02:00
Sebastian Dröge
9bbcccc21e audiostreamalign: Add G_BEGIN_DECLS/G_END_DECLS 2017-11-08 19:24:55 +02:00
Edward Hervey
89238f9de1 discoverer: Don't switch to PLAYING if we saw an error
If we saw an error on the bus, we can't be guaranteed that element will
function properly anyway. Avoids weird state change races also
2017-11-04 19:48:13 +01:00
Edward Hervey
fcf09c18f2 Revert "discoverer: Avoid race of adding elements while stopping"
This reverts commit 9a8cb29970.

The problem is deeper down the stack
2017-11-04 19:09:19 +01:00
Edward Hervey
ae865ec1d1 rtcpbuffer: fix left shift override
Needs to be cast to the target type
2017-11-04 16:56:10 +01:00
Edward Hervey
9a8cb29970 discoverer: Avoid race of adding elements while stopping
This would result in a lot of warnings regarding elements not being
in NULL state when removed, or even leaked elements.

Instead make sure we take the lock and check whether we are processing
or not before allocating or adding anything to the pipeline
2017-11-04 16:13:06 +01:00
Edward Hervey
31d5ac15b2 video-converter: Fix undefined left shift
Cast value to target type
2017-11-04 12:18:39 +01:00
Mathieu Duponchelle
c493c564ba codecutils: improve input validation in opus header parsing
Invalid input files do not warrant assertions. Instead
output error messages and let the error bubble up.
2017-11-03 17:25:47 +01:00
Justin Kim
91179622eb sdpmessage: add_attribute accepts NULL value
The attribute can be defined without value regardless session-level
or media-level.
Although `gst_sdp_message_insert_attribute` can be used to set NULL,
it would be easier if `gst_sdp_message_add_attribute` accepts NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=789841
2017-11-03 17:56:39 +11:00
Tim-Philipp Müller
fc94627778 audioaggregator: 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 13:02:07 +00:00
Tim-Philipp Müller
5d3795163b audioaggregator: make class padding larger 2017-11-02 11:44:54 +00:00
Edward Hervey
24a5a03d27 vorbistag: Fix previous comment
We already NULL-ended the string, don't use the bogus cur_size
2017-11-02 10:43:02 +01:00
Edward Hervey
ee55f94ac0 riff-media: Handle strf_data being NULL
Instead of trying to get the size of a NULL buffer :)
2017-11-02 09:19:21 +01:00
Edward Hervey
62081fe583 vorbistag: Check whether tag name is valid
In the same way we check before whether the content of the tag
is UTF-8
2017-11-02 08:19:13 +01:00
Edward Hervey
7e28f6c076 discoverer: Check return values
The target pad of a ghostpad could have gone (due to shutdown taking
place for example). Check for it's existence before doing anything
with it.
2017-11-02 08:04:27 +01:00
Edward Hervey
39ba6427f1 discoverer: Uniquely name elements
Helps identifying actual queue/fakesink usage. There seems to be
a race in discoverer, this should help track it down.
2017-11-02 07:18:17 +01:00
Sebastian Dröge
9c2d5e863e rtspconnection: Allow setting a custom accept-certificate function for manually checking a TLS certificate for validity
https://bugzilla.gnome.org/show_bug.cgi?id=785024
2017-11-01 13:41:42 +02:00
Edward Hervey
8e867aefe0 vorbistag: Fix leak in error case
Don't leak the vendor_string on error cases
2017-11-01 10:53:54 +01:00
Justin Kim
33709106e9 rtcpbuffer: Add XR type
RTCP XR provides supplements information of the report blocks
from SR and RR. This patch is for downgrading warnings when
XR is detected before implementing entire block types of RFC3611.

https://bugzilla.gnome.org/show_bug.cgi?id=789743
2017-11-01 10:54:10 +02:00
Justin Kim
d100180ce3 sdpmessage: do not append NULL value for session-level attr
If an attribute is defined without value, the generated text
should be 'a=key' rather than 'a=key:'. For media-level, it
has already been done.

https://bugzilla.gnome.org/show_bug.cgi?id=789742
2017-11-01 17:09:47 +11:00
Edward Hervey
cb0b73672c Update disted orc file
For latest orc fixes
2017-10-31 11:57:23 +01:00
Guillaume Desmottes
7950a4614c videoencoder: add qos property
This new property control if the encoder base class should gather QoS
stats and if subclasses should use them by dropping late frames.

https://bugzilla.gnome.org/show_bug.cgi?id=789467
2017-10-25 14:22:15 +02:00
Ashish Kumar
346c24dc4b gst-plugins-base: gstaudiochannels: Handled buffer mapping failure
https://bugzilla.gnome.org/show_bug.cgi?id=789458
2017-10-25 13:04:28 +02:00
Matthew Waters
a240880664 Revert "videoencoder: flush encoder in transition PAUSED->READY"
This reverts commit 877664a414.
2017-10-22 01:00:10 +11:00
Matthew Waters
a81b5a95ba Revert "videodecoder: flush decoder in transition PAUSED->READY"
This reverts commit 6e9edc3031.
2017-10-22 01:00:08 +11:00
Matthew Waters
06aba17d19 Revert "audioencoder: flush encoder in transition PAUSED->READY"
This reverts commit 2dcdd13512.
2017-10-22 01:00:06 +11:00
Matthew Waters
b8369ba20d Revert "audiodecoder: flush decoder in transition PAUSED->READY"
This reverts commit e7cf4c058d.
2017-10-22 01:00:03 +11:00
Olivier Crête
c2b462837b audioaggregator: Accept buffer with no data, but duration and gap flag
These are produced from GAP events by the base class.

https://bugzilla.gnome.org/show_bug.cgi?id=784846
2017-10-21 12:06:08 +02:00
Nicola Murino
877664a414 videoencoder: flush encoder in transition PAUSED->READY
https://bugzilla.gnome.org/show_bug.cgi?id=787311
2017-10-20 01:55:19 +11:00
Nicola Murino
6627dd3ae3 videoencoder: remove the lock from gst_video_encoder_flush
The lock is already taken before calling the flush method and can lead to
deadlock for some encoders that need to take the same lock from another
thread while flushing

https://bugzilla.gnome.org/show_bug.cgi?id=787311
2017-10-20 01:55:10 +11:00
Nicola Murino
6e9edc3031 videodecoder: flush decoder in transition PAUSED->READY
https://bugzilla.gnome.org/show_bug.cgi?id=787311
2017-10-20 01:55:07 +11:00
Nicola Murino
2dcdd13512 audioencoder: flush encoder in transition PAUSED->READY
https://bugzilla.gnome.org/show_bug.cgi?id=787311
2017-10-20 01:55:04 +11:00
Nicola Murino
e7cf4c058d audiodecoder: flush decoder in transition PAUSED->READY
https://bugzilla.gnome.org/show_bug.cgi?id=787311
2017-10-20 01:54:54 +11:00
Guillaume Desmottes
bcca3b926c videoencoder: implement QoS
It allows encoders to detect and drop input frames which are already
late to increase the chance of the pipeline to catch up.

The QoS logic and code is directly copied from gstvideodecoder.c.

https://bugzilla.gnome.org/show_bug.cgi?id=582166
2017-10-19 16:26:22 +02:00
Thibault Saunier
6d4e17eee8 doc: Add some missing/malformed Since markers 2017-10-16 14:17:00 +02:00
Stefan Sauer
023170e2f8 audioaggregator: improve readability in offset calculation
Don't reuse the offset variables will contain a sample offset for an
intermediate time value. Instead add a segment_pos variable of type
GstClockTime for this. Use The clock-time macros to check if we got
a valid time.
2017-10-15 10:29:20 +02:00
Stefan Sauer
bd34243177 audioaggregator: move comment to the place it is meant to be
This probably got shifted after some changes.
2017-10-14 18:20:30 +02:00
Mathieu Duponchelle
d4db88772b audioconvert: allow empty mix matrix
When an empty mix matrix is passed, audio-channel-mixer
will now generate a (potentially truncated) identity matrix,
this replicates the behaviour of audiomixmatrix in first-channels
mode.

https://bugzilla.gnome.org/show_bug.cgi?id=788833
2017-10-11 22:57:38 +02:00
Mathieu Duponchelle
545e0b003b API: gst_discoverer_info_get_live
https://bugzilla.gnome.org/show_bug.cgi?id=783722
2017-10-11 19:47:19 +02:00
Mathieu Duponchelle
2a26baf4be API: gst_discoverer_audio_info_get_channel_mask
https://bugzilla.gnome.org/show_bug.cgi?id=783722
2017-10-11 19:46:29 +02:00
Mathieu Duponchelle
8e2805cf06 audio-converter: remove unused mix_matrix private field 2017-10-11 17:00:08 +02:00
Thibault Saunier
20fae3f1e0 rtsp: Start implementing support for RTSP 2.0
Properly handle protocol version in the connection

Add the following headers types:
  * Pipelined-Request
  * Media-Properties
  * Seek-Style
  * Accept-Ranges

https://bugzilla.gnome.org/show_bug.cgi?id=781446
2017-10-05 13:16:03 -03:00
Stefan Sauer
1b84283396 audioaggregator: remove buffer!=NULL check
Acording to the logic this cannot happen (we already check this before). So
add a assert like we do above and remove the check. This make it clearer that
we check for the offset range.
Also remove a dead assignment since we reassign this a few lines below.
2017-10-05 18:12:29 +02:00
Stefan Sauer
f46d80f07d audioaggreator: update docs
Remove wrote references to collectpads. Document the units.
2017-10-05 17:57:35 +02:00
Havard Graff
43985b363d meson: remove vs_module_defs
GST_EXPORT should handle it.
2017-10-05 13:53:14 +01:00
Rico Tzschichholz
fb3455d7a1 meson: Add some missing args and dependencies in the gir generation 2017-10-05 13:51:19 +01:00
Stefan Sauer
6ecfd599a5 audioaggregator: pass blocksize to mix_buffer()
No need to recalc the value twice per run. Establishes that it is the same
value.
2017-10-05 08:57:09 +02:00
Stefan Sauer
926fed92e9 audioaggregator: rename _fill_buffer() to _queue_new_buffer()
It does not fill a buffer. Rename it and add a short comment.
2017-10-05 08:57:09 +02:00
Reynaldo H. Verdejo Pinochet
e81c334ca9 Use proper GtkDoc notation for NULL/FALSE/TRUE 2017-10-03 14:31:18 -07:00
Stefan Sauer
5fd4e71da3 audioaggregator: reduce variable scope
This is a non-functional change that makes the code more alike to the previous
check. I should be more obvious when we drop a buffer.
2017-10-02 17:01:36 +02:00
Stefan Sauer
17848d7c0c audioaggregator: update comment for aggregate
Replace collect-pads left-over. Remove first paragraph, we're not doing this.
Remove 3), 4) since this is not per pad.
2017-10-02 17:01:36 +02:00
Thibault Saunier
c610076d85 meson: Add mssing GstBase-1.0 include in the gir generation 2017-09-28 21:56:29 -03:00
Sebastian Dröge
bf68e74403 audio: Add stream align API for getting timestamp at discont and number of samples since discont
https://bugzilla.gnome.org/show_bug.cgi?id=787560
2017-09-28 14:06:24 +03:00
Sebastian Dröge
d2fd740388 audio: Add reverse playback support to GstAudioStreamAlign
https://bugzilla.gnome.org/show_bug.cgi?id=787560
2017-09-28 14:06:07 +03:00
Sebastian Dröge
ec1e20ffe5 audio: Add helper object for audio discontinuity detection and sample alignment
This is the same code that is in decklinkaudiosrc, audioringbuffer,
audiomixer and various other places. Have it once instead of copying it
everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=787560
2017-09-28 14:06:05 +03:00
Mathieu Duponchelle
4196e67ff1 [API]: GST_AUDIO_CONVERTER_OPT_MIX_MATRIX
Taken from audiomixmatrix, credits to Vivia Nikolaidou

https://bugzilla.gnome.org/show_bug.cgi?id=785471
2017-09-22 16:19:59 +02:00
Mathieu Duponchelle
877d6faeea [API]: gst_audio_channel_mixer_new_with_matrix
+ Refactor previous constructor to call on that new constructor

+ Reimplement is_passthrough to strictly check whether the matrix
  is an identity matrix, comparing channel-masks was incorrect:
  the mixer may be remixing from a list of positions to the same
  list of positions, but ordered differently, and reciprocally,
  the mixer may be remixing from a list of positions to another
  list of positions identically ordered

+ Remove unused tmp field, must have been a refactoring leftover

https://bugzilla.gnome.org/show_bug.cgi?id=785471
2017-09-22 16:19:58 +02:00
Julien Isorce
fc86194595 appsink: on drain wait for buffers to be consumed
So that an upstream element can claim all buffers to return to its buffer pool.

Added unit test 'test_query_drain'
  make elements/appsink.check

https://bugzilla.gnome.org/show_bug.cgi?id=786739
2017-09-19 14:33:36 +01:00
Julien Isorce
7b1056b946 appsink: also clear preroll buffer in _pull_sample
If someone calls gst_app_sink_try_pull_sample they are
probably no longer interested in any preroll samples.

Useful if the user has not registered a preroll appsink callback.

Also added unit test 'test_do_not_care_preroll'
  make elements/appsink.check
that fails without this patch.

https://bugzilla.gnome.org/show_bug.cgi?id=786740
2017-09-19 09:06:44 +01:00
Stefan Sauer
ceee4db9d0 audioaggregator: fix typo in comment 2017-09-17 21:06:48 -07:00
Julien Isorce
68518acb53 appsink: unref preroll buffer upon pull
There is no reason for appsink to hang onto the preroll buffer.
If needed, the application can just keep a ref on this buffer
after calling gst_app_sink_try_pull_preroll.

Also added unit test 'test_pull_preroll'
  make elements/appsink.check

https://bugzilla.gnome.org/show_bug.cgi?id=786740
2017-09-13 14:11:27 +01:00
Julien Isorce
c134a3c21b appsink: rename GstBuffer *preroll to preroll_buffer
priv->preroll can be confused with basesink_class->preroll

https://bugzilla.gnome.org/show_bug.cgi?id=786740
2017-09-13 14:06:43 +01:00
Nicolas Dufresne
5d6fbcb0af video-filter: Support allocation pool with pool object
This is used to indicate upstream the requirement in buffers
while no buffer pool can be provided. In this case, only
configure the pool with caps/size/min/max if we have caps,
which we only parsed when there was no allocation pool.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-06 14:20:46 -04:00
Matthew Waters
5d3d764568 video/affinetransformationmeta: use the provided doc comment for the struct 2017-08-24 19:11:29 +10:00
Mathieu Duponchelle
28943c4399 videoutilsprivate: fill more video fields.
__gst_video_element_proxy_caps is called by
__gst_video_element_proxy_getcaps with caps set to the caps
allowed downstream. As we didn't set colorimetry or
chroma-site on the resulting caps, upstream considered it
possible to use whatever values it wanted, leading to
not negotiated errors later on.

As the description for that function is:
"Takes caps and copies its video fields to tmpl_caps",
it seems legitimate to set these fields there.

https://bugzilla.gnome.org/show_bug.cgi?id=786172
2017-08-14 12:42:57 +02:00
Philippe Normand
d375a28a37 appsrc: handle duration query only if the property was set
https://bugzilla.gnome.org/show_bug.cgi?id=786200
2017-08-12 16:23:27 +01:00
Tim-Philipp Müller
7acdfa3753 pbutils: sprinkle more GST_EXPORT 2017-08-10 13:57:26 +01:00
Tim-Philipp Müller
ece4a096a1 libs: add some more missing GST_EXPORT 2017-08-10 10:27:23 +01:00
Mark Nauwelaerts
00fa39befa audioencoder: also adjust sample count upon discont to avoid ts overflow
Only adjusting the base_ts might lead to a negative ts and as such integer
overflow into a huge timestamp which then propagates into the granulepos
and so on.  Instead, resync to incoming buffer timestamp using both base_ts
and sample count rather than only base_ts.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=785948
2017-08-09 09:32:55 +02:00
Sebastian Dröge
f996b05644 xmptag: Stop parsing GPS coordinate if sscanf() fails
CID 1139610
2017-08-04 13:39:31 +03:00
Tim-Philipp Müller
6105420bfc appsrc: fix doc typos 2017-08-01 17:08:08 +01:00
Sebastian Dröge
8be5030d47 appsrc: Add out annotations to gst_app_src_get_latency() 2017-08-01 18:49:23 +03:00
Stefan Sauer
4080b844c0 audioaggregator: use local var
Instead of the self->priv-> deref use the local var we created already.
2017-07-26 09:43:52 +02:00
Sebastian Dröge
01f4d6494a videotimecode: Add GST_VIDEO_TIME_CODE_INIT macro 2017-07-25 10:03:41 +03:00
Satya Prakash Gupta
5cf883c8ed videofilter: Unmap input frame if mapping output frame failed
https://bugzilla.gnome.org/show_bug.cgi?id=785341
2017-07-24 17:05:17 +03:00
Sebastian Dröge
ae8d0cf3ac videodecoder: Make sure we have an actually writable buffer when modifying metadata
avviddec keeps references to the buffers internally for example, in
which case we need to do a shallow copy of the buffer.
2017-07-24 16:48:17 +03:00
Sebastian Dröge
79424411e7 videometa: Don't crash if adding the timecode meta to a buffer failed 2017-07-24 16:29:53 +03:00
Tim-Philipp Müller
6461ad057c fft: don't generate g-i files for bindings
The g-i stuff for this helper lib was never usable from bindings
anyway and there are problems with the latest gobject-introspection,
so we might just as well remove the g-i integration entirely for
this lib.
2017-07-19 23:08:12 +01:00
Tim-Philipp Müller
d95e62be82 audio: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Stefan Sauer
35a4149caf aggregator: code cleanups
Fix comment typos, some copy'n'paste in logging. Add more doc comments.
2017-07-13 22:02:17 +02:00
Heekyoung Seo
65406774ae convertframe: Fix leak in case of vcrop is disabled
https://bugzilla.gnome.org/show_bug.cgi?id=784639
2017-07-07 09:26:22 +03:00
Sebastian Dröge
24fe473a01 libs: Export boxed type copy/free functions for the remaining types 2017-06-20 10:06:17 +03:00
Arun Raghavan
398a6a2a1b navigation: Add some validation while sending key/mouse events
https://bugzilla.gnome.org/show_bug.cgi?id=783330
2017-06-06 11:12:18 +05:30
Scott D Phillips
8d1b45ded6 navigation: Add introspection annotations for some output parameters
The missing annotations prevented proper usage from introspected
bindings like python.

https://bugzilla.gnome.org/show_bug.cgi?id=783330
2017-06-06 11:03:29 +05:30
Scott D Phillips
09af0f1fbd video: update orc generated files
Includes updates from:

  103d265 Fix RGBA and ABGR pack/unpack on big endian cpu

https://bugzilla.gnome.org/show_bug.cgi?id=783328
2017-06-01 23:21:48 +01:00
Wim Taymans
103d265cf0 Fix RGBA and ABGR pack/unpack on big endian cpu
The pack and unpack functions for RGBA and ABGR only work for little
endian cpus. Add variants for big endian as well.
2017-06-01 17:47:22 +02:00
Mathieu Duponchelle
5d6b3b60cb gst-discoverer: use state changes instead of ASYNC_DONE.
And monitor no_more_pads.

With live sources such as rtsp, uridecodebin only creates its
child decodebins between PAUSED and PLAYING.

This means that the ASYNC_DONE it posts when getting NO_PREROLL
in its change_state method gets immediately propagated by the
GstBin parent class, as opposed to a situation where a
decodebin has been added to it already, and has posted ASYNC_START.

The proposed solution, instead of simply waiting for ASYNC_DONE,
and finishing prematurely in that case, waits for three conditions
to be true:

* the uridecodebin needs to have emitted no_more_pads
* its current state must be PAUSED if not live, PLAYING otherwise
* There must be no "pending subtitle pads", ie pads where we haven't
  received tags yet.

All these conditions are checked in the message handler, as we
post custom messages on it when we get subtitle tags or no_more_pads.

https://bugzilla.gnome.org/show_bug.cgi?id=783257
2017-05-31 05:10:21 +02:00
Olivier Crête
930c3cea40 audioaggregate: Don't hold object locks across calls to aggregate_one
https://bugzilla.gnome.org/show_bug.cgi?id=782878
2017-05-21 18:44:53 +02:00
Tim-Philipp Müller
18e55dcdc0 pbutils: fix stand-alone version header include
Include gst headers for GST_EXPORT.
2017-05-21 17:43:12 +01:00
Olivier Crête
55ab23cc30 audioaggregator: Use downstream allocator and params if available
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-05-21 13:24:29 +02:00
Edward Hervey
dfa548dc5b videodecoder: Don't queue frames in TRICKMODE_KEY_UNITS
When the input is TRICKMODE_KEY_UNITS, we expect to only receive keyframes
which we want to decode/push immediately. Therefore don't queue them.

If upstream didn't send just keyframes (which is the ideal situation), two
different things can happen:
1) Either the subclass checks the segment flags and properly configures
 the decoder implementation to only decode/output keyframes,
2) Or the subclass really decodes and outputs everything, in which case
 the reverse frames will end up arriving "late" downstream (and will
 be dropped). If upstream did properly send GOP in reverse order, we
 still end up just showing keyframes (but at the overhead of decoding
 everything).

https://bugzilla.gnome.org/show_bug.cgi?id=777094
2017-05-20 17:37:27 +02:00
Olivier Crête
8a302f1815 aggregator: Remove unused GST_FLOW_NOT_HANDLED 2017-05-20 16:21:17 +02:00
Matthew Waters
57673e608e 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
Olivier Crête
26819ba296 aggregator: Delay clipping to output thread
This is required because the synchronized events like caps or segments
may only be processed on the output thread.

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Olivier Crête
1e7aaf775f aggregator: Simplify clip function
The return value was ignored anyway

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Jan Schmidt
2980e96a50 videodecoder: Output mono multiview caps if none specified
Always put multiview-caps onto the output caps, assuming
mono if we've got no other information. It's still easy for
downstream elements to override using a capssetter or event
probe if desired.

https://bugzilla.gnome.org/show_bug.cgi?id=776172
2017-05-19 18:02:36 +02:00
Sebastian Dröge
cc281e80d6 discoverer: Clean up more fields to decide if parent/child streams are equivalent
https://bugzilla.gnome.org/show_bug.cgi?id=782780
2017-05-18 13:24:19 +03:00
Sebastian Dröge
5614862de1 Revert "discoverer: Consider parent/child streams the same if they have caps with the same name"
This reverts commit 478b7a8eb4.

video/mpeg,systemstream=true / false distinguishes between container and
elementary stream.
2017-05-18 13:13:58 +03:00
Sebastian Dröge
478b7a8eb4 discoverer: Consider parent/child streams the same if they have caps with the same name
Child streams could have more accurate width/height or various other
information added. If they have the same name, they are likely to be the
same streams.

https://bugzilla.gnome.org/show_bug.cgi?id=782697
2017-05-18 11:21:55 +03:00
Sebastian Dröge
67fb3b12ee gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:52 +03:00
Sebastian Dröge
2a8784e218 audioclock: Sink the reference in the constructor
This is now needed as GstClock does not do that internally anymore,
because that broke bindings.

And mark the function correctly as (transfer full), which it already was
before.

https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:52 +03:00
Sebastian Dröge
7185a7ac98 allocators: Annotate constructors with (transfer floating)
GstAllocator is a GstObject and as such uses floating references.

https://bugzilla.gnome.org/show_bug.cgi?id=702960
2017-05-17 10:40:52 +03:00
Nicolas Dufresne
1ceb40cd1e audioringbuffer: 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
Tim-Philipp Müller
820c34740f video: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:23:12 +01:00
Tim-Philipp Müller
af78896a82 tag: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:23:08 +01:00
Tim-Philipp Müller
bb7e401cb3 sdp: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:23:08 +01:00
Tim-Philipp Müller
587cf82fc1 rtsp: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:45 +01:00
Tim-Philipp Müller
33ae84fd1c rtp: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:42 +01:00
Tim-Philipp Müller
a1ec342b77 riff: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:42 +01:00
Tim-Philipp Müller
1b6494a644 pbutils: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:38 +01:00
Tim-Philipp Müller
7ae9b4ac4e app: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:34 +01:00
Tim-Philipp Müller
fda887179e fft: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:30 +01:00
Tim-Philipp Müller
d7dd381f78 audio: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:26 +01:00
Tim-Philipp Müller
d6a12c0a8f allocators: mark symbols explicitly for export with GST_EXPORT 2017-05-16 01:11:46 +01:00
Tim-Philipp Müller
f4494dab87 rtpbasedepayload: fix class description in docs 2017-05-15 16:20:01 +01:00
Tim-Philipp Müller
60e9629860 g-i: no need to load registry in g-i scanner 2017-05-04 23:55:20 +01:00
Sebastian Dröge
a3656ba29b libs: Check if meta transform_func is NULL before using it
https://bugzilla.gnome.org/show_bug.cgi?id=782050
2017-05-02 14:31:14 +03:00
Guillaume Desmottes
a8edddb3d6 video: fix typo in GstVideoAlignment doc
https://bugzilla.gnome.org/show_bug.cgi?id=781490
2017-04-19 10:50:41 +01:00
Tim-Philipp Müller
5185cce994 audio: resampler: fix typos in docs 2017-04-13 16:40:02 +01:00
Rico Tzschichholz
07a427b403 meson: Pass --c-include accordingly to GIR builds 2017-04-13 12:23:32 +01:00
Tim-Philipp Müller
4246198fb3 No need for newlines in debug log statements 2017-04-12 09:58:49 +01:00
Claudio Saavedra
6b983a79e3 meson: install gstappsink.h
https://bugzilla.gnome.org/show_bug.cgi?id=781168
2017-04-11 11:51:36 +03:00
Sebastian Dröge
78ae1411ce Revert "tag: Fix enum nicks for backwards compatibility"
This reverts commit 595b29519a.

Bindings are not using the nicks but the actual enum names.
2017-04-10 14:34:23 +03:00
Sebastian Dröge
a69befecd3 app/tag: Fix build with srcdir!=builddir 2017-04-10 14:25:30 +03:00
Sebastian Dröge
595b29519a tag: Fix enum nicks for backwards compatibility
The enum values got the wrong name at some point, something to fix for 2.0.
2017-04-10 14:02:01 +03:00
Rico Tzschichholz
dc4e041f07 app/tag: Add missing sources/headers to the GIR build 2017-04-10 13:55:58 +03:00
Sebastian Dröge
8169cfa737 meson: Define missing variable 2017-04-09 12:54:12 +03:00
Sebastian Dröge
e74e1e80fa tag: Generate GLib enums/flags with glib-mkenums 2017-04-09 12:51:52 +03:00
Sebastian Dröge
b56dcb3e20 app: Generate GLib enums with glib-mkenums 2017-04-09 12:29:55 +03:00
Sebastian Dröge
e05127a510 encoding-profile: It's (transfer none), not (transfer-none) 2017-04-09 12:19:22 +03:00
Sebastian Dröge
8b468c3c36 audio: Generate audiobasesink/src and audiocdsrc GLib enums automatically
And ensure that GstAudioBaseSrcSlaveMethod's re-timestamp stays
re-timestamp and doesn't become retimestamp.
2017-04-09 11:49:50 +03:00
Vivia Nikolaidou
bdccc98ee2 timecode: Fix invalid drop-frame timecode right before a new second
The previous fix was only working for non-drop-frame timecodes.

https://bugzilla.gnome.org/show_bug.cgi?id=779866
2017-04-09 11:15:27 +03:00
Matthew Waters
0dcab96d88 sdp/media: caps_from_media() don't modify the input media
Performing a gst_sdp_media_get_caps_from_media() would result in
changing fields in the GstSDPMedia violating the const tag in the
function declaration.

Before there would be a line with a=rtpmap:96 VP8/90000
after, that attribute would only contain a=rtpmap:96

Fix by performing modifications on duplicated strings instead of on
the internal values.

Also add a simple test for checking that the representation doesn't
change by a gst_sdp_media_get_caps_from_media()
2017-04-03 16:49:12 +10:00
Matthew Waters
9d3622e1bd sdp: add g_return*_if_fail assertions on invalid inputs
Prevents some programming errors and invalid modifications.
2017-04-03 16:49:12 +10:00
Matthew Waters
fa243654cf sdp/message: fix segfault copying NULL in the boxed copy impl
Allows passing NULL as a value to g_object_set and as signal
parameters without crashing.
2017-04-03 16:49:12 +10:00
Vincent Penquerc'h
32ef8f54d4 video-converter: fix scaler leak
https://bugzilla.gnome.org/show_bug.cgi?id=780764
2017-03-31 16:14:50 +01:00
Arun Raghavan
a6742e81b9 convertframe: Fix async video sample conversion with non-default context
The GSource for dealing with timeouts in
gst_video_convert_sample_async() might be attached to a non-default
context, so we should not be using g_source_remove() on the returned ID.

The correct thing to do is to keep a reference to the actual GSource and
then call g_source_destroy() on it.

https://bugzilla.gnome.org/show_bug.cgi?id=780297
2017-03-20 17:23:58 +05:30
Jan Schmidt
2d3e69dca3 videodecoder: Add debug output tracking decode-after-flush
Track how long it takes to generate the first buffer after a flush
as a simple measure of how efficient the decoder is at skipping /
rushing to get to the first decode.
2017-03-18 02:03:47 +11:00
Sebastian Dröge
ce9bac465a video-format: Shift correctly when packing I420_12BE 2017-03-17 13:43:04 +02:00
Sebastian Dröge
eda8bd4de1 video-format: Order all formats in GST_VIDEO_FORMATS_ALL like in the enum
And remove duplicated entries.
2017-03-17 13:28:02 +02:00
Arun Raghavan
389a3c4461 encoding-profile: Mark format caps as transfer-none in profile creation 2017-03-17 16:01:57 +05:30
Sebastian Dröge
95ddfdee4e video-format: Add Since markers to all new formats from 1.2
https://bugzilla.gnome.org/show_bug.cgi?id=780100
2017-03-16 17:38:02 +02:00
Sebastian Dröge
77f802f8e6 video: Add I420/I422/Y444_12LE/BE and GBRA video formats
https://bugzilla.gnome.org/show_bug.cgi?id=780100
2017-03-16 17:32:27 +02:00
Emeric Grange
2fcab9e7ef video: Add GBRA_10LE/BE, GBR_12LE/BE, GBRA_12LE/BE pixel formats
With additional bugfixes from Sebastian Dröge <sebastian@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=780100
2017-03-16 16:44:12 +02: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
Vivia Nikolaidou
a122135194 videotimecode: Fix invalid timecode right before a new second
When initializing a timecode from a GDateTime, and the remaining time
until the new second is less than half a frame (according to the given
frame rate), it would lead to the creation of an invalid timecode, e.g.
00:00:00:25 (at 25 fps) instead of 00:00:01:00. Fixed.

https://bugzilla.gnome.org/show_bug.cgi?id=779866
2017-03-10 17:47:46 +02:00
Matthew Waters
d15b0f4844 videodecoder: fix build error on i386
Use G_GUINT64_FORMAT for guint64 values.

Introduced by fcb63e77a9

Found by Alexander Larsson

gstvideodecoder.c: In function 'gst_video_decoder_have_frame':
gstvideodecoder.c:3312:51: error: format '%u' expects argument of type 'unsigned int', but argument 8 has type 'guint64 {aka long long unsigned int}' [-Werror=format=]
2017-03-10 18:23:48 +11:00
Sebastian Dröge
9460d40054 videotimecode: Unref GDateTime in error cases 2017-03-08 15:47:52 +02:00
Jan Schmidt
052d34478f videodecoder: Fix a leak introduced in fcb63e
CID: 1402055
2017-03-06 19:14:48 +11:00
Jan Schmidt
6ac79da6a2 videodecoder: Restrict frame timestamp guessing in reverse mode
Don't guess a timestamp of the start of the segment when running
in reverse mode, as more likely it means we're discontinuous somewhere
in the middle of the segment, and we'll fix up timestamps once
the frames are decoded and reversed.
2017-03-04 00:30:37 +11:00
Jan Schmidt
fcb63e77a9 videodecoder: Store buffer information even without PTS
When a PTS is not set, we still want to store the rest of the
buffer information, or else we lose important things like the
duration or buffer flags when parsing.
2017-03-04 00:30:37 +11:00
Sebastian Dröge
daa0e18c75 videodecoder: Handle return value of gst_video_decoder_drain()
CID 1362896
2017-02-28 15:11:42 +02:00
Sebastian Dröge
0f7b9dbe75 video-converter: Give a name to the thread-pool threads
This way they can be distinguished from any other threads in the same
process.
2017-02-24 10:04:21 +02:00
Sebastian Dröge
6d20fcc9df video-converter: Only lock the thread pool mutex when running with more than 1 thread
There's no reason to lock anything if only the current thread is ever
going to do any work.
2017-02-24 10:02:28 +02:00
Sebastian Dröge
49ac382b47 video-converter: Implement multi-threaded scaling/conversion
This adds a property to select the maximum number of threads to use for
conversion and scaling. During processing, each plane is split into
an equal number of consecutive lines that are then processed by each
thread.

During tests, this gave up to 1.8x speedup with 2 threads and up to 3.2x
speedup with 4 threads when converting e.g. 1080p to 4k in v210.

https://bugzilla.gnome.org/show_bug.cgi?id=778974
2017-02-23 21:55:29 +02:00
Georg Lippitsch
d15ad75caf videotimecode: Validate for drop-frame correctness
In gst_video_time_code_is_valid, also check for invalid
ranges when using drop-frame TC. Refactor some code which
broke after the check was added.

https://bugzilla.gnome.org/show_bug.cgi?id=779010
2017-02-23 19:56:26 +02:00
Georg Lippitsch
b3df5786a9 videotimecode: Init from GDateTime
Add a function to init the time code from a GDateTime

https://bugzilla.gnome.org/show_bug.cgi?id=778702
2017-02-23 19:50:39 +02:00
Sebastian Dröge
ab854b04ba video-scaler: Fix upscaling if width & height change and we're starting not at y=0
It was taking the initial input y-offset from the output value, which
only works for y=0 (in which case both are the same). If y > 0, we would
always stay behind the requested input offset and never ever read
anything from the input.
2017-02-15 21:43:32 +02:00
Thibault Saunier
d5fbc905e3 discoverer: Ignore more parser related fields when comparing streams
The parser might do some conversion on a stream but the stream keeps
being the same, and we need to make sure GstDiscoverer detects it is the
case.

https://bugzilla.gnome.org/show_bug.cgi?id=778298
2017-02-08 15:56:34 -03:00
Jan Schmidt
5903e2dfbb audioringbuffer: Also add FLAC to debug strings.
Oops, also add FLAC to the debug strings array.

https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-02-04 14:46:42 +11:00
Jan Schmidt
04c14de1d1 audioringbuffer: Prevent overflow of debug names array
Add new audio types to the list of strings used for debug
so we don't index past the end of that array.

https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-02-04 14:42:33 +11:00
Sebastian Dröge
f939f05304 audio-resampler: Fix integer overflow in clamping code
https://bugzilla.gnome.org/show_bug.cgi?id=777921
2017-01-30 12:35:04 +02:00
Tim-Philipp Müller
83e84d5acf audio: add since markers to docs for new enums
https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-01-23 20:04:54 +00:00
Vincent Penquerc'h
6134dab3bb audio: add FLAC to GstAudioRingBufferFormatType
https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-01-23 13:47:39 -05:00
Olivier Crete
c46607095e audioringbuffer: Also support raw AAC
Support raw AAC streams without the ADTS header

https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-01-23 13:45:50 -05:00
Sebastian Dröge
5d505d1088 riff-media: Don't divide block align by zero channels
https://bugzilla.gnome.org/show_bug.cgi?id=777525
2017-01-20 12:41:16 +02:00
Sebastian Dröge
ef55c8a6b7 riff-media: Don't recurse in for nested WAVEFORMATEX
There was already a check for that, but it failed because
subformat_guid[0] is a guint32 and that is then casted implicitely to a
guint16 when recursing... just that we checked the uncasted value.

This caused an infinite recursion and thus stack overflow.

https://bugzilla.gnome.org/show_bug.cgi?id=777265
2017-01-18 13:11:07 +02:00
Sebastian Dröge
81d3ba3fa2 riff-media: Check for valid channels/rate before using the values
Otherwise we might divide by zero or otherwise create invalid caps.

https://bugzilla.gnome.org/show_bug.cgi?id=777262
2017-01-15 18:32:34 +01:00
Sebastian Dröge
d0c1b34288 video-converter: Fix crashes in fast-paths when converting interlaced formats with different vertical subsampling
E.g. the following pipelines fail because chroma values after the last
line are read (note: 486 % 4 == 2):

gst-launch-1.0 videotestsrc ! "video/x-raw,interlace-mode=interleaved,width=720,height=486,format=UYVY" ! videoconvert ! "video/x-raw,format=I420" ! fakesink
gst-launch-1.0 videotestsrc ! "video/x-raw,interlace-mode=interleaved,width=720,height=486,format=I420" ! videoconvert ! "video/x-raw,format=UYVY" ! fakesink
gst-launch-1.0 videotestsrc ! "video/x-raw,interlace-mode=interleaved,width=720,height=486,format=I420" ! videoconvert ! "video/x-raw,format=AYUV" ! fakesink
2017-01-11 18:41:14 +02:00
Vivia Nikolaidou
629e8229a7 videotimecode: New GstVideoTimeCodeInterval type, ability to add to a GstVideoTimeCode
Sometimes there is a human-oriented timecode that represents an
interval between two other timecodes. It corresponds to the human
perception of "add X hours" or "add X seconds" to a specific timecode,
taking drop-frame oddities into account. This interval-representing
timecode is now a GstVideoTimeCodeInterval. Also added function to add it to
a GstVideoTimeCode.

https://bugzilla.gnome.org/show_bug.cgi?id=776447
2017-01-11 11:05:21 +11:00
Thibault Saunier
9e86b2931d pbutils: Fix annotation in gst_encoding_profile_set_preset 2017-01-10 08:57:51 -03:00
Vivia Nikolaidou
06ff74e51d videotimecode: Add GstValue functions
Add compare, serialization and deserialization functions

https://bugzilla.gnome.org/show_bug.cgi?id=772764
2017-01-09 18:56:16 +02:00
Jan Schmidt
cca3a5b194 gst_video_guess_framerate: Don't throw away all precision
When operating on framerates near 10000fps, at least keep 1
digit of precision for calculations
2017-01-09 21:25:26 +11:00
Thibault Saunier
99c35c29ea encoding-target: Properly free temporary list 2017-01-06 11:40:20 -03:00
Thibault Saunier
46b424a38b encoding-profile: Add a way to copy an encoding profile
It is often usefull to make sure that you get a full copy of a profile.
For example you want to let the user modify it in the user interface
but still keep an unchanged version for later use.

API:
  gst_encoding_profile_copy
2017-01-06 11:40:20 -03:00
Tobias Mueller
57ff3ea72f appsrc: fix compiler warning
Initialize min and max _get_property() to gets rid of these
compiler warnings:

gstappsrc.c:741:7: error: 'max' may be used uninitialized in this function
       g_value_set_int64 (value, max);
       ^
gstappsrc.c:733:7: error: 'min' may be used uninitialized in this function
       g_value_set_int64 (value, min);
       ^
Which happens because gcc doesn't know that GST_IS_APP_SRC will never
fail here.

https://bugzilla.gnome.org/show_bug.cgi?id=752052
2016-12-25 13:15:26 +00:00
Stuart Weaver
0cf08d90c0 rtsp-url: unescape special chars in user/pass part of URL
This way special characters such as '@' can be used in
usernames or passwords, e.g.

  rtsp://view:%40dm%4An@<IP-ADDR>/media/camera1

will now parse username and password into:

  User: view
  Pass: @dm:n

https://bugzilla.gnome.org/show_bug.cgi?id=758389
2016-12-25 12:08:45 +00:00
Vineeth TM
c0a18df468 discoverer: Add support to dump dot files
Dump graphs during error/warning messages and discover is done

https://bugzilla.gnome.org/show_bug.cgi?id=758259
2016-12-25 11:49:49 +00:00
Thomas Bluemel
cd101ce8f0 id3v2: fix splitting strings in ISO-8859-1 and UTF-16 formats
When parsing NUL-terminated strings, do not include the terminating
NUL byte(s).  Depending on the encoding used, either g_utf8_validate()
failed due to this, or worse the call to g_utf16_to_utf8() would
return 0 items read on an empty string, causing it to fail parsing
certain frames.

https://bugzilla.gnome.org/show_bug.cgi?id=770355
2016-12-25 10:52:39 +00:00
Thomas Bluemel
da6070054f id3v2: fix handling of tags with extended headers
The extended header size value does not include itself.

https://bugzilla.gnome.org/show_bug.cgi?id=770355
2016-12-25 10:35:47 +00:00
Thibault Saunier
cd4253028e encoding-profile: Initialize variables to avoid build failures
encoding-profile.c: In function ‘get_profile_format_from_possible_factory_name’:
encoding-profile.c:1532:6: error: ‘fact’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (fact)
      ^
encoding-profile.c: In function ‘profile_from_string’:
encoding-profile.c:1720:6: error: ‘res’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (profile)
      ^
cc1: all warnings being treated as errors
2016-12-23 18:08:43 -03:00
Thibault Saunier
51cd2bd926 encoding-profile: Allow using factory names in serialization format
Instead of enforcing the user to know and understand caps to describe
the encoding format, let him use element factory names directly.
This also makes it possible to ensure that a specific encodore/muxer
is used instead of letting the ranking system do it.

It is now possible to describe an encoding format simply specifying:

  matroskamux:x264enc:vobisenc

Factor out functions in the parsing, cleaning up the whole thing.
Update documentation.
2016-12-23 17:40:23 -03:00
Thibault Saunier
998f28b65c encoding-profile: Also take into account preset name when comparing profiles 2016-12-23 17:40:23 -03:00
Thibault Saunier
636cd255ce encoding-profile: Handle path to serialized target when deserializing a profile
The synthax is path/to/encoding/profile.gep:profilename
2016-12-23 17:40:23 -03:00
Thibault Saunier
40088a9f5d encoding-target: Add 'file-extension' as a known category 2016-12-23 17:40:23 -03:00
Thibault Saunier
85979f996d encoding-target: Allow using name and targets from serialized file
We used to only care about the name of the files even if the name
is defined in the encoding target serialized file.

That commit also allows user to define several names for a single
target file (using a ';' between the names) which allows us to have
a target for youtube that is called 'youtube;yt' or a target for
'ogg;ogv;oga' file extension.
2016-12-23 17:40:23 -03:00
Thibault Saunier
2c9db14d03 encoding-target: Auto convert loading target name to lowercase
We *only* support lowercase encoding target names so we can just
handle user to use uper case ones converting them.
2016-12-23 17:40:23 -03:00
Thibault Saunier
bff04a1396 pbutils: Add documentation about encoding targets 2016-12-23 17:40:23 -03:00
Evan Nemerson
98064ed9bf audioringbuffer: add set_callback_full() for g-i
https://bugzilla.gnome.org/show_bug.cgi?id=678301
2016-12-22 15:34:58 +00:00
Sebastian Dröge
19ece085ac riff-media: Fix up last commit 2016-12-20 13:00:59 +02:00
Nicola Murino
a75be73471 riff: add ADPCM_G722 support
https://bugzilla.gnome.org/show_bug.cgi?id=746574
2016-12-20 12:48:32 +02:00
Tim-Philipp Müller
2cfb446eb9 tag: id3v2: turn redundant check into an assert
We checked this already earlier, so this is dead code.
Leave an assert in place for consistency with the other
branch and in case the rest of the code changes.

CID 1397350.
2016-12-18 12:29:42 +00:00
Sebastian Dröge
15123c0455 discoverer: Get caps from the element's srcpad if possible
The caps put into the stream topology by decodebin are the caps at the
moment the pads are exposed on it. This is usually before decoders
received any buffers.
In discoverer we however wait for pre-roll, which ensures that each
decoder handled buffers already. At this point, there might be more
information known about the caps already that we could make use of.

One example here is extra information stored in the SEI of H264, like
the multiview-mode. This will be known if there is a SEI before the
first keyframe, but decodebin won't put this into the topology as it
only waits for the initial caps of h264parse (which come directly after
SPS/PPS).

With this change, the multiview-mode is in the caps reported by
discoverer in many cases.
2016-12-17 22:01:10 +02:00
Thibault Saunier
d67f945177 encoding-profile: Fix documentation and port to gtk markdown
And remove some trailling whitepsaces
2016-12-16 11:27:31 -03:00
Thibault Saunier
f4ed0e1af1 base: Actually support using the default encoding target 2016-12-16 11:27:31 -03:00
Thibault Saunier
646e0499fb encoding-target: Remove useless check for local presence 2016-12-16 11:27:31 -03:00
Thibault Saunier
7f76713835 pbutils: Add safe guard too encoding profile API 2016-12-16 11:27:31 -03:00
Thibault Saunier
8bbf67c37d audio: Fix introspection annotation
In gst_audio_check_valid_channel_positions the mask
is an out parameter.

And minor conversion from a print to a GST_ERROR.
2016-12-16 11:27:31 -03:00
Thibault Saunier
1c7c51fa23 encoding-target: Handle GST_ENCODING_TARGET_PATH in list_all
And fix the compare_target function
2016-12-16 11:27:31 -03:00
Tim-Philipp Müller
e0742b8759 rtsp: add boxed types for new authentication credential API
To make the structs usable in bindings, and fix

gstrtspmessage.c:1188: Warning: GstRtsp:
gst_rtsp_message_parse_auth_credentials: return value: Invalid
non-constant return of bare structure or union; register as
boxed type or (skip)

https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-12-13 22:45:02 +00:00
Vincent Penquerc'h
6ee5922f2f audioringbuffer: do not require 4 byte multiple for encoded MPEG
Bytes per frame doesn't make sense for encoded audio.

https://bugzilla.gnome.org/show_bug.cgi?id=776038
2016-12-13 10:16:07 +00:00
Sebastian Dröge
2f62720d71 xmptag: Don't leak the namespace string if there are multiple
https://bugzilla.gnome.org/show_bug.cgi?id=775887
2016-12-09 17:36:47 +02:00
Jan Schmidt
7ff1de380f id3v2: Clarify id3v2_add_id3v2_frame_blob_to_taglist()
Pass the frame data and size explicitly to
id3v2_add_id3v2_frame_blob_to_taglist() and add a
comment that it's being deliberately / manually
passed the full ID3v2 frame including header.
2016-12-09 18:06:35 +11:00
Jan Schmidt
d178f7626a id3v2: Add missing overrun check for frame sizes
When frames claim to have a footer, ensure they
are large enough to contain one to avoid an invalid
read overrun.

Spotted by Joshua Yabut
2016-12-09 18:06:35 +11:00
Sebastian Dröge
7c1a32e28b tagdemux: Fix crash when shutting down element during getrange()
Ensure that nothing is in any of the streaming thread functions
anymore when going from PAUSED to READY. While the parent's state change
function has deactivated all pads, there is nothing preventing
downstream from activating our srcpad again and calling the getrange()
function. Although we're in READY!

https://bugzilla.gnome.org/show_bug.cgi?id=775687
2016-12-06 16:29:23 +02:00
Sebastian Dröge
71e819ae7d audio-converter: In passthrough, also don't copy if in and out block are the same
In and out array are usually different, they are stack allocated arrays.
However the blocks inside them still can be the same.

https://bugzilla.gnome.org/show_bug.cgi?id=775369
2016-11-30 10:43:50 +02:00
Sebastian Dröge
7e24acc67f discoverer: Handle NULL/ANY/EMPTY caps without crashing 2016-11-28 19:46:10 +02:00
Edward Hervey
216ee52090 video-info: Properly initialize/set extra fields
The flags and field order weren't properly initialized in the
gst_video_info_init().

Furthermore in gst_video_info_from_caps() we might set unitiliazed
values previously, this only sets them if valid.
2016-11-28 16:53:10 +01:00
Edward Hervey
e3216d1648 sdp: Fix attribute leak
We need to free the strdup'd string (to_free) in all cases
2016-11-28 16:51:43 +01:00
Edward Hervey
fb4856c839 rtsp: Don't leak authorization string 2016-11-28 16:51:23 +01:00
Petr Kulhavy
010b9547d3 audio-converter: optimize endian conversion
Optimize LE<->BE conversion by adding a dedicated fast path instead of
using the generic converter. Implement transform_ip function in order to do the
endian swap in place.

This saves buffer allocation for the intermediate format, can be done in place
and also performs the conversion in one step instead of unpack-convert-pack.

For all bit widths the naive algorithm is implemented, which provides the best
performance when compiled with -O3. ORC was considered but eventually removed
as it requires a dedicated function for in-place conversion (due to the
"restrict" parameters).

A more complex algorithm for the 24-bit conversion with unrolled loop and
32-bit processing is implemented in the #if 0 section. It performs better if
compiled with -O2. With -O3 however the naive algorithm performs better.

https://bugzilla.gnome.org/show_bug.cgi?id=773073
2016-11-28 17:24:17 +02:00
Petr Kulhavy
640c54d8f8 audio-convert: simplify the chain free process
It is not needed to store a pointer to every single chain element to free it.
Instead walk the channel list backwards and free the chain elements one by one.

Rename GstAudioConverter->chain_pack to chain_end.

https://bugzilla.gnome.org/show_bug.cgi?id=773073
2016-11-28 17:24:13 +02:00
Sebastian Dröge
4efc15dffb discoverer: Extract video information from caps manually without GstVideoInfo
The caps might not be fixated (which is required by GstVideoInfo) and we
would assert otherwise. However the caps often contain useful
information in the already-fixed parts that we can use here.
2016-11-28 10:12:49 +02:00
Sebastian Dröge
bd74b102fa discoverer: Also stop waiting for subtitles if we get EOS
We're not going to get a buffer or GAP event anymore after EOS and would
wait forever otherwise.
2016-11-28 10:04:38 +02:00
Sebastian Dröge
0846eb5b27 riff-media: Check if caps are NULL before using them for the first time, not afterwards
Otherwise we'll get a g_critical() before erroring out cleanly on
https://samples.mplayerhq.hu/A-codecs/ATRAC3/SND0.AT3
2016-11-26 13:54:41 +02:00
Miguel Paris
036bdf5d2d rtpbuffer: Fix ensure_buffers() if whole packet is in one GstMemory
When gst_rtp_buffer_add_extension_onebyte_header() is used over a
GstRtpBuffer that only contains a memory for the whole packet,
ensure_buffers function crashes at the next point:

mem = gst_memory_copy (rtp->map[i].memory, offset, rtp->size[i]);

when i==2 because the payload is not mapped.

In addition the offset is calculated subtracting in the wrong direction.

https://bugzilla.gnome.org/show_bug.cgi?id=774959
2016-11-25 13:15:24 +02:00
Sebastian Dröge
47fdb15074 video-info: Add unit test for overflow checks
And also prevent overflows caused by allowing uint width/height in
gst_video_info_set_format() but storing them as (signed!) ints.
2016-11-24 15:40:22 +02:00
Sebastian Dröge
3d7a566640 video-info: And change the overflow check to not actually overflow itself 2016-11-24 15:12:40 +02:00
Sebastian Dröge
681d97aed7 video: Handle errors in gst_video_info_set_format() / gst_video_info_align()
https://bugzilla.gnome.org/show_bug.cgi?id=774588
2016-11-24 15:06:39 +02:00
Sebastian Dröge
17cdd369e6 video-info: Sanity check the frame size to prevent overflows
https://bugzilla.gnome.org/show_bug.cgi?id=774588
2016-11-24 15:06:39 +02:00
Ulf Olsson
a4c1dfe4cd mikey: Generate the correct SRTP policy
https://bugzilla.gnome.org/show_bug.cgi?id=774911
2016-11-23 17:44:29 +01:00
Sebastian Dröge
7e4697ec98 rtspdefs: Assert on the excepted MD5 digest string length
CID 1394494.
2016-11-23 18:26:29 +02:00
Scott D Phillips
c2dd0149c9 tag: fix some warnings in mklicensestables
https://bugzilla.gnome.org/show_bug.cgi?id=774878
2016-11-23 10:20:04 +02:00
Julien Isorce
b68d9bbe43 gstfdmemory: log with GST_INFO instead of GST_ERROR on permission denied
For example mmap can fail with EACCES if the the fd has been open
with read only mode. And mapping the memory might be the only way
to check that. So no need to print out an error.

Ex: ioctl(dev, DRM_IOCTL_PRIME_HANDLE_TO_FD, flags & ~DRM_RDWR)

https://bugzilla.gnome.org/show_bug.cgi?id=765600
2016-11-21 21:22:47 +00:00
Sebastian Dröge
90b24d34b3 rtsp: Add gst_rtsp_message_parse_auth_credentials() to parse authentication credentials
https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-11-21 09:39:21 +02:00
Sebastian Dröge
828c8604dd rtsp: Add gst_rtsp_generate_digest_auth_response() to calculate digest auth response
https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-11-21 09:39:21 +02:00
Nicolas Dufresne
a1a2a33315 dmabuf-allocator: Add missing padding in the class
This class was made subclassable, though for future growth of the code,
it's better if we have some room for add class members. Using the small
padding since this is unlikely.
2016-11-18 14:56:20 -05:00
Sebastian Dröge
b9f59fd999 rtpbasepayload: Ensure to set the RECONFIGURE flag again if reconfiguration failed
https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:04:27 +02:00
Vivia Nikolaidou
f578c00a14 videotimecode: Fix incorrect nsec_since_daily_jam calculation
For drop-frame timecodes, the nsec_since_daily_jam doesn't necessarily
directly correspond to this many hours/minutes/seconds/frames. We have
to get the frame count as per frames_since_daily_jam and then convert.

https://bugzilla.gnome.org/show_bug.cgi?id=774585
2016-11-17 10:04:26 +02:00
Sebastian Dröge
088aebfda9 riff: Extract bpp from the strf for vnmc
Needed for avdec_vnmc to work.
2016-11-16 20:49:11 +02:00
Scott D Phillips
e740103669 videodecoder, audiodecoder: parse format before checking in src_query_default
The logic change in these commits misordered the parsing and checking of
format in position queries:

 2b06e54 videodecoder: Don't answer BYTES queries
 1840b02 audio: Don't answer BYTES queries

https://bugzilla.gnome.org/show_bug.cgi?id=774484
2016-11-16 07:57:31 +11:00
Tim-Philipp Müller
826eec22f7 appsink: fix g-i warnings and add since markers
Rename function parameter and make sure the name in the
declaration matches the name in the implementation, to
avoid g-i warnings. Also add Since markers for gtk-doc.

gstappsink.c:1248: Warning: GstApp: gst_app_sink_set_buffer_list_support:
unknown parameter 'buffer_list' in documentation comment, should be 'drop'
2016-11-15 18:38:48 +00:00
Thibault Saunier
0c0dfbd455 discoverer: Do not try to unref the bus if it has not been set yet
It might happen if creation of the discoverer failed
2016-11-15 15:22:45 -03:00
Patricia Muscalu
f1562053fe appsink: add support for buffer lists
https://bugzilla.gnome.org/show_bug.cgi?id=752363
2016-11-16 02:06:40 +11:00
Jan Schmidt
2b06e54651 videodecoder: Don't answer BYTES queries
Refuse to answer BYTES queries ourselves. The only
time they make sense is on raw elementary streams,
in which case upstream would already have answered.

https://bugzilla.gnome.org/show_bug.cgi?id=757631
2016-11-16 00:14:47 +11:00
Jan Schmidt
1840b0233a audio: Don't answer BYTES queries
Refuse to answer BYTES queries ourselves. The only
time they make sense is on raw elementary streams,
in which case upstream would already have answered.

They especially don't make sense for encoders to answer
based on upstream values - although perhaps later
we could make it do TIME->BYTES conversion on the source
pad based on bitrate.

https://bugzilla.gnome.org/show_bug.cgi?id=757631
2016-11-16 00:14:47 +11:00
Scott D Phillips
6a4c14c39a sdp: cast away const in call to g_free
MSVC warns about the const here. It's safe to cast away.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-15 14:52:22 +02:00
Scott D Phillips
6e71583d07 Cast away const from GstMetaInfo in *_get_meta_info() functions
MSVC warns about the const in the implicit argument conversion in the
calls to g_once_init_{enter,leave}. It's OK so explicitly cast it.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-15 14:52:22 +02:00
Thibault Saunier
5bdb38995f meson: Fix build when orc is disabled
Making sure not to use the orc_dep variable in case
orc has been explicitely disabled.
2016-11-14 17:26:02 -03:00
Scott D Phillips
ff8d49a4c8 Use intermediate guint when handling GstVideoMultiviewFlags
The underlying integer type of the enum GstVideoMultiviewFlags is
implementation defined and may not have the same size as guint.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-12 10:51:30 +02: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
Thibault Saunier
30b3055780 rtsp: Include GstSdp-1.0.gir when generating the gir
It is actually needed as we need some symbols. We do not link
to libgstsdp as the user of the lib should do it (same with
autotools build).

This reverts previous commit
2016-11-10 17:43:38 -03:00
Thibault Saunier
b42a9c0cde libs:rtsp: Remove wrong dependency on Sdp for the gir file 2016-11-10 16:40:56 -03:00
Thibault Saunier
de6f4f0c7f libs:rtsp: Remove wrong dependency on Sdp for the gir file 2016-11-10 16:37:39 -03:00
Thibault Saunier
6917cb629e meson: Generate girs
https://bugzilla.gnome.org/show_bug.cgi?id=773944
2016-11-09 18:06:19 -03:00
Petr Kulhavy
54f4d3772c audio-channels: map buffer read-write only if channels differ
gst_audio_buffer_reorder_channels() was always mapping the buffer read-write
regardless whether any reordering was needed.  If the from and to channel order
is identical return immediately without remapping the buffer.

Add a small helper function gst_audio_channel_positions_equal() which is used
in both gst_audio_reorder_channels() and gst_audio_buffer_reorder_channels().

https://bugzilla.gnome.org/show_bug.cgi?id=773833
2016-11-09 19:42:47 +02:00
Julien Isorce
3bf893e12a video: add gst_video_decoder_allocate_output_frame_with_params
It adds a third argument to pass GstBufferPoolAcquireParams
to gst_buffer_pool_acquire_buffer.

If a user subclasses GstBufferPoolAcquireParams, this allows to
pass an updated param to the underlying buffer pool at each
gst_video_decoder_allocate_output_frame_with_params call.

https://bugzilla.gnome.org/show_bug.cgi?id=773165
2016-11-04 16:18:13 +00:00
Sebastian Dröge
e73eb54908 video-info: Fix the docs to say interlace-mode, not interlaced-mode 2016-11-04 16:25:55 +02:00
Julien Isorce
f5eb366335 allocators: define GST_CAPS_FEATURE_MEMORY_DMABUF
Adds "memory:DMABuf" caps feature. Since 1.11 tag.
Useful when the the dma-buf buffer cannot be mapped to CPU for r/w requests.
Example: protected content or platform constraints.

https://bugzilla.gnome.org/show_bug.cgi?id=759358
2016-11-03 13:19:12 -04:00
Nicolas Dufresne
c37b1e8c56 dmabuf: Make the allocator sub-classable
This should allos for cleaner code when implement such allocator.

https://bugzilla.gnome.org/show_bug.cgi?id=768794
2016-11-03 13:19:12 -04:00
Nicolas Dufresne
eddb543719 audiosrc: Leave read loop if no longer running
In the case a src stops providing data (read calls returns 0). The audio
src thread will never leave. Instead, check the condition and leave the
loop.
2016-11-03 13:19:12 -04:00
Sebastian Dröge
1f9204c725 video: Update orc generated files 2016-11-02 11:04:32 +02:00
Sebastian Dröge
9041db4680 Revert "video-color: Allow converting incomplete colorimetry to a string"
This reverts commit 158eae7e7e.

It already *always* allowed to convert incomplete colorimetry to a
string.
2016-11-01 23:51:47 +02:00
Sebastian Dröge
d84879db28 rtpbasedepayload: Reject non-TIME segments
https://bugzilla.gnome.org/show_bug.cgi?id=765796
2016-11-01 21:09:13 +02:00
Sebastian Dröge
568ec0fc7b Revert "basertpdepayload: create valid segment when given non-time segment"
This reverts commit 0f609bc6c6.
2016-11-01 21:09:04 +02:00
Sebastian Dröge
158eae7e7e video-color: Allow converting incomplete colorimetry to a string
This is only a good idea for non-raw caps.

https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-11-01 20:40:07 +02:00
Sebastian Dröge
ad06b54443 videoencoder: Proxy colorimetry and chroma-site from input to output caps
https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-11-01 20:40:07 +02:00
Sebastian Dröge
e6fd46601c videodecoder: Proxy field order to the output caps
https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-11-01 20:40:07 +02:00
Sebastian Dröge
635d1a2a98 videoencoder: Proxy interlace-mode and field-order fields from the input to the output caps
https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-11-01 20:40:07 +02:00
Sebastian Dröge
79809633de video-info: Add optional field-order caps field for interlaced-mode=interleaved
Usually this information is static for the whole stream, and various
container formats store this information inside the headers for the
whole stream.

Having it inside the caps for these cases simplifies code and makes it
possible to express these requirements more explicitly with the caps.

https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-11-01 20:40:07 +02:00
Tomasz Zajac
4d4f3c3cc4 sdp: Parse rtcp-fb media attributes
https://bugzilla.gnome.org/show_bug.cgi?id=769698
2016-11-01 19:57:06 +02:00
Tomasz Zajac
5424357ffa sdp: Add rtcp-fb media attributes based on caps
https://bugzilla.gnome.org/show_bug.cgi?id=769698
2016-11-01 19:57:02 +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
Marcin Kolny
89e711663f audioclock: use GstAudioClock* as first argument in GstAudioClock methods
All the GstAudioClock method declarations required object of GstClock type
as a first argument, but in fact, required GstAudioClock object (runtime
check in function body). Instead of checking type in run-time, we can
change functions declaration, to accept only GstAudioClock methods. Then,
runtime check is not necessary anymore, since always GstAudioClock object
is passed to a function.

https://bugzilla.gnome.org/show_bug.cgi?id=756628
2016-11-01 19:54:01 +02:00
Nirbheek Chauhan
20ced51df2 Fix incorrect return type in several functions
All these should return GstFlowReturn, not gboolean
2016-10-27 23:06:26 +05:30
Thibault Saunier
9842a6708d Revert "meson: Use the new pic argument on static libs"
This reverts commit e3c22605ae.

pic was added after 0.35 and will be present in 0.36 (meson documentation
was wrong).
2016-10-20 17:17:58 -03:00
Thibault Saunier
e3c22605ae meson: Use the new pic argument on static libs
We depend on 0.35 already
2016-10-20 16:07:33 -03:00
Stefan Sauer
7986a8ed3d audio: don't deref NULL
gst_buffer_copy_region() can return NULL when the buffer meta-data is invalid.

See https://bugzilla.gnome.org/show_bug.cgi?id=772200
2016-10-20 15:42:50 +02:00
Havard Graff
a32b25db6a audioencoder: Error-handling for pushing headers
https://bugzilla.gnome.org/show_bug.cgi?id=773105
2016-10-20 14:12:53 +03:00
Stian Selnes
92392a4733 videodecoder: Default caps sets format I420
Also the format must be fixed on the default raw caps. If not
gst_video_info_from_caps() will fail and
gst_video_decoder_negotiate_default_caps() return FALSE.

The test simulates the use case where a gap event is received before
the first buffer causing the decoder to fall back to the default caps.

https://bugzilla.gnome.org/show_bug.cgi?id=773103
2016-10-20 14:11:48 +03:00
Havard Graff
63c1f4aa33 audioencoder: Plug buffer-leak
https://bugzilla.gnome.org/show_bug.cgi?id=773107
2016-10-20 14:09:49 +03:00
Stefan Sauer
409534f242 audio: fix doc string again.
There was a second '*' at the start of the line. Reword + reformat to make it
obvious.
2016-10-17 09:47:54 +02:00
Nirbheek Chauhan
69abe1de13 meson: Add missing audio-enumtypes.h dep in audio-resampler static libs
Seen on the Jenkins CI:

FAILED: subprojects/gst-plugins-base/gst-libs/gst/audio/audio_resampler_sse41@sta/audio-resampler-x86-sse41.c.o
ccache cc  '-Isubprojects/gst-plugins-base/gst-libs/gst/audio/audio_resampler_sse41@sta' '-fdiagnostics-color=always' '-I../subprojects/gst-plugins-base/gst-libs/gst/audio' '-Isubprojects/gst-plugins-base/gst-libs/gst/audio' '-Isubprojects/gst-plugins-base/.' '-I../subprojects/gst-plugins-base/.' '-Isubprojects/gst-plugins-base/gst-libs' '-I../subprojects/gst-plugins-base/gst-libs' '-Isubprojects/gstreamer/libs' '-I../subprojects/gstreamer/libs' '-Isubprojects/gstreamer/.' '-I../subprojects/gstreamer/.' '-pipe' '-Wall' '-Winvalid-pch' '-DHAVE_CONFIG_H' '-msse4.1' '-fPIC' '-O0' '-g' '-fPIC' '-I/usr/include/glib-2.0' '-I/usr/lib/glib-2.0/include' '-pthread' '-Isubprojects/gstreamer/gst' '-MMD' '-MQ' 'subprojects/gst-plugins-base/gst-libs/gst/audio/audio_resampler_sse41@sta/audio-resampler-x86-sse41.c.o' '-MF' 'subprojects/gst-plugins-base/gst-libs/gst/audio/audio_resampler_sse41@sta/audio-resampler-x86-sse41.c.o.d' -o 'subprojects/gst-plugins-base/gst-libs/gst/audio/audio_resampler_sse41@sta/audio-resampler-x86-sse41.c.o' -c ../subprojects/gst-plugins-base/gst-libs/gst/audio/audio-resampler-x86-sse41.c
In file included from ../subprojects/gst-plugins-base/gst-libs/gst/audio/audio-resampler.h:24:0,
                 from ../subprojects/gst-plugins-base/gst-libs/gst/audio/audio-resampler-private.h:23,
                 from ../subprojects/gst-plugins-base/gst-libs/gst/audio/audio-resampler-macros.h:25,
                 from ../subprojects/gst-plugins-base/gst-libs/gst/audio/audio-resampler-x86-sse41.h:23,
                 from ../subprojects/gst-plugins-base/gst-libs/gst/audio/audio-resampler-x86-sse41.c:24:
../subprojects/gst-plugins-base/gst-libs/gst/audio/audio.h:26:39: fatal error: gst/audio/audio-enumtypes.h: No such file or directory
 #include <gst/audio/audio-enumtypes.h>
                                       ^
compilation terminated.
2016-10-15 21:48:39 +05:30
Thibault Saunier
558172d418 meson: Make use of new environment object and set plugin path to builddir
Workaround source_root being the root directory of all projects
in the subproject case.
Remove now unneeded getpluginsdir and define c++ tests in the same loop.

Bump meson requirement to 0.35
2016-10-14 17:37:16 +02:00
Stefan Sauer
86d18fa9ff audio: fix typo in doc string 2016-10-14 14:21:52 +02:00
Sebastian Dröge
a7b75cb1cc video-color: Mark some function arguments as const
https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-10-03 20:08:17 +03:00
Arun Raghavan
87905cc48b meson: Enable SSE intrinsics in audio-resampler
This files need to be built with the specific C flags for the
corresponding processor optimisations.
2016-10-03 11:01:36 +05:30
Arun Raghavan
4de66632d7 meson: Enable Orc in build
Top-level meson.build code updated from gst-plugins-good.
2016-10-03 11:01:24 +05:30
Arun Raghavan
20ba0299cc audio-resampler: Add a missing header to noinst_HEADERS 2016-09-29 19:55:45 +05:30
Arun Raghavan
a1ae17ef69 audiorsample: Fix build on 32-bit x86
Turns out _mm_cvtsi128_si64() isn't available on 32-bit, so only build
SSE 4.1 optimisations on x86-64 for now.
2016-09-29 19:45:16 +05:30
Arun Raghavan
4b5f78337a audioresample: Separate out CFLAGS used for SSE* code
This makes sure that we only build files that need explicit SIMD support
with the relevant CFLAGS. This allows the rest of the code to be built
without, and specific SSE* code is only called after runtime checks for
CPU features.

https://bugzilla.gnome.org/show_bug.cgi?id=729276
2016-09-29 18:37:08 +05:30
Arun Raghavan
f4cba79063 audioresample: Fix some gobject introspection warnings 2016-09-28 19:09:26 +05:30
Wim Taymans
7a02e9676f video-scaler: take number of bits into account when copying
Copy twice the amount of pixels for 16 bits formats.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=747225
2016-09-22 16:17:33 +02:00
Nicolas Dufresne
1852e7b88a doc: Add missing map flag to gst_video_frame_map()
Add missing map flag, and also add unmap call.
2016-09-19 11:27:10 -04:00
Víctor Manuel Jáquez Leal
dcfc69ab1d videooverlaycomposition: document required map flags
Fix documentation for gst_video_overlay_composition_blend(). The video frame
needs to be mapped with GST_MAP_READWRITE flag.

https://bugzilla.gnome.org/show_bug.cgi?id=771382
2016-09-14 11:17:25 +02:00
Jonathan Matthew
7b8aa8cf7e pbutils: store missing-plugin structure in current_info->misc again
This allows gst_discoverer_info_get_misc to work again, until it
finally gets removed.

https://bugzilla.gnome.org/show_bug.cgi?id=770643
2016-09-04 16:48:40 +01:00
Jan Schmidt
47cb25a1f8 video-frame: Expand the range of caps for extended buffer flags
The video buffer flags can be applied to encoded video streams,
such as video/x-h264 marked up by a demuxer or parser.
2016-09-01 22:48:40 +10:00
Havard Graff
4b854b3440 video-frame: GST_VIDEO_BUFFER_FLAG are only valid for video/x-raw caps
https://bugzilla.gnome.org/show_bug.cgi?id=769771
2016-09-01 13:05:47 +03:00
Havard Graff
c726e0ab6d rtpbuffer: Add buffer flag RETRANSMISSION
Useful for elements to know if a buffer is a retransmitted RTP packet.

https://bugzilla.gnome.org/show_bug.cgi?id=769771
2016-09-01 13:05:47 +03: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
Tim-Philipp Müller
45eee84140 meson: update for new files in video lib 2016-08-25 12:19:52 +01:00
Xabier Rodriguez Calvar
0341f04ce1 videodirection: interface for rotation and flip
A GstVideoOrientationMethod enumeration is also provided for the
admitted property values.

https://bugzilla.gnome.org/show_bug.cgi?id=768687
2016-08-25 10:19:13 +03: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
Vivia Nikolaidou
41c9f0b9dc videotimecode: Fix false positive coverity issues
They are false positive overflows, because coverity doesn't realize that
hours <= 24, minutes < 60 and seconds < 60 in all functions. Also casting the
number 60 (seconds in minute, minutes in hour) to guint64 for the
calculations, in order to avoid overflowing once we allow more than 24-hour
timecodes.

CIDs #1371459, #1371458
2016-08-19 15:57:01 +03:00
Nirbheek Chauhan
a276fd45b8 gstfft: Use stdint.h instead of _stdint.h
_stdint.h is generated by Autotools and we don't really need it.
stdint.h is now available on all supported platforms.
This really only makes a difference for MSVC, which has it starting from
Visual Studio 2015.
2016-08-19 12:12:31 +01:00
Wim Taymans
38622ee1e8 fdmemory: add flag to avoid close of the fd
Add GST_FD_MEMORY_FLAG_DONT_CLOSE to avoid closing the fd when the
memory is freed. When you can guarantee the lifetime of the fd is
longer than the memory, this can save a dup() call.
2016-08-19 09:27:01 +02:00
Vivia Nikolaidou
70149451ea videotimecode: Fix various coverity issues
Most of them are overflow related and false positives, but coverity can't know
that these can't overflow without us giving it more information. Add some
assertions for this.

One was an actual issue with flags comparison.

CIDs #1369051, #1369050, #1369049, #1369048, #1369045
2016-08-17 13:05:26 +03:00
Vivia Nikolaidou
8d8384f20a videometa: Added video time code meta
It attaches a GstVideoTimeCodeMeta (SMPTE timecode) as metadata to a buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=766419
2016-08-04 18:59:48 +03:00
Vivia Nikolaidou
ab35d7394e videotimecode: Added support for SMPTE time code metadata
Can be attached as GstMeta into a video frame.

https://bugzilla.gnome.org/show_bug.cgi?id=766419
2016-08-04 18:59:40 +03:00
Carlos Rafael Giani
9adaeb0a71 riff: Remove sample rate and channel count boundaries in caps
WAV is too generic to impose more-or-less arbitrary boundaries on the
sample rate and channel count caps. For example, there are 384 kHz WAV
files. Another example: it is in theory possible that somebody puts DSD
data into a WAV file, which will then have a sample rate of ~2.8 MHz.

For this reason, get rid of the rate and channel caps unless they are
fixed values. Downstream anyway usually knows the limitations better.

https://bugzilla.gnome.org/show_bug.cgi?id=761514
2016-08-02 15:25:53 +03:00
Sreerenj Balachandran
e5a67d71f7 pbutils: Add more h264 scalable profiles
Adding Scalable Constrained High (G.10.1.2.1) and
Scalable High Intra(G.10.1.3) profiles to the profile list

https://bugzilla.gnome.org/show_bug.cgi?id=769303
2016-08-02 14:25:57 +03:00
Sebastian Dröge
69f90adbaf rtpbuffer: Add some const qualifiers
gst_rtp_buffer_add_extension_onebyte_header() and
gst_rtp_buffer_add_extension_twobytes_header() can have a const argument for
the actual extension data.
2016-07-26 17:46:38 +03:00
Michael Olbrich
44da322083 audioclock: use GST_STIME_FORMAT for the correct argument
GST_STIME_ARGS is used for time_offset not for last_time.
This fixes the format string accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=768990
2016-07-20 12:28:54 +01:00
Joan Pau Beltran
c6722c06a0 appsink: add _pull_sample/preroll() variants with timeout
The _pull_sample() and _pull_preroll() functions block
until a sample is available, EOS happens or the pipeline
is shut down (returning NULL in the last two cases).

This adds _try_pull_sample() and _try_pull_preroll()
functions with a timeout argument to specify the maximum
amount of time to wait for a new sample.

To avoid code duplication, wait forever if the timeout is
GST_CLOCK_TIME_NONE and use that to implement
_pull_sample/_pull_preroll with the original behavior.

Add also corresponding action signals "try-pull-sample"
and "try-pull-preroll".

https://bugzilla.gnome.org/show_bug.cgi?id=768852
2016-07-18 16:55:16 +01:00
Tim-Philipp Müller
a80c546628 rtp: rtpbasedepayload: simplify code
Remove unnecessary helper struct for callbacks. The bclass
member of the helper struct was not used, so we can just
remove it and the GET_CLASS() call and simplify the whole
affair by passing the depayloader directly to the callback.
2016-07-15 19:51:20 +01:00
Xabier Rodriguez Calvar
9f594d1562 videoorientation: Use G_DEFINE_INTERFACE instead of a manually written get_type()
https://bugzilla.gnome.org/show_bug.cgi?id=768687
2016-07-12 09:05:32 +03:00
Sebastian Dröge
02a88077fc video: Fix some compiler warnings for out-of-range enum values
https://bugzilla.gnome.org/show_bug.cgi?id=767816
2016-07-12 00:14:13 +03:00
Seungha Yang
50f74daa2f appsrc: Remove trailing whitespace
https://bugzilla.gnome.org/show_bug.cgi?id=768510
2016-07-11 09:54:11 +03:00
Sebastian Dröge
48324cab38 encoding-profile: Remove some more fields from the caps when creating from discoverer info
parsed, framed, stream-format and alignment are only relevant for parsers and
should not matter here. We still want to be able to use an encoder that can
only output byte-stream if the input was avc.

https://bugzilla.gnome.org/show_bug.cgi?id=768566
2016-07-08 16:44:18 +03:00
Sebastian Dröge
0e7cdee6c8 missing-plugins: Remove some other fields when cleaning up caps
Caps are cleaned up for missing plugins, and for creating encoding profiles
and caps descriptions.

Fields like streamheader, parsed, framed, stream-format and alignment are not
relevant here. The last ones all because a parser will take care of them.

https://bugzilla.gnome.org/show_bug.cgi?id=768566
2016-07-08 16:41:12 +03:00
Sebastian Dröge
d31f958d17 pbutils: Mark private functions as G_GNUC_INTERNAL 2016-07-08 15:44:26 +03:00
Sergio Torres Soldado
7960bc0380 rtspconnection: Fix potential deadlock caused by blocking read forever
Reset the connection "may_cancel" property to avoid a potential deadlock
if there is no data to read and the socket stays blocked forever.

https://bugzilla.gnome.org/show_bug.cgi?id=768249
2016-07-07 19:15:18 +03:00
Wim Taymans
9144a787df video-converter: fix compilation on big-endian 2016-07-07 17:29:34 +02:00
Edward Hervey
cfc36ba586 videodecoder: More trickmode fix
We need to take into account the input segment flags to know whether
we should drain the decoder after a new keyframe in trick mode.

Otherwise we would have to wait for the next frame to be outputted (and
the segment to be activated) which ... well ... kind of beats the whole
point of this draining :)
2016-07-07 17:12:31 +02:00
Sebastian Dröge
61f59857a7 audio: Ship audio-resampler-neon.h 2016-07-07 00:27:18 +03:00
Sebastian Dröge
08f993d090 Release 1.9.1 2016-07-06 13:06:06 +03:00
Philippe Normand
6338146c06 videodecoder: Take stream lock one time only on drain
When the drain is triggered from the chain function the lock is already
taken so there is no need to take it one more time.

https://bugzilla.gnome.org/show_bug.cgi?id=767641
2016-07-05 19:38:40 +03:00
Sebastian Dröge
e18a9d9b5f videodecoder: fix criticals fixating a non existent field
https://bugzilla.gnome.org/show_bug.cgi?id=766970
2016-07-04 11:16:55 +02:00
Sebastian Dröge
e5d7064b29 audiodecoder: Protect samples_in/bytes_out and audio info with object lock
It might cause invalid calculations during the CONVERT query otherwise.
2016-07-04 11:12:55 +02:00
Sebastian Dröge
5cbd1a7bca audioencoder: Protect samples_in/bytes_out and audio info with object lock
It might cause invalid calculations during the CONVERT query otherwise.
2016-07-04 11:12:55 +02:00
Sebastian Dröge
8d8262a00c audioencoder/decoder: Move encoded audio conversion function to a common place
No need to duplicate this non-trivial function.
2016-07-04 11:12:55 +02:00
Vincent Penquerc'h
c76e8c77eb audiodecoder: fix criticals fixating a non existent field
https://bugzilla.gnome.org/show_bug.cgi?id=766970
2016-07-04 10:05:45 +01:00
Sebastian Dröge
66342c5c86 videodecoder: Use the object lock to protect bytes/time tracking
And especially don't use the stream lock for that, as otherwise non-serialized
queries (CONVERT) will cause the stream lock to be taken and easily causes the
application to deadlock.

https://bugzilla.gnome.org/show_bug.cgi?id=768361
2016-07-04 10:55:07 +02:00
Sebastian Dröge
3cabd3fe55 videoencoder: Use the object lock to protect bytes/time tracking 2016-07-04 10:52:24 +02:00
Sebastian Dröge
d8111778bd videoencoder/decoder: Move conversion utility functions to a common header and use consistently in encoder/decoder 2016-07-04 10:47:36 +02:00
Sebastian Dröge
1032f5c1b3 appsrc: If do-timestamp=TRUE, capture the time when the buffer was pushed to the source
... instead of the time when it was pushed further downstream.

https://bugzilla.gnome.org/show_bug.cgi?id=763630
2016-07-01 14:32:26 +02:00
Zaheer Abbas Merali
0f609bc6c6 basertpdepayload: create valid segment when given non-time segment
This will become an error in 1.10.

https://bugzilla.gnome.org/show_bug.cgi?id=765796
2016-07-01 14:16:46 +02:00
Tim-Philipp Müller
a2c050a4be tagdemux: fix handling of very short files in push mode
By default we'll wait for a certain amount of data before
attempting typefinding. However, if the stream is fairly
short, we might get EOS before we ever attempted any
typefinding, so at this point we should force typefinding
and output any pending data if we manage to detect the
type.

https://bugzilla.gnome.org//show_bug.cgi?id=768178
2016-06-30 18:53:07 +01:00
Tim-Philipp Müller
130e78dbd8 tagdemux: fix erroring out if we reach EOS without detecting type
In 0.10 the source pad was a dynamic pad that was only added once
the type had been detected, but in 1.x it's an always source pad,
so checking whether it's still NULL won't work to detect if the
type has been detected.

Makes tagdemux error out when we get EOS but haven't managed to
identify the format of the data after the tag.

https://bugzilla.gnome.org//show_bug.cgi?id=768178
2016-06-30 18:53:02 +01:00
Sebastian Dröge
5de9d5809b audioconvert: Handle fallback channel mask for mono correctly
It's 0 and no mask should be set for mono at all.

https://bugzilla.gnome.org/show_bug.cgi?id=757472
2016-06-29 18:14:51 +02:00
Wim Taymans
5e752f4eda video-converter: fix interlaced scaling some more
Fix problem with the line cache where it would forget the first line in
the cache in some cases.
Keep as much backlog as we have taps. This generally works better and we
could do even better by calculating the overlap in all taps.
Allocated enough lines for the line cache.
Use only half the number of taps for the interlaced lines because we
only have half the number of lines.
The pixel shift should be relative to the new output pixel size so scale
it.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=767921
2016-06-22 16:21:13 +02:00
Guillaume Desmottes
937a42247a audioaggregator: fix buffer leak
If the pad was still owning a buffer when being destroyed it was leaked.

Fix a leak with the test_flush_start_flush_stop test.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Michael Olbrich
72879c3639 tagdemux: preserve duration when skipping a tag at the beginning of a buffer
gst_buffer_copy_region() does not copy the duration if it doesn't start
with the first byte. We just skip the tag here, so the duration is still
valid.

https://bugzilla.gnome.org/show_bug.cgi?id=767791
2016-06-21 10:43:50 +03:00
Sebastian Dröge
26f63db498 discoverer: Only allow serializing OK discoverer infos to GVariants
They will be incomplete otherwise and we can't generate the full serialized
information, and instead will crash somewhere on the way.

https://bugzilla.gnome.org/show_bug.cgi?id=767859
2016-06-21 10:24:15 +03:00
Mikhail Fludkov
8d4f79b640 audiodecoder: fix invalid timestamps when PLC and delay
Elements inherited from GstAudioDecoder, supporting PLC and introducing
delay produce invalid timestamps. Good example is opusdec with in-band FEC
enabled. After receiving GAP event it delays the audio concealment until
the next buffer arrives. The next buffer will have DISCONT flag set which
will make GstAudioDecoder to reset it's internal state, thus forgetting
the timestamp of GAP event. As a result the concealed audio will have the
timestamp of the next buffer (with DISCONT flag) but not the timestamp
from the event.
2016-06-16 11:01:04 +01:00
Paulo Neves
5dd720e064 exiftag: Increase serialized geo precision
The serialization of double typed geographical
coordinates to DMS system supported by the exif
standards was previously truncated without need.

The previous code truncated the seconds part of
the coordinate to a fraction with denominator
equal to 1 causing a bug on the deserialization
when the test for the coordinate to be serialized
was more precise.

This patch applies a 10E6 multiplier to the numerator
equal to the denominator of the rational number.

Eg. Latitude = 89.5688643 Serialization

DMS Old code = 89/1 deg, 34/1 min, 7/1 sec
DMS New code = 89/1 deg, 34/1 min, 79114800UL/10000000UL

Deserialization

DMS Old code = 89.5686111111
DMS New code = 89.5688643

The new test tries to serialize a higher precision
coordinate.

The types of the coordinates are also guint32 instead
of gint like previously. guint32 is the type of the
fraction components in the exif.

https://bugzilla.gnome.org/show_bug.cgi?id=767537
2016-06-13 09:29:52 +03:00
Thomas Jones
d423406e0a audiovisualizer: Fix calculations for bytes<->samples conversions
Use bpf instead of channels * sizeof(gint16).

https://bugzilla.gnome.org/show_bug.cgi?id=767505
2016-06-11 11:45:51 +03:00
Thomas Jones
247ce9f39f audiovisualizer: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()
https://bugzilla.gnome.org/show_bug.cgi?id=767506
2016-06-11 11:42:54 +03:00
Thomas Jones
721e415fd2 audiovisualizer: fix timestamp calculation for audio channels > 1
We have to use bps*channels instead of just bps, which is exactly what bpf is for.

https://bugzilla.gnome.org/show_bug.cgi?id=767507
2016-06-11 11:42:20 +03:00
Víctor Manuel Jáquez Leal
8b8708f946 videodecoder: handle buffer's flags at offset
For reverse playback it is important to handle correctly the frame sync
points, which is set when the input buffer doesn't have the DELTA_UNIT flag.

This is handled correctly when decoder is packetized, but when it is not the
frame's sync point is not copied, and the reverse playback never decodes frame
batches.

The current patch adds the buffer's flags to the Timestamp list, where the
timestamp and duration of the input buffers are hold.
2016-06-09 19:13:46 +03:00
Víctor Manuel Jáquez Leal
75906f53d1 videodecoder: squash two message logs into one
There were two consecutive log messages in gst_video_decoder_decode_frame().
Given the information they provide, it is more efficient to squash them into a
single one.
2016-06-09 19:08:08 +03:00
Víctor Manuel Jáquez Leal
779e739142 videodecoder: playback rate is in input_segment
The playback rate is hold in the input_segment member variable, not in the
output_segment, and the parse_gather list was never filled because of that.

This patch changes the comparison with input_segment.
2016-06-09 19:05:41 +03:00
Sebastian Dröge
0bd3f2352c videodecoder: Use input segment rate instead of output segment rate to decide whether the drain on keyframes
The output segment is only set up after data is output, which might be far in
the future for reverse playback. Also we are here interested in the state at
the current *input* frame (which is the keyframe), not any possible output.
2016-06-09 19:02:49 +03:00
Sebastian Dröge
0c7022d681 videodecoder: Only drain in KEY_UNITS trick mode after a keyframe in forwards playback mode
For reverse playback the same behaviour was already implemented in
flush_parse().

For reverse playback, chain_forward() is only used to gather frames and not
for decoding, and it is actually called by the draining logic, causing an
infinite recursion.
2016-06-09 18:57:49 +03:00
Edward Hervey
8bee96c4a2 videodecoder: Don't push late frames
While it's a bit tricky to discard frames *before* decoding (because
we might not be sure which data is needed or not by the decoder), we
can discard them after decoding if they are too late anyway.

Any following basetransform based element or similar would drop the frame too.
2016-06-09 17:21:45 +03:00
Edward Hervey
5bef865f9f videodecoder: Avoid recursive drain/flush calls
_chain_forward() can also be called with reverse playback. Blindly
calling drain_out() on DISCONT buffers would end up in a recursive
call.
2016-06-07 10:31:59 +02:00
Edward Hervey
183e94b2d3 videodecoder: Drain out keyframes in TRICK_MODE_KEY_UNITS
When asked to just decode keyframe, if we got a keyframe drain out
the decoder straight away.
This avoids having to wait for the next frame and reduces delay even
more.

https://bugzilla.gnome.org/show_bug.cgi?id=767232
2016-06-07 09:50:08 +02:00
Edward Hervey
eb1ebf226f videodecoder: Drain decoder on DISCONT buffers
This ensures the decoder is properly drained out when receiving a
DISCONT buffer. The optimal way of doing this would have been to
receive a GAP event before hand but it is not always possible.

Fixes big delays with some decoders (ex gst-libav) that will not
drain out data when only decoding keyframes.

https://bugzilla.gnome.org/show_bug.cgi?id=767232
2016-06-07 09:49:56 +02:00
Michael Olbrich
ac56c1c3a7 tagdemux: preserve timestamp when skipping a tag at the beginning of a buffer
gst_buffer_copy_region() does not copy the timestamp if it doesn't start
with the first byte. We just skip the tag here, so the timestamp is still
valid.

https://bugzilla.gnome.org/show_bug.cgi?id=767173
2016-06-04 12:40:24 +01:00
Stian Selnes
1335ccd228 video-color: Fix colorimetry IS_UNKNOWN
Fix issue with colorimetry default indicies not being in sync with the
actual table causing IS_UNKNOWN() to sometimes fail.

https://bugzilla.gnome.org/show_bug.cgi?id=767163
2016-06-02 17:14:50 +01:00
Edward Hervey
fb21fc3af1 videodecoder: Make sure the DISCONT flag is set on the outgoing buffer
The base class was setting the DISCONT flag before checking whether the buffer
would be in segment or not.

Fix issues with DISCONT flags not being properly propagated downstream when
decoders buffers were out of segment.

https://bugzilla.gnome.org/show_bug.cgi?id=766800
2016-06-02 10:50:58 +03:00
Joan Pau Beltran
abb88801e7 video: add IYU2 format
This existed in 0.10 and is needed by dc1394src.

IYU2 format is a YUV fully-sampled packed format similar to v308
but with different component order (U-Y-V instead of Y-U-V).

http://www.fourcc.org/yuv.php#IYU2

https://bugzilla.gnome.org/show_bug.cgi?id=763026#c5
2016-06-01 12:07:05 +01:00
Tim-Philipp Müller
d52a74f32e g-i: pass compiler env to g-ir-scanner
It's what introspection.mak does as well. Should
fix spurious build failures on gnome-continuous.
2016-05-24 00:44:21 +01:00
Guillaume Desmottes
8fc42f12f0 videosink: ensure the debug category is always initialized
gst_video_sink_center_rect() can be called without a GstVideoSink
having been instantiated so we can't relly on the video sink
class_init function to init the category.

Fix a warning when running:
GST_CHECKS=test_video_center_rect GST_DEBUG=6 G_DEBUG=fatal_warnings make libs/video.check-norepeat

https://bugzilla.gnome.org/show_bug.cgi?id=766510
2016-05-18 19:44:52 +01:00
Tim-Philipp Müller
7c5ee9d3ef app: remove marshaller files from git 2016-05-16 09:20:36 +01:00
Tim-Philipp Müller
75f3c7cb85 app: use generic marshallers 2016-05-15 15:26:13 +01:00
Matthew Waters
1e3f5e0ecf video/affinetransformationmeta: define the coordinate space used
Based on the expected output from the already existing usage by androidmedia
and the opengl plugins.

https://bugzilla.gnome.org/show_bug.cgi?id=764667
2016-05-15 10:53:55 +03:00
Tim-Philipp Müller
fb2c75de68 pbutils: add description for WebVTT 2016-05-14 16:08:09 +01:00
Hyunjun Ko
825c150e9d sdp: parse sdp attributes in case that sdp message doesn't contain mikey message
https://bugzilla.gnome.org/show_bug.cgi?id=766204
2016-05-10 19:43:32 +03:00
Sebastian Dröge
dc8120f298 appsrc: Add duration property for providing a duration in TIME format
https://bugzilla.gnome.org/show_bug.cgi?id=766229
2016-05-10 16:50:32 +03:00
Sebastian Dröge
5be3c5f6b2 videodecoder/encoder: Correct GST_IS_*CODER_CLASS macros
They are currently not used, but would result in a compiler error due to wrong
variable name usage.

https://bugzilla.gnome.org/show_bug.cgi?id=766203
2016-05-10 10:01:12 +03:00
Sebastian Dröge
9e60877108 encoding-profile: Fix caps memory leak 2016-04-29 11:06:49 +03:00
Sebastian Dröge
e2bde252a6 encoding-profile: Recurse into nested container profiles and only add the final audio/video streams
If we e.g. have AVI with DV container with video/audio inside the DV
container, we can't handle this at this point with an encoding profile.
Instead of erroring out, flatten the container hierarchy.

https://bugzilla.gnome.org/show_bug.cgi?id=765708
2016-04-29 10:12:06 +03:00
Sebastian Dröge
4c2e7ae051 encoding-profile: Fail to create encoding profile from discoverer info if no streams could be added
https://bugzilla.gnome.org/show_bug.cgi?id=765708
2016-04-29 10:12:06 +03:00
Sebastian Dröge
436adc68e0 encoding-profile: Move adding of each stream to a helper function
https://bugzilla.gnome.org/show_bug.cgi?id=765708
2016-04-29 10:12:06 +03:00
Aurélien Zanelli
928bb3b6f4 exiftag: handle GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM tag
This tag match the EXIF_TAG_FOCAL_LENGTH_IN_35_MM_FILM exif tag and is
stored on a short. Hence there is a precision loss compared to the
GstTag which is a double value.

https://bugzilla.gnome.org/show_bug.cgi?id=753930
2016-04-28 12:13:15 -03:00
Aurélien Zanelli
c5a4a83828 tag: add GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM tag
It is the 35 mm equivalent focal length of the lens, mainly used in
photography. Tag value is stored in a double value to be consistent with
GST_TAG_CAPTURING_FOCAL_LENGTH.

https://bugzilla.gnome.org/show_bug.cgi?id=753930
2016-04-28 12:13:15 -03:00
Kipp Cannon
f7a31a79f4 audio: Add const to segment parameter of gst_audio_buffer_clip()
e.g., allows this to be used with the reference retrieved by
gst_event_parse_segment().

https://bugzilla.gnome.org/show_bug.cgi?id=765663
2016-04-27 12:26:07 +03:00
Sebastian Dröge
155222017a codec-utils: H265 level idc 0 is not valid
Don't put level=0 into the caps, it confuses other elements.

https://bugzilla.gnome.org/show_bug.cgi?id=765538
2016-04-25 16:49:20 +03:00
Sebastian Dröge
7741e56db4 codec-utils: H264 level idc 0 is not valid
Don't put level=0 into the caps, it confuses other elements.

https://bugzilla.gnome.org/show_bug.cgi?id=765538
2016-04-25 16:49:20 +03:00
Sebastian Dröge
fc99a61774 encoding-profile: Remove codec_data and streamheader fields from constraint caps
When converting discoverer output to an encoding profile, it makes sense to
omit these. It's very very unlikely that our encoder is going to produce bit
by bit the same codec_data or streamheader.

https://bugzilla.gnome.org/show_bug.cgi?id=765534
2016-04-25 16:07:50 +03:00
Sebastian Dröge
fd32d5812a encoding-profile: Don't put G_BEGIN_DECLS around #include statements
It should only be around our own declarations.
2016-04-25 15:06:23 +03:00
Wim Taymans
a12f51c3de video-converter: add more fastpaths for I420 -> RGB
Use the I420->BGRA and a new I420->ARGB to speed up any I420 to RGB
operation.
2016-04-22 15:30:19 +02:00
Josep Torra
1439b61694 sdp: update since markers to 1.8.1 for some new APIs
As we decided to backport some fixes we update the since markers.
2016-04-19 17:36:20 +02:00
Jan Schmidt
802eae296a Revert "audioringbuffer: start ringbuffer if needed upon commit"
This reverts commit 13ee94ef10.

Causes audio glitches at startup by starting to output segments
from the ringbuffer before it has been filled / fully prerolled.

https://bugzilla.gnome.org/show_bug.cgi?id=657076
2016-04-16 02:13:15 +10:00
Aleix Conchillo Flaqué
28cf2f02e7 sdpmessage: new gst_sdp_media_parse_keymgmt/gst_sdp_media_parse_keymgmt
We add a couple of new functions gst_sdp_media_parse_keymgmt and
gst_sdp_media_parse_keymgmt. We also implement
gst_sdp_message_attributes_to_caps and gst_sdp_media_attributes_to_caps
in terms of these new functions and also gst_mikey_message_to_caps.
2016-04-15 15:28:47 +02:00
Aleix Conchillo Flaqué
7a864c177f mikey: add new function gst_mikey_message_to_caps 2016-04-15 15:21:23 +02:00
Aleix Conchillo Flaqué
62e0e74759 mikey: allow passing srtp or srtcp to create mikey message
Current implementation requires all srtp and srtcp parameters to be
given in the caps. MIKEY uses only one algorithm for encryption and one
for authentication so we now allow passing srtp or srtcp parameters. If
both are given srtp parametres will be preferred.

https://bugzilla.gnome.org/show_bug.cgi?id=765027
2016-04-15 12:33:43 +02:00
Sebastian Dröge
a82ef8983e videometa: Initialize all fields of all metas with default values
The metas are not allocated with all fields initialized to zeroes.

https://bugzilla.gnome.org/show_bug.cgi?id=764902
2016-04-13 10:10:51 +03:00
Arjen Veenhuizen
c5ed98a35b videometa: Explicitly initialize GstVideoCropMeta on init
It is not allocated with all fields initialized to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=764902
2016-04-13 10:10:46 +03:00