GstVaapiDecoder

GstVaapiDecoder — VA decoder abstraction

Synopsis

enum                GstVaapiDecoderStatus;
                    GstVaapiDecoder;
                    GstVaapiDecoderClass;
GstCaps *           gst_vaapi_decoder_get_caps          (GstVaapiDecoder *decoder);
gboolean            gst_vaapi_decoder_put_buffer        (GstVaapiDecoder *decoder,
                                                         GstBuffer *buf);
GstVaapiSurfaceProxy * gst_vaapi_decoder_get_surface    (GstVaapiDecoder *decoder,
                                                         GstVaapiDecoderStatus *pstatus);

Object Hierarchy

  GObject
   +----GstVaapiDecoder
         +----GstVaapiDecoderFfmpeg

Properties

  "caps"                     gpointer              : Read / Write / Construct Only
  "display"                  GstVaapiDisplay*      : Read / Write / Construct Only

Description

Details

enum GstVaapiDecoderStatus

enum GstVaapiDecoderStatus {
    GST_VAAPI_DECODER_STATUS_SUCCESS = 0,
    GST_VAAPI_DECODER_STATUS_END_OF_STREAM,
    GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED,
    GST_VAAPI_DECODER_STATUS_ERROR_INIT_FAILED,
    GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_CODEC,
    GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA,
    GST_VAAPI_DECODER_STATUS_ERROR_NO_SURFACE,
    GST_VAAPI_DECODER_STATUS_ERROR_INVALID_SURFACE,
    GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN = -1
};

Decoder status for gst_vaapi_decoder_get_surface().

GST_VAAPI_DECODER_STATUS_SUCCESS

Success.

GST_VAAPI_DECODER_STATUS_END_OF_STREAM

End-Of-Stream.

GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED

No memory left.

GST_VAAPI_DECODER_STATUS_ERROR_INIT_FAILED

Decoder initialization failure.

GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_CODEC

Unsupported codec.

GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA

Not enough input data to decode.

GST_VAAPI_DECODER_STATUS_ERROR_NO_SURFACE

No surface left to hold the decoded picture.

GST_VAAPI_DECODER_STATUS_ERROR_INVALID_SURFACE

Invalid surface.

GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN

Unknown error.

GstVaapiDecoder

typedef struct _GstVaapiDecoder GstVaapiDecoder;

A VA decoder base instance.


GstVaapiDecoderClass

typedef struct {
} GstVaapiDecoderClass;

A VA decoder base class.


gst_vaapi_decoder_get_caps ()

GstCaps *           gst_vaapi_decoder_get_caps          (GstVaapiDecoder *decoder);

Retrieves the decoder caps. The deocder owns the returned caps, so use gst_caps_ref() whenever necessary.

decoder :

a GstVaapiDecoder

Returns :

the decoder caps

gst_vaapi_decoder_put_buffer ()

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.

decoder :

a GstVaapiDecoder

buf :

a GstBuffer

Returns :

TRUE on success

gst_vaapi_decoder_get_surface ()

GstVaapiSurfaceProxy * gst_vaapi_decoder_get_surface    (GstVaapiDecoder *decoder,
                                                         GstVaapiDecoderStatus *pstatus);

Flushes encoded buffers to the decoder and returns a decoded surface, if any.

decoder :

a GstVaapiDecoder

pstatus :

return location for the decoder status, or NULL

Returns :

a GstVaapiSurfaceProxy holding the decoded surface, or NULL if none is available (e.g. an error). Caller owns the returned object. g_object_unref() after usage.

Property Details

The "caps" property

  "caps"                     gpointer              : Read / Write / Construct Only

The decoder caps.


The "display" property

  "display"                  GstVaapiDisplay*      : Read / Write / Construct Only

The GstVaapiDisplay this decoder is bound to.