mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
rpicamsrc: meson: use gnome.glib_mkenums_simple() and fix build as Meson subproject
While at it also fix up the type defines, e.g. GST_RPI_CAM_TYPE_RPI_CAM_SRC_EXPOSURE_MODE -> GST_RPI_CAM_SRC_TYPE_EXPOSURE_MODE
This commit is contained in:
parent
912ea0dceb
commit
1c25fe131d
2 changed files with 14 additions and 22 deletions
|
@ -375,21 +375,21 @@ gst_rpi_cam_src_class_init (GstRpiCamSrcClass * klass)
|
|||
g_object_class_install_property (gobject_class, PROP_EXPOSURE_MODE,
|
||||
g_param_spec_enum ("exposure-mode", "Exposure Mode",
|
||||
"Camera exposure mode to use",
|
||||
GST_RPI_CAM_TYPE_RPI_CAM_SRC_EXPOSURE_MODE, EXPOSURE_MODE_DEFAULT,
|
||||
GST_RPI_CAM_SRC_TYPE_EXPOSURE_MODE, EXPOSURE_MODE_DEFAULT,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_EXPOSURE_METERING_MODE,
|
||||
g_param_spec_enum ("metering-mode", "Exposure Metering Mode",
|
||||
"Camera exposure metering mode to use",
|
||||
GST_RPI_CAM_TYPE_RPI_CAM_SRC_EXPOSURE_METERING_MODE,
|
||||
GST_RPI_CAM_SRC_TYPE_EXPOSURE_METERING_MODE,
|
||||
EXPOSURE_METERING_MODE_DEFAULT,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_DRC,
|
||||
g_param_spec_enum ("drc", "DRC level", "Dynamic Range Control level",
|
||||
GST_RPI_CAM_TYPE_RPI_CAM_SRC_DRC_LEVEL, GST_RPI_CAM_SRC_DRC_LEVEL_OFF,
|
||||
GST_RPI_CAM_SRC_TYPE_DRC_LEVEL, GST_RPI_CAM_SRC_DRC_LEVEL_OFF,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_AWB_MODE,
|
||||
g_param_spec_enum ("awb-mode", "Automatic White Balance Mode",
|
||||
"White Balance mode", GST_RPI_CAM_TYPE_RPI_CAM_SRC_AWB_MODE,
|
||||
"White Balance mode", GST_RPI_CAM_SRC_TYPE_AWB_MODE,
|
||||
GST_RPI_CAM_SRC_AWB_MODE_AUTO,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_AWB_GAIN_RED,
|
||||
|
@ -403,7 +403,7 @@ gst_rpi_cam_src_class_init (GstRpiCamSrcClass * klass)
|
|||
g_object_class_install_property (gobject_class, PROP_IMAGE_EFFECT,
|
||||
g_param_spec_enum ("image-effect", "Image effect",
|
||||
"Visual FX to apply to the image",
|
||||
GST_RPI_CAM_TYPE_RPI_CAM_SRC_IMAGE_EFFECT,
|
||||
GST_RPI_CAM_SRC_TYPE_IMAGE_EFFECT,
|
||||
GST_RPI_CAM_SRC_IMAGEFX_NONE,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
#if 0
|
||||
|
@ -461,7 +461,7 @@ gst_rpi_cam_src_class_init (GstRpiCamSrcClass * klass)
|
|||
g_object_class_install_property (gobject_class, PROP_ANNOTATION_MODE,
|
||||
g_param_spec_flags ("annotation-mode", "Annotation Mode",
|
||||
"Flags to control annotation of the output video",
|
||||
GST_RPI_CAM_TYPE_RPI_CAM_SRC_ANNOTATION_MODE, 0,
|
||||
GST_RPI_CAM_SRC_TYPE_ANNOTATION_MODE, 0,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_ANNOTATION_TEXT,
|
||||
g_param_spec_string ("annotation-text", "Annotation Text",
|
||||
|
@ -470,7 +470,7 @@ gst_rpi_cam_src_class_init (GstRpiCamSrcClass * klass)
|
|||
g_object_class_install_property (gobject_class, PROP_INTRA_REFRESH_TYPE,
|
||||
g_param_spec_enum ("intra-refresh-type", "Intra Refresh Type",
|
||||
"Type of Intra Refresh to use, -1 to disable intra refresh",
|
||||
GST_RPI_CAM_TYPE_RPI_CAM_SRC_INTRA_REFRESH_TYPE,
|
||||
GST_RPI_CAM_SRC_TYPE_INTRA_REFRESH_TYPE,
|
||||
GST_RPI_CAM_SRC_INTRA_REFRESH_TYPE_NONE,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_ANNOTATION_TEXT_SIZE,
|
||||
|
|
|
@ -7,24 +7,16 @@ rpicamsrc_sources = [
|
|||
'RaspiCLI.c',
|
||||
]
|
||||
|
||||
# This can be simplified once meson gets native support for glib-mkenums (soon)
|
||||
glib_mkenums = find_program('glib-mkenums')
|
||||
# glib-mkenums
|
||||
gnome = import('gnome')
|
||||
|
||||
gstrpicam_enum_types_h = custom_target('gstrpicam-enum-types.h',
|
||||
output : 'gstrpicam-enum-types.h',
|
||||
input : files('gstrpicam_types.h'),
|
||||
command : [glib_mkenums, '--template', meson.current_source_dir() + '/gstrpicam-enums-template.h', '@INPUT@'],
|
||||
capture : true)
|
||||
|
||||
gstrpicam_enum_types_c = custom_target('gstrpicam-enum-types.c',
|
||||
output : 'gstrpicam-enum-types.c',
|
||||
input : files('gstrpicam_types.h'),
|
||||
depends : [gstrpicam_enum_types_h],
|
||||
command : [glib_mkenums, '--template', meson.current_source_dir() + '/gstrpicam-enums-template.c', '@INPUT@'],
|
||||
capture : true)
|
||||
enums = gnome.mkenums_simple('gstrpicam-enum-types',
|
||||
sources: 'gstrpicam_types.h',
|
||||
identifier_prefix: 'GstRpiCamSrc',
|
||||
symbol_prefix: 'gst_rpi_cam_src')
|
||||
|
||||
library('gstrpicamsrc',
|
||||
rpicamsrc_sources, gstrpicam_enum_types_h, gstrpicam_enum_types_c,
|
||||
rpicamsrc_sources, enums,
|
||||
c_args : gst_rpicamsrc_args,
|
||||
include_directories : config_inc,
|
||||
dependencies : [gst_dep, gstbase_dep, gstvideo_dep] + mmal_deps,
|
||||
|
|
Loading…
Reference in a new issue