Commit graph

707 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
6ec2a09729 plugins: disable GL_TEXTURE_UPLOAD if no EGL/GLX
The plugins should not expose the feature meta:GstVideoGLTextureUploadMeta in
their caps templates if they were not compiled either with GLX or EGL support.
2016-04-13 20:35:59 +02:00
Víctor Manuel Jáquez Leal
f61b728ae1 plugins: fix compilation when EGL/GLX is disabled
The compiler might complain of gst_vaapi_create_display_from_handle() being
unused if both EGL and GLX are disabled. This patch avoid that compilation
error.
2016-04-13 20:35:59 +02:00
Thiago Santos
506c9e2b5b vaapidecode: add stop function
Clear any status on the current stream:

stored frames, caps and decoder configuration

https://bugzilla.gnome.org/show_bug.cgi?id=763460
2016-04-01 09:53:24 -03:00
Víctor Manuel Jáquez Leal
d4f00383ed unify caps template for VAAPI encoders and decoders
There is no difference in VAAPI surface caps between encoders and decoders.
Thus, the patch makes a simplification by removing encoders specific caps and
shares the same definition of VAAPI surfaces caps for all the elements.
2016-03-30 16:55:26 +02:00
Víctor Manuel Jáquez Leal
fe08f7ecdc vaapidecode: move gst_vaapidecode_negotiate() code
With it we can remove a function declaration, making the code a bit
more readable.

https://bugzilla.gnome.org/show_bug.cgi?id=764316
2016-03-30 16:22:51 +02:00
Víctor Manuel Jáquez Leal
aac0f50500 docs: generate vaapijpegdec documentation
https://bugzilla.gnome.org/show_bug.cgi?id=764314
2016-03-30 15:07:43 +02:00
Sreerenj Balachandran
fd04a7c046 gst/vaapi: keep precedence for NV12 over I420
Use NV12 as default "assumption" format all over.
NV12 is the default high priority format used my most of the
vaapi-drivers.
2016-03-29 15:02:46 +03:00
Sreerenj Balachandran
75a20deab4 vaapidecode: Use video format derived from decoded surface as default src pad format
Use the surface format derived from first decoded surface
to negotiate the downstream video format capabilities.

https://bugzilla.gnome.org/show_bug.cgi?id=759181
2016-03-29 14:34:37 +03:00
Scott D Phillips
eea3f0cdb2 Add P010 video format support
The P010 video format is the native format used by the vaapi intel driver
for HEVCMain10 decode . Add support for planes and images of this video format.

https://bugzilla.gnome.org/show_bug.cgi?id=759181
2016-03-29 14:34:00 +03:00
Víctor Manuel Jáquez Leal
ddddb0415b gltextureupload: use an array for texture type
Instead of using a single value for the texture type, use an array with 4
elements, just as the GstVideoGLTextureUploadMeta, avoiding a buffer
overflow.

https://bugzilla.gnome.org/show_bug.cgi?id=764231
2016-03-28 15:32:47 +02:00
Sreerenj Balachandran
959d14ce8a vaapidecode: Fix decide_allocation handling
Set the already configured pool in decide_allocation query
in cases where pool renegotiation is not required.

https://bugzilla.gnome.org/show_bug.cgi?id=753914
2016-03-24 15:09:43 +02:00
Sreerenj Balachandran
6b17ed9060 vaapidecode: Derive and save the decoded surface format
After the decoding of first frame, try to extract the exact
decoded surface format using vaDeriveImage and keep this
as the format in decoded_info.

https://bugzilla.gnome.org/show_bug.cgi?id=753914
2016-03-24 15:09:15 +02:00
Sreerenj Balachandran
859a2b2f4f Make vaapidecode to advertise the cropped values in srcpad, but negotiate pool only if needed
-- Maintaing decoded surface resoluton and actual display resoultion separately
-- Before pushing every frames downstream, check for the requirement of pool negoation and
output_state negotiation: This is needed to avoid multiple issuses with cropping,
multi-resoluton video handling, more complex multi resolution decode scenarios for vp9decode,
possible wrong behaviour from upstream element to report uncropped values etc. Due to these reasons,
We can't just reliably use the resolution change notification from libgstvaapi for pool renegotiation too.
This is slight overhead, but safe enough. Optimization could be possible though.

https://bugzilla.gnome.org/show_bug.cgi?id=753914
2016-03-24 15:08:50 +02:00
Sreerenj Balachandran
c2aa405a3e vaapidecode: Delay the output format setting until we have a decoded surface
This will help to consoidate the out caps negotiation to a single place,
which will make the code simpler, allows to get the exact decoded format
if needed and the selected chroma type too.

https://bugzilla.gnome.org/show_bug.cgi?id=753914
2016-03-24 15:08:27 +02:00
Víctor Manuel Jáquez Leal
3ec9286728 vaapidecode: GST_VAAPIDECODE macro is a cast
This patch is the continuation of commit 1e1d3b1d because the function
gst_vaapidecode_get_type() got undefined since then.

Now, the macro GST_VAAPIDECODE is a simple cast to the GstVaapiDecode
structure. The rest of the GObject handling macros were deleted too.
2016-03-24 13:36:24 +01:00
Víctor Manuel Jáquez Leal
1b11e357d8 vaapidecodebin: don't handle jpeg decoding
As JPEG decoder has been split and demoted, it cannot be handled by
vaapidecodebin

Added a fixme comment regarding the future removal of vaapidecode.

https://bugzilla.gnome.org/show_bug.cgi?id=734093
2016-03-11 10:23:39 +01:00
Víctor Manuel Jáquez Leal
1e1d3b1d09 vaapidecode: split out jpeg decoder
Split, as a different element, the JPEG decoder.

https://bugzilla.gnome.org/show_bug.cgi?id=734093
2016-03-11 10:23:08 +01:00
Víctor Manuel Jáquez Leal
96ac9bee8e vaapidecode: register decoder with internal GType
Don't expose the the vaapidecode GType, instead expose a function
which will register element.

This is the first step to split the decoder by codecs.

https://bugzilla.gnome.org/show_bug.cgi?id=734093
2016-03-11 09:42:37 +01:00
Víctor Manuel Jáquez Leal
8aa880786d vaapidecode: remove unused function declaration
There is no need to pre-declare gst_vaapidecode_update_sink_caps(). And fixed
code-style of the other pre-declared functions.
2016-03-10 12:54:39 +01:00
Vineeth TM
1608eff3e5 plugins: fix gstgl and vaapi memory leaks
1\ Unref gl_display and gl_window as soon they are not needed.
2\ Remove an unneeded display type check, since is handled by
   gst_vaapi_created_display_from_handle()
3\ Unref vaapi's display if the display cannot be bind to a GL API.

Modified-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=763354
2016-03-09 15:39:31 +01:00
Víctor Manuel Jáquez Leal
548528c817 plugins: proxy information from downstream caps
Propagate to upstream the downstream information, such as fps, par, etc.

This will fix several "getcaps" critical warnings in gst-validate.

https://bugzilla.gnome.org/show_bug.cgi?id=763300
2016-03-08 10:54:04 +01:00
Víctor Manuel Jáquez Leal
861ef4d218 vaapidecode: intersect with filter in getcaps()
In commit 6034734d I forgot to add the caps filter intersection in the
getcaps() vmethod generating a regression when a capsfilter is set in the
pipeline.

This commit adds the caps filter intersection.
2016-03-01 11:35:49 +01:00
Víctor Manuel Jáquez Leal
6034734d73 vaapidecode: use video decoder getcaps()
The usage of getcaps() vmethod is preferred than to handle manually the sink's
caps query.

In order to avoid function declarations, this patch moves the class_init()
method to the end of the file.
2016-02-22 18:01:07 +01:00
Víctor Manuel Jáquez Leal
5b5ebc0a15 plugins: remove deprecated code
Since we are only supporting current GStreamer version, since 1.3
gst_buffer_pool_config_add_option() checks if the option to add is
already set. There is no need to do it ourselves.
2016-02-22 17:43:13 +01:00
Vineeth TM
24bc53456c vaapisink: Fix event,pad,structure memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=762229
2016-02-18 04:02:53 -03:00
Lim Siew Hoon
ce1ab4673c Add icamerasrc as dmabuf capable peer element
icamerasrc is another gstreamer plugin using to capture RAW
frames from camera device. It is based on libcamhal library.
There are some properties available to control icamera behavior.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Tested & Reviewed: Zhu Haiyang <haiyang.zhu@intel.com>

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

Fixme: This is the similar workaround we done for v4l2src.
The workaround will be removed once we fix #755072
2016-02-17 15:40:54 +02:00
Vineeth TM
733c9b6fba vaapipluginbase: Fix structure memory leak
config structure is not being freed in all cases

https://bugzilla.gnome.org/show_bug.cgi?id=762172
2016-02-17 10:45:29 +02:00
Vineeth TM
ac01304cec vaapidecode: Fix videocodec state memory leak
When state is not NULL and either width/height of video info is 0, then state leaks

https://bugzilla.gnome.org/show_bug.cgi?id=762173
2016-02-17 10:45:29 +02:00
Tim-Philipp Müller
38fbe58999 vaapisink: post message for application for unhandled keyboard/mouse events
Makes (most) keyboard shortcuts work in gst-play-1.0 when
the video window has focus.
2016-02-16 15:44:48 +00:00
Vineeth TM
26abec3e26 vaapidecode: Fix capsfeature memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=762116
2016-02-16 15:10:26 +02:00
Vineeth TM
b54ac96c27 vaapisink: Fix capsfeature memory leak
caps feature allocated is not being freeing in some cases

https://bugzilla.gnome.org/show_bug.cgi?id=762111
2016-02-16 15:10:11 +02:00
Sebastian Dröge
734b8bad8f vaapi: Fix various compiler warnings and disable -Wredundant-decls for now 2016-02-16 15:09:01 +02:00
Sreerenj Balachandran
1f6d29641d vaapisink: Fix wrong caps advertising
The get_caps() should only report the supported formats.

https://bugzilla.gnome.org/show_bug.cgi?id=761147
2016-02-09 12:18:27 +01:00
Víctor Manuel Jáquez Leal
77ddde41d9 rename encoders to vaapi{codec}enc
Trying to comply with GStreamer's element names, this patch renames the
encoders using the name format vaapi{codec}enc.

In this way, the plugin documentation is linked correctly.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-03 20:23:31 +01:00
Víctor Manuel Jáquez Leal
9b8fb25b8c docs: update plugin documentation
Update all the documentation of elements of the vaapi plugin.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-03 20:03:47 +01:00
Víctor Manuel Jáquez Leal
4b5be5973e libs: small refactors to enhance the code style
As gst-indent generated ugly code in these cases, this patch changes the used
idiomatic into other one.

No functional changes were introduced.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-03 20:03:47 +01:00
Víctor Manuel Jáquez Leal
bb2248ab66 plugins: fix code style
Minor code style changes by executing gst-indent in gst/vaapi directory.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-03 12:17:59 +01:00
Tim-Philipp Müller
24168a2093 vaapi: fix 'ISO C90 forbids mixed declarations and code' compiler warnings
Declare variables at the beginning of a code block, which
is how it's done in GStreamer.

https://bugzilla.gnome.org/show_bug.cgi?id=759192
2016-02-02 16:17:43 +01:00
Sreerenj Balachandran
0a9ce66ec7 vaapidecode: Fix renegotiation for resolution change
Always renegotiate the pool if the immediate frame which going
to be pushed has a different un-cropped resolution than the already
configured one.
2016-02-02 16:17:43 +01:00
Víctor Manuel Jáquez Leal
d83ffd1231 plugins: use the same pre-processor macro
In gstvaapipluginbase.c we are using the macro USE_GST_GL_HELPERS to guard the
code related with GstGL. Nonetheless, in gstvaapipluginbase.h we are using
HAVE_GST_GL_GL_H macro in order to include the GstGLContext's header.

We should use only one to be homogeneous. This patch sets USE_GST_GL_HELPERS
in the header file.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-02 16:17:43 +01:00
Víctor Manuel Jáquez Leal
3c6eb032fa build: add gstreamer-pbutils dependency
This dependency was added in gstvaapidecodebin with the call
gst_missing_element_message_new().

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-01 12:21:57 +01:00
Víctor Manuel Jáquez Leal
ba91bf4c56 build: remove unused EGL specific sources
These Makefile variables are not used at all.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-01 12:21:57 +01:00
Víctor Manuel Jáquez Leal
14662eeec1 build: remove check for GStreamer 1.2
Since we are working for current stable GStreamer 1.6

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-01 12:21:57 +01:00
Víctor Manuel Jáquez Leal
e387ad5388 Remove more video parser crufts
This header is not used anymore since it declares parsers that are
already in GStreamer 1.6

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-01 12:21:56 +01:00
Víctor Manuel Jáquez Leal
1c722efe54 Remove old gst version guards
As gstreamer-vaapi now only supports from GStreamer 1.6, this patch removes
all the old GStreamer version guards.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-01-25 12:09:40 +00:00
Víctor Manuel Jáquez Leal
28caa20167 Remove video parser crufts
We forgot to remove gstvaapiparse.c when we removed all the videoparser
machinery.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-01-25 12:09:25 +00:00
Víctor Manuel Jáquez Leal
fa6144545f libs: remove versioning
Since we don't install libraries anymore, it makes no sense to keep
versioning them according to the gstreamer's version.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-01-20 10:19:07 +01:00
Víctor Manuel Jáquez Leal
56fab31c00 Remove codecparsers submodule
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-01-19 12:49:11 +01:00
Víctor Manuel Jáquez Leal
b8da44bdea vaapipostproc: check ANY caps at transform_caps()
When transforming downstream caps we should check for ANY caps from peer pad,
otherwise we get a segmentation fault.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=759893
2016-01-14 17:40:12 +01:00
Víctor Manuel Jáquez Leal
8f77d54103 vaapisink: ignore frame if its upload failed
When gst_vaapi_plugin_base_get_input_buffer() fail to copy the input buffer
into a VAAPI buffer, the return value is GST_FLOW_NOT_SUPPORTED, and it was
ignored by the vaapisink, leading to a segmentation fault.

This patch ignores the frame that generated the GST_FLOW_NOT_SUPPORTED
returned by gst_vaapi_plugin_base_get_input_buffer(), avoiding the
segmentation fault, but doing and effort to continue rendering. This is
the same behavior of ximagesink.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=759332
2016-01-14 11:31:17 +01:00