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 703271 - [gstreamer-1.2-port] Add support for GstCaps features
[gstreamer-1.2-port] Add support for GstCaps features
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks: 698054
 
 
Reported: 2013-06-28 16:21 UTC by Víctor Manuel Jáquez Leal
Modified: 2013-12-19 12:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add capsfeature support. (3.78 KB, patch)
2013-06-28 18:52 UTC, Víctor Manuel Jáquez Leal
none Details | Review
Add capsfeature support (4.06 KB, patch)
2013-07-04 08:07 UTC, sreerenj
none Details | Review
vaapisink: expose the raw video formats in static caps template. (1.19 KB, patch)
2013-10-09 10:56 UTC, sreerenj
none Details | Review

Description Víctor Manuel Jáquez Leal 2013-06-28 16:21:51 UTC
This bug is to track the patches required to support
caps features (available in GStreamer 1.2)

http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-caps.txt
Comment 1 Víctor Manuel Jáquez Leal 2013-06-28 18:52:55 UTC
Created attachment 248032 [details] [review]
Add capsfeature support.

https://bugzilla.gnome.org/show_bug.cgi?id=698054
Comment 2 Gwenole Beauchesne 2013-07-03 13:42:18 UTC
Review of attachment 248032 [details] [review]:

::: gst/vaapi/gstvaapidecode.c
@@ +190,3 @@
     gst_video_codec_state_unref(state);
 
+#if !GST_CHECK_VERSION(1,1,0)

I'd prefer the newest APIs first, i.e.

#if GST_CHECK_VERSION(1,1,0)
   state->caps = gst_video_info_to_caps(&vis);
#else
   ...
#endif

Doesn't really matter but it would look more consistent and easier to strip down to include only the git master bits.

::: gst/vaapi/gstvaapisink.c
@@ +743,3 @@
+    templ_caps = gst_static_pad_template_get_caps (&gst_vaapisink_sink_factory);
+    out_caps = gst_caps_copy (templ_caps);
+    gst_caps_unref (templ_caps);

Can't we just make out_caps = gst_static_pad_template_get_caps() since that already increases the reference of the underlying GstCaps? Otherwise, if we want to write into out_caps, it's probably clearer to call gst_caps_make_writable() explicitly, even though this reduces to the same thing.
Comment 3 sreerenj 2013-07-04 08:07:25 UTC
Created attachment 248364 [details] [review]
Add capsfeature support

Minor modifications as gb proposed.
Comment 4 Víctor Manuel Jáquez Leal 2013-07-15 13:19:32 UTC
Review of attachment 248364 [details] [review]:

::: gst/vaapi/gstvaapisink.c
@@ +94,3 @@
+    GST_VIDEO_CAPS_MAKE(GST_VIDEO_FORMATS_ALL);
+    
+#elif !GST_CHECK_VERSION(1,0,0)

sree_, the patch doesn't apply correctly anymore, because of 769f33ca
Could you update the patch?
Comment 5 sreerenj 2013-07-30 08:28:05 UTC
hm, i didn't see your comment.The stupid bugzilla didn't send any email notification!

It seems that the gstreamer-vaapi master branch is changing rapidly with many patches.So IMHO it is better to wait for Gwenole to merge the 1.2 stuffs . Otherwise we will end up with rebasing all the patches again and again.
Comment 6 Víctor Manuel Jáquez Leal 2013-07-30 08:47:46 UTC
> IMHO it is better to wait for Gwenole to merge the 1.2 stuffs .
> Otherwise we will end up with rebasing all the patches again and again.

Agree
Comment 7 Gwenole Beauchesne 2013-09-27 09:18:13 UTC
Review of attachment 248364 [details] [review]:

::: gst/vaapi/gstvaapisink.c
@@ +752,3 @@
+        if (yuv_caps) {
+	    if (!gst_caps_is_writable(out_caps))
+		out_caps = gst_caps_make_writable(out_caps);

out_caps = gst_caps_make_writable(out_caps) should be enough.

More specifically, gst_caps_is_writable() does not exist in GStreamer 0.10 APIs. :)
Comment 8 Gwenole Beauchesne 2013-09-27 12:33:21 UTC
Patch slightly arranged and integrated into git master branch. Thanks.
Comment 9 Gwenole Beauchesne 2013-09-27 12:33:28 UTC
commit 8fe3bb0b14120738834000d3de3dfa842e692e24
Author: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Date:   Thu Jul 4 11:03:52 2013 +0300

    plugins: add support for GstCaps features.
    
    Move VA video buffer memory from "video/x-surface,type=vaapi" format,
    as expressed in caps, to the more standard use of caps features. i.e.
    add "memory:VASurface" feature attribute to the associated caps.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703271
    
    Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Comment 10 sreerenj 2013-10-09 10:56:01 UTC
It seems that you forgot to expose the raw video formats in sink caps template which was there in my patch. Was that intentional?

Anyway i will attach another patch to add that.
Comment 11 sreerenj 2013-10-09 10:56:29 UTC
Created attachment 256794 [details] [review]
vaapisink: expose the raw video formats in static caps template.

Expose all raw video formats in the static caps template since the
vaapisink is supporting raw data. We will get the exact set of formats
supported by the driver dynamically through the _get_caps() routine.
Comment 12 sreerenj 2013-10-10 12:45:14 UTC
Re-opening..
Comment 13 Gwenole Beauchesne 2013-11-20 10:09:08 UTC
Hi, in this case, gst_vaapisink_get_caps_impl() needs some arrangements to avoid duplicates from the template pad caps. e.g. remove formats from what we get from the template pad caps, or don't actually use gst_static_pad_template_get_caps() but rather build clean caps that only mention the first series for caps with memory:VASurface feature.
Comment 14 Gwenole Beauchesne 2013-12-19 12:11:53 UTC
The initial bug was fixed. The vaapisink template caps update is followed up on bug #720737