diff options
author | Philip Lorenz <philip@bithub.de> | 2012-09-04 13:40:04 +0200 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2012-09-07 11:54:09 +0200 |
commit | 79b45a43d1f8fe1da67fbe20368a2772fe0e06fd (patch) | |
tree | 062b5993572f66b53dcf798d9475f37d0db6b03c /gst-libs/gst/vaapi | |
parent | eb73aa3061d42144564ad29d92b161174583859b (diff) |
Do not forward declare enums.
Forward declaring enums is not allowed by the C standard and aborts
compilation if the header file is included in a C++ project.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Diffstat (limited to 'gst-libs/gst/vaapi')
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder.h | 5 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder_objects.h | 5 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidisplay.h | 5 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiimageformat.c | 5 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiimageformat.h | 6 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiprofile.h | 16 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapisurface.h | 16 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapitypes.h | 10 |
8 files changed, 26 insertions, 42 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.h b/gst-libs/gst/vaapi/gstvaapidecoder.h index f365b931..deeb6926 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder.h +++ b/gst-libs/gst/vaapi/gstvaapidecoder.h @@ -53,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; @@ -75,7 +74,7 @@ typedef struct _GstVaapiDecoderClass GstVaapiDecoderClass; * * 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, @@ -88,7 +87,7 @@ enum _GstVaapiDecoderStatus { GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_PROFILE, GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_CHROMA_FORMAT, GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN = -1 -}; +} GstVaapiDecoderStatus; /** * GstVaapiDecoder: diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h index f7a7ea69..b95f4e00 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h +++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h @@ -27,7 +27,6 @@ G_BEGIN_DECLS -typedef enum _GstVaapiPictureType GstVaapiPictureType; typedef struct _GstVaapiPicture GstVaapiPicture; typedef struct _GstVaapiPictureClass GstVaapiPictureClass; typedef struct _GstVaapiSlice GstVaapiSlice; @@ -64,7 +63,7 @@ typedef struct _GstVaapiSliceClass GstVaapiSliceClass; GST_VAAPI_TYPE_PICTURE, \ GstVaapiPictureClass)) -enum _GstVaapiPictureType { +typedef enum { GST_VAAPI_PICTURE_TYPE_NONE = 0, // Undefined GST_VAAPI_PICTURE_TYPE_I, // Intra GST_VAAPI_PICTURE_TYPE_P, // Predicted @@ -73,7 +72,7 @@ enum _GstVaapiPictureType { GST_VAAPI_PICTURE_TYPE_SI, // Switching Intra GST_VAAPI_PICTURE_TYPE_SP, // Switching Predicted GST_VAAPI_PICTURE_TYPE_BI, // BI type (VC-1) -}; +} GstVaapiPictureType; /** * Picture flags: diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.h b/gst-libs/gst/vaapi/gstvaapidisplay.h index 56ca042d..d23b0ad9 100644 --- a/gst-libs/gst/vaapi/gstvaapidisplay.h +++ b/gst-libs/gst/vaapi/gstvaapidisplay.h @@ -55,7 +55,6 @@ G_BEGIN_DECLS GST_VAAPI_TYPE_DISPLAY, \ GstVaapiDisplayClass)) -typedef enum _GstVaapiDisplayType GstVaapiDisplayType; typedef struct _GstVaapiDisplayInfo GstVaapiDisplayInfo; typedef struct _GstVaapiDisplay GstVaapiDisplay; typedef struct _GstVaapiDisplayPrivate GstVaapiDisplayPrivate; @@ -69,13 +68,13 @@ typedef struct _GstVaapiDisplayClass GstVaapiDisplayClass; * @GST_VAAPI_DISPLAY_TYPE_WAYLAND: VA/Wayland display. * @GST_VAAPI_DISPLAY_TYPE_DRM: VA/DRM display. */ -enum _GstVaapiDisplayType { +typedef enum { GST_VAAPI_DISPLAY_TYPE_ANY = 0, GST_VAAPI_DISPLAY_TYPE_X11, GST_VAAPI_DISPLAY_TYPE_GLX, GST_VAAPI_DISPLAY_TYPE_WAYLAND, GST_VAAPI_DISPLAY_TYPE_DRM, -}; +} GstVaapiDisplayType; #define GST_VAAPI_TYPE_DISPLAY_TYPE \ (gst_vaapi_display_type_get_type()) diff --git a/gst-libs/gst/vaapi/gstvaapiimageformat.c b/gst-libs/gst/vaapi/gstvaapiimageformat.c index dd031577..d29ef6c2 100644 --- a/gst-libs/gst/vaapi/gstvaapiimageformat.c +++ b/gst-libs/gst/vaapi/gstvaapiimageformat.c @@ -30,14 +30,13 @@ #include "gstvaapicompat.h" #include "gstvaapiimageformat.h" -typedef enum _GstVaapiImageFormatType GstVaapiImageFormatType; typedef struct _GstVaapiImageFormatMap GstVaapiImageFormatMap; -enum _GstVaapiImageFormatType { +typedef enum { GST_VAAPI_IMAGE_FORMAT_TYPE_YCBCR = 1, /* YUV */ GST_VAAPI_IMAGE_FORMAT_TYPE_RGB, /* RGB */ GST_VAAPI_IMAGE_FORMAT_TYPE_INDEXED /* paletted */ -}; +} GstVaapiImageFormatType; struct _GstVaapiImageFormatMap { GstVaapiImageFormatType type; diff --git a/gst-libs/gst/vaapi/gstvaapiimageformat.h b/gst-libs/gst/vaapi/gstvaapiimageformat.h index 56af2a4e..9e1e6627 100644 --- a/gst-libs/gst/vaapi/gstvaapiimageformat.h +++ b/gst-libs/gst/vaapi/gstvaapiimageformat.h @@ -28,8 +28,6 @@ G_BEGIN_DECLS -typedef enum _GstVaapiImageFormat GstVaapiImageFormat; - /** * GstVaapiImageFormat: * @GST_VAAPI_IMAGE_NV12: @@ -51,7 +49,7 @@ typedef enum _GstVaapiImageFormat GstVaapiImageFormat; * * The set of all image formats for #GstVaapiImage. */ -enum _GstVaapiImageFormat { +typedef enum { GST_VAAPI_IMAGE_NV12 = GST_MAKE_FOURCC('N','V','1','2'), GST_VAAPI_IMAGE_YV12 = GST_MAKE_FOURCC('Y','V','1','2'), GST_VAAPI_IMAGE_I420 = GST_MAKE_FOURCC('I','4','2','0'), @@ -60,7 +58,7 @@ enum _GstVaapiImageFormat { GST_VAAPI_IMAGE_RGBA = GST_MAKE_FOURCC('R','G','B','A'), GST_VAAPI_IMAGE_ABGR = GST_MAKE_FOURCC('A','B','G','R'), GST_VAAPI_IMAGE_BGRA = GST_MAKE_FOURCC('B','G','R','A'), -}; +} GstVaapiImageFormat; gboolean gst_vaapi_image_format_is_rgb(GstVaapiImageFormat format); diff --git a/gst-libs/gst/vaapi/gstvaapiprofile.h b/gst-libs/gst/vaapi/gstvaapiprofile.h index 986c9a26..f742e134 100644 --- a/gst-libs/gst/vaapi/gstvaapiprofile.h +++ b/gst-libs/gst/vaapi/gstvaapiprofile.h @@ -26,10 +26,6 @@ G_BEGIN_DECLS -typedef enum _GstVaapiCodec GstVaapiCodec; -typedef enum _GstVaapiProfile GstVaapiProfile; -typedef enum _GstVaapiEntrypoint GstVaapiEntrypoint; - /** * GstVaapiCodec: * @GST_VAAPI_CODEC_MPEG1: MPEG-1 (ISO/IEC 11172) @@ -42,7 +38,7 @@ typedef enum _GstVaapiEntrypoint GstVaapiEntrypoint; * * The set of all codecs for #GstVaapiCodec. */ -enum _GstVaapiCodec { +typedef enum { GST_VAAPI_CODEC_MPEG1 = GST_MAKE_FOURCC('M','P','1',0), GST_VAAPI_CODEC_MPEG2 = GST_MAKE_FOURCC('M','P','2',0), GST_VAAPI_CODEC_MPEG4 = GST_MAKE_FOURCC('M','P','4',0), @@ -51,7 +47,7 @@ enum _GstVaapiCodec { GST_VAAPI_CODEC_WMV3 = GST_MAKE_FOURCC('W','M','V',0), GST_VAAPI_CODEC_VC1 = GST_MAKE_FOURCC('V','C','1',0), GST_VAAPI_CODEC_JPEG = GST_MAKE_FOURCC('J','P','G',0), -}; +} GstVaapiCodec; /** * GST_VAAPI_MAKE_PROFILE: @@ -99,7 +95,7 @@ enum _GstVaapiCodec { * * The set of all profiles for #GstVaapiProfile. */ -enum _GstVaapiProfile { +typedef enum { GST_VAAPI_PROFILE_UNKNOWN = 0, GST_VAAPI_PROFILE_MPEG1 = GST_VAAPI_MAKE_PROFILE(MPEG1,1), GST_VAAPI_PROFILE_MPEG2_SIMPLE = GST_VAAPI_MAKE_PROFILE(MPEG2,1), @@ -116,7 +112,7 @@ enum _GstVaapiProfile { GST_VAAPI_PROFILE_VC1_MAIN = GST_VAAPI_MAKE_PROFILE(VC1,2), GST_VAAPI_PROFILE_VC1_ADVANCED = GST_VAAPI_MAKE_PROFILE(VC1,3), GST_VAAPI_PROFILE_JPEG_BASELINE = GST_VAAPI_MAKE_PROFILE(JPEG,1), -}; +} GstVaapiProfile; /** * GstVaapiEntrypoint: @@ -127,12 +123,12 @@ enum _GstVaapiProfile { * * The set of all entrypoints for #GstVaapiEntrypoint */ -enum _GstVaapiEntrypoint { +typedef enum { GST_VAAPI_ENTRYPOINT_VLD = 1, GST_VAAPI_ENTRYPOINT_IDCT, GST_VAAPI_ENTRYPOINT_MOCO, GST_VAAPI_ENTRYPOINT_SLICE_ENCODE -}; +} GstVaapiEntrypoint; GstVaapiProfile gst_vaapi_profile(VAProfile profile); diff --git a/gst-libs/gst/vaapi/gstvaapisurface.h b/gst-libs/gst/vaapi/gstvaapisurface.h index 9f51caa3..4b8aaeac 100644 --- a/gst-libs/gst/vaapi/gstvaapisurface.h +++ b/gst-libs/gst/vaapi/gstvaapisurface.h @@ -32,10 +32,6 @@ G_BEGIN_DECLS -typedef enum _GstVaapiChromaType GstVaapiChromaType; -typedef enum _GstVaapiSurfaceStatus GstVaapiSurfaceStatus; -typedef enum _GstVaapiSurfaceRenderFlags GstVaapiSurfaceRenderFlags; - /** * GST_VAAPI_SURFACE_CAPS_NAME: * @@ -64,11 +60,11 @@ typedef enum _GstVaapiSurfaceRenderFlags GstVaapiSurfaceRenderFlags; * * The set of all chroma types for #GstVaapiSurface. */ -enum _GstVaapiChromaType { +typedef enum { GST_VAAPI_CHROMA_TYPE_YUV420 = 1, GST_VAAPI_CHROMA_TYPE_YUV422, GST_VAAPI_CHROMA_TYPE_YUV444 -}; +} GstVaapiChromaType; /** * GstVaapiSurfaceStatus: @@ -83,12 +79,12 @@ enum _GstVaapiChromaType { * * The set of all surface status for #GstVaapiSurface. */ -enum _GstVaapiSurfaceStatus { +typedef enum { GST_VAAPI_SURFACE_STATUS_IDLE = 1 << 0, GST_VAAPI_SURFACE_STATUS_RENDERING = 1 << 1, GST_VAAPI_SURFACE_STATUS_DISPLAYING = 1 << 2, GST_VAAPI_SURFACE_STATUS_SKIPPED = 1 << 3 -}; +} GstVaapiSurfaceStatus; /** * GstVaapiSurfaceRenderFlags @@ -105,7 +101,7 @@ enum _GstVaapiSurfaceStatus { * * The set of all render flags for gst_vaapi_window_put_surface(). */ -enum _GstVaapiSurfaceRenderFlags { +typedef enum { GST_VAAPI_PICTURE_STRUCTURE_TOP_FIELD = 1 << 0, GST_VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD = 1 << 1, GST_VAAPI_PICTURE_STRUCTURE_FRAME = @@ -115,7 +111,7 @@ enum _GstVaapiSurfaceRenderFlags { ), GST_VAAPI_COLOR_STANDARD_ITUR_BT_601 = 1 << 2, GST_VAAPI_COLOR_STANDARD_ITUR_BT_709 = 1 << 3, -}; +} GstVaapiSurfaceRenderFlags; #define GST_VAAPI_TYPE_SURFACE \ (gst_vaapi_surface_get_type()) diff --git a/gst-libs/gst/vaapi/gstvaapitypes.h b/gst-libs/gst/vaapi/gstvaapitypes.h index ff5f9eb9..1ca4dd72 100644 --- a/gst-libs/gst/vaapi/gstvaapitypes.h +++ b/gst-libs/gst/vaapi/gstvaapitypes.h @@ -129,11 +129,10 @@ struct _GstVaapiRectangle { * backing store, or back buffer of a frame buffer, and is free to * be re-used right away for decoding. */ -typedef enum _GstVaapiRenderMode GstVaapiRenderMode; -enum _GstVaapiRenderMode { +typedef enum { GST_VAAPI_RENDER_MODE_OVERLAY = 1, GST_VAAPI_RENDER_MODE_TEXTURE -}; +} GstVaapiRenderMode; /** * GstVaapiRotation: @@ -142,13 +141,12 @@ enum _GstVaapiRenderMode { * @GST_VAAPI_ROTATION_180: the VA display is rotated by 180°, clockwise. * @GST_VAAPI_ROTATION_270: the VA display is rotated by 270°, clockwise. */ -typedef enum _GstVaapiRotation GstVaapiRotation; -enum _GstVaapiRotation { +typedef enum { GST_VAAPI_ROTATION_0 = 0, GST_VAAPI_ROTATION_90 = 90, GST_VAAPI_ROTATION_180 = 180, GST_VAAPI_ROTATION_270 = 270, -}; +} GstVaapiRotation; G_END_DECLS |