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.
This patch replaces it with these steps:
- With wl_display_prepare_read() all threads announce their intention
to read.
- wl_display_read_events() is thread save. On threads reads, the other
wait for it to finish.
- With wl_display_dispatch_queue_pending() each thread dispatches its
own events.
wl_display_dispatch_queue_pending() was defined since wayland 1.0.2
Original-patch-by: Michael Olbrich <m.olbrich@pengutronix.de>
* stripped out the unlock() unlock_stop() logic
* stripped out the poll handling
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=749078https://bugzilla.gnome.org/show_bug.cgi?id=747492
Since bug #745728 was fixed the oldest supported version of GStreamer is
1.2. That GStreamer release requires glib 2.32, so we can upgrade our
requirement too.
This patch changes the required version of glib in configure.ac and removes
the hacks in glibcompat.h
https://bugzilla.gnome.org/show_bug.cgi?id=748698
This patch only removes the support of gstreamer-1.0 in the autotools
scripts. No other files are touched.
In the automake file all the converters were deprecated.
https://bugzilla.gnome.org/show_bug.cgi?id=745728
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
This library was intended to add the base classes for video decoders which
where not included in gstreamer-0.10.
Since the support of gstreamer-0.10 is deprecated those classes are not
required, thus the whole library is removed.
https://bugzilla.gnome.org/show_bug.cgi?id=745728https://bugzilla.gnome.org/show_bug.cgi?id=732666
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This patch only removes the support of gstreamer-0.10 in the autotools
scripts. No other files are touched.
The configuration parameter --gstreamer-api was deleted since now it is always
auto-detected.
The verification of vmethod query in GstBaseSinkClass was removed since it was
added in gstreamer 0.10.35. The same case for GstVideoOverlayComposition and
its format flags.
The precious variable GST_PLUGIN_PATH was removed, while GST_PLUGIN_PATH_1_0
remained.
The automake files were changed accordingly.
Removed, in debian/control, the vaapiupload and vaapidownload descriptions.
https://bugzilla.gnome.org/show_bug.cgi?id=732666https://bugzilla.gnome.org/show_bug.cgi?id=745728
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Add initial support for EGL through GstVideoGLTextureUploadMeta.
Fix gst_vaapi_ensure_display() to allocate a GstVaapiDisplay off the
downstream supplied GstGLContext configuration, i.e. use its native
display handle to create a GstVaapiDisplay of type X11 or Wayland ;
and use the desired OpenGL API to allocate the GstVaapiDisplayEGL
wrapper.
https://bugzilla.gnome.org/show_bug.cgi?id=741079
Record GL context supplied by downstream elements. This can be useful,
and further needed, to enforce run-time check that the GL context is
compatible for use by libgstvaapi. e.g. check that we don't create a
VA/GLX display for EGL/X11 contexts.
https://bugzilla.gnome.org/show_bug.cgi?id=725643
Original-path-by: Matthew Waters <ystreet00@gmail.com>
Add initial support for EGL to libgstvaapi core library. The target
display server and the desired OpenGL API can be programmatically
selected at run-time.
A comprehensive set of EGL utilities are provided to support those
dynamic selection needs, but also most importantly to ensure that
the GL command stream is executed from within a single thread.
https://bugzilla.gnome.org/show_bug.cgi?id=743846
Allow imports of v4l2 buffers into VA surfaces for further operation
with vaapi plugins, e.g. vaapipostproc or vaapiencode_* elements.
https://bugzilla.gnome.org/show_bug.cgi?id=735362
[fixed memory leaks, ported to new dma_buf infrastructure, cleanups]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
The VA/GLX interfaces are obsolete. They used to exist for XvBA, and
ease of use, but they had other caveats to deal with. It's now better
to move on to legacy mode, whereby VA/GLX interop is two be provided
through (i) X11 Pixmap, and (ii) other modern means of buffer sharing.
https://bugzilla.gnome.org/show_bug.cgi?id=736711
Fix arguments to XkbKeycodeToKeysym() for converting an X11 keycode
to a KeySym. In particular, there is no such Window argument. Also
make sure to check for, and use, the correct <X11/XKBlib.h> header
where that new function is defined. Otherwise, default to the older
XKeycodeToKeysym() function.
Supporting anything thing below GStreamer 1.2 is asking for trouble
for keeping up with the required facilities to make efficient pipelines.
Users are invited to upgrade to the very latest GStreamer 1.2.x release,
at the minimum.
Support for GStreamer 0.10 is obsolete. i.e. it is no longer supported
and may actually be removed altogether for a future release. There is
no real point to maintain a build for such an ancient GStreamer version
that is not even supported upstream.
The built-in video parsers elements are built into a single DSO named
libgstvaapi_parse.so. The various video parsers could be accessed as
vaapiparse_CODEC.
For now, this only includes a modified version of h264parse so that to
support H.264 MVC encoded streams.
The built-in libvpx serves multiple purposes, among which the most
important ones could be: track the most up-to-date, and optimized,
range decoder; allow for future hybrid implementations (non-VLD);
and have a completely independent range decoder implementation.
Add libvpx submodule that tracks the upstream version 1.3.0. This is
needed to build a libgstcodecparsers_vpx.so library with all symbols
placed into the GSTREAMER namespace.
It turns out it is more convenient to have only pkgconfig files named
after the installed GStreamer API version (1.0) instead of using all
possible subsequent names from that (1.0, 1.2, 1.4). i.e. they conflict
altogether anyway, so align pkgconfig file names to that.
Bump the library major version due to API/ABI changes that occurred in
the imaging API. In particular, GstVaapiDisplay interfaces no longer
expose any GstCaps but provide GArray based ones e.g. to determine the
set of supported decode/encode profiles.
Fix the pluginsdir and includedir variables in the generated pkgconfig
(.pc) files. The location needs to be built with the PKG version in
mind instead of the API version.
While we are at it, also fix the PKG version for GStreamer >= 1.3.
https://bugzilla.gnome.org/show_bug.cgi?id=720820
[additional fixes for includedir and pkg requirements]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
GStreamer 0.10.36 is the latest and ultimate version to be released
from the GStreamer 0.10 branch. i.e. no further releases are to be
made. So, we can safely enable the built-in videoutils replacement
now that they are in sync with the 0.10 branch.
Add initial API for video encoding: only basic interfaces and small
encoder objects are implemented so far.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
GstBitWriter provides a bit writer that can write any number of bits
to a pre-allocated memory buffer. Helper functions are also provided
to write any number of bits from 8, 16, 32 and 64 bit variables.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Automatically detect GStreamer API version. The --with-gstreamer-api
configure option now defaults to "autodetect" and configure then tries
to derive the GStreamer API version from the highest version based on
what pkg-config --modversion would report.
https://bugzilla.gnome.org/show_bug.cgi?id=711657
The GStreamer 1.2.x packages sticked to the naming convention for 1.0.x
packages, i.e. -1.0 suffix. However, for gstreamer-vaapi packaging
purposes, update the versioning to -1.2 suffix instead.
Port vaapidecode and vaapisink plugins to GStreamer API >= 1.2. This
is rather minimalistic so that to test the basic functionality.
Disable vaapipostproc plugin for now as further polishing is needed.
Also disable GstVideoContext interface support since this API is now
gone in 1.2.x. This is preparatory work for GstContext support.
https://bugzilla.gnome.org/show_bug.cgi?id=703235
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Fix detection of VA/JPEG decoding API with non-standard libva packages.
More precisely, some packages were shipping with a <va/va.h> header that
did not include <va/va_dec_jpeg.h>.
https://bugzilla.gnome.org/show_bug.cgi?id=706055
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Use hardware accelerated XRenderComposite() function, from the RENDER
extension, to blit a pixmap to screen. Besides, this can also support
cropping and scaling.
Bump the library major version due to API/ABI changes that occurred in
the imaging API. In particular, GstVaapiImageFormat type was replaced
with the standard GstVideoFormat type. All dependent APIs were updated
to match this change.
Add flag to have all codecparsers built-in, thus ensuring that the
resulting binaries have all the necessary bug fixes and this is what
the QA has been testing anyway.
Of course, for a completely up-to-date Linux distribution, you could
also opt for --disable-builtin-codecparsers and use the system ones.
Though, some core fixes could be missing, and those cannot be tested
for with API checks.
The whole libgstvaapi libraries got a major refresh to get rid of GObject.
This is a fundamental change that requires a new SONAME. More changes are
underway to streamline the core libraries.
So far, the net result is a reduction of .text size (code) by 32KB, i.e. -10%.
On one particular test (sintel HD trailer), the total number of executed
instruction was reduced by 8%.
Ensure libgstvaapi-glx*.so builds against libdl since dlsym() is used
to resolve glXGetProcAddress() from GLX libraries. This fix builds on
Fedora 17.
https://bugzilla.gnome.org/show_bug.cgi?id=698046
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Bump library major version, while preserving a major version of 0 for
GStreamer 1.0 based libraries, and a major version of 2 for GStreamer
0.10 based librarieS.
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.
This integrates support for GStreamer API >= 1.0 only in the libgstvaapi
core decoding library. The changes are kept rather minimal here so that
the library retains as little dependency as possible on core GStreamer
functionality.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
GstVideoDecoder API is part of an unreleased GStreamer 0.10 stack. In particular,
this is only available in git 0.10 branch or GStreamer >= 1.0 stack. Interested
parties may either use upstream git 0.10 branch or backport the necessary support
for GstVideoDecoder API, thus including helper tools like GstVideoCodecFrame et al.
If GST_PLUGIN_PATH environment variable exists and points to a valid
directory, then use it as the system installation path for gst-vaapi
plugin elements.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Invoke gst_mpeg_video_finalise_mpeg2_sequence_header() to get the
correct PAR values. While doing so, require a newer version of the
bitstream parser library.
Note: it may be necessary to also parse the Sequence_Display_Extension()
header.
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This patch updates to relect the 1.0 version of the protocol. The main
changes are the switch to wl_registry for global object notifications
and the way that the event queue and file descriptor is processed.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Use newer sources from the codecparsers/ submodule for
- GstH264SliceHdr.n_emulation_prevention_bytes: EPBs;
- GstH264VUIParams.{par_n,par_d}: pixel-aspect-ratio.