Commit graph

43 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
bd2e304ea4 libs: window: don't add an unused function
The macro GST_VAAPI_OBJECT_DEFINE_CLASS_WITH_CODE only defines
a function that is never used, thus when compiling we might see
this warning (clang):

gstvaapiwindow.c:147:1: warning: unused function 'gst_vaapi_window_class' [-Wunused-function]
GST_VAAPI_OBJECT_DEFINE_CLASS_WITH_CODE (GstVaapiWindow,
^

https://bugzilla.gnome.org/show_bug.cgi?id=759533
2017-04-11 19:22:38 +02:00
Víctor Manuel Jáquez Leal
8e8280efbf libs: window: remove surface_format member
Since we always convert to NV12, there is no need to keep a
variable for that. Let us hard code it.

https://bugzilla.gnome.org/show_bug.cgi?id=759533
2017-04-11 19:22:38 +02:00
Hyunjun Ko
ccfbca733d libs: window: add gst_vaapi_window_vpp_convert_internal()
If a backend doesn't support specific format, we can use vpp for conversion
and make it playing.

This api is originated from GstVaapiWindowWayland and moved to GstVaapiWindow,
so that GstVaapiWindowX11 could use it.

https://bugzilla.gnome.org/show_bug.cgi?id=759533
2017-04-11 19:20:24 +02:00
Hyunjun Ko
4752f68a37 libs: window: x11/wayland: chaining up to GstVaapiWindow
Currently, GstVaapiWindowX11/Wayland are not descendants of GstVaapiWindow.
This patch chains them up to GstVaapiWindow to handle common members in GstVaapiWindow.

https://bugzilla.gnome.org/show_bug.cgi?id=759533
2017-04-11 16:41:41 +02:00
Víctor Manuel Jáquez Leal
b1f6da98de libs: fix code style for errors 2016-11-03 12:51:44 +01:00
Víctor Manuel Jáquez Leal
28d01c0857 libs: small code style fixes
This a set of small code style fixes detected as-is by gst-indent.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-03 12:45:30 +01:00
Michael Olbrich
11b9260b6c vaapisink: implement unlock/unlock_stop for wayland
Otherwise wl_display_dispatch_queue() might prevent the pipeline from
shutting down. This can happen e.g. if the wayland compositor exits while
the pipeline is running.

Changes:
* renamed unlock()/unlock_stop() to unblock()/unblock_cancel() in gstvaapiwindow
* splitted the patch removing wl_display_dispatch_queue()

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=747492

https://bugzilla.gnome.org/show_bug.cgi?id=749078
2015-05-15 17:10:37 +02:00
Gwenole Beauchesne
ff0a237458 window: add generic helper to create windows.
Add a new generic helper function gst_vaapi_window_new() to create
a window without having the caller to check for the display type
himself. i.e. internally, there is now a GstVaapiDisplayClass hook
to create windows, and the actual backend implementation fills it in.
Add new generic helper functions gst_vaapi_texture_new_wrapped()

This is a simplification in view to supporting EGL.
2015-01-27 18:11:45 +01:00
Holger Kaelberer
08dc3036f4 window: allow for updating size from current geometry.
Add gst_vaapi_window_reconfigure() interface to force an update of
the GstVaapiWindow "soft" size, based on the current geometry of the
underlying native window.

This can be useful for instance to synchronize the window size when
the user changed it.

Thanks to Fabrice Bellet for rebasing the patch.

[changed interface to gst_vaapi_window_reconfigure()]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-25 17:36:12 +02:00
Gwenole Beauchesne
3490212988 window: re-indent all GstVaapiWindow related source code. 2014-07-25 17:36:12 +02:00
Gwenole Beauchesne
c516311a1a legal: update copyright notice dates. 2013-11-22 06:39:20 +01:00
Gwenole Beauchesne
15519ebe3d legal: add per-file authorship information.
Credit original authors on a per-file basis as we cannot expect people
to know all country-specific rules, or bother browsing through the git
history.
2013-11-22 06:39:15 +01:00
Gwenole Beauchesne
5cabf4e305 Add initial Pixmap API.
Add API to transfer VA urfaces to native pixmaps. Also add an API to
render a native pixmap, for completeness. In general, rendering to
pixmap would only be useful to certain VA drivers and use cases on
X11 display servers. e.g. GLX_EXT_texture_from_pixmap (TFP) handled
in an upper layer.
2013-07-22 15:43:28 +02:00
Gwenole Beauchesne
99dfd44f33 surface: add simple surface info accessors as helper macros.
Add helper macros to retrieve the VA surface information like size
(width, height) or chroma type. This is a micro-optimization to avoid
useless function calls and NULL pointer re-checks in internal routines.
2013-07-08 18:52:56 +02:00
Gwenole Beauchesne
67eea92044 libs: drop GST_VAAPI_IS_xxx() helper macros.
Drop obsolete GST_VAAPI_IS_xxx() helper macros since we are no longer
deriving from GObject and so those were only checking for whether the
argument was NULL or not. This is now irrelevant, and even confusing
to some extent, because we no longer have type checking.

Note: this incurs more type checking (review) but the libgstvaapi is
rather small, so this is manageable.
2013-05-23 18:15:48 +02:00
Gwenole Beauchesne
8402b04ac9 libs: use GstVaapiObject for window objects. 2013-05-07 17:51:27 +02:00
Gwenole Beauchesne
61cc02f54b libs: fix build in strict ISO C mode. 2012-09-07 16:23:42 +02:00
Gwenole Beauchesne
0fb1147d9c Add header for system-dependent definitions. 2012-01-30 19:52:10 +01:00
Gwenole Beauchesne
92f11799d1 legal: fix year for some copyright notices. 2012-01-16 11:40:51 +01:00
Gwenole Beauchesne
1594d99d55 legal: add Intel copyright on modified files. 2012-01-16 11:40:51 +01:00
Gwenole Beauchesne
14cc1cf061 legal: fix copyright notices to include "Copyright" term. 2012-01-16 11:40:51 +01:00
Gwenole Beauchesne
420402d593 window: always check geometry when the window is mapped. 2012-01-11 09:38:56 +01:00
Gwenole Beauchesne
1701ce3107 Update copyright notice. 2011-06-14 13:54:07 +02:00
Gwenole Beauchesne
b614ec9c9b Fix licensing terms. 2011-06-14 13:54:03 +02:00
gb
6b56ca0068 Move GST_VAAPI_DISPLAY_VADISPLAY() and GST_VAAPI_DISPLAY_{LOCK,UNLOCK}() to gstvaapidisplay_priv.h. 2010-04-01 09:47:59 +00:00
gb
c3dcabd90c Check GstVaapiWindow::render() is available prior to calling it. 2010-03-26 08:35:24 +00:00
gb
2ecadd45b8 Rename to GST_VAAPI_OBJECT_DISPLAY(). 2010-03-24 17:40:19 +00:00
gb
0881507989 Make GstVaapiWindow* derive from GstVaapiObject. 2010-03-24 17:22:18 +00:00
gb
755f198a74 Fix short descriptions. 2010-03-24 08:16:32 +00:00
gb
b271ebd760 Drop introspection annotations since they require gtk-doc >= 1.12. 2010-03-23 13:32:36 +00:00
gb
df9e25d473 Shorten condition. 2010-03-22 16:59:29 +00:00
gb
3136cdc991 Try to improve switch to fullscreen mode. 2010-03-22 16:57:20 +00:00
gb
729f4fc9c6 Move _GstVaapiWindowPrivate declaration to gstvaapiwindow_priv.h. 2010-03-22 13:06:41 +00:00
gb
6407e5339a Add private API to set window size & fullscreen modes
without triggering any notification or virtual functions.
This is useful for derived class to fix up sizes whenever appropriate.
2010-03-22 13:05:05 +00:00
gb
8e773e6d10 Add gst_vaapi_window_get_fullscreen() helper and "fullscreen" property. 2010-03-22 12:47:13 +00:00
gb
cc10345448 Add gst_vaapi_window_get_display() to base. 2010-03-22 12:39:02 +00:00
gb
873d5b7a04 Add GstVaapiPoint & GstVaapiRectangle data structures. 2010-03-22 12:16:47 +00:00
gb
b8daf624c5 Add gst_vaapi_window_set_fullscreen() API. 2010-03-22 10:51:49 +00:00
gb
27307a6c1b Rename gst_vaapi_window_put_surface_full() to plain gst_vaapi_window_put_surface(). 2010-03-21 08:12:52 +00:00
gb
d63f196c73 Add tedious documentation. 2010-03-19 15:45:21 +00:00
gb
b9bf5678f9 Make it possible to bin an X11 window to GstVaapiWindowX11 with plain
g_object_new() and "xid" property. i.e. get foreign window size in
gst_vaapi_window_x11_create().
2010-03-18 13:49:50 +00:00
gb
d6f883f73a Rename vaapi_debug.h to gstvaapidebug.h. 2010-03-16 09:17:41 +00:00
gb
7fe02f31a5 Add VA/X11 window abstraction. 2010-03-15 15:12:27 +00:00