platform/upstream/gstreamer.git
7 years agodocs: add missing long descriptions
Víctor Manuel Jáquez Leal [Thu, 27 Oct 2016 09:06:06 +0000 (11:06 +0200)]
docs: add missing long descriptions

7 years agovaapipostproc: use GST_*_OBJECT when possible
Víctor Manuel Jáquez Leal [Tue, 25 Oct 2016 12:32:44 +0000 (14:32 +0200)]
vaapipostproc: use GST_*_OBJECT when possible

Since we can have several vaapipostproc operating in a pipeline, it is useful
to know which one is generating the logging message.

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

7 years agovaapidecode: rename member to allowed_sinkpad_caps
Víctor Manuel Jáquez Leal [Tue, 19 Jul 2016 15:00:23 +0000 (17:00 +0200)]
vaapidecode: rename member to allowed_sinkpad_caps

vaapidecode has a member named allowed_caps, but this name is not enough
explicit. This patch renames allowed_caps to allowed_sinkpad_caps.

No functional changes were included.

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

7 years agoplugins: fix code style for errors
Víctor Manuel Jáquez Leal [Thu, 20 Oct 2016 16:12:04 +0000 (18:12 +0200)]
plugins: fix code style for errors

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

7 years agovaapivideomemory: comment style
Víctor Manuel Jáquez Leal [Thu, 20 Oct 2016 15:01:57 +0000 (17:01 +0200)]
vaapivideomemory: comment style

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

7 years agovaapivideomemory: rename input parameter
Víctor Manuel Jáquez Leal [Thu, 20 Oct 2016 09:19:50 +0000 (11:19 +0200)]
vaapivideomemory: rename input parameter

In order to clarify the use of flag as input parameter, it is renamed to
surface_alloc_flag, since it is used when creating a VA surface with certain
properties.

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

7 years agovaapidecode: rename element description
Víctor Manuel Jáquez Leal [Tue, 25 Oct 2016 17:22:03 +0000 (19:22 +0200)]
vaapidecode: rename element description

So encoders and decoders have similar descriptions.

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

7 years agovaapiencode: h264, h265: rename codec name
Víctor Manuel Jáquez Leal [Tue, 2 Aug 2016 09:32:19 +0000 (11:32 +0200)]
vaapiencode: h264, h265: rename codec name

So encoder and decoders have the same codec name.

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

7 years agoplugins: simplify code
Víctor Manuel Jáquez Leal [Fri, 29 Jul 2016 13:17:33 +0000 (15:17 +0200)]
plugins: simplify code

Merge two lines of variable declarations.

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

7 years agolibs: minor correction for logical consistency
Hyunjun Ko [Fri, 7 Oct 2016 09:46:22 +0000 (18:46 +0900)]
libs: minor correction for logical consistency

GstVaapiDecode is a descendant of GstVaapiMiniObject, so, thought we should
use its methods, even though it doesn't change functionality.

GstVaapiPixmap, GstVaapiTexture and GstVaapiWindow are descendant of
GstVaapiObject, hence its methods shall be used.

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

7 years agovaapivideomemory: add explanation about the call 'dup (dmabuf_fd)'
Julien Isorce [Wed, 19 Oct 2016 14:39:54 +0000 (15:39 +0100)]
vaapivideomemory: add explanation about the call 'dup (dmabuf_fd)'

In short GstFdMemory is configured to call close when using
GstDmabufMemory.

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

7 years agobuild: clean up the dlopen usage
Víctor Manuel Jáquez Leal [Fri, 2 Sep 2016 14:42:45 +0000 (16:42 +0200)]
build: clean up the dlopen usage

7 years agoencoder: h264,h265: fix regression in offset count
Víctor Manuel Jáquez Leal [Sat, 8 Oct 2016 12:33:59 +0000 (14:33 +0200)]
encoder: h264,h265: fix regression in offset count

In commit dc35dafa a bug was introduced because I assumed that
GST_CLOCK_TIME_NONE is zero when is -1. This patch fixes that mistake.

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

7 years agodocs: update README
Víctor Manuel Jáquez Leal [Tue, 18 Oct 2016 15:02:59 +0000 (17:02 +0200)]
docs: update README

7 years agolibs: display: egl: remove unused header include
Víctor Manuel Jáquez Leal [Tue, 27 Sep 2016 15:29:25 +0000 (17:29 +0200)]
libs: display: egl: remove unused header include

The header gmodule.h is not used since the library dynamic loading for EGL
display was removed.

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

7 years agoRelease 1.9.90
Sebastian Dröge [Fri, 30 Sep 2016 10:05:20 +0000 (13:05 +0300)]
Release 1.9.90

7 years agovaapi: use new gst_element_class_add_static_pad_template()
Vineeth TM [Fri, 4 Mar 2016 07:35:11 +0000 (16:35 +0900)]
vaapi: use new gst_element_class_add_static_pad_template()

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

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
7 years agoplugins: reset textures at negotiation/shutdown
Hyunjun Ko [Thu, 22 Sep 2016 07:34:48 +0000 (16:34 +0900)]
plugins: reset textures at negotiation/shutdown

When caps reconfiguration is called, the new downstream frame size might be
different. Thus, if the downstream caps change,the display's texture map is
reset.

In addition, during pipeline shutdown, textures in texture map have to be
released, since each one have a reference to the GstVaapiDisplay object, which
is a dangerous circular reference.

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

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
7 years agolibs: display{egl,glx}: cache GstVaapiTextures
Hyunjun Ko [Thu, 22 Sep 2016 07:34:38 +0000 (16:34 +0900)]
libs: display{egl,glx}: cache GstVaapiTextures

instances when created and reuse

This patch improves performance when glimagesink uploads a GL texture.

It caches the GStVaapiTexture instances in GstVaapiDisplay{GLX,EGL}, using an
instance of GstVaapiTextureMap, so our internal texture structure can be found
by matching the GL texture id for each frame upload process, avoiding the
internal texture structure creation and its following destruction.

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

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
7 years agolibs: vaapitexturemap: implement GstVaapiTextureMap
Hyunjun Ko [Thu, 22 Sep 2016 07:33:06 +0000 (16:33 +0900)]
libs: vaapitexturemap: implement GstVaapiTextureMap

Implement GstVaapiTextureMap object, which caches VAAPI textures, so them can be
reused. Internally it is a hash table.

Note that it is GstObject based rather than GstVaapiObject, as part of the future
converstion to GstObject of most of the code.

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

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
7 years agoencoder: vp8: Increase the allocation size for coded buffer
Sreerenj Balachandran [Wed, 21 Sep 2016 06:55:53 +0000 (09:55 +0300)]
encoder: vp8: Increase the allocation size for coded buffer

We are not getting enough compression for some streams and
encoded frame end up with more size than allocated.
Assuming a compression ratio of 4, which should be good enough
for holding the frames.

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

7 years agoencoder: vp9: Fix refresh frame flag setting
Sreerenj Balachandran [Wed, 21 Sep 2016 06:52:21 +0000 (09:52 +0300)]
encoder: vp9: Fix refresh frame flag setting

While doing the mode-1 referece picture selection,
the circular buffer logic was not correctly setting the
refresh frame flags as per VP9 spec.
Make sure refresh_flag[0] get updated correclty after
each cycle of GST_VP9_REF_FRAMES.

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

7 years agovaapidecode: codec_data minimal size is 7
Víctor Manuel Jáquez Leal [Wed, 14 Sep 2016 16:42:09 +0000 (18:42 +0200)]
vaapidecode: codec_data minimal size is 7

When the format of a H.264 stream is AVC3, the SPS and PPS are inside the
stream, not in the codec_data, so the size of codec_data might be 7.

This patch reduces the minimal size of the codec_data buffer from 8 to 7.

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

7 years agovaapidecode: reset decoder hard when set_format()
Víctor Manuel Jáquez Leal [Wed, 14 Sep 2016 14:29:01 +0000 (16:29 +0200)]
vaapidecode: reset decoder hard when set_format()

set_format() is called by upstream when the stream capabilites has changed.
Before, if the new stream is compatible with the old one the VA decoder was
not destroyed. Nonetheless, with this behavoir, the VA decoder ignores
when the upstreamer parsers gets more details of the stream, such as the
framerate. Hence, when the src caps are negotiates, the further sink caps
updates are ignored.

This patch forces the VA decoder destroying and recreation when set_format()
is called.

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

7 years agoconfigure: Depend on gstreamer 1.9.2.1
Sebastian Dröge [Wed, 14 Sep 2016 09:31:39 +0000 (11:31 +0200)]
configure: Depend on gstreamer 1.9.2.1

7 years agoRevert "vaapivideomemory: load VA Image when mapping to write"
Víctor Manuel Jáquez Leal [Fri, 9 Sep 2016 10:03:37 +0000 (12:03 +0200)]
Revert "vaapivideomemory: load VA Image when mapping to write"

This reverts commit c67edea4aba35f16d9e97c78a0b49ad1b590b112.

7 years agoAutomatic update of common submodule
Jan Schmidt [Sat, 10 Sep 2016 10:52:21 +0000 (20:52 +1000)]
Automatic update of common submodule

From b18d820 to f980fd9

7 years agoAutomatic update of common submodule
Jan Schmidt [Fri, 9 Sep 2016 23:58:25 +0000 (09:58 +1000)]
Automatic update of common submodule

From f49c55e to b18d820

7 years agoplugins: set allocator's image size to sinkpad bufferpool
Hyunjun Ko [Thu, 8 Sep 2016 07:16:09 +0000 (16:16 +0900)]
plugins: set allocator's image size to sinkpad bufferpool

Otherwise the buffer is always ditched by the bufferpool, losing performance.

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

7 years agolibs: surface: ensure composite overlay is not bigger
Víctor Manuel Jáquez Leal [Wed, 7 Sep 2016 15:34:08 +0000 (17:34 +0200)]
libs: surface: ensure composite overlay is not bigger

Ensure the composition overlay rectangle (subtitles) is not bigger than
the surface where it is going to be composited and rendered.

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

7 years agovaapivideomemory: load VA Image when mapping to write
Hyunjun Ko [Wed, 7 Sep 2016 08:51:23 +0000 (17:51 +0900)]
vaapivideomemory: load VA Image when mapping to write

When calling gst_video_frame_map() with GST_MAP_WRITE flag, it doesn't call
ensure_image_is_current(), which means it doesn't guarentee VAImage is valid
in this case.

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

7 years agovaapidecode: merge vc1 and wmv3 elements
Víctor Manuel Jáquez Leal [Tue, 6 Sep 2016 10:27:45 +0000 (12:27 +0200)]
vaapidecode: merge vc1 and wmv3 elements

This patch merges vaapivc1dec and vaapiwmv3dec into a single
vaapivc1dec. Also, removed the WMVA format, since it is not
supported by libva.

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

7 years agodecoder: vc1: fails only on advanced profile
Víctor Manuel Jáquez Leal [Tue, 6 Sep 2016 09:19:05 +0000 (11:19 +0200)]
decoder: vc1: fails only on advanced profile

In commit 2eb4394 the frame coding mode was verified for progressive
regardless the profile. But the FCM is only valid in the advanced
profile. This patch checks for the advanced profile before verifying FCM for
progressive.

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

7 years agovaapi: DISPLAY envvar as dependency
Víctor Manuel Jáquez Leal [Thu, 1 Sep 2016 10:39:15 +0000 (12:39 +0200)]
vaapi: DISPLAY envvar as dependency

In a multiple video cards system, a X11 environment may have different VA
capabilities. This patch tracks the DISPLAY environment variable to
invalidates the GStreamer features cache. Also tracks WAYLAND_DISPLAY.

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

7 years agodecoder: vc1: Fail only on actual interlaced frames
Scott D Phillips [Fri, 26 Aug 2016 21:55:17 +0000 (14:55 -0700)]
decoder: vc1: Fail only on actual interlaced frames

In the earlier patch:

 f31d9f3 decoder: vc1: Print error on interlaced content

Decoding would error out if the interlace flag was set in the
sequence bdu. This isn't quite right because a video can have this
flag set and yet not have any interlaced pictures.

Here instead we error out when either parsing a field bdu or
decoding a frame bdu which has fcm set to anything other than
progressive.

Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=769250

8 years agoBack to development
Sebastian Dröge [Thu, 1 Sep 2016 09:34:48 +0000 (12:34 +0300)]
Back to development

8 years agoRelease 1.9.2
Sebastian Dröge [Thu, 1 Sep 2016 09:34:38 +0000 (12:34 +0300)]
Release 1.9.2

8 years agodecoder: vc1: Print error on interlaced content
Scott D Phillips [Tue, 16 Aug 2016 08:58:38 +0000 (11:58 +0300)]
decoder: vc1: Print error on interlaced content

Interlaced video is as yet unsupported in the vc1 element. Print
an error to make that more obvious.

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

8 years agoencoder: h264: fix C90 mixed declarations and code
Víctor Manuel Jáquez Leal [Wed, 10 Aug 2016 11:29:45 +0000 (13:29 +0200)]
encoder: h264: fix C90 mixed declarations and code

Commit 4259d1a introduced this compilation error. This patch fixes it.

8 years agoencoder: h264,h265,mpeg2,vp8: use gst_util_uint64_scale() for bitrate
Víctor Manuel Jáquez Leal [Thu, 21 Jul 2016 15:38:40 +0000 (17:38 +0200)]
encoder: h264,h265,mpeg2,vp8: use gst_util_uint64_scale() for bitrate

Use gst_util_uint64_scale() to calculate bitrate instead of normal arithmetic
to avoid overflows, underflows and loss of precision.

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

8 years agovaapiencode: h264,h265: validate fps numerator
Víctor Manuel Jáquez Leal [Tue, 5 Jul 2016 18:07:15 +0000 (20:07 +0200)]
vaapiencode: h264,h265: validate fps numerator

Validate that fps numerator is non-zero so it can be used to calculate
the duration of the B frame.

Also it gst_util_uint64_scale() is used instead of normal arithmetic in
order to aviod overflows, underflows and loss of precision.

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

8 years agoencoders: demote to RANK_NONE since not fit for autoplugging yet
Tim-Philipp Müller [Sat, 6 Aug 2016 11:54:17 +0000 (12:54 +0100)]
encoders: demote to RANK_NONE since not fit for autoplugging yet

Encoders claim to support a whole bunch of input formats but then
just error out if the format is not actually supported, even if
there's a converter in front. This means they're not fit for
autoplugging in encodebin or camerabin yet and therefore should
not have a rank. People can still use them in custom pipelines.

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

8 years agoplugins: check dmabuf-import for sink pad allocator
Víctor Manuel Jáquez Leal [Tue, 19 Jul 2016 17:24:08 +0000 (19:24 +0200)]
plugins: check dmabuf-import for sink pad allocator

Check earlier if upstream video source has activated the dmabuf-import
io-mode (hack to disappear soon), thus we can avoid the re-assignation of a
new allocator.

8 years agoplugins: reset allocators if video info changed
Víctor Manuel Jáquez Leal [Tue, 19 Jul 2016 18:02:54 +0000 (20:02 +0200)]
plugins: reset allocators if video info changed

If the frame size or format, change, the allocators are reset, so a new ones
can be created with the new video info.

8 years agoplugins: remove sink pad allocator if caps change
Víctor Manuel Jáquez Leal [Tue, 19 Jul 2016 17:27:27 +0000 (19:27 +0200)]
plugins: remove sink pad allocator if caps change

If the negotiated sinkpad caps change, destroy the assignated allocator,
because it is not valid anymore.

8 years agopluginutil: const params to gst_video_info_changed()
Víctor Manuel Jáquez Leal [Tue, 19 Jul 2016 18:01:05 +0000 (20:01 +0200)]
pluginutil: const params to gst_video_info_changed()

Since they are not modified, we should mark them as const.

8 years agogstvaapivideomemory: allocator's image size getter
Víctor Manuel Jáquez Leal [Fri, 29 Jul 2016 13:13:29 +0000 (15:13 +0200)]
gstvaapivideomemory: allocator's image size getter

Add the method gst_allocator_get_vaapi_image_size() for the
GstVaapiVideoAllocator, which gets the size of the allocated images with the
current video info.

This method replaces the direct call to the allocator's image info when the
pool is configured.

8 years agoplugins: update buffer pool size with new allocator's image size
Hyunjun Ko [Fri, 29 Jul 2016 09:06:30 +0000 (18:06 +0900)]
plugins: update buffer pool size with new allocator's image size

Depends on media, video size is sometimes updated with new allocator.
It leads to dismatch between bufferpool's set size and real allocated buffer size.

In this case, it causes every buffer is freed during release in bufferpool,
which should be reused. This affects performance.

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

8 years agoconfigure: remove gmodule-2.0 EGL dependency
Víctor Manuel Jáquez Leal [Wed, 27 Jul 2016 17:49:59 +0000 (19:49 +0200)]
configure: remove gmodule-2.0 EGL dependency

Since commit 27429ce, EGL support doesn't depend on dynamic loading libraries,
thus the dependency to gmodule-2.0 is not mandatory anymore.

8 years agoconfigure: Fix non-fatal PKG_CHECK_MODULES invocations
Scott D Phillips [Wed, 27 Jul 2016 17:09:38 +0000 (10:09 -0700)]
configure: Fix non-fatal PKG_CHECK_MODULES invocations

Some invocations of PKG_CHECK_MODULES were intended to be non-fatal if
the package is missing, but action-if-not-found was given as an empty
string which still causes the default action to run, which halts
execution.

Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=769237

8 years agolibs: egl: remove dynamic library loading code
Víctor Manuel Jáquez Leal [Wed, 13 Jul 2016 16:34:57 +0000 (18:34 +0200)]
libs: egl: remove dynamic library loading code

Since the upstream of gstreamer-vaapi, the library is not a public shared
object anymore. But the EGL support depended on this dynamic library, so the
EGL support was broken.

This patch removes the dynamic library loading code and instantiates the
EGL display using either X11 or Wayland if available.

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

8 years agovaapidecode: register only the available decoders
Víctor Manuel Jáquez Leal [Tue, 12 Jul 2016 21:47:41 +0000 (23:47 +0200)]
vaapidecode: register only the available decoders

In order to register only the available decoders, this patch queries the
created test VA display, which uses the currently used back-end (X11, Wayland,
DRM, …) on the used display device.

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

8 years agovaapi: register only the available encoders
Víctor Manuel Jáquez Leal [Tue, 28 Jun 2016 09:43:15 +0000 (11:43 +0200)]
vaapi: register only the available encoders

In order to register only the available encoders, this patch queries the
created test VA display, which uses the currently used back-end (X11,
Wayland, DRM, …) on the used display device.

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

8 years agovaapidecode: split all the codecs
Víctor Manuel Jáquez Leal [Tue, 7 Jun 2016 14:28:07 +0000 (16:28 +0200)]
vaapidecode: split all the codecs

Split the vaapidecode to all the supported codecs with the format
vaapi{codec}dec.

vaapidecode is stil registered as a GObject type, but not as a
GStreamer feature, so it can be used internally by vaapidecodebin without
changing its code too much.

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

8 years agovaapidecodebin: simplify the code
Víctor Manuel Jáquez Leal [Tue, 12 Jul 2016 20:19:37 +0000 (22:19 +0200)]
vaapidecodebin: simplify the code

Since the elements dependant of the VA video processor are now only registered
if it is available, vaapidecodebin code can be simplified a lot, removing all
the code required to check if the VA video processor was available.

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

8 years agovaapidecode: delay the GstVaapiDisplay instantiating
Víctor Manuel Jáquez Leal [Tue, 12 Jul 2016 15:54:26 +0000 (17:54 +0200)]
vaapidecode: delay the GstVaapiDisplay instantiating

Delay the GstVaapiDisplay instantiating until when changing the state from
READY to PAUSE. In this way the element has more chances to find an already
created GstVaapiDisplay, or a GL context, in the pipeline.

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

8 years agopluginutil: set GLX display type
Víctor Manuel Jáquez Leal [Tue, 12 Jul 2016 15:49:50 +0000 (17:49 +0200)]
pluginutil: set GLX display type

The function gst_vaapi_create_display_from_gl_context() cretes a
GstVaapiDisplay given a GstGLContext. But it didn't created a GLX VA display
when the GL platform was GLX, but a plain X11 VA display.

This patch fixes that, by querying the GL platform earlier.

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

8 years agoplugins: add gst_vaapi_plugin_base_find_gl_context()
Víctor Manuel Jáquez Leal [Thu, 2 Jun 2016 17:57:08 +0000 (19:57 +0200)]
plugins: add gst_vaapi_plugin_base_find_gl_context()

Using the GstContext mechanism, it is possible to find if the pipeline
shares a GstGLContext, even if we are not to negotiating GLTextureUpload
meta. This is interesting because we could negotiate system memory caps
feature, but enable DMABuf if the GstGLContext is EGL with some extensions.

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

8 years agoplugins: remove gst_vaapi_plugin_base_driver_is_whitelisted()
Víctor Manuel Jáquez Leal [Tue, 28 Jun 2016 15:14:06 +0000 (17:14 +0200)]
plugins: remove gst_vaapi_plugin_base_driver_is_whitelisted()

Since nobody is calling gst_vaapi_plugin_base_driver_is_whitelisted(),
it is deleted.

8 years agoplugins: remove common change_state() vmethod
Víctor Manuel Jáquez Leal [Tue, 12 Jul 2016 16:24:10 +0000 (18:24 +0200)]
plugins: remove common change_state() vmethod

Remove the common change_state() vmethod for all the plugins, since no one is
using it.

8 years agovaapidecode: remove change_state() vmethod
Víctor Manuel Jáquez Leal [Tue, 12 Jul 2016 18:38:07 +0000 (20:38 +0200)]
vaapidecode: remove change_state() vmethod

Since the driver checkup is done at registering, there is no need to do it
when changing the element state from NULL to READY. This patch remove this
vmethod from vaapidecode.

8 years agovaapi: register vaapipostproc only if supported
Víctor Manuel Jáquez Leal [Tue, 12 Jul 2016 18:29:12 +0000 (20:29 +0200)]
vaapi: register vaapipostproc only if supported

Query the GstVaapiDisplay to know if the driver supports video
postprocessing. If does, then register vaapipostproc and vaapidecodebin
elements.

This patch will simplify the design of vaapidecodebin.

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

8 years agovaapi: don't register if VA driver is unsupported
Víctor Manuel Jáquez Leal [Wed, 29 Jun 2016 10:36:26 +0000 (12:36 +0200)]
vaapi: don't register if VA driver is unsupported

Using the test VA display, the driver name is queried, and if it is not
white-listed, the plugin rejects to register any element.

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

8 years agoplugins: add gst_vaapi_driver_is_whitelisted()
Víctor Manuel Jáquez Leal [Tue, 28 Jun 2016 15:14:06 +0000 (17:14 +0200)]
plugins: add gst_vaapi_driver_is_whitelisted()

Move some of the logic in gst_vaapi_plugin_base_driver_is_whitelisted() to a
new function gst_vaapi_driver_is_whitelisted(), in this way, it can be used
when registering the plugin's feature set with the test VA display.

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

8 years agovaapi: instantiate a VA display when registering
Víctor Manuel Jáquez Leal [Tue, 12 Jul 2016 17:56:02 +0000 (19:56 +0200)]
vaapi: instantiate a VA display when registering

This patch tries to instantiate a GstVaapiDisplay when registering the plugin
features, if it fails, no gstreamer-vaapi element is registering.

The purpose of this patch is to avoid a situation where the user has
gstreamer-vaapi installed but their VA-API setup is not functional, which may
lead to unexpected behavior.

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

8 years agovaapi: declare external dependencies
Víctor Manuel Jáquez Leal [Tue, 28 Jun 2016 09:33:18 +0000 (11:33 +0200)]
vaapi: declare external dependencies

There are two main external dependencies that define the feature set of this
plugin: a) the kernel and b) the VA driver

This patch tracks both dependencies, if any of them change, GStreamer will
re-inspect the plugin.

The kernel is tracked through the device files /dev/dri/card*

The VA driver is tracked through the files VA_DRIVERS_PATH/*_drv_video.so,
where VA_DRIVERS_PATH is the one defined in libva package configuration. Also,
the environment variables LIBVA_DRIVERS_PATH and LIBVA_DRIVER_NAME are tracked
since they modify the driver lookup.

Additionally, the environment variable GST_VAAPI_ALL_DRIVERS is tracked too.

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

8 years agovaapidecode: remove unneeded initializations
Víctor Manuel Jáquez Leal [Tue, 19 Jul 2016 14:02:27 +0000 (16:02 +0200)]
vaapidecode: remove unneeded initializations

GObject's memory is set to zero, so there is no need to initialize to zero or
NULL it's class variables.

8 years agoplugins: remove undefined macros
Víctor Manuel Jáquez Leal [Tue, 19 Jul 2016 16:28:28 +0000 (18:28 +0200)]
plugins: remove undefined macros

8 years agoRevert "gstvaapisurface_drm: release image when done"
Víctor Manuel Jáquez Leal [Tue, 19 Jul 2016 15:43:28 +0000 (17:43 +0200)]
Revert "gstvaapisurface_drm: release image when done"

This reverts commit 1dbcc8a0e199f2da6a0ab8e949f13341916128a3  and commit
372a03a9e38acbf435eb80bf31d9a9844069e504.

While the dmabuf handle is exported, the derive image must exist, otherwise
the image's VA buffer is invalid, thus the dmabuf handle is never released,
leading into a file descriptors leak.

8 years agoencoder: h265: fix code-style
Víctor Manuel Jáquez Leal [Thu, 21 Jul 2016 15:38:17 +0000 (17:38 +0200)]
encoder: h265: fix code-style

8 years agovaapipostproc: update filters at color balance
Víctor Manuel Jáquez Leal [Fri, 22 Jul 2016 14:55:59 +0000 (16:55 +0200)]
vaapipostproc: update filters at color balance

This is a fix for a regression of previous commit, which updates the filters
only when the property is set, because it is also required to update the
filter when the color balance interface change its values.

8 years agovaapipostproc: make it enable/disable pass-through mode
Hyunjun Ko [Fri, 22 Jul 2016 03:10:23 +0000 (12:10 +0900)]
vaapipostproc: make it enable/disable pass-through mode

In case that sink caps and src caps are same, and no filtering parameter set,
pass-through mode is enabled.
If new filtering parameter is set during playback, it makes it reconfiguring,
so that pass-through mode is changed

In addition, updating filter is performed during reconfiguration, if needed.

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

8 years agovaapipostproc: checking and updating filter parameter only when it's set
Hyunjun Ko [Fri, 22 Jul 2016 02:51:26 +0000 (11:51 +0900)]
vaapipostproc: checking and updating filter parameter only when it's set

This patch is to avoid checking filter value at every frame.

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

8 years agodecoder: h265: handle the SEI NAL units included in codec_data
Allen Zhang [Thu, 21 Jul 2016 08:24:31 +0000 (11:24 +0300)]
decoder: h265: handle the SEI NAL units included in codec_data

The prefix/suffix SEI nal units can appear in codec_data too
which weren't handled before. Parse these SEI headers to
fix the segfault.

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

8 years agobuild: doc: do not redefine MAINTAINERCLEANFILES
Víctor Manuel Jáquez Leal [Fri, 15 Jul 2016 14:32:26 +0000 (16:32 +0200)]
build: doc: do not redefine MAINTAINERCLEANFILES

MAINTAINERCLEANFILES is defined in gtk-doc-plugins.mak, thus instead of
overload it, the files should be added.

8 years agoencoder: h264: Fix MVC encode while enabling dct8x8
Sreerenj Balachandran [Fri, 15 Jul 2016 11:41:27 +0000 (14:41 +0300)]
encoder: h264: Fix MVC encode while enabling dct8x8

Pack the transform_8x8_mode_flag and other necessary rbsp data
in packed_pps header for MVC encode.

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

8 years agovaapisink: demote a debug message to trace
Víctor Manuel Jáquez Leal [Tue, 12 Jul 2016 21:58:55 +0000 (23:58 +0200)]
vaapisink: demote a debug message to trace

Reduces noise when debugging.

8 years agowayland: Error check before using cached wl_display
Jagyum Koo [Wed, 13 Jul 2016 08:21:01 +0000 (17:21 +0900)]
wayland: Error check before using cached wl_display

A planar(or some other) buffer allocation may fail on the driver, then
the wayland connection becomes invalid, not able to send request or
receive any event. So we need to set up a new wayland connection if
there's an error detected on the cached wl_display.

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

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
8 years agoAutomatic update of common submodule
Stefan Sauer [Mon, 11 Jul 2016 19:15:57 +0000 (21:15 +0200)]
Automatic update of common submodule

From ac2f647 to f49c55e

8 years agovaapiencode: demote a log to trace level
Víctor Manuel Jáquez Leal [Tue, 5 Jul 2016 16:23:22 +0000 (18:23 +0200)]
vaapiencode: demote a log to trace level

Removes noise when debugging.

8 years agovaapiencode: implement flush() vmethod
Hyunjun Ko [Wed, 6 Jul 2016 02:17:23 +0000 (11:17 +0900)]
vaapiencode: implement flush() vmethod

In order to handle correctly seek and other operations, vaapiencode should
flush all the remaining data from the encoder without pushing it downstream.

This patch implements the flush() vmethod, only after of pausing the
source pad task, and restarting it again after the flush stop.

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

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
8 years agodecoder: vc1: flush dpb only if opened
Víctor Manuel Jáquez Leal [Mon, 11 Jul 2016 06:43:04 +0000 (08:43 +0200)]
decoder: vc1: flush dpb only if opened

Flush the decode picture buffer, if and only if, the decoder is
started. Otherwise the dpb structure might be NULL.

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

8 years agovaapidecode: drop non-keyframe in reverse playback
Hyunjun Ko [Fri, 1 Jul 2016 05:42:20 +0000 (14:42 +0900)]
vaapidecode: drop non-keyframe in reverse playback

To avoid surface-exhausted situation during reverse playback,
drop frames except for key frame.

Also, to avoid the corruption of the parser state, flush() vmethod
doesn't destroy the VA decoder when playing in reverse.

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

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
8 years agovaapidecode: unref output frame earlier
Víctor Manuel Jáquez Leal [Sun, 10 Jul 2016 17:33:14 +0000 (19:33 +0200)]
vaapidecode: unref output frame earlier

The queue in GstVaapiDecode adds an extra reference to the frames. This patch
unref that extra reference earlier making the code simpler to follow.

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

8 years agovaapidecode: remove gst_vaapidecode_internal_flush()
Víctor Manuel Jáquez Leal [Sun, 10 Jul 2016 17:01:17 +0000 (19:01 +0200)]
vaapidecode: remove gst_vaapidecode_internal_flush()

As gst_vaapidecode_finish() is the only callee of
gst_vaapidecode_internal_flush(), it is better to inline it.

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

8 years agovaapidecode: flush output adapter at drain()
Víctor Manuel Jáquez Leal [Sun, 10 Jul 2016 16:18:57 +0000 (18:18 +0200)]
vaapidecode: flush output adapter at drain()

Calling drain() vmethod means "decode any data it can at this point, but that
more data may arrive after". Hence, vaapidecode should check if there is data
in the output adapter and process them, without destroying the decoded picture
buffer (dpb).

Since this operation is done by gst_vaapidecode_internal_flush(), the operation
was refactored into a new function gst_vaapidecode_flush_output_adapter().

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

8 years agovaapidecode: call purge at flush()
Víctor Manuel Jáquez Leal [Sun, 10 Jul 2016 11:46:25 +0000 (13:46 +0200)]
vaapidecode: call purge at flush()

Calling flush() vmethod means "to flush all remaining data from the decoder
without pushing it downstream".

Nonetheless flush() is calling gst_vaapidecode_internal_flush(), which calls
gst_video_decoder_have_frame() if there is still something in the input
adapter, which may push buffers to downstream by calling handle_frame().

This patch changes this behavior by calling gst_vaapidecode_purge() rather
than gst_vaapidecode_internal_flush(), which does what we want: flushes the VA
decoder and releases all the rest of decoded frames.

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

8 years agotest: elements: remove spurious linkage
Víctor Manuel Jáquez Leal [Wed, 6 Jul 2016 16:38:37 +0000 (18:38 +0200)]
test: elements: remove spurious linkage

Element tests only need to link against gstreamer libraries.

8 years agoconfigure: Require GLib >= 2.40 like everywhere else
Sebastian Dröge [Wed, 6 Jul 2016 11:41:21 +0000 (14:41 +0300)]
configure: Require GLib >= 2.40 like everywhere else

8 years agoBack to development
Sebastian Dröge [Wed, 6 Jul 2016 10:51:21 +0000 (13:51 +0300)]
Back to development

8 years agoRelease 1.9.1
Sebastian Dröge [Wed, 6 Jul 2016 10:48:07 +0000 (13:48 +0300)]
Release 1.9.1

8 years agotests: elements: rotate orientation event
Víctor Manuel Jáquez Leal [Tue, 5 Jul 2016 18:59:49 +0000 (20:59 +0200)]
tests: elements: rotate orientation event

8 years agotests: elements: Add testsuite for vaapisink
Hyunjun Ko [Fri, 1 Jul 2016 07:01:54 +0000 (16:01 +0900)]
tests: elements: Add testsuite for vaapisink

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

8 years agovaapisink: add support for GST_TAG_IMAGE_ORIENTATION
Hyunjun Ko [Fri, 1 Jul 2016 07:00:46 +0000 (16:00 +0900)]
vaapisink: add support for GST_TAG_IMAGE_ORIENTATION

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

8 years agovaapipostproc: return caps template if no display
Víctor Manuel Jáquez Leal [Wed, 29 Jun 2016 11:57:02 +0000 (13:57 +0200)]
vaapipostproc: return caps template if no display

This patch is a fix for my bad review of commit 6d73ca8d. The element should
be able to return the available raw caps handled by the VA display, but that
only should happen when there a VA display. If there's none, the element
should use the caps template.

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

8 years agovaapipostproc: don't require a vaapi display for all caps queries
Matthew Waters [Wed, 29 Jun 2016 06:42:18 +0000 (16:42 +1000)]
vaapipostproc: don't require a vaapi display for all caps queries

This delays the requirement of having a GstVaapiDisplay until later

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

8 years agoutils: report VP9 profiles
Víctor Manuel Jáquez Leal [Tue, 28 Jun 2016 13:48:39 +0000 (15:48 +0200)]
utils: report VP9 profiles

Add VP9Profile0-3 name mapping.

8 years agovaapi: nest includes under USE_ENCODER macro
Víctor Manuel Jáquez Leal [Tue, 28 Jun 2016 12:05:51 +0000 (14:05 +0200)]
vaapi: nest includes under USE_ENCODER macro

This is a missed changeset from commit 1c05c53, since also header includes
should be nested.

8 years agovaapi: nest encoders under USE_ENCODER macro
Víctor Manuel Jáquez Leal [Tue, 28 Jun 2016 09:54:33 +0000 (11:54 +0200)]
vaapi: nest encoders under USE_ENCODER macro

Though USE_{JPEG,VP8,VP9,H265}_ENCODER macros definition depend on USE_ENCODER
macro, it is clearer to nest them, showing explicitly the dependency relation.

8 years agovaapivideocontext: check if query context is NULL
Víctor Manuel Jáquez Leal [Fri, 24 Jun 2016 10:05:24 +0000 (12:05 +0200)]
vaapivideocontext: check if query context is NULL

Under certain conditions the element might receive a positive context query
but without a context instance. This situation will lead to a segmentation
fault when traversing the context list in the pipeline.

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