Commit graph

61 commits

Author SHA1 Message Date
Nicolas Dufresne
999bdd72c9 gtksink: Ensure the copy pasted code remains the same
Move back the default property at the same place they are in the
other sink. This helps when using a diff viewer to synchronized
this unfortunate copy paste.

https://bugzilla.gnome.org/show_bug.cgi?id=751104
2015-07-16 17:05:36 -04:00
Nicolas Dufresne
1a7c9b82f4 gtk: Fix race between queue_draw and destroy
In GTK dispose can be called before the last ref is reached. This
happens when you close the container window. The dispose will be
explicitly called, and destroyed notify will be fired. This patch
fixes this race by properly tracking the widget state.

In the sink, we now set the widget pointer to NULL, so the widget
will properly get created again if you set your pipeline to NULL
state after the widget was destroy, and set it back to PLAYING.

https://bugzilla.gnome.org/show_bug.cgi?id=751104
2015-07-16 17:05:36 -04:00
Nicolas Dufresne
8d9fbc5e49 gtkgstwidget: Add missing break in get_property 2015-07-15 11:47:51 -04:00
Nicolas Dufresne
5db1a0027a gtksinks: Remove undefined private structure
The classes contains a private structure which are not defined,
hence unused.
2015-07-15 11:44:30 -04:00
Matthew Waters
469ea20754 gtk: add to the generic/states test 2015-07-09 16:40:19 +10:00
Xavier Claessens
c3f1f2d78b GstGtkGLSink: Ensure widget has a toplevel parent
Checking for a parent is not enough, it must have a toplevel one.
If widget has no toplevel parent then add it in a GtkWindow, that
make it usable from gst-launch-1.0.

https://bugzilla.gnome.org/show_bug.cgi?id=751104
2015-07-09 16:40:19 +10:00
Xavier Claessens
9f39a9964a GstGtkGLSink: Post error if widget gets destroyed
https://bugzilla.gnome.org/show_bug.cgi?id=751104
2015-07-09 16:40:19 +10:00
Xavier Claessens
c55e55f48b GstGtkGLSink: fix possible warning in finalize
If the element is finalized before going in READY state
the widget could still be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=751104
2015-07-09 16:40:19 +10:00
Thibault Saunier
cb10f1b290 gtkglsink: Release the widget lock when trying to get the GL context
Otherwise we might be waiting for the lock on the main loop (for
example in the ->render vmethod) and thus we will deadlock.
2015-07-06 19:33:35 +02:00
Sebastian Dröge
577ca6a0e8 gtkglwidget: Const'ify another array 2015-06-15 21:32:43 +02:00
Sebastian Dröge
e410c770f5 gtkglwidget: Calculate the viewport size ourselves
Getting the current viewport and modifying it relatively will produce an
interesting feedback loop during widget resizing. Over a few frames we
will gradually move the viewport a bit until it converged again, adding
unnecessary additional borders at the top and left.
2015-06-15 21:29:46 +02:00
Sebastian Dröge
5cabeb3415 gtk: Use the display width/height for the widget's preferred width/height 2015-06-15 21:24:01 +02:00
Sebastian Dröge
166e33d64c gtksink: Add support for xRGB/BGRx 2015-06-15 20:45:11 +02:00
Sebastian Dröge
bd9ec0f333 gtk: Cairo color formats are in native endianness, GStreamer's in memory order
CAIRO_FORMAT_ARGB32 is ARGB on big endian and BGRA on little endian.
2015-06-15 20:39:59 +02:00
Sebastian Dröge
05fa796c25 gtk: Implement ignore-alpha property and enable it by default 2015-06-15 20:35:38 +02:00
Sebastian Dröge
8497b84e0d gtk: Sync properties from the sink to the widget upon widget creation 2015-06-15 20:13:57 +02:00
Matthew Waters
48db03200d gtk: implement pixel and display aspect ratio handling 2015-06-15 22:39:07 +10:00
Matthew Waters
8648d59974 gtk: silence unused variable warnings for unsupported winsys' 2015-06-15 14:41:24 +10:00
Matthew Waters
869ea6093c gtk: implement basic wayland GL support 2015-06-15 14:41:05 +10:00
Thibault Saunier
baad74b995 gtk: Do not try to activate a NULL GLContext
At that point in the code nothing guarantees it exists
2015-06-12 15:40:29 +02:00
Matthew Waters
a512a91598 gtk: implement video aspect-ratio handling
For both the software and the GL sink's.

Doesn't deal with the pixel-aspect-ratio field at all yet.
2015-06-12 15:17:30 +10:00
Matthew Waters
b9ebc71cc8 gtk: fix a couple of typos 2015-06-12 12:40:50 +10:00
Matthew Waters
7707894ee5 gtkglsink: reset the context/display in READY_TO_NULL
Fixes context propagation in pipelines with upstream GL elements.
2015-06-12 12:32:06 +10:00
Nicolas Dufresne
b68f478467 gstgtk: No need to realize the widget
The widget already does that.
2015-06-11 12:41:49 -04:00
Nicolas Dufresne
bdbff3bc8e gstgtk: Don't leak the widget
g_object_get() returns a ref, gtk_container_add() only ref_sink().
That mean we still need to unref afterward. This leak was hiding
a reference bug previously present.
2015-06-11 12:41:49 -04:00
Nicolas Dufresne
5c6050f849 gstgtk: Allow doing gst-inspect-1.0 on these elements
This patch allow going gst-inspect-1.0 on these elements removing
ugly crash that was previously occurring. The method consist of
making the widget creation as lazy as possible. This way we don't
endup doing gtk_init() before the application. We also ref_sink()
the widget, so we don't crash if the parent widget is discarded,
and cleanly error out with GL if the widget has no parent window,
because calling gtk_widget_realized() can only be done if the widget
has been parented to a window).
2015-06-11 12:41:49 -04:00
Thibault Saunier
4cef5787c8 gtk: Do not try to initialize display if we have not have a GLContext yet 2015-06-11 15:07:24 +02:00
Sebastian Dröge
fe5bf0cee1 gtk: Add missing CFLAGS to example 2015-06-11 14:58:27 +02:00
Matthew Waters
a959c410d9 Implement gtk sinks
two sinks are provided.  gtksink which is a cairo/software based renderer
and gtkglsink which utilises the GL support in gtk and gstreamer.
2015-06-11 22:01:03 +10:00
Matthew Waters
fc45400f4e gl/examples: move to -bad
- fix all the compiler errors
- give them their own gl directory
2014-04-29 16:40:08 +10:00
Руслан Ижбулатов
12e669f388 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
2014-03-18 06:17:03 +00:00
Matthew Waters
499cd75e4b [864/906] examples: update to gtk3 2014-03-15 18:37:05 +01:00
Sebastian Dröge
f5cb0ccb16 [771/906] gl: Some less long/ulong/gulong usage 2014-03-15 18:36:59 +01:00
Mathieu Duponchelle
e850ed5498 [769/906] tests/examples: fix and port some of the examples.
Realize widgets, remove glupload element.
2014-03-15 18:36:59 +01:00
Sebastian Dröge
804c5b14e8 [729/906] gl: Include config.h everywhere 2014-03-15 18:36:57 +01:00
Sebastian Dröge
1a2de27a52 [720/906] examples: Stop using deprecated GLib thread API 2014-03-15 18:36:56 +01:00
Matthew Waters
d6054f9738 [603/906] update FSF address 2014-03-15 18:36:50 +01:00
Matthew Waters
3d180b1602 [560/906] examples: update for bus api changes and glimagesink changes 2014-03-15 18:36:47 +01:00
Matthew Waters
d4a320f81f [511/906] tests: update for 1.0 2014-03-15 18:36:44 +01:00
Stefan Kost
4555feb043 [461/906] xoverlay: require base from git and update to new API 2014-03-15 18:36:41 +01:00
Julien Isorce
b130c3b750 [457/906] gtk examples: adapt code since the native-window changes from gtk
Fixes bug #599885
2014-03-15 18:36:41 +01:00
Руслан Ижбулатов
df4b871718 [413/906] Fix Windows compiler warning in test/examples/gtk/fxtest/pixbufdrop.c 2014-03-15 18:36:39 +01:00
Julien Isorce
757d005662 [386/906] pixbufdrop: fix example on win32 2014-03-15 18:36:37 +01:00
Filippo Argiolas
754299a5fd [361/906] gstgtk: add missing license and copyright information 2014-03-15 18:36:35 +01:00
Filippo Argiolas
b1102eafe5 [360/906] examples: add missing copyright/license to my examples 2014-03-15 18:36:35 +01:00
David Schleef
b70b0106b5 [328/906] Convert gtk examples to use helper library
Helper lib implements gst-gtk glue on all platforms
2014-03-15 18:36:34 +01:00
David Schleef
cbbb5f1eff [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"
2014-03-15 18:36:33 +01:00
David Schleef
500ebc49b9 [308/906] Rename glpixbufoverlay to gloverlay 2014-03-15 18:36:32 +01:00
Julien Isorce
f115d31df6 [301/906] depends on libpng instead of gdk_pixbuf 2014-03-15 18:36:32 +01:00
David Schleef
ea43a17480 [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.
2014-03-15 18:36:32 +01:00