mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
libs: decoder: add _get_surface_formats()
This function exposes the available formats of the surfaces in the the current context to the plugins.
This commit is contained in:
parent
71264ede6f
commit
b09f592a4c
2 changed files with 21 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue