/*
* gstvaapidecoder.h - VA decoder abstraction
*
- * gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
+ * Copyright (C) 2010-2011 Splitted-Desktop Systems
+ * Copyright (C) 2011 Intel Corporation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
GST_VAAPI_TYPE_DECODER, \
GstVaapiDecoderClass))
-typedef enum _GstVaapiDecoderStatus GstVaapiDecoderStatus;
typedef struct _GstVaapiDecoder GstVaapiDecoder;
typedef struct _GstVaapiDecoderPrivate GstVaapiDecoderPrivate;
typedef struct _GstVaapiDecoderClass GstVaapiDecoderClass;
* @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_BITSTREAM_PARSER: Invalid or unsupported bitstream data.
+ * @GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_PROFILE: Unsupported codec profile.
+ * @GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_CHROMA_FORMAT: Unsupported chroma format.
* @GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN: Unknown error.
*
* Decoder status for gst_vaapi_decoder_get_surface().
*/
-enum _GstVaapiDecoderStatus {
+typedef enum {
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_NO_DATA,
GST_VAAPI_DECODER_STATUS_ERROR_NO_SURFACE,
GST_VAAPI_DECODER_STATUS_ERROR_INVALID_SURFACE,
+ GST_VAAPI_DECODER_STATUS_ERROR_BITSTREAM_PARSER,
+ GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_PROFILE,
+ GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_CHROMA_FORMAT,
GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN = -1
-};
+} GstVaapiDecoderStatus;
/**
* GstVaapiDecoder:
GObjectClass parent_class;
GstVaapiDecoderStatus (*decode)(GstVaapiDecoder *decoder, GstBuffer *buffer);
+ void (*clear_buffer)(GstVaapiDecoder *decoder);
};
GType
-gst_vaapi_decoder_get_type(void);
+gst_vaapi_decoder_get_type(void) G_GNUC_CONST;
+
+GstVaapiCodec
+gst_vaapi_decoder_get_codec(GstVaapiDecoder *decoder);
GstCaps *
gst_vaapi_decoder_get_caps(GstVaapiDecoder *decoder);
GstVaapiSurfaceProxy *
gst_vaapi_decoder_get_surface(
GstVaapiDecoder *decoder,
- GstVaapiDecoderStatus *pstatus
+ GstVaapiDecoderStatus *pstatus,
+ gboolean try_again
);
+void
+gst_vaapi_decoder_clear_buffer(GstVaapiDecoder *decoder);
+
G_END_DECLS
#endif /* GST_VAAPI_DECODER_H */