libs: decoder: add _get_surface_formats()

This function exposes the available formats of the surfaces in the the current
context to the plugins.
parent 71264ede
......@@ -1067,3 +1067,21 @@ gst_vaapi_decoder_decode_codec_data (GstVaapiDecoder * decoder)
gst_buffer_unmap (codec_data, &map_info);
return status;
}
/**
* gst_vaapi_decoder_get_surface_formats:
* @decoder: a #GstVaapiDecoder
*
* Retrieves an array of #GstVideoFormat which the output surfaces of
* the @decoder can handle.
*
* Return value: (transfer full): a #GArray of #GstVideoFormat or
* %NULL
*/
GArray *
gst_vaapi_decoder_get_surface_formats (GstVaapiDecoder * decoder)
{
if (decoder && decoder->context)
return gst_vaapi_context_get_surface_formats (decoder->context);
return NULL;
}
......@@ -102,6 +102,9 @@ gst_vaapi_decoder_set_codec_state_changed_func (GstVaapiDecoder * decoder,
GstCaps *
gst_vaapi_decoder_get_caps (GstVaapiDecoder * decoder);
GArray *
gst_vaapi_decoder_get_surface_formats (GstVaapiDecoder * decoder);
gboolean
gst_vaapi_decoder_put_buffer (GstVaapiDecoder * decoder, GstBuffer * buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment