Commit graph

36 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
562bd629a6 vaapisink: add 'handoff' signal
This patch adds the signal ::handoff and the property signal-handoffs. If the
property is set TRUE, the signal ::handoff is emitted just after the buffer is
rendered.

Based on Zhao Halley <halley.zhao@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=747905
2015-04-16 11:27:51 +02:00
Changzhi Wei
c201f738fe vaapisink: add support for GstColorBalance interface.
https://bugzilla.gnome.org/show_bug.cgi?id=722390

[fixed channel names, simplified range factor, fixed memory leak]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-31 18:49:55 +02:00
Changzhi Wei
5a95cd5645 vaapisink: add support for colorbalance adjustment.
https://bugzilla.gnome.org/show_bug.cgi?id=722390

[fixed and simplified tracking of colorbalance value changes]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-31 18:48:46 +02:00
Gwenole Beauchesne
d1f83b4570 vaapisink: code clean-ups.
Move code around in a more logical way. Introduce GST_VAAPISINK_CAST()
helper macro and use it wherever we know the object is a GstBaseSink or
any base class. Drop explicit initializers for values that have defaults
set to zero.
2014-07-31 18:48:46 +02:00
Gwenole Beauchesne
1824a80957 vaapisink: re-indent all GstVaapiSink related source code. 2014-07-31 18:48:46 +02:00
Gwenole Beauchesne
30c59af0a0 vaapisink: introduce separate backends.
Introduce new backends vtable so that to have clean separation between
display dependent code and common base code. That's a "soft" separation,
we don't really need dedicated objects.

https://bugzilla.gnome.org/show_bug.cgi?id=722248
2014-07-30 18:38:03 +02:00
Gwenole Beauchesne
24673dc3a4 vaapisink: drop unused "synchronous" mode.
Support for X11 "synchronous" mode was never implemented, and was only
to be useful for debugging. Drop that altogether, that's not going to
be useful in practice.

https://bugzilla.gnome.org/show_bug.cgi?id=733985
2014-07-30 18:35:31 +02:00
Gwenole Beauchesne
81b5ad85b5 vaapisink: drop unused variables.
Drop obsolete, and now unused, video_buffer_pool and video_buffer_size
variables. They got merged into the GstVaapiPluginBase object.
2014-07-30 18:35:31 +02:00
Gwenole Beauchesne
8298d64aad vaapisink: drop GLX rendering and fancy effects.
Rendering with GLX in vaapisink is kind of useless nowadays, including
OpenGL related fancy effects. Plain VA/GLX interfaces are also getting
deprecated in favor of EGL, or more direct buffer sharing with actual
GL textures.

Should testing of interop with GLX be needed, one could still be using
the modern cluttersink or glimagesink elements.

https://bugzilla.gnome.org/show_bug.cgi?id=733984
2014-07-30 18:35:31 +02:00
Holger Kaelberer
4b61cc3cd7 vaapisink: listen to window size changes on X11.
Allow dynamic changes to the window, e.g. performed by the user, and
make sure to refresh its contents, while preserving aspect ratio.

In practice, Expose and ConfigureNotify events are tracked in X11
display mode by default. This occurs in a separte event thread, and
this is similar to what xvimagesink does. Any of those events will
trigger a reconfiguration of the window "soft" size, subsequently
the render-rect when necessary, and finally _expose() the result.

The default of handle_events=true can be changed programatically via
gst_x_overlay_handle_events().

Thanks to Fabrice Bellet for rebasing the patch.

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

[dropped XInitThreads(), cleaned up the code a little]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-30 15:46:14 +02:00
Gwenole Beauchesne
aa2fab43bd vaapisink: allow a specific view component to be displayed.
If a multiview stream is decoded, multiple view components are submitted
as is downstream. It is the responsibility of the sink element to display
the required view components. By default, always select the frame buffer
that matches the view-id of the very first frame to be displayed.

However, introduce a "view-id" property to allow the selection of a
specific view component of interest to display.
2014-07-28 10:29:57 +02:00
Gwenole Beauchesne
6bf3c1863c legal: update copyright notice dates. 2014-01-22 19:02:35 +01:00
Holger Kaelberer
b1d3f7d4c0 vaapisink: set csc render flags from sinkpad caps.
This maps GstVideoColorimetry information in vaapisink's sinkpad caps
to GST_VAAPI_COLOR_STANDARD_* flags, if per-buffer information was not
available.

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

[factored out code, added SMPTE240M, handle per-buffer flags]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-01-15 14:24:32 +01:00
Gwenole Beauchesne
e3dcd33114 plugins: factor out support for raw YUV buffers on sink pads.
Factor out propose_allocation() hooks, creation of video buffer pool
for the sink pad, conversion from raw YUV buffers to VA surface backed
buffers. Update vaapidecode, vaapiencode and vaapipostproc to cope
with the new GstVaapiPluginBase abilities.
2013-12-18 16:38:57 +01:00
Gwenole Beauchesne
6f2dfb71e6 plugins: factor out display creation process.
Move common VA display creation code to GstVaapiPluginBase, with the
default display type remaining "any". Also add a "display-changed"
hook so that subclasses could perform additional tasks when/if the
VA display changed, due to a new display type request for instance.

All plug-ins are updated to cope with the new internal APIs.
2013-12-18 16:38:57 +01:00
Gwenole Beauchesne
7e58d60854 plugins: add new base object, store display in there.
Introduce a new GstVaapiPluginBase object that will contain all common
data structures and perform all common tasks. First step is to have a
single place to hold VA displays.

While we are at it, also make sure to store and subsequently release
the appropriate debug category for the subclasses.
2013-12-18 16:38:57 +01: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
d2648afa32 vaapisink: handle raw buffers not created from VA video buffer pool.
Handle raw video buffers that were not created from a VA video buffer
pool. Use the generic GstVideo API to copy buffers in GStreamer 1.0.x
builds instead of the GstVaapiUploader.

https://bugs.freedesktop.org/show_bug.cgi?id=55818
2013-08-29 19:36:06 +02:00
Simon Farnsworth
0ef5979d77 vaapisink: allow scaling to ignore aspect ratio.
Other GStreamer sinks, like xvimagesink, have a force-aspect-ratio property,
which allows you to say that you don't want the sink to respect aspect
ratio. Add the same property to vaapisink.

http://lists.freedesktop.org/archives/libva/2012-September/001298.html

Signed-off-by: Simon Farnsworth <simon.farnsworth at onelan.co.uk>
2013-08-26 13:10:33 +02:00
Gwenole Beauchesne
ece5cb2d83 vaapisink: add "use-glx" property for OpenGL rendering.
Now that VA/GLX capable buffers are generated by default on X11, thus
depending on a VA/GLX display, we stil want to use vaPutSurface() for
rendering since it is faster.

Anyway, OpenGL rendering in vaapisink was only meant for testing and
enabling "fancy" effects to play with. This has no real value. So,
disable OpenGL rendering by default.
2013-06-27 13:53:46 +02:00
Gwenole Beauchesne
1b500dee54 Allow build against either GStreamer API (0.10 or 1.0).
Introduce a new configure option --with-gstreamer-api that determines
the desired GStreamer API to use. By default, GStreamer 1.0 is selected.
Also integrate more compatibility glue into gstcompat.h and plugins.
2013-04-10 14:58:17 +02:00
Sreerenj Balachandran
551ac4c5b3 plugins: use new video buffer pools.
Use new GstVaapiVideoBufferPool to maintain video buffers. Implement
GstBaseSink::propose_allocation() to expose that pool to upstream
elements; and also implement GstVideoDecoder::decide_allocation() to
actually use that pool (from downstream), if any, or create one.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-04-10 14:58:16 +02:00
Gwenole Beauchesne
22094ed053 legal: fix year for some copyright notices (2012). 2013-01-29 14:37:02 +01:00
Gwenole Beauchesne
499e0dd981 vaapisink: add support for raw YUV buffers.
Add new GstVaapiUploader helper to upload raw YUV buffers to VA surfaces.
It is up to the caller to negotiate source caps (for images) and output
caps (for surfaces). gst_vaapi_uploader_has_direct_rendering() is available
to help decide between the creation of a GstVaapiVideoBuffer or a regular
GstBuffer on sink pads.

Signed-off-by: Zhao Halley <halley.zhao@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-11-20 16:04:51 +01:00
Wind Yuan
c8f2358479 vaapisink: add video rotation support.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-09-06 13:44:42 +02:00
Gwenole Beauchesne
0ef393c6af vaapisink: automatically detect overlay rendering mode.
Retain the VA surface until another surface is to be displayed only
if VA display rendering mode is determined to be "overlay" mode.
2012-08-29 12:05:03 +02:00
Gwenole Beauchesne
e36fb69ef9 vaapisink: retain VA surface until another one is displayed.
Keep VA surface proxy associated with the surface that is currently
being displayed. This makes sure that surface is not released back
to the pool of surfaces free to use for decoding. This is necessary
with VA driver implementations that support rendering to an overlay
pipe. Otherwise, there could be cases where we are decoding into a
surface that is being displayed, hence some flickering.
2012-08-29 12:05:00 +02:00
Gwenole Beauchesne
ab8b0359e1 vaapisink: fix build with older toolchains.
Don't re-declare GstVaapiTexture if USE_GLX mode is set.
2012-08-29 12:04:55 +02:00
Gwenole Beauchesne
8f132b7936 configure: drop check for --enable-vaapisink-glx.
vaapisink is now built with support for multiple display types, whenever
they are enabled. The new "display" attribute is used to select a particular
renderer.
2012-07-24 15:57:57 +02:00
Javier Jardón
ba3ae60613 plugins: declare _get_type() functions as const.
Declaring a function as const enables better optimization of calls to
the function.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-07-19 15:19:17 +02:00
Holger Kaelberer
c37c9ca6cf vaapisink: recalculate render rect only if caps are negotiated.
Fix gst_vaapisink_xoverlay_set_window_handle() when it is called before
caps got negotiated. Besides, when a foreign window is provided by the
user, so should the render rect.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-04-02 13:33:13 +02: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
Nicolas Dufresne
99c5d18f41 Port to GstVideoContext interface.
This new interface allows for upstream and downstream display sharing
that works in both static and dynamic pipelines.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2011-12-08 14:58:58 +01:00
Nicolas Dufresne
48b3d02143 Group all plugins into the same bundle
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2011-12-07 14:33:59 +01:00
Renamed from gst/vaapisink/gstvaapisink.h (Browse further)