GNOME Bugzilla – Bug 671977
videodecoder: add support for GstSurfaceBuffer caps
Last modified: 2013-08-16 09:48:41 UTC
This adds support for GstSurfaceBuffer caps as specified in -bad/gst-libs/gst/video/gstsurfacebuffer.[hc] Right now it is not possible to use GstBaseVideoDecoder for hardware accelerated buffers like the vaapi ones. Has been tested with current GstSurfaceBuffer. As this is still declared "unstable" please align with possible changes to GstSurfaceBuffer API. Thanks, Holger
Created attachment 209595 [details] [review] Allow GstSurfaceBuffer caps
I'm not sure if this is the correct approach (feels unclean somehow) but this should be considered when getting the classes moved to -base... to make sure we can at least add support for it later.
Please feel free to change the 'how' in whatever way seems right to you. The attached patch was meant to make it work. The minimum necessary is to allow for mime-type GST_VIDEO_CAPS_SURFACE and further caps properties/keys set by the deriving class used for what is mentioned in the GstSurfaceBuffer docs: <GstSurfaceBuffer> An implementation specific type must be set using the "type" key (e.g. type="vaapi"). Available convertion type are speficied using seperate boolean arguement (e.g. opengl=true). Having this information in the capabilities allow easy negotiating of such feature with other elements (e.g. a ClutterGstVideoSink can claim accpeting caps "video/x-surface,opengl=true"). </GstSurfaceBuffer> Was sure if these 'keys' are final or will be extended ... Thanks, Holger
This will be done differently in 1.0, but keeping open for now.
...and is done differently in 1.0.