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 702178 - vaapisink template_caps is not exposing the raw video formats.
vaapisink template_caps is not exposing the raw video formats.
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:
 
 
Reported: 2013-06-13 13:25 UTC by sreerenj
Modified: 2013-07-11 17:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vaapisink: Expose the raw video formats in capstemplate (1.01 KB, patch)
2013-06-27 09:37 UTC, sreerenj
none Details | Review

Description sreerenj 2013-06-13 13:25:50 UTC
The vaapisink element is not exposing raw formats in its template_caps. Of course the get_caps() routine is giving the supported formats dynamically. But as per gstreamer guidelines, I guess we should add all possible combinations to sink template caps. 
How about adding GST_VIDEO_FORMATS_ALL to template_caps (This will include both RGB and YUV)?
Comment 1 Gwenole Beauchesne 2013-06-26 15:43:40 UTC
The problem is if the underlying driver doesn't support the specified format for (implicit) color conversion, what would happen? _get_caps() would fulfill its purpose, and strip down/only keep the supported formats, but what would all formats be useful for specifically in static template caps? Auto-plugging? Thanks.
Comment 2 sreerenj 2013-06-27 08:06:52 UTC
AFAIK, We doesn't need to support all specified formats in capstemplate all the time. For eg: the caps template of ximagesink is saying that it can accept any raw formats but not, it won't success in all cases. You will get exact format only from get_caps() dynamically. 

In case of vaapi, we are supposed to support the raw formats but of course the exact format will get only during get_caps() based on different driver supports.So our capstemplate should supply all possible combination of formats (because we don't know what format the current driver is supporting)and get_caps() for the exact format. This will help in autoplugging since the first comparisons are always based on template caps.
Comment 3 sreerenj 2013-06-27 09:37:48 UTC
Created attachment 247881 [details] [review]
vaapisink: Expose the raw video formats in capstemplate
Comment 4 Gwenole Beauchesne 2013-06-27 09:53:00 UTC
Review of attachment 247881 [details] [review]:

Hi, maybe put this in the GST_CHECK_VERSION(1,0,0) clause?
Comment 5 Gwenole Beauchesne 2013-06-27 12:07:44 UTC
Merged into git master branch, with some minor changes as documented. Thanks.
Comment 6 Gwenole Beauchesne 2013-07-11 17:21:27 UTC
commit 769f33cab29ab298a90b39257ca9dbbca26e1498
Author: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Date:   Thu Jun 27 12:25:44 2013 +0300

    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.
    
    This also fixes an inconsistency wrt. GStreamer 0.10 builds.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702178