From 9e08343d5c74abec401e68c3b622b314afc4c62b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 23 Jul 2012 13:58:07 +0200 Subject: [PATCH] video-frame: add macros to get frame flags --- gst-libs/gst/video/video-frame.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst-libs/gst/video/video-frame.h b/gst-libs/gst/video/video-frame.h index e65e9fd098..ec27b8f59d 100644 --- a/gst-libs/gst/video/video-frame.h +++ b/gst-libs/gst/video/video-frame.h @@ -89,6 +89,14 @@ gboolean gst_video_frame_copy_plane (GstVideoFrame *dest, const GstVideoFr #define GST_VIDEO_FRAME_HEIGHT(f) (GST_VIDEO_INFO_HEIGHT(&(f)->info)) #define GST_VIDEO_FRAME_SIZE(f) (GST_VIDEO_INFO_SIZE(&(f)->info)) +/* flags */ +#define GST_VIDEO_FRAME_FLAGS(f) ((f)->flags) +#define GST_VIDEO_FRAME_FLAG_IS_SET(f,fl) ((GST_VIDEO_FRAME_FLAGS(f) & (fl)) == (fl)) +#define GST_VIDEO_FRAME_IS_INTERLACED(f) (GST_VIDEO_FRAME_FLAG_IS_SET(f, GST_VIDEO_FRAME_FLAG_INTERLACED) +#define GST_VIDEO_FRAME_IS_TFF(f) (GST_VIDEO_FRAME_FLAG_IS_SET(f, GST_VIDEO_FRAME_FLAG_TFF) +#define GST_VIDEO_FRAME_IS_RFF(f) (GST_VIDEO_FRAME_FLAG_IS_SET(f, GST_VIDEO_FRAME_FLAG_RFF) +#define GST_VIDEO_FRAME_IS_ONEFIELD(f) (GST_VIDEO_FRAME_FLAG_IS_SET(f, GST_VIDEO_FRAME_FLAG_ONEFIELD) + /* dealing with planes */ #define GST_VIDEO_FRAME_N_PLANES(f) (GST_VIDEO_INFO_N_PLANES(&(f)->info)) #define GST_VIDEO_FRAME_PLANE_DATA(f,p) ((f)->data[p])