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 15:03:35 +0200 |
commit | 94ee10e5476a0b21cca586aac0472aeefe99dd97 (patch) | |
tree | d51783447a0fe3ca374ee2ee13adec8d1a7d7ee8 | |
parent | 5b41a10ef31a19b1fa46745af95771a91ed1ff9a (diff) | |
download | gst-vaapi-94ee10e5476a0b21cca586aac0472aeefe99dd97.tar.gz |
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>
-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/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 | 5 | ||||
-rw-r--r-- | gst/vaapi/gstvaapipostproc.h | 11 |
8 files changed, 26 insertions, 43 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/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 241051f8..3845be98 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; G_END_DECLS diff --git a/gst/vaapi/gstvaapipostproc.h b/gst/vaapi/gstvaapipostproc.h index 6ec56d1c..4ad4f705 100644 --- a/gst/vaapi/gstvaapipostproc.h +++ b/gst/vaapi/gstvaapipostproc.h @@ -57,20 +57,17 @@ G_BEGIN_DECLS typedef struct _GstVaapiPostproc GstVaapiPostproc; typedef struct _GstVaapiPostprocClass GstVaapiPostprocClass; -typedef enum _GstVaapiDeinterlaceMode GstVaapiDeinterlaceMode; -typedef enum _GstVaapiDeinterlaceMethod GstVaapiDeinterlaceMethod; - /** * GstVaapiDeinterlaceMode: * @GST_VAAPI_DEINTERLACE_MODE_AUTO: Auto detect needs for deinterlacing. * @GST_VAAPI_DEINTERLACE_MODE_INTERLACED: Force deinterlacing. * @GST_VAAPI_DEINTERLACE_MODE_DISABLED: Never perform deinterlacing. */ -enum _GstVaapiDeinterlaceMode { +typedef enum { GST_VAAPI_DEINTERLACE_MODE_AUTO = 0, GST_VAAPI_DEINTERLACE_MODE_INTERLACED, GST_VAAPI_DEINTERLACE_MODE_DISABLED, -}; +} GstVaapiDeinterlaceMode; /** * GstVaapiDeinterlaceMethod: @@ -79,12 +76,12 @@ enum _GstVaapiDeinterlaceMode { * @GST_VAAPI_DEINTERLACE_METHOD_MOTION_ADAPTIVE: Motion adaptive deinterlacing algorithm. * @GST_VAAPI_DEINTERLACE_METHOD_MOTION_COMPENSATED: Motion compensated deinterlacing algorithm. */ -enum _GstVaapiDeinterlaceMethod { +typedef enum { GST_VAAPI_DEINTERLACE_METHOD_BOB = 1, GST_VAAPI_DEINTERLACE_METHOD_WEAVE, GST_VAAPI_DEINTERLACE_METHOD_MOTION_ADAPTIVE, GST_VAAPI_DEINTERLACE_METHOD_MOTION_COMPENSATED, -}; +} GstVaapiDeinterlaceMethod; struct _GstVaapiPostproc { /*< private >*/ |