From f270838515e8a82772454fcf2ac755399532b7c6 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Thu, 4 Dec 2014 14:36:35 +0100 Subject: [PATCH] libs: re-introduce a GST_VAAPI_ID_INVALID value. Re-introduce a GST_VAAPI_ID_INVALID value that represents a non-zero and invalid id. This is useful to have a value that is still invalid for cases where zero could actually be a valid value. --- gst-libs/gst/vaapi/gstvaapitypes.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gst-libs/gst/vaapi/gstvaapitypes.h b/gst-libs/gst/vaapi/gstvaapitypes.h index ccdddbfa06..9cc646f57e 100644 --- a/gst-libs/gst/vaapi/gstvaapitypes.h +++ b/gst-libs/gst/vaapi/gstvaapitypes.h @@ -37,6 +37,21 @@ G_BEGIN_DECLS */ typedef gsize GstVaapiID; +/** + * GST_VAAPI_ID: + * @id: an arbitrary integer value + * + * Macro that creates a #GstVaapiID from @id. + */ +#define GST_VAAPI_ID(id) ((GstVaapiID)(id)) + +/** + * GST_VAAPI_ID_INVALID: + * + * Macro that evaluates to an invalid #GstVaapiID value. + */ +#define GST_VAAPI_ID_INVALID GST_VAAPI_ID((gssize)(gint32)-1) + /** * GST_VAAPI_ID_FORMAT: *