| Top |
GstCaps *
gst_vaapi_decoder_get_caps (GstVaapiDecoder *decoder);
Retrieves the decoder
caps. The decoder owns the returned caps, so
use gst_caps_ref() whenever necessary.
GstVaapiCodec
gst_vaapi_decoder_get_codec (GstVaapiDecoder *decoder);
Retrieves the decoder
codec type.
GstVideoCodecState *
gst_vaapi_decoder_get_codec_state (GstVaapiDecoder *decoder);
Retrieves the decoder
codec state. The decoder owns the returned
GstVideoCodecState structure, so use gst_video_codec_state_ref()
whenever necessary.
gboolean gst_vaapi_decoder_put_buffer (GstVaapiDecoder *decoder,GstBuffer *buf);
Queues a GstBuffer to the HW decoder. The decoder holds a
reference to buf
.
Caller can notify an End-Of-Stream with buf
set to NULL. However,
if an empty buffer is passed, i.e. a buffer with NULL data pointer
or size equals to zero, then the function ignores this buffer and
returns TRUE.
GstVaapiDecoderStatus gst_vaapi_decoder_get_surface (GstVaapiDecoder *decoder,GstVaapiSurfaceProxy **out_proxy_ptr);
Flushes encoded buffers to the decoder and returns a decoded surface, if any.
On successful return, *out_proxy_ptr
contains the decoded surface
as a GstVaapiSurfaceProxy. The caller owns this object, so
gst_vaapi_surface_proxy_unref() shall be called after usage.
GstVaapiDecoderStatus gst_vaapi_decoder_get_frame (GstVaapiDecoder *decoder,GstVideoCodecFrame **out_frame_ptr);
On successful return, *out_frame_ptr
contains the next decoded
frame available as a GstVideoCodecFrame. The caller owns this
object, so gst_video_codec_frame_unref() shall be called after
usage. Otherwise, GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA
is
returned if no decoded frame is available.
The actual surface is available as a GstVaapiSurfaceProxy attached to the user-data anchor of the output frame. Ownership of the proxy is transferred to the frame.
This is equivalent to gst_vaapi_decoder_get_frame_with_timeout()
with a timeout value of zero.
GstVaapiDecoderStatus gst_vaapi_decoder_get_frame_with_timeout (GstVaapiDecoder *decoder,GstVideoCodecFrame **out_frame_ptr,guint64 timeout);
On successful return, *out_frame_ptr
contains the next decoded
frame available as a GstVideoCodecFrame. The caller owns this
object, so gst_video_codec_frame_unref() shall be called after
usage. Otherwise, GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA
is
returned if no decoded frame is available.
The actual surface is available as a GstVaapiSurfaceProxy attached to the user-data anchor of the output frame. Ownership of the proxy is transferred to the frame.
decoder |
||
out_frame_ptr |
the next decoded frame as a GstVideoCodecFrame |
|
timeout |
the number of microseconds to wait for the frame, at most |
GstVaapiDecoderStatus gst_vaapi_decoder_parse (GstVaapiDecoder *decoder,GstVideoCodecFrame *frame,GstAdapter *adapter,gboolean at_eos,guint *got_unit_size_ptr,gboolean *got_frame_ptr);
GstVaapiDecoderStatus gst_vaapi_decoder_decode (GstVaapiDecoder *decoder,GstVideoCodecFrame *frame);
Decoder status for gst_vaapi_decoder_get_surface().
|
Success. |
||
|
End-Of-Stream. |
||
|
No memory left. |
||
|
Decoder initialization failure. |
||
|
Unsupported codec. |
||
|
Not enough input data to decode. |
||
|
No surface left to hold the decoded picture. |
||
|
Invalid surface. |
||
|
Invalid or unsupported bitstream data. |
||
|
Unsupported codec profile. |
||
|
Unsupported chroma format. |
||
|
Unsupported parameter. |
||
|
Unknown error. |