summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapidecoder_unit.h
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-01-07 14:04:22 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-01-07 14:11:39 +0100
commit8c403c2d98310aec59893f41c4c966dc4b176e2f (patch)
treed1e7cb2c81f1c8bbe6994d372130cc87b166055c /gst-libs/gst/vaapi/gstvaapidecoder_unit.h
parenta486d1af667e93e299b35b83625d49ee12575a90 (diff)
downloadgst-vaapi-8c403c2d98310aec59893f41c4c966dc4b176e2f.tar.gz
decoder: decoder units are no longer dynamically allocated objects.
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapidecoder_unit.h')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_unit.h57
1 files changed, 39 insertions, 18 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_unit.h b/gst-libs/gst/vaapi/gstvaapidecoder_unit.h
index 9842afb8..2c10129f 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_unit.h
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_unit.h
@@ -23,7 +23,6 @@
#define GST_VAAPI_DECODER_UNIT_H
#include <gst/gstbuffer.h>
-#include <gst/vaapi/gstvaapiminiobject.h>
G_BEGIN_DECLS
@@ -54,10 +53,44 @@ typedef enum {
GST_VAAPI_DECODER_UNIT_FLAG_LAST = (1 << 5)
} GstVaapiDecoderUnitFlags;
-#define GST_VAAPI_DECODER_UNIT_FLAGS GST_VAAPI_MINI_OBJECT_FLAGS
-#define GST_VAAPI_DECODER_UNIT_FLAG_IS_SET GST_VAAPI_MINI_OBJECT_FLAG_IS_SET
-#define GST_VAAPI_DECODER_UNIT_FLAG_SET GST_VAAPI_MINI_OBJECT_FLAG_SET
-#define GST_VAAPI_DECODER_UNIT_FLAG_UNSET GST_VAAPI_MINI_OBJECT_FLAG_UNSET
+/**
+ * GST_VAAPI_DECODER_UNIT_FLAGS:
+ * @unit: a #GstVaapiDecoderUnit
+ *
+ * The entire set of flags for the @unit
+ */
+#define GST_VAAPI_DECODER_UNIT_FLAGS(unit) \
+ ((unit)->flags)
+
+/**
+ * GST_VAAPI_DECODER_UNIT_FLAG_IS_SET:
+ * @unit: a #GstVaapiDecoderUnit
+ * @flag: a flag to check for
+ *
+ * Checks whether the given @flag is set
+ */
+#define GST_VAAPI_DECODER_UNIT_FLAG_IS_SET(unit, flag) \
+ ((GST_VAAPI_DECODER_UNIT_FLAGS(unit) & (flag)) != 0)
+
+/**
+ * GST_VAAPI_DECODER_UNIT_FLAG_SET:
+ * @unit: a #GstVaapiDecoderUnit
+ * @flags: flags to set
+ *
+ * This macro sets the given bits
+ */
+#define GST_VAAPI_DECODER_UNIT_FLAG_SET(unit, flags) \
+ (GST_VAAPI_DECODER_UNIT_FLAGS(unit) |= (flags))
+
+/**
+ * GST_VAAPI_DECODER_UNIT_FLAG_UNSET:
+ * @unit: a #GstVaapiDecoderUnit
+ * @flags: flags to unset
+ *
+ * This macro unsets the given bits.
+ */
+#define GST_VAAPI_DECODER_UNIT_FLAG_UNSET(unit, flags) \
+ (GST_VAAPI_DECODER_UNIT_FLAGS(unit) &= ~(flags))
/**
* GST_VAAPI_DECODER_UNIT_IS_FRAME_START:
@@ -129,9 +162,7 @@ typedef enum {
* A chunk of bitstream data that was parsed.
*/
struct _GstVaapiDecoderUnit {
- /*< private >*/
- GstVaapiMiniObject parent_instance;
-
+ guint flags;
guint size;
guint offset;
GstBuffer *buffer;
@@ -160,16 +191,6 @@ void
gst_vaapi_decoder_unit_set_parsed_info(GstVaapiDecoderUnit *unit,
gpointer parsed_info, GDestroyNotify destroy_notify);
-#define gst_vaapi_decoder_unit_ref(unit) \
- gst_vaapi_mini_object_ref(GST_VAAPI_MINI_OBJECT(unit))
-
-#define gst_vaapi_decoder_unit_unref(unit) \
- gst_vaapi_mini_object_unref(GST_VAAPI_MINI_OBJECT(unit))
-
-#define gst_vaapi_decoder_unit_replace(old_unit_p, new_unit) \
- gst_vaapi_mini_object_replace((GstVaapiMiniObject **)(old_unit_p), \
- (GstVaapiMiniObject *)(new_unit))
-
G_END_DECLS
#endif /* GST_VAAPI_DECODER_UNIT_H */