Gwenole Beauchesne [Thu, 23 Oct 2014 09:56:31 +0000 (11:56 +0200)]
texture: add support for cropping rectangle during transfer.
The gst_vaapi_texture_put_surface() function is missing a crop_rect
argument that would be used during transfer for cropping the source
surface to the desired dimensions.
Note: from a user point-of-view, he should create the GstVaapiTexture
object with the cropped size. That's the default behaviour in software
decoding pipelines that we need to cope with.
This is an API/ABI change, and SONAME version needs to be bumped.
https://bugzilla.gnome.org/show_bug.cgi?id=736712
Gwenole Beauchesne [Thu, 23 Oct 2014 09:22:10 +0000 (11:22 +0200)]
texture: re-indent all GstVaapiTexture related source code.
Gwenole Beauchesne [Tue, 27 Jan 2015 10:16:34 +0000 (11:16 +0100)]
surface: add more fine-grained allocation helper.
Add new gst_vaapi_surface_new_full() helper function that allocates
VA surface from a GstVideoInfo template in argument. Additional flags
may include ways to
- allocate linear storage (GST_VAAPI_SURFACE_ALLOC_FLAG_LINEAR_STORAGE) ;
- allocate with fixed strides (GST_VAPI_SURFACE_ALLOC_FLAG_FIXED_STRIDES) ;
- allocate with fixed offsets (GST_VAAPI_SURFACE_ALLOC_FLAG_FIXED_OFFSETS).
Gwenole Beauchesne [Mon, 15 Sep 2014 12:57:57 +0000 (14:57 +0200)]
surface: re-indent all GstVaapiSurface related source code.
Gwenole Beauchesne [Fri, 23 Jan 2015 15:44:34 +0000 (16:44 +0100)]
surfaceproxy: add helper to create a wrapped surface object.
Add new gst_vaapi_surface_proxy_new() helper to wrap a surface into
a proxy. The main use case for that is to convey additional information
at the proxy level that would not be suitable to the plain surface.
Gwenole Beauchesne [Fri, 23 Jan 2015 15:37:06 +0000 (16:37 +0100)]
surfaceproxy: re-indent all GstVaapiSurfaceProxy related source code.
Gwenole Beauchesne [Tue, 27 Jan 2015 17:02:56 +0000 (18:02 +0100)]
libs: bump library major version.
Gwenole Beauchesne [Thu, 4 Dec 2014 13:36:35 +0000 (14:36 +0100)]
libs: re-introduce a GST_VAAPI_ID_INVALID value.
Re-introduce a GST_VAAPI_ID_INVALID value that represents
a non-zero and invalid id. This is useful to have a value
that is still invalid for cases where zero could actually
be a valid value.
Gwenole Beauchesne [Tue, 2 Dec 2014 15:51:20 +0000 (16:51 +0100)]
libs: expose GstVaapiMiniObject APIs to all backends.
Make it possible to have all libgstvaapi backends (libs) access to a
common GstVaapiMiniObject API and implementation. This is a minor step
towards full exposure when needed, but restrict it to libgstvaapi at
this time.
Gwenole Beauchesne [Tue, 2 Dec 2014 13:15:49 +0000 (14:15 +0100)]
libs: re-indent all GstVaapiObject related source code.
Re-indent and provide additional minor cosmetical changes to the
GstVaapiMiniObject and GstVaapiObject source files.
Simon Farnsworth [Tue, 27 Jan 2015 14:25:21 +0000 (16:25 +0200)]
pluginutil: Fix clearing of subtitle overlay
dvbsuboverlay signals no subtitles present by not setting
GstVideoOverlayCompositionMeta on a buffer.
Detect this, and remove subtitles whenever we have no overlay composition to
hand.
Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Michael Olbrich [Tue, 27 Jan 2015 14:06:02 +0000 (16:06 +0200)]
vaapipostproc: clear state on stop
Otherwise restarting may fail because the state of vaapipluginbase and
vaapipostproc don't match. e.g. gst_vaapipostproc_set_caps() will skip
initailization and not call gst_vaapi_plugin_base_set_caps()
Michael Olbrich [Tue, 27 Jan 2015 12:50:12 +0000 (14:50 +0200)]
vaapidecode: don't print an error message for GST_FLOW_FLUSHING
Sreerenj Balachandran [Tue, 27 Jan 2015 10:38:45 +0000 (12:38 +0200)]
gstvaapiencoder: Fix the negotiation issue with _ENCODED format handling
Don't error out for the video format GST_VIDEO_FORMAT_ENCODED with in gstvaapiencoder,
since the vaaapi context creation (gstvaapicontext.c) can still use the
default chroma type which is YUV420.
https://bugzilla.gnome.org/show_bug.cgi?id=743567
https://bugzilla.gnome.org/show_bug.cgi?id=743035
Sreerenj Balachandran [Wed, 21 Jan 2015 16:31:22 +0000 (18:31 +0200)]
h264parse: drop patches merged upstream.
0003-h264parse-add-initial-support-for-MVC-NAL-units.patch
Sreerenj Balachandran [Wed, 21 Jan 2015 16:26:12 +0000 (18:26 +0200)]
codecparsers: update to gst-vaapi-branch commit d3b5c1b
8194cac: h264parse: parse SPS subset
64b7f52: h264parse: expose stereo-high profile
774360a: h264parse: add initial support for MVC NAL units
258478f: h264parser: fix stack smashing
Sreerenj Balachandran [Mon, 19 Jan 2015 09:30:12 +0000 (11:30 +0200)]
Fix compilation error if there is no GL/gl.h header file installed
Gwenole Beauchesne [Thu, 15 Jan 2015 15:23:24 +0000 (16:23 +0100)]
vaapidecode: commit updated srcpad caps to base plugin.
Make sure that the GstVaapiPluginBase instance receives the new src
pad caps whenever they get updated from within the GstVaapiDecoder
decode routines.
This also ensures that downstream elements receive correctly sized
SW decoded buffers if needed.
https://bugs.tizen.org/jira/browse/TC-114
Gwenole Beauchesne [Thu, 15 Jan 2015 15:19:59 +0000 (16:19 +0100)]
vaapidecode: always reset decoder on ::set_format().
Split GstVideoDecoder::set_format() handler to first update the sink
pad caps and reset the active VA decoder instance based on those, and
then update the src pad caps whenever possible, e.g. when the caps
specify a valid video resolution.
Gwenole Beauchesne [Thu, 15 Jan 2015 15:14:13 +0000 (16:14 +0100)]
vaapivideomemory: don't crash when trying to allocate 0x0 images.
In some occasions, a buffer pool is created for pre-initialization
purposes regardless of whether a valid image size is available or
not. However, during actual decode stage, the vaapidecode element
is expected to update the srcpad caps with the new dimensions, thus
also triggering a reset of the underlying bufferpool.
Sreerenj Balachandran [Wed, 14 Jan 2015 22:00:16 +0000 (00:00 +0200)]
codecparsers: update to gst-vaapi-branch commit 191cb2f
347605a: h264parse: expose compatible profiles to downstream
d1ea97e: h264parse: Fix periodic SPS/PPS sending work after a seek
24a3126: Revert "h264parse: expose compatible profiles to downstream"
8661740: h264parse: expose compatible profiles to downstream
8b7ef3f: codecparsers: fix some compiler warnings
Sreerenj Balachandran [Thu, 27 Nov 2014 10:11:03 +0000 (12:11 +0200)]
encoder: h264: Fix the period between I/P frames
If the key-frame period is set as one, then ip_period shuld be zero
https://bugzilla.gnome.org/show_bug.cgi?id=734992
Sreerenj Balachandran [Thu, 27 Nov 2014 09:21:03 +0000 (11:21 +0200)]
encoder: h264: Provide intra_idr_period value for VAEncSequenceParameterBufferH264
https://bugzilla.gnome.org/show_bug.cgi?id=734993
Sreerenj Balachandran [Thu, 27 Nov 2014 09:14:50 +0000 (11:14 +0200)]
vaapisink: Protect the X11 API invokations with proper locking
https://bugzilla.gnome.org/show_bug.cgi?id=739808
Gwenole Beauchesne [Thu, 27 Nov 2014 09:13:20 +0000 (11:13 +0200)]
encoder: h264: fix pixel-aspect-ratio in encoded stream.
Really report sample aspect ratio (SAR) as present, and make it match
what we have obtained from the user as pixel-aspect-ratio (PAR). i.e.
really make sure VUI parameter aspect_ratio_info_present_flag is set
to TRUE and that the indication from aspect_ratio_idc is Extended_SAR.
This is a leftover from git commit a12662f.
https://bugzilla.gnome.org/show_bug.cgi?id=740360
Gwenole Beauchesne [Tue, 25 Nov 2014 10:46:12 +0000 (11:46 +0100)]
decoder: mpeg4: fix uninitialized variables.
Fix gst_vaapi_decoder_mpeg4_parse() to initialize the packet type to
GST_MPEG4_USER_DATA so that a parse error would result in skipping
that packet. Also fix gst_vaapi_decoder_mpeg4_decode_codec_data() to
initialize status to GST_VAAPI_DECODER_STATUS_SUCCESS.
Gwenole Beauchesne [Tue, 25 Nov 2014 10:41:49 +0000 (11:41 +0100)]
encoder: h264: fix profile limits.
Fix ensure_profile_limits() to lower profile to the desired limits,
only if the latter are actually known and the profile needed to be
changed to fit.
Gwenole Beauchesne [Mon, 24 Nov 2014 14:14:37 +0000 (15:14 +0100)]
vaapipostproc: fix out caps for GLMemory.
If the best downstream capsfeature turns out to be GLMemory, then make
sure to propagate RGBA video format in caps to that element. This fixes
the following pipeline: ... ! vaapipostproc ! glimagesink.
Gwenole Beauchesne [Mon, 24 Nov 2014 13:25:33 +0000 (14:25 +0100)]
vaapipostproc: fix check for compatible src pad capsfilters.
When an explicit output video format is selected, from an src pad
capsfilter, make sure that the downstream element actually supports
that format. In particular, fix crash with the following pipelines:
... ! vaapipostproc ! video/x-raw,format=XXX ! xvimagesink ; where
XXX is a format not supported by xvimagesink.
While doing so, also reduce the set of src pad filter caps to the
actual set of allowed src pad caps.
Gwenole Beauchesne [Mon, 24 Nov 2014 13:10:11 +0000 (14:10 +0100)]
plugins: re-indent all video processing related source code.
Gwenole Beauchesne [Mon, 24 Nov 2014 12:20:33 +0000 (13:20 +0100)]
plugins: further fixes to the new "current" storage tracker.
The ensure_surface() and ensure_image() functions shall only relate
to the underlying backing store. The actual current flags are to be
updated only through ensure_{surface,image}_is_current() or very other
particular cases in GstMemory hooks.
Gwenole Beauchesne [Fri, 21 Nov 2014 14:43:35 +0000 (15:43 +0100)]
plugins: fix "current" video memory flags.
If the surface proxy is updated into the GstVaapiVideoMemory, then
it is assumed it is the most current representation of the current
video frame. Likewise, make a few more arrangements to have the
"current " flags set more consistently.
Gwenole Beauchesne [Fri, 21 Nov 2014 14:23:13 +0000 (15:23 +0100)]
plugins: ensure VA surface is current prior to using it.
When interacting with SW elements, the buffers and underlying video
memory could be mapped as read/write. However, we need to use those
buffers again as plain VA surfaces, we have to make sure the VA image
is thus committed back to VA surface memory.
This fixes pipelines involving avdec_* and vaapi{postproc,sink}.
Víctor Manuel Jáquez Leal [Fri, 12 Jul 2013 10:34:15 +0000 (06:34 -0400)]
plugins: enable memory maps for read & write.
Hence vaapisink can display buffers decoded by gst-libav, or HW decoded
buffers can be further processed in-place, e.g. with a textoverlay.
https://bugzilla.gnome.org/show_bug.cgi?id=704078
[ported to current git master branch, amended commit message]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Gwenole Beauchesne [Tue, 18 Nov 2014 13:57:02 +0000 (14:57 +0100)]
plugins: preserve framerate when updating src caps video format.
In the current implementation, gst_video_info_set_format() would reset
the whole GstVideoInfo structure first, prior to setting video format
and size. So, coleteral information like framerate or pixel-aspect-
ratio are lost.
Provide and use a unique gst_video_info_change_format() for overcome
this issue, i.e. only have it change the format and video size, and
copy over the rest of the fields.
https://bugzilla.gnome.org/show_bug.cgi?id=734665
Sreerenj Balachandran [Tue, 18 Nov 2014 12:07:57 +0000 (14:07 +0200)]
vaapidecode: increase the rank to GST_RANK_PRIMARY + 1
This is for helping decodebin to autoplug the vaapidecode element.
Decodebin is selecting decoder elements only based on rank and caps.
Without overriding the autoplug-* signals there is no way to autoplug
HW decoders inside decodebin. An easier soulution is to raise the
rank of vaapidecode, so that it gets selected first.
https://bugzilla.gnome.org/show_bug.cgi?id=739332
Gwenole Beauchesne [Wed, 12 Nov 2014 06:46:53 +0000 (07:46 +0100)]
vaapidecode: only expose supported profiles when needed.
JPEG and VP8 codecs do not really support the concept of "profile". So,
don't try to expose any set that wouldn't be supported by jpegparse, or
ivfparse for instance.
https://bugzilla.gnome.org/show_bug.cgi?id=739713
https://bugzilla.gnome.org/show_bug.cgi?id=739714
Gwenole Beauchesne [Thu, 13 Nov 2014 14:13:24 +0000 (15:13 +0100)]
decoder: h264: add initial support for repeat-first-field (RFF) flag.
Use the SEI pic_timing() message to track and propagate down the repeat
first field (RFF) flag. This is only initial support as there is one
other condition that could induce the RFF flag, which is not handled
yet.
Gwenole Beauchesne [Thu, 13 Nov 2014 14:05:19 +0000 (15:05 +0100)]
decoder: h264: fix picture ordering count type 0 with previous MMCO5.
Fix the decoding process for picture order count type 0 when the previous
picture had a memory_management_control_operation = 5. In particular, fix
the actual variable type for prev_pic_structure to hold the full bits of
the picture structure.
In practice, this used to work though, due to the underlying type used to
express a gboolean.
Gwenole Beauchesne [Thu, 13 Nov 2014 14:00:21 +0000 (15:00 +0100)]
decoder: h264: fix detection of top-field-first (TFF) flag.
Use the SEI pic_timing() message to track the pic_struct variable when
present, or infer it from the regular slice header flags field_pic_flag
and bottom_field_flag. This fixes temporal sequence ordering when the
output pictures are to be displayed.
https://bugzilla.gnome.org/show_bug.cgi?id=739291
Gwenole Beauchesne [Fri, 14 Nov 2014 08:54:02 +0000 (09:54 +0100)]
codecparsers: update to gst-vaapi-branch commit 3d05d9f.
1241840 h264: fix derivation of MaxPicNum variable
3bd718e h264: fix GstH264ParserResult documentation typo
b021609 h264parse: set the HEADER flag on buffers containing SPS or PPS
b08e4be h264parse: don't unnecesarily set src_caps
Sreerenj Balachandran [Mon, 3 Nov 2014 17:20:43 +0000 (19:20 +0200)]
vaapipostproc: Add string representation of VPP functions to ElementFactoy Klass
Added the same Klass specifications used in other upstream
video postprocessing elements like videoconvert, videoscale,
videobalance and deinterlace.
An example use case is for this is to help the playsink
to autoplug the hardware accelerated deinterlacer.
Sreerenj Balachandran [Mon, 3 Nov 2014 17:19:20 +0000 (19:19 +0200)]
vaapipostproc: Tweak the output video format setting to enable the autoplugging
This is a workaround until auto-plugging is fixed when
format=ENCODED + memory:VASurface caps feature are provided.
Use the downstream negotiated video format as the output video format
if the user didn't ask for the colorspace conversion explicitly.
Usecase: This will help to connect elements like videoscale, videorate etc
to vaapipostproc.
https://bugzilla.gnome.org/show_bug.cgi?id=739443
Gwenole Beauchesne [Wed, 29 Oct 2014 16:30:30 +0000 (17:30 +0100)]
vaapipostproc: allow user defined scaling mode.
Add new "scale-method" property to expose the scaling mode to use during
video processing. Note that this is only a hint, and the actual behaviour
may differ from implementation (VA driver) to implementation.
Gwenole Beauchesne [Wed, 29 Oct 2014 15:57:12 +0000 (16:57 +0100)]
filter: add initial support for high quality scaling.
Add support for video scaling options in VPP pipelines. Only the
DEFAULT mode is bound to exist. Others might be folded into that
mode.
Gwenole Beauchesne [Wed, 29 Oct 2014 15:35:46 +0000 (16:35 +0100)]
filter: re-indent all GstVaapiFilter related source code.
Gwenole Beauchesne [Wed, 29 Oct 2014 14:45:50 +0000 (15:45 +0100)]
codecparsers: update to gst-vaapi-branch commit f9d3bde.
2218b02 h264parse: expose parsed profile and level to downstream
3dbfab4 h264parse: return flushing if we get chained while being set to READY
d40fa8b h264: fix frame packing SEI parsing
32d40be h264: Use proper bit_reader api while parsing buffering_period SEI
b3e022e h264: initialize some fields of pic_timing structure
a70661d vc1: fix expected level in sequence-layer parsing unit test
6cee88d vc1: fix level values for simple/main profile
356c189 vc1: add unit test for sequence-layer parsing
ab9f641 vc1: take care of endianness when parsing sequence-layer
8dc8e35 mpeg4: fix vlc table used for sprite trajectory
Sreerenj Balachandran [Wed, 29 Oct 2014 13:46:47 +0000 (15:46 +0200)]
vaapidecode: Expose the supported profiles as caps to upstream
This will allows the playbin to fallback to Software Decoder
if the Hardware Decoder does not support a particular profile.
https://bugzilla.gnome.org/show_bug.cgi?id=730997
Sreerenj Balachandran [Wed, 29 Oct 2014 13:46:12 +0000 (15:46 +0200)]
encode: Attach the codec-data to out caps only based on negotiated caps
Attach the codec_data to out_caps only if downstream needed.
For eg: h264 encoder doesn't need to stuff codec_data to the
src caps if the negotiated caps has a stream format of byte-stream.
https://bugzilla.gnome.org/show_bug.cgi?id=734902
Sreerenj Balachandran [Wed, 29 Oct 2014 13:45:44 +0000 (15:45 +0200)]
configure: echoing installation prefix path
Gwenole Beauchesne [Wed, 24 Sep 2014 08:14:24 +0000 (10:14 +0200)]
display: add support for DRM Render-Nodes.
Add support for DRM Render-Nodes. This is a new feature that appeared
in kernel 3.12 for experimentation purposes, but was later declared
stable enough in kernel 3.15 for getting enabled by default.
This allows headless usages without authentication at all, i.e. usages
through plain ssh connections is possible.
Gwenole Beauchesne [Wed, 24 Sep 2014 11:44:43 +0000 (13:44 +0200)]
vaapisink: clean-ups (indentation, drop unused variables).
Gwenole Beauchesne [Wed, 24 Sep 2014 11:39:55 +0000 (13:39 +0200)]
vaapisink: fix GstNavigation "key-press" / "key-release" events.
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.
Gwenole Beauchesne [Wed, 24 Sep 2014 11:23:17 +0000 (13:23 +0200)]
vaapisink: fix GstNavigation "mouse-move" event.
Really use the motion event coordinates to propagate the "mouse-move"
event to upper layer, instead of those from a button event. Those are
technically the same though.
Sreerenj Balachandran [Tue, 16 Sep 2014 11:25:40 +0000 (14:25 +0300)]
vaapisink: implement the GstNavigation interface
This is useful for things like DVD menus, where key/mouse events
would need to be forwarded from the upstream sink element.
https://bugzilla.gnome.org/show_bug.cgi?id=711479
Simon Farnsworth [Thu, 13 Mar 2014 18:38:33 +0000 (18:38 +0000)]
vaapipostproc: fix deinterlacing from non VA memory buffers.
When we copy a buffer because we're moving it into VA-API memory, we
need to copy flags. Otherwise, interlaced YUV buffers from a capture
source (e.g. V4L2) don't get flagged as interlaced.
https://bugzilla.gnome.org/show_bug.cgi?id=726270
Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
[reversed order of gst_buffer_copy_into() flags to match <1.0 code]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Gwenole Beauchesne [Fri, 22 Aug 2014 13:22:32 +0000 (15:22 +0200)]
vaapipostproc: add support for GLTextureUploadMeta output.
This allows for vaapipostproc to be chained to the glimagesink element
for instance.
https://bugzilla.gnome.org/show_bug.cgi?id=735231
Gwenole Beauchesne [Fri, 22 Aug 2014 13:22:32 +0000 (15:22 +0200)]
vaapipostproc: add support for "download" capability.
Allow implicit conversions to raw video formats, while still keeping
VA surfaces underneath. This allows for chaining the vaapipostproc
element to a software-only element that takes care of maps/unmaps.
e.g. xvimagesink.
https://bugzilla.gnome.org/show_bug.cgi?id=720174
Gwenole Beauchesne [Fri, 22 Aug 2014 16:10:54 +0000 (18:10 +0200)]
vaapipostproc: use pooled vaapi video meta.
Use pooled GstVaapiVideoMeta information, i.e. always allocate that on
video buffer allocation. Also optimize copy of additional metadata info
into the resulting video buffer: only copy the video cropping info and
the source surface proxy.
https://bugzilla.gnome.org/show_bug.cgi?id=720311
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
[fixed proxy leak, fixed double free on error, optimized meta copy]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Gwenole Beauchesne [Fri, 22 Aug 2014 13:17:29 +0000 (15:17 +0200)]
vaapipostproc: fix passthrough mode.
If no explicit output surface format is supplied try to keep the one
supplied through the sink pad caps. This avoids a useless copy, even
if things are kept in GPU memory.
This is a performance regression from git commit dfa70b9.
Sreerenj Balachandran [Sat, 5 Jul 2014 18:00:34 +0000 (21:00 +0300)]
vaapipostproc: fix output buffer to have a GstVaapiVideoMemory.
https://bugzilla.gnome.org/show_bug.cgi?id=720311
[used new infrastructure through base decide_allocation() impl]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Gwenole Beauchesne [Fri, 22 Aug 2014 09:13:36 +0000 (11:13 +0200)]
vaapipostproc: enable advanced deinterlacing with same format.
If only advanced deinterlacing is requested, i.e. deinterlacing is
the only active algorithm to apply with source and output surface
formats being the same, then make sure to enable VPP processing.
Otherwise, allow fallback to bob-deinterlacing with simple rendering
flags alteration.
Sreerenj Balachandran [Thu, 21 Aug 2014 12:04:20 +0000 (15:04 +0300)]
vaapivideomemory: avoid NULL pointer unref if GstVaapiImage creation failed.
https://bugzilla.gnome.org/show_bug.cgi?id=735156
Gwenole Beauchesne [Fri, 22 Aug 2014 11:25:03 +0000 (13:25 +0200)]
plugins: fix memory leaks.
Gwenole Beauchesne [Thu, 21 Aug 2014 12:10:36 +0000 (14:10 +0200)]
plugins: factor out decide_allocation() hook.
Add a default decide_allocation() hook to GstVaapiPluginBase. The caps
feature argument can be used to force a bufferpool with a specific kind
of memory.
Gwenole Beauchesne [Thu, 21 Aug 2014 09:12:39 +0000 (11:12 +0200)]
plugins: allow bufferpool to not allocate vaapi video meta.
Add GST_VAAPI_VIDEO_BUFFER_POOL_ACQUIRE_FLAG_NO_ALLOC params flag that
can be used to disable early allocations of vaapi video metas on buffers,
thus delagating that to the bufferpool user.
Gwenole Beauchesne [Thu, 21 Aug 2014 08:45:31 +0000 (10:45 +0200)]
plugins: re-indent all GstVaapiVideo* related source code.
Gwenole Beauchesne [Fri, 22 Aug 2014 13:12:46 +0000 (15:12 +0200)]
surfaceproxy: fix copy to propagate view_id.
Fix gst_vaapi_surface_proxy_copy() to copy the view-id element, thus
fixing random frames skipped when vaapipostproc element is used in
passthrough mode. In that mode, GstMemory is copied, thus including
the underlying GstVaapiVideoMeta and associated GstVaapiSurfaceProxy.
Gwenole Beauchesne [Wed, 20 Aug 2014 14:38:45 +0000 (16:38 +0200)]
vaapipostproc: fix detection of output surface format changes.
Default to I420 format for output surfaces so that to match the usual
GStreamer pipelines. Though, internally, we could still opt for NV12
surface formats, i.e. default format=ENCODED is a hint for that, thus
delegating the decision to the VA driver.
Gwenole Beauchesne [Wed, 20 Aug 2014 08:59:53 +0000 (10:59 +0200)]
vaapipostproc: fix construction of allowed sink pad caps.
Fix construction of the set of caps allowed on the sink pad to filter
out unsupported raw video caps with GStreamer >= 1.2.
Gwenole Beauchesne [Wed, 20 Aug 2014 08:37:02 +0000 (10:37 +0200)]
vaapipostproc: improve heuristics for detecting native VA surfaces.
Use the new gst_caps_has_vaapi_surface() helper function to detect
whether the sink pad caps contain native VA surfaces, or not, i.e.
no raw video caps.
Also rename is_raw_yuv to get_va_surfaces to make the variable more
explicit as we just want a way to differentiate raw video caps from
VA surfaces actually.
Gwenole Beauchesne [Tue, 12 Aug 2014 16:33:25 +0000 (18:33 +0200)]
vaapipostproc: disable discontinuity detection code.
The "discontinuity" tracking code, whereby lost frames are tentatively
detected, is inoperant if the sink pad buffer timestamps are not right
to begin with.
This is a temporary workaround until the following bug is fixed:
https://bugzilla.gnome.org/show_bug.cgi?id=734386
Gwenole Beauchesne [Thu, 7 Aug 2014 12:57:26 +0000 (14:57 +0200)]
vaapipostproc: fix heuristic for detecting discontinuity.
In order to make the discontinuity detection code useful, we need to
detect the lost frames in the history as early as the previous frame.
This is because some VA implementations only support one reference
frame for advanced deinterlacing.
In practice, turn the condition for detecting new frame that is beyond
the previous frame from field_duration*2 to field_duration*3, i.e.
nothing received for the past frame and a half because of possible
rounding errors when calculating the field-duration either in this
element (vaapipostproc), or from the upstream element (parser element).
This is a regression introduced with commit faefd62.
https://bugzilla.gnome.org/show_bug.cgi?id=734135
Gwenole Beauchesne [Wed, 20 Aug 2014 09:43:08 +0000 (11:43 +0200)]
plugins: fix detection of raw video caps.
Use the new gst_caps_has_vaapi_surface() helper function to better
detect raw video caps, and in particular those from RGB colorspace.
https://bugzilla.gnome.org/show_bug.cgi?id=734665
Gwenole Beauchesne [Wed, 20 Aug 2014 09:30:41 +0000 (11:30 +0200)]
plugins: add helper for detecting VA surfaces in caps.
Introduce new gst_caps_has_vaapi_surface() helper function to detect
whether the supplied caps has VA surfaces. With GStreamer >= 1.2, this
implies a check for memory:VASurface caps features, and format=ENCODED
for earlier versions of GStreamer.
Sebastian Dröge [Tue, 12 Aug 2014 10:01:57 +0000 (13:01 +0300)]
vaapidecode: start the decoder task again after finishing
This allows the element to accept data again after draining without
a hard reset or caps change happening in between.
https://bugzilla.gnome.org/show_bug.cgi?id=734616
Sebastian Dröge [Tue, 12 Aug 2014 10:00:03 +0000 (13:00 +0300)]
vaapidecode: unlock condition variables before shutting down the element
Otherwise threads might wait for them, causing the shutdown of the element
to deadlock on the streaming thread.
https://bugzilla.gnome.org/show_bug.cgi?id=734616
Sebastian Dröge [Mon, 11 Aug 2014 14:15:24 +0000 (17:15 +0300)]
vaapidecode: reset decoder_finish variable after stopping the decoder thread
Otherwise the element is not usable again after draining/EOS.
https://bugzilla.gnome.org/show_bug.cgi?id=734616
Sebastian Dröge [Mon, 11 Aug 2014 14:14:53 +0000 (17:14 +0300)]
vaapidecode: don't try flushing the decoder instance if we didn't create one yet
This otherwise results in unnecessary error messages.
https://bugzilla.gnome.org/show_bug.cgi?id=734616
Gwenole Beauchesne [Fri, 1 Aug 2014 04:32:32 +0000 (06:32 +0200)]
build: fix with --no-undefined linker flags.
https://bugzilla.gnome.org/show_bug.cgi?id=729352
Changzhi Wei [Thu, 23 Jan 2014 15:44:09 +0000 (15:44 +0000)]
vaapisink: add support for GstColorBalance interface.
https://bugzilla.gnome.org/show_bug.cgi?id=722390
[fixed channel names, simplified range factor, fixed memory leak]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Changzhi Wei [Thu, 23 Jan 2014 15:23:00 +0000 (15:23 +0000)]
vaapisink: add support for colorbalance adjustment.
https://bugzilla.gnome.org/show_bug.cgi?id=722390
[fixed and simplified tracking of colorbalance value changes]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Gwenole Beauchesne [Thu, 31 Jul 2014 11:18:21 +0000 (13:18 +0200)]
vaapisink: improve installation of properties.
Simplify the creation and installation process of properties, by first
accumulating them into a g_properties[] array, and next calling into
g_object_class_install_properties().
Also add missing docs and flags to some properties.
Gwenole Beauchesne [Thu, 31 Jul 2014 08:48:15 +0000 (10:48 +0200)]
vaapisink: code clean-ups.
Move code around in a more logical way. Introduce GST_VAAPISINK_CAST()
helper macro and use it wherever we know the object is a GstBaseSink or
any base class. Drop explicit initializers for values that have defaults
set to zero.
Gwenole Beauchesne [Thu, 31 Jul 2014 08:37:57 +0000 (10:37 +0200)]
vaapisink: re-indent all GstVaapiSink related source code.
Gwenole Beauchesne [Wed, 30 Jul 2014 15:27:50 +0000 (17:27 +0200)]
vaapisink: introduce separate backends.
Introduce new backends vtable so that to have clean separation between
display dependent code and common base code. That's a "soft" separation,
we don't really need dedicated objects.
https://bugzilla.gnome.org/show_bug.cgi?id=722248
Gwenole Beauchesne [Wed, 30 Jul 2014 14:47:20 +0000 (16:47 +0200)]
vaapisink: drop unused "synchronous" mode.
Support for X11 "synchronous" mode was never implemented, and was only
to be useful for debugging. Drop that altogether, that's not going to
be useful in practice.
https://bugzilla.gnome.org/show_bug.cgi?id=733985
Gwenole Beauchesne [Wed, 30 Jul 2014 15:32:29 +0000 (17:32 +0200)]
vaapisink: drop unused variables.
Drop obsolete, and now unused, video_buffer_pool and video_buffer_size
variables. They got merged into the GstVaapiPluginBase object.
Gwenole Beauchesne [Wed, 30 Jul 2014 14:35:32 +0000 (16:35 +0200)]
vaapisink: drop GLX rendering and fancy effects.
Rendering with GLX in vaapisink is kind of useless nowadays, including
OpenGL related fancy effects. Plain VA/GLX interfaces are also getting
deprecated in favor of EGL, or more direct buffer sharing with actual
GL textures.
Should testing of interop with GLX be needed, one could still be using
the modern cluttersink or glimagesink elements.
https://bugzilla.gnome.org/show_bug.cgi?id=733984
Holger Kaelberer [Tue, 5 Nov 2013 13:01:11 +0000 (14:01 +0100)]
vaapisink: listen to window size changes on X11.
Allow dynamic changes to the window, e.g. performed by the user, and
make sure to refresh its contents, while preserving aspect ratio.
In practice, Expose and ConfigureNotify events are tracked in X11
display mode by default. This occurs in a separte event thread, and
this is similar to what xvimagesink does. Any of those events will
trigger a reconfiguration of the window "soft" size, subsequently
the render-rect when necessary, and finally _expose() the result.
The default of handle_events=true can be changed programatically via
gst_x_overlay_handle_events().
Thanks to Fabrice Bellet for rebasing the patch.
https://bugzilla.gnome.org/show_bug.cgi?id=711478
[dropped XInitThreads(), cleaned up the code a little]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Gwenole Beauchesne [Tue, 29 Jul 2014 13:47:46 +0000 (15:47 +0200)]
vaapidecode: decode and output all pending frames on normal EOS.
The gst_vaapidecode_decode_loop() function is called within a separate
task to fetch and output all frames that were decoded so far. So, if
the decoder_loop_status is forcibly set to EOS when _finish() is called,
then we are bound to exist the task without submitting the pending
frames.
If the downstream element error'ed out, then the gst_pad_push() would
propagate up an error and so we will get it right for cutting off
_finish() early in that case.
This is a regression from 6003596.
https://bugzilla.gnome.org/show_bug.cgi?id=733897
Gwenole Beauchesne [Tue, 29 Jul 2014 11:24:52 +0000 (13:24 +0200)]
Bump version for development.
Gwenole Beauchesne [Tue, 29 Jul 2014 08:31:58 +0000 (10:31 +0200)]
AUTHORS: updates.
Gwenole Beauchesne [Tue, 29 Jul 2014 08:31:15 +0000 (10:31 +0200)]
NEWS: updates.
Matthew Waters [Tue, 29 Jul 2014 06:22:01 +0000 (16:22 +1000)]
vaapidecode: properly return from decode loop on downstream errors.
Fixes a hang/race on shutdown where _decode_loop() had already completed
its execution and _finish() was waiting on a GCond for decode_loop()
to complete. Also fixes the possible race where _finish() is called
but _decode_loop() endlessly returns before signalling completion
iff the decoder instance returns GST_FLOW_OK.
Found with: ... ! vaapidecode ! {glimagesink,cluttersink}
https://bugzilla.gnome.org/show_bug.cgi?id=733897
[factored out GST_VIDEO_DECODER_STREAM_UNLOCK() call]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Gwenole Beauchesne [Mon, 28 Jul 2014 16:45:49 +0000 (18:45 +0200)]
0.5.9.
Gwenole Beauchesne [Mon, 28 Jul 2014 16:31:09 +0000 (18:31 +0200)]
vaapisink: fix GstVideoOverlay::expose() implementation.
Now that we always track the currently active video buffer, it is
not necessary to automatically increase its reference since this is
implicitly performed in ::show_frame() through the get_input_buffer()
helper from GstVaapiPluginBase class.
This is a regression from a26df80.
Gwenole Beauchesne [Mon, 28 Jul 2014 16:00:19 +0000 (18:00 +0200)]
vaapidecode: simplify bufferpool configuration.
Rework the logics behind the configuration of an adequate bufferpool,
especially when OpenGL meta or additional capsfeatures are needed.
Besides, for GStreamer >= 1.4, the first capsfeatures that gets matched,
and that is not system memory, is now selected by default.
Gwenole Beauchesne [Mon, 28 Jul 2014 14:43:47 +0000 (16:43 +0200)]
vaapidecode: fix auto-plugging of vaapisink element.
Make sure to propagate memory:VASurface capsfeature to srcpad caps
only for GStreamer >= 1.5 as the plug-in elements in GStreamer 1.4
core currently miss additional patches available in 1.5-git (1.6).
This is a temporary workaround.
Sreerenj Balachandran [Mon, 28 Jul 2014 12:54:46 +0000 (15:54 +0300)]
configure: allow builds against GStreamer git (1.5.x).
https://bugzilla.gnome.org/show_bug.cgi?id=733688