After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703934 - do more check in _set_caps of vaapisink when _buffer_alloc is not called
do more check in _set_caps of vaapisink when _buffer_alloc is not called
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
git master
Other Windows
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-07-10 10:04 UTC by congx.zhong
Modified: 2013-08-29 17:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-do-more-check-in-_set_caps-of-vaapisink-when-_buffer (1.41 KB, patch)
2013-07-10 10:04 UTC, congx.zhong
none Details | Review

Description congx.zhong 2013-07-10 10:04:53 UTC
Created attachment 248816 [details] [review]
0001-do-more-check-in-_set_caps-of-vaapisink-when-_buffer

when _buffer_alloc is not called

    in webkit video ogg stream, _buffer_alloc isn't called,
    do more check in _set_caps to initialized image/surface pool
    for uploading raw yuv frame to vaSurface
Comment 1 Zhao, Halley 2013-07-12 02:55:53 UTC
even if decoder (or some other issue) doesn't invoke _buffer_alloc, vaapisink shouldn't fail.

       In tizen/ivi, murphy is added to gst playbin2, then I met the issue that _buffer_alloc is not called.
       Anyway, it isn’t fault that decoder doesn’t trigger _buffer_alloc for downlink elements, just not so nice. So we’d better add condition check in vaapisink for such case.
Comment 2 Gwenole Beauchesne 2013-08-26 11:32:04 UTC
Hi,

(In reply to comment #0)
> Created an attachment (id=248816) [details] [review]
> 0001-do-more-check-in-_set_caps-of-vaapisink-when-_buffer
> 
> when _buffer_alloc is not called
> 
>     in webkit video ogg stream, _buffer_alloc isn't called,
>     do more check in _set_caps to initialized image/surface pool
>     for uploading raw yuv frame to vaSurface

Unless WebKit is doing something special, and possibly incorrectly, I cannot reproduce this issue with the Theora/OGG BBB trailer video and both GStreamer 1.0 (playbin) and 0.10 (playbin & playbin2). video-sink="vaapisink" would just work.
Comment 3 Gwenole Beauchesne 2013-08-26 11:35:48 UTC
Review of attachment 248816 [details] [review]:

::: gst/vaapi/gstvaapisink.c
@@ +827,3 @@
+        if (!gst_vaapi_uploader_ensure_caps(sink->uploader, caps, NULL))
+            return GST_FLOW_NOT_SUPPORTED;
+    }

GST_FLOW_NOT_SUPPORTED is not a valid return code. This will likely return something like !FALSE => TRUE.
Comment 4 Gwenole Beauchesne 2013-08-29 17:20:54 UTC
Fixed and pushed in git master branch. Though, I don't see what it fixes.
Comment 5 Gwenole Beauchesne 2013-08-29 17:21:14 UTC
commit 16d082d4e354fee8dc0e37a9c9ca0b7a2c7fefe9
Author: Zhao Halley <halley.zhao@intel.com>
Date:   Thu Apr 18 19:49:42 2013 +0800

    vaapisink: ensure the uploader is setup for upstream allocated buffers.
    
    In GStreamer 0.10 builds, make sure that the GstVaapiUploader helper
    is setup in case upstream elements allocate buffers themselves without
    honouring our GstVaapiSink::bufer_alloc() hook.
    
    In particular, this fixes support for OGG video streams with WebKit.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703934