Commit graph

1596 commits

Author SHA1 Message Date
He Junyan
fd6291cc3c libs: Delete the duplicated ARGB video format.
Two ARGB formats with the same format information.
Should be verbose and delete one.

Signed-off-by: He Junyan <junyan.he@hotmail.com>
2019-02-17 14:35:33 +00:00
Adam Jackson
3d9555a86d glx: Stop specifying GLX_DEPTH_SIZE
This code is just confused. It's asking for at least as many bits of
(z-axis) depth as the root window has bits of (color) depth. For rgb565
or rgb888 this is harmless, but at 10 bits per channel this demands a
30-bit or deeper Z buffer. While some hardware could in principle do a
32-bit Z buffer, Mesa does not expose such fbconfigs (at least on Intel
and AMD).

We're not actually using the Z buffer, so just stop asking for one.
2019-02-17 09:26:55 +00:00
Niels De Graef
f84394fa49 libs: wayland: add support for XDG-shell protocol
[wl_shell] is officially [deprecated], so provide support for the
XDG-shell protocol should be provided by all desktop-like compositors.
(In case they don't, we can of course fall back to wl_shell).

Note that the XML file is directly provided by the `wayland-protocols`
dependency and generates the protocol marshalling code.

[wl_shell]: https://people.freedesktop.org/~whot/wayland-doxygen/wayland/Client/group__iface__wl__shell.html
[deprecated]: 698dde1958
2019-02-16 23:55:42 +01:00
Niels De Graef
8e695c8fdb libs: window: wayland: Prefix wl_shell_surface field with wl_
It will help us to distinguish from other Wayland shell surface
(such as XDG-shell) later on.
2019-02-16 19:14:26 +01:00
Niels De Graef
e980fbf83d libs: wayland: Prefix wl_shell field with wl_
It will help us to distinguish from other Wayland shells (such as
XDG-shell) later on.
2019-02-16 18:45:03 +01:00
Denis Nagorny
4aae03d3c1 libs: display: lock ensure_profile()
Thread safety patch for ensure_profile() function

Fixes #133
2019-02-11 16:14:27 +01:00
Víctor Manuel Jáquez Leal
7afe5311cc vaapisink: x11: trap WM_DELETE_WINDOW message
Register the WM_DELETE_WINDOW message from window manager and
trap it to stop the pipeline cleanly.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/130
2019-01-24 21:11:54 +01:00
Víctor Manuel Jáquez Leal
8bdd1bf5f6 libs: window: remove native-id property
native-id property is problematic since the variable that stores it is
gsize, which is platform specific, and in some is bigger than unsigned
long, and there are not way to handle gsize properties.

Also, GST_VAAPI_ID_INVALID is defined in gsize terms, and we would
like to keep using it for this scope.

This patch removes the native-id property and set it manually in
gst_vaapi_window_new_internal().
2019-01-22 09:46:57 +00:00
Víctor Manuel Jáquez Leal
92af6b82fa libs: window: use G_GSIZE_MODIFIER for window id
gsize type is not equal in all platforms, then the 'l' print modifier
shall not be used always.

This issue was found in Debian builds.
2019-01-22 09:46:57 +00:00
Wangfei
e6943d668a encoder: h264/h265: set SPS cbr_flag with correct value.
The flag only set as 1 when the rate-control mode is CBR.
2019-01-22 08:50:46 +00:00
Víctor Manuel Jáquez Leal
f1877628bb libs: encoder: refactor to avoid code duplication
gst_vaapi_encoder_put_frame() and gst_vaapi_encoder_flush() duplicates
the same code segment where the coded buffer is created, the picture
encoded on it and pushed to the async queue.

The function gst_vaapi_encoder_encode_and_queue() refactor this.
2019-01-14 20:09:57 +01:00
Víctor Manuel Jáquez Leal
220016aa6c libs: encoder: h264/h265: flush pending ordered pictures
In order to flush the pending pictures, a new internal encoder vmethod
is used: get_pending_reordered()

This method follows an iterator pattern which will return the next
picture to encode and push.

The base encoder will call this function in a loop when flush() is called.

For now, only H.264 and H.265 encoders implement this flushing mechanism.
2019-01-14 20:09:57 +01:00
Wangfei
f50fb8748f libs: encoder: h264/h265: fix encode lose frame issue.
Instead of dropping all remain frames in reorder_frame_list during
flush, keep encoding.

https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/97
2019-01-14 19:08:29 +00:00
Wangfei
14587eb8e8 vaapipostproc: clean up USE_VA_VPP macro since it already removed from
configure file.
2019-01-11 13:50:22 +08:00
Haihao Xiang
5b447753da meson: build h264 fei encoder if possible 2019-01-07 17:46:42 +00:00
Haihao Xiang
920b1ec7a8 vaapi: bump the minimum vaapi version requirement to 0.39.0
And reduce unnecessary API version and structures check as well.

https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/108
2019-01-07 17:46:42 +00:00
Víctor Manuel Jáquez Leal
e4ae7d9879 libs: window: remove custom ref() and unref()
Use gst_object_ref() and gst_object_unref() instead.
2018-12-24 12:20:00 +00:00
Víctor Manuel Jáquez Leal
8ef95a7dc2 libs: window: use its own debug category 2018-12-24 12:20:00 +00:00
Víctor Manuel Jáquez Leal
6c364cb9a7 libs: window: refactor as gobject
This is another step in the gobjectification of the internal library
of gstreamer-vaapi. Now it is the turn of GstVaapiWindow and its
derivates.

The idea is to minimize the changeset keeping the same design as
much as possible.

GstVaapiWindow is defined as an abstract class with two properties:
the GstVaapiDisplay and the native ID. Thus, many of the
GstVaapiObject macros were copied as GstVaapiWindow macros.

The function gst_vaapi_window_new_internal() is kept as a decorator
of for calling gst_vaapi_window_create() and the possibility of
failure.

The descendant classes, such as glx, still use the private
structures, but through the gobject mechanism.
2018-12-24 12:20:00 +00:00
Víctor Manuel Jáquez Leal
7b782be5dd libs: filter: use its own debug category 2018-12-24 12:20:00 +00:00
Niels De Graef
e73e69a480 Use G_DEFINE_TYPE_WITH_PRIVATE if applicable
This gets rid of the strange `do_init` macro and makes the intent a bit
more clear.
2018-12-10 10:54:53 +01:00
Wangfei
5e7988b2d8 libs: dec: h265: support decode for main-444 10bit streams.
Add 444 10bit yuv format Y410, which can be used to decode
main-444 10bit streams. Currently, this feature is only
supported by media-driver in Icelake.
2018-12-04 13:25:59 +08:00
Wangfei
5d0878b48a libs: dec: h265: support decode for main-444 8bit streams.
Add 444 8bit yuv format AYUV, which can be used to decode
main-444 8bit streams. Currently, this feature is only
supported by media-driver in Icelake.

https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/119
2018-11-14 02:29:54 +00:00
He Junyan
90d8350820 libs: Sync the GstVaapiChromaType to VA header file.
Add more kinds of chrometype which will be used to describe
new video formats. Sync it with 1.4.0 version header file.
Alse delete useless GST_VAAPI_CHROMA_TYPE_YUV410 chrome type.

Signed-off-by: He Junyan <junyan.he@hotmail.com>
2018-11-10 19:57:40 +01:00
Tim-Philipp Müller
de6883f6d0 meson: link with -lm
Fixes #117 hopefully.
2018-11-09 23:55:05 +00:00
Junyan He
14c283f891 libs: Modify the video format of endianness.
We lack some video format because endianness declare.
The video format should not directly relate to endianness. For example,
ARGB on big endian should not be simplely seen as BGRA on little endian
machine. We should provide endianess convert or format convert help
functions if endianness does not match.

https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/112

Signed-off-by: Junyan He <junyan.he@intel.com>
2018-11-07 13:29:15 +01:00
Wangfei
b26f3d989d libs: encoder: h264/h264fei: remove unuseless code.
The variable are set twice, remove previous one.

https://bugzilla.gnome.org/show_bug.cgi?id=797365
2018-11-05 14:11:27 +01:00
Víctor Manuel Jáquez Leal
5171a3d5b1 build: meson: declare headers for libgstvaapi
Thus handling its recompilation if needed.
2018-11-05 13:46:17 +01:00
Wangfei
638004875b libs: dec: h265: support decode for main-10-422 10bit streams.
Add 422 10bit yuv format Y210, which can be used to decode
main-10-422 10bit streams. Currently, this feature is only
supported by media-driver in Icelake.

https://bugzilla.gnome.org/show_bug.cgi?id=797264
2018-11-01 14:03:23 +01:00
Wangfei
d8442e479e libs: context: roi_rc_qp_delta_support should not be checked when CQP.
VA_ROI_RC_QP_DELTA_SUPPORT return value will be ignored when the
rate control mode is set as CQP. In CQP mode, it shouldn't check
roi_rc_qp_delta_support return value from driver backend.

https://bugzilla.gnome.org/show_bug.cgi?id=797087
2018-10-16 13:23:41 +02:00
Wangfei
ecdfc623fd libs: context: create context first before using it to create surface.
In gst_vaapi_context_reset(), if the context has to be destroyed, make
sure to create it first before allocating its associated surfaces.

This patch fixes a regression introduced in commit 82872f4 because
the formats available in the current context now are ensured before
creating the context's surfaces.

https://bugzilla.gnome.org/show_bug.cgi?id=797277
2018-10-15 16:54:02 +02:00
Wangfei
82872f4234 libs: context: query surface format before context to create surface.
Before using context to create surface, the supported surface format
should be checked first.

https://bugzilla.gnome.org/show_bug.cgi?id=797222
2018-10-10 20:13:01 +02:00
Víctor Manuel Jáquez Leal
bcd63f8021 libs: replace g_error with GST_ERROR
And handle those errors rather than halting.
2018-10-09 17:23:55 +02:00
Víctor Manuel Jáquez Leal
9132090182 libs: replace g_warning with GST_WARNING 2018-10-09 17:23:30 +02:00
Matteo Valdina
5567a3d2cd libs: Move from g_debug to GST_DEBUG.
https://bugzilla.gnome.org/show_bug.cgi?id=797202
2018-10-09 16:58:43 +02:00
Matteo Valdina
b1b36a44a4 libs: h264: Update level table to "Recommendation H.264 (04/17)".
Added level 6, 6.1 and 6.2. Reference Table A-1 – Level limits
from T-REC-H.264-201704.

https://bugzilla.gnome.org/show_bug.cgi?id=797202
2018-09-27 12:29:10 +02:00
Wangfei
619abbdeb4 libs: dec: h265: add 422 chroma format support.
Add main-422-10 profile which support 422 chroma format stream.
Currently, this feature is only supported by media-driver in Icelake.

https://bugzilla.gnome.org/show_bug.cgi?id=797143
2018-09-27 11:55:04 +02:00
Víctor Manuel Jáquez Leal
cfbe7cbc44 libs: utils: no need of include config.h 2018-09-25 18:22:51 +02:00
Víctor Manuel Jáquez Leal
ae2fbf951a libs: remove already include string.h
Since sysdeps.h includes string.h there's no need to include it again.
2018-09-25 18:22:35 +02:00
Víctor Manuel Jáquez Leal
0152410c97 libs: object: separation of internal API and plugins
Removed exposed macros GST_VAAPI_OBJECT_DISPLAY() and
GST_VAAPI_OBJECT_ID() to plugins, keeping them only for internal
library usage.

The purpose is readability.

https://bugzilla.gnome.org/show_bug.cgi?id=797139
2018-09-25 17:41:55 +02:00
Víctor Manuel Jáquez Leal
9970e15f67 libs: parser_frame: change macros for inlined functions
https://bugzilla.gnome.org/show_bug.cgi?id=797139
2018-09-25 17:41:55 +02:00
Víctor Manuel Jáquez Leal
0e16691b09 libs: videopool: remove unneeded code
The removed code comes frome the bad practice of copy&paste. Better
move it as internal function.

https://bugzilla.gnome.org/show_bug.cgi?id=797139
2018-09-25 17:41:55 +02:00
Víctor Manuel Jáquez Leal
4505acc522 libs: remove dependency on IN_LIBGSTVAAPI_CORE
This conditional code was when libgstvaapi was intended to be library
used outside GStreamer. This not the case anymore, thus removing it.

https://bugzilla.gnome.org/show_bug.cgi?id=797139
2018-09-25 17:41:55 +02:00
Wangfei
f4f935b6f4 libs: dec: h265: fix the macros used for IDC profile
profile_idc flag in SPS only indicate the IDC profile, which may
need some other flags together to get the real profile.

https://bugzilla.gnome.org/show_bug.cgi?id=797160
2018-09-18 13:16:43 +02:00
Jimmy Ohn
7b077cdcb9 libs: use g_clear_pointer() when possible
https://bugzilla.gnome.org/show_bug.cgi?id=797131
2018-09-13 11:35:27 +02:00
Víctor Manuel Jáquez Leal
148d75c8af libs: filter: add gobject's cleanup function 2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
ae46b1a91a libs: filter: remove custom ref() and unref()
Replacing them by gst_object_ref() and gst_object_unref()

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
99183e0184 libs: filter: refactor filter as gobject
https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
a2f923f9e9 libs: decoder: remove destoy() and create() callbacks
They were all replaced by reset()

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
60dad9fa02 libs: decoder: vp9: implement reset() callback
remove destroy() and create() callback

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00