Luis de Bethencourt
8c46b24d51
gl: check the correct GstGLMemory in basic_test
2017-12-09 19:31:37 +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
c52dd44e60
gl: fails glimagesink when shader compilation went wrong
...
Those shaders are fixed and very simple so it should not fail
but it's worth to handle a such case.
2017-12-09 19:31:37 +00:00
Julien Isorce
4844c53017
gl: call glClearColor before glClear
2017-12-09 19:31:37 +00:00
Josep Torra
22d5f77ccf
pkgconfig: fix gstreamer-gl uninstalled
...
Ensure to provide libgstgl also in the uninstalled setup.
Fixes build of gst-omx for RPI in uninstalled setup.
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
Sebastian Dröge
569f1363f4
glimagesink: Use the pixel-aspect-ratio adjusted width/height when centering the frame in the display area
...
Makes sure we actually keep the display aspect ratio
2017-12-09 19:31:37 +00:00
Sebastian Dröge
889e92e738
glimagesink: By default keep the display aspect ratio
...
Also the default for the pixel-aspect-ratio should be 1/1, not 0/1.
2017-12-09 19:31:37 +00:00
Sebastian Dröge
7f7ceea8de
gltestsrc: Unref context when creation failed and guard against that in fill()
2017-12-09 19:31:37 +00:00
Sebastian Dröge
fc607b3c53
glimagesink: Call gst_object_unref() on the GstGL GObjects again
...
While they're plain GObjects it does not hurt to call gst_object_unref()
on them and potentially allows to debug reference leaks a bit easier.
2017-12-09 19:31:37 +00:00
Sebastian Dröge
2b38f86b4e
glimagesink: If creating a context or upload failed, destroy it
...
Fixes deadlocks in error cases when later code assumes the broken
context is actually usable.
https://bugzilla.gnome.org/show_bug.cgi?id=728761
2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
f230f758e7
gl: a couple spelling/grammar fixes
2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
d6a87fb0c3
gl: guard against using a NULL window pointer
...
Coverity 1195145
2017-12-09 19:31:37 +00:00
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
9eb5001e02
glimagesink: remove unused texture
2017-12-09 19:31:36 +00:00
Matthew Waters
57b4bd6905
glimagesink: move upload into _prepare()
2017-12-09 19:31:36 +00:00
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
a05928ba62
gl: Set glimagesink rank to SECONDARY
...
This is a full-featured video sink now and especially should be
used instead of osxvideosink on OSX if available.
2017-12-09 19:31:36 +00:00
Sebastian Dröge
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
Sebastian Dröge
aab3ef1b5d
glimagesink: First handle GL window setup, then create the context and its thread
2017-12-09 19:31:36 +00:00
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