Fix seek issue
[profile/ivi/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapidecoder.h
old mode 100644 (file)
new mode 100755 (executable)
index f7210d3..0ebb92b
@@ -1,7 +1,8 @@
 /*
  *  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
@@ -52,7 +53,6 @@ G_BEGIN_DECLS
                                GST_VAAPI_TYPE_DECODER,  \
                                GstVaapiDecoderClass))
 
-typedef enum _GstVaapiDecoderStatus             GstVaapiDecoderStatus;
 typedef struct _GstVaapiDecoder                 GstVaapiDecoder;
 typedef struct _GstVaapiDecoderPrivate          GstVaapiDecoderPrivate;
 typedef struct _GstVaapiDecoderClass            GstVaapiDecoderClass;
@@ -67,11 +67,14 @@ 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,
@@ -80,8 +83,11 @@ enum _GstVaapiDecoderStatus {
     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:
@@ -105,10 +111,14 @@ struct _GstVaapiDecoderClass {
     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);
@@ -119,9 +129,13 @@ gst_vaapi_decoder_put_buffer(GstVaapiDecoder *decoder, GstBuffer *buf);
 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 */