mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 11:40:38 +00:00
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>
This commit is contained in:
parent
eb73aa3061
commit
79b45a43d1
9 changed files with 30 additions and 49 deletions
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 >*/
|
||||
|
|
Loading…
Reference in a new issue