From 124cd8a3d39c8a597f19a57cdf0a98cb82811214 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Thu, 23 Feb 2012 16:23:27 +0100 Subject: [PATCH] decoder: add picture structure flags. --- gst-libs/gst/vaapi/gstvaapidecoder_objects.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h index 6bdfe2cb5c..6566fec047 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h +++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h @@ -79,6 +79,8 @@ enum _GstVaapiPictureType { * Picture flags: * @GST_VAAPI_PICTURE_FLAG_SKIPPED: skipped frame * @GST_VAAPI_PICTURE_FLAG_REFERENCE: reference frame + * @GST_VAAPI_PICTURE_FLAG_BOTTOM_FIELD: bottom field + * @GST_VAAPI_PICTURE_FLAG_TOP_FIELD: top field * @GST_VAAPI_PICTURE_FLAG_LAST: first flag that can be used by subclasses * * Enum values used for #GstVaapiPicture flags. @@ -86,9 +88,15 @@ enum _GstVaapiPictureType { enum { GST_VAAPI_PICTURE_FLAG_SKIPPED = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 0), GST_VAAPI_PICTURE_FLAG_REFERENCE = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 1), - GST_VAAPI_PICTURE_FLAG_LAST = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 2), + GST_VAAPI_PICTURE_FLAG_BOTTOM_FIELD = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 2), + GST_VAAPI_PICTURE_FLAG_TOP_FIELD = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 3), + GST_VAAPI_PICTURE_FLAG_LAST = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 4), + + GST_VAAPI_PICTURE_MASK_STRUCTURE = (GST_VAAPI_PICTURE_FLAG_TOP_FIELD | + GST_VAAPI_PICTURE_FLAG_BOTTOM_FIELD) }; +#define GST_VAAPI_PICTURE_FLAGS GST_MINI_OBJECT_FLAGS #define GST_VAAPI_PICTURE_FLAG_IS_SET GST_MINI_OBJECT_FLAG_IS_SET #define GST_VAAPI_PICTURE_FLAG_SET GST_MINI_OBJECT_FLAG_SET #define GST_VAAPI_PICTURE_FLAG_UNSET GST_MINI_OBJECT_FLAG_UNSET @@ -96,6 +104,15 @@ enum { #define GST_VAAPI_PICTURE_IS_REFERENCE(picture) \ GST_VAAPI_PICTURE_FLAG_IS_SET(picture, GST_VAAPI_PICTURE_FLAG_REFERENCE) +#define GST_VAAPI_PICTURE_IS_TOP_FIELD(picture) \ + GST_VAAPI_PICTURE_FLAG_IS_SET(picture, GST_VAAPI_PICTURE_FLAG_TOP_FIELD) + +#define GST_VAAPI_PICTURE_IS_BOTTOM_FIELD(picture) \ + GST_VAAPI_PICTURE_FLAG_IS_SET(picture, GST_VAAPI_PICTURE_FLAG_BOTTOM_FIELD) + +#define GST_VAAPI_PICTURE_IS_FRAME(picture) \ + ((GST_VAAPI_PICTURE_FLAGS(picture) & GST_VAAPI_PICTURE_MASK_STRUCTURE) == 0) + /** * GstVaapiPicture: * -- 2.34.1