Commit graph

1029 commits

Author SHA1 Message Date
Wang Xin-yu (王昕宇)
45db2931c8 glcolorconvert: support RGB16/BGR16 video format download
https://bugzilla.gnome.org/show_bug.cgi?id=740801
2017-12-09 19:31:50 +00:00
Matthew Waters
55977523b0 glimagesink: only attempt a resize when the window has already resized
fixes a black startup screen on wayland
2017-12-09 19:31:50 +00:00
Matthew Waters
e32c4a62c2 gl/wayland: implement resizing the window using the right mouse button 2017-12-09 19:31:50 +00:00
Matthew Waters
e252c908e7 glfilter: support fixed dimensions on both sides of the element
Fixes:

  width=320,height=240 ! glfilter ! width=800,height=600
  width=230,height=240 ! glfilter ! width=600
  ... ! glfilter ! width=800
2017-12-09 19:31:50 +00:00
Ramprakash Jelari
c5804b9af5 glcontext: Fix unused variable warning by moving declaration where it is actually used 2017-12-09 19:31:50 +00:00
Sebastian Dröge
3c7095e5ad glupload: Fix valid compiler warning
gstglupload.c:442:32: error: if statement has empty body [-Werror,-Wempty-body]
    if (upload->texture_ids[i]);
                               ^
2017-12-09 19:31:50 +00:00
Philippe Normand
ce58219124 gl: ship the gstglcontext_egl.h header
It is required by gsteglimagememory.h.

https://bugzilla.gnome.org/show_bug.cgi?id=740611
2017-12-09 19:31:50 +00:00
Tim-Philipp Müller
13706c2c05 gl: shadervariables: make parsing of floats locale-independent
Floating point numbers are written differently in different
locales, e.g. in many countries 1/2 = 0,5 instead of 0.5, and
strtod will not be able to parse "0.5" correctly in such a
locale.
2017-12-09 19:31:50 +00:00
Matthew Waters
97607a0d50 glshadervariables: also trim \r as well as \n 2017-12-09 19:31:50 +00:00
Matthew Waters
00506bf183 glupload: rearchitecture for non GLMemory inputs/outputs
Allows other memory types to be implemented/returned/used by the caller.
2017-12-09 19:31:50 +00:00
Vineeth T M
1716e8c481 glimagesink: critical error while seek playback-test(stop state)
If we seek when media is in stop state, playback-test gives
critical error, since context of glimagesink is destroyed during stop.
But since context is not present, we need not handle send_event in glimagesink
Hence adding a condition to check if context is valid.

https://bugzilla.gnome.org/show_bug.cgi?id=740305
2017-12-09 19:31:50 +00:00
Vineeth T M
d747c65d4c glcontext: build errors when GST_GL_HAVE_OPENGL is 0
Moving variables within #if GST_GL_HAVE_OPENGL, which are not going to be used otherwise.
and which are needed only when OpenGl is present

https://bugzilla.gnome.org/show_bug.cgi?id=740235
2017-12-09 19:31:50 +00:00
Matthew Waters
e731762984 glfilter: add read-only context property 2017-12-09 19:31:50 +00:00
Matthew Waters
3455b050c2 glmixer: add read-only context property 2017-12-09 19:31:50 +00:00
Sebastian Dröge
8f5faa3872 gl/cocoa: Only use convertRectToBacking on OSX >= 10.7
It does not exist before and older versions also don't have
support for HiDPI displays anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=740201
2017-12-09 19:31:50 +00:00
Sebastian Dröge
d70f6a9b5e gl: Use numeric OSX version instead of the macro
The macro is not defined on older OSX versions and evaluates to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=740201
2017-12-09 19:31:50 +00:00
Sebastian Dröge
3fe5be7c9a gl/cocoa: Don't override the application delegate
Otherwise interesting things will happen in Cocoa applications, like
infinite event loops that block the NSApplication loop forever.

This was only needed for GNUStep and thus can safely be removed now.
2017-12-09 19:31:50 +00:00
Sebastian Dröge
673b0190af gl/cocoa: Remove GNUStep support
Until gcc and GNUStep properly support Objective-C blocks and other
"new" features of Objective-C we can't properly support them without
making the code much more ugly.

https://bugzilla.gnome.org/show_bug.cgi?id=739152
2017-12-09 19:31:50 +00:00
Matthew Waters
f0c118c77a glimagesink: don't set the upload to NULL on the drain query
https://bugzilla.gnome.org/show_bug.cgi?id=732694
2017-12-09 19:31:50 +00:00
Hyunjun Ko
db6ea1b3bd gl: Correct invalid comment text 2017-12-09 19:31:49 +00:00
Julien Isorce
56c9d7f111 gl: add unit test that checks for glimagesink drain query handling
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732694
2017-12-09 19:31:49 +00:00
Julien Isorce
c72498af92 glimagesink: release stored buffers on drain query
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732694
2017-12-09 19:31:49 +00:00
Julien Isorce
af59b771fd gl: do not raise a critical msg if the backend does not handle window events
Fix "assertion 'window_class->handle_events != NULL' failed"
if not using a X11 window.
2017-12-09 19:31:49 +00:00
Matthew Waters
af9b73043e gl: remove the width/height fields from the caps to support frame resizing
It was previously only occuring with sysmem caps features

https://bugzilla.gnome.org/show_bug.cgi?id=739334
2017-12-09 19:31:49 +00:00
Sebastian Dröge
90022c451c gstglconfig: Put gstglconfig.h into $(libdir)/gstreamer-1.0/include
It's architecture dependent and should not be placed into the include
directory as the assumption is that all those headers are architecture
independent.

https://bugzilla.gnome.org/show_bug.cgi?id=739767
2017-12-09 19:31:49 +00:00
Alessandro Decina
c3612847ef glimagesink: don't make gst_glimage_sink_handle_events call _ensure_gl_setup
gst_glimage_sink_handle_events can be called from the overlay interface and from
the main thread before GL is setup. Before this change, that would call
_ensure_gl_setup() and deadlock on OSX.

Change things so that it's always safe to call gst_glimage_sink_handle_events()
without stuff deadlocking.
2017-12-09 19:31:49 +00:00
Alessandro Decina
ab8990c89f glimagesink: fix possible deadlock on osx
Remove gst_glimage_sink_handle_events call in gst_glimage_sink_init. It was
unnecessary and when the element was instantiated from the main thread, caused a
deadlock in OSX creating the context (thread).
2017-12-09 19:31:49 +00:00
Matthew Waters
d9b724a3d2 glimagesink: clamp the resize width/height to >= 1 to avoid a GL error 2017-12-09 19:31:49 +00:00
Matthew Waters
d738b78229 glutils: only attempt getting the app context when we don't already have a display
avoids querying/messaging the world on each frame
2017-12-09 19:31:49 +00:00
Matthew Waters
e2f61d20a2 glcontext: fail context creation if glGetString returns NULL 2017-12-09 19:31:49 +00:00
Lubosz Sarnecki
64dd17bde6 glimagesink: implement gst_video_overlay_handle_events
https://bugzilla.gnome.org/show_bug.cgi?id=736035
2017-12-09 19:31:49 +00:00
Julien Isorce
f1365f1051 gl/cocoa: use NSAutoreleasePool to free resize data
Otherwise when resizing the window you will also get messages like:
class NSConcreteMapTable autoreleased with no pool in place - just leaking
class NSConcreteValue autoreleased with no pool in place - just leaking
class NSConcreteValue autoreleased with no pool in place - just leaking
class __NSCFDictionary autoreleased with no pool in place - just leaking
2017-12-09 19:31:49 +00:00
Julien Isorce
ef707ee9d5 gl/cocoa: include gl3.h to have GL_CONTEXT_PROFILE_MASK 2017-12-09 19:31:49 +00:00
Julien Isorce
f44b430bc7 gl/cocoa: make sure to turn on frame rectangle changes notifications
Default value of property postsFrameChangedNotifications is YES
but it is worth to explicitly enable it.
2017-12-09 19:31:49 +00:00
Julien Isorce
4a736caded gl/cocoa: fix uncaught exception 'unrecognized selector sent to instance'
Need to set the ':' as the reshape method now takes one parameter.
For the story, the GstGLNSView was previously inheriting from
NSOpenGLView which has a reshape function without any parameter.
Now the GstGLNSView inherits from NSView and we re-use the reshape
function manually.
2017-12-09 19:31:49 +00:00
Julien Isorce
a581d479ff gl/cocoa: fix compiler warning
Use the reshape function after being defined. The other way
would have been to declare the reshape function in the header.

gstglwindow_cocoa.m: In function '-[GstGLNSView drawRect:]':
gstglwindow_cocoa.m:555: warning: 'GstGLNSView' may not respond to '-reshape'
gstglwindow_cocoa.m:555: warning: (Messages without a matching method signature
gstglwindow_cocoa.m:555: warning: will be assumed to return 'id' and accept
gstglwindow_cocoa.m:555: warning: '...' as arguments.)
2017-12-09 19:31:49 +00:00
Tim-Philipp Müller
653c04b121 gl: fix Since marker for gst_gl_window_run_navigation() 2017-12-09 19:31:49 +00:00
Luis de Bethencourt
f16b75aa49 glshader: Fix memory leak
Memory is only freed in the TRUE clause of the if conditional. Free in the else
clause as well.
Also, consolidate g_malloc + sprintf into a g_strdup_printf().

CID #1212171

https://bugzilla.gnome.org/show_bug.cgi?id=739368
2017-12-09 19:31:49 +00:00
Luis de Bethencourt
eabcf66f2f glcolorconvert: fix comments that confuse gtk-doc
GTK-Doc uses a special syntax for code documentation. A multiline comment that
starts with an additional '*' marks a documentation block that will be processed
by the GTK-Doc tools. So GTK-Doc is confused if a comment block starts with that
additional '*' but isn't meant to be processed. Removing this additional '*'.

https://bugzilla.gnome.org/show_bug.cgi?id=739444
2017-12-09 19:31:49 +00:00
Matthew Waters
0fa95fe809 glimagesink: resize the viewport correctly on a caps change
with force-aspect-ratio=true, if the width or height changed, the
viewport wasn't being updated to respect the new video width and height
until a resize occured.
2017-12-09 19:31:49 +00:00
Matthew Waters
b06ca547d6 glmixer: advertise support for changing input caps mid-stream
https://bugzilla.gnome.org/show_bug.cgi?id=739334
2017-12-09 19:31:49 +00:00
Matthew Waters
35e9b5ab8b gl: sprinkle some Since markers 2017-12-09 19:31:49 +00:00
Matthew Waters
4a8b7c9193 glmixer: don't get the current caps from GstVideoInfo for the srcpad
It's missing the caps features needed.
2017-12-09 19:31:49 +00:00
Matthew Waters
6811c39ff9 gl/examples: update for other-context property removal 2017-12-09 19:31:49 +00:00
Matthew Waters
7d97a35139 glcontext: add more functionality to wrapped contexts
Implements get_current_context() and get_proc_address() for wrapped
contexts.
2017-12-09 19:31:49 +00:00
Matthew Waters
366eaea6d2 glshader: advertise the default vertex and fragment shaders on desktop GL 2017-12-09 19:31:49 +00:00
Lubosz Sarnecki
e173ab2b9d satisfy gst-indent 2017-12-09 19:31:49 +00:00
Jan Schmidt
1a25f7e44a glfiltercube: Fix typo in property description 2017-12-09 19:31:49 +00:00
Wang Xin-yu (王昕宇)
10eb848d57 glmixer:fix incorrect parameter passed to handle_set_context 2017-12-09 19:31:48 +00:00
Matthew Waters
59e4a039c9 glfilter: get the config from the correct pool 2017-12-09 19:31:48 +00:00