GNOME Bugzilla – Bug 702178
vaapisink template_caps is not exposing the raw video formats.
Last modified: 2013-07-11 17:21:27 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)?
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.
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.
Created attachment 247881 [details] [review] vaapisink: Expose the raw video formats in capstemplate
Review of attachment 247881 [details] [review]: Hi, maybe put this in the GST_CHECK_VERSION(1,0,0) clause?
Merged into git master branch, with some minor changes as documented. Thanks.
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