vaapidecodebin: add postprocessor dynamically
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Wed, 11 Nov 2015 18:04:25 +0000 (19:04 +0100)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Mon, 16 Nov 2015 15:07:07 +0000 (16:07 +0100)
commitbd4395ce9f2bf037a86cd9597b4b22b652e61e8c
tree2e3cbfacb6e48933eaf516aefa8ee98c2f7c269d
parentce3d1a6203330d6a2110797dc89709605c4c9282
vaapidecodebin: add postprocessor dynamically

The former approach to left the bin unfinished has some problems: the context
cannot be shared because the vaapidecode is unlinked in many cases, leading to
creating a VADisplay twice.

Initially the bin is fully functional, constructed as

(-----------------------------------)
|            vaapidecodebin         |
|   (-------------)    (-------)    |
|<--| vaapidecode |--->| queue |--->|
|   (-------------)    (-------)    |
(-----------------------------------)

When the context is shared and the VADisplay has VPP capabilities, before
changing to READY state, the bin is reconfigured dynamically, adding the
vaapipostproc element afeter the queue:

(--------------------------------------------------------)
|                       vaapidecodebin                   |
|   (-------------)    (-------)    (---------------)    |
|<--| vaapidecode |--->| queue |--->| vaapipostproc |--->|
|   (-------------)    (-------)    (---------------)    |
(--------------------------------------------------------)

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757957
gst/vaapi/gstvaapidecodebin.c
gst/vaapi/gstvaapidecodebin.h