camerabin: photography: Spring G_PARAM_STATIC_STRINGS

Sprinkle some G_PARAM_STATIC_STRINGS over the properties
in GstPhotography interface and in camerabin
This commit is contained in:
Thiago Santos 2010-04-13 15:59:04 -03:00
parent 55d98ef488
commit a72774c5f8
2 changed files with 42 additions and 31 deletions

View file

@ -484,7 +484,8 @@ gst_photography_iface_class_init (gpointer g_class)
"White balance mode property", "White balance mode property",
"White balance affects the color temperature of the photo", "White balance affects the color temperature of the photo",
GST_TYPE_WHITE_BALANCE_MODE, GST_TYPE_WHITE_BALANCE_MODE,
GST_PHOTOGRAPHY_WB_MODE_AUTO, G_PARAM_READWRITE)); GST_PHOTOGRAPHY_WB_MODE_AUTO,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* Colour tone */ /* Colour tone */
g_object_interface_install_property (g_class, g_object_interface_install_property (g_class,
@ -492,7 +493,8 @@ gst_photography_iface_class_init (gpointer g_class)
"Colour tone mode property", "Colour tone mode property",
"Colour tone setting changes colour shading in the photo", "Colour tone setting changes colour shading in the photo",
GST_TYPE_COLOUR_TONE_MODE, GST_TYPE_COLOUR_TONE_MODE,
GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NORMAL, G_PARAM_READWRITE)); GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NORMAL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* Scene mode */ /* Scene mode */
g_object_interface_install_property (g_class, g_object_interface_install_property (g_class,
@ -500,7 +502,8 @@ gst_photography_iface_class_init (gpointer g_class)
"Scene mode property", "Scene mode property",
"Scene mode works as a preset for different photo shooting mode settings", "Scene mode works as a preset for different photo shooting mode settings",
GST_TYPE_SCENE_MODE, GST_TYPE_SCENE_MODE,
GST_PHOTOGRAPHY_SCENE_MODE_AUTO, G_PARAM_READWRITE)); GST_PHOTOGRAPHY_SCENE_MODE_AUTO,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* Flash mode */ /* Flash mode */
g_object_interface_install_property (g_class, g_object_interface_install_property (g_class,
@ -508,7 +511,8 @@ gst_photography_iface_class_init (gpointer g_class)
"Flash mode property", "Flash mode property",
"Flash mode defines how the flash light should be used", "Flash mode defines how the flash light should be used",
GST_TYPE_FLASH_MODE, GST_TYPE_FLASH_MODE,
GST_PHOTOGRAPHY_FLASH_MODE_AUTO, G_PARAM_READWRITE)); GST_PHOTOGRAPHY_FLASH_MODE_AUTO,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* Flicker reduction mode */ /* Flicker reduction mode */
g_object_interface_install_property (g_class, g_object_interface_install_property (g_class,
@ -516,7 +520,8 @@ gst_photography_iface_class_init (gpointer g_class)
"Flicker reduction mode property", "Flicker reduction mode property",
"Flicker reduction mode defines a line frequency for flickering prevention", "Flicker reduction mode defines a line frequency for flickering prevention",
GST_TYPE_FLICKER_REDUCTION_MODE, GST_TYPE_FLICKER_REDUCTION_MODE,
GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF, G_PARAM_READWRITE)); GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* Focus mode */ /* Focus mode */
g_object_interface_install_property (g_class, g_object_interface_install_property (g_class,
@ -524,47 +529,48 @@ gst_photography_iface_class_init (gpointer g_class)
"Focus mode property", "Focus mode property",
"Focus mode defines the range of focal lengths to use in autofocus search", "Focus mode defines the range of focal lengths to use in autofocus search",
GST_TYPE_FOCUS_MODE, GST_TYPE_FOCUS_MODE,
GST_PHOTOGRAPHY_FOCUS_MODE_AUTO, G_PARAM_READWRITE)); GST_PHOTOGRAPHY_FOCUS_MODE_AUTO,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* Capabilities */ /* Capabilities */
g_object_interface_install_property (g_class, g_object_interface_install_property (g_class,
g_param_spec_ulong (GST_PHOTOGRAPHY_PROP_CAPABILITIES, g_param_spec_ulong (GST_PHOTOGRAPHY_PROP_CAPABILITIES,
"Photo capabilities bitmask", "Photo capabilities bitmask",
"Tells the photo capabilities of the device", "Tells the photo capabilities of the device",
0, G_MAXULONG, 0, G_PARAM_READABLE)); 0, G_MAXULONG, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/* EV_compensation */ /* EV_compensation */
g_object_interface_install_property (g_class, g_object_interface_install_property (g_class,
g_param_spec_float (GST_PHOTOGRAPHY_PROP_EV_COMP, g_param_spec_float (GST_PHOTOGRAPHY_PROP_EV_COMP,
"EV compensation property", "EV compensation property",
"EV compensation affects the brightness of the image", "EV compensation affects the brightness of the image",
-2.5, 2.5, 0, G_PARAM_READWRITE)); -2.5, 2.5, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* ISO value */ /* ISO value */
g_object_interface_install_property (g_class, g_object_interface_install_property (g_class,
g_param_spec_uint (GST_PHOTOGRAPHY_PROP_ISO_SPEED, g_param_spec_uint (GST_PHOTOGRAPHY_PROP_ISO_SPEED,
"ISO speed property", "ISO speed property",
"ISO speed defines the light sensitivity (0 = auto)", "ISO speed defines the light sensitivity (0 = auto)",
0, 6400, 0, G_PARAM_READWRITE)); 0, 6400, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* Aperture */ /* Aperture */
g_object_interface_install_property (g_class, g_object_interface_install_property (g_class,
g_param_spec_uint (GST_PHOTOGRAPHY_PROP_APERTURE, g_param_spec_uint (GST_PHOTOGRAPHY_PROP_APERTURE,
"Aperture property", "Aperture property",
"Aperture defines the size of lens opening (0 = auto)", "Aperture defines the size of lens opening (0 = auto)",
0, G_MAXUINT8, 0, G_PARAM_READWRITE)); 0, G_MAXUINT8, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* Exposure */ /* Exposure */
g_object_interface_install_property (g_class, g_object_interface_install_property (g_class,
g_param_spec_uint (GST_PHOTOGRAPHY_PROP_EXPOSURE, g_param_spec_uint (GST_PHOTOGRAPHY_PROP_EXPOSURE,
"Exposure time in milliseconds", "Exposure time in milliseconds",
"Exposure time defines how long the shutter will stay open (0 = auto)", "Exposure time defines how long the shutter will stay open (0 = auto)",
0, G_MAXUINT32, 0, G_PARAM_READWRITE)); 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* Image capture caps */ /* Image capture caps */
g_object_interface_install_property (g_class, g_object_interface_install_property (g_class,
g_param_spec_boxed (GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS, g_param_spec_boxed (GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS,
"Image capture supported caps", "Image capture supported caps",
"Caps describing supported image capture formats", GST_TYPE_CAPS, "Caps describing supported image capture formats", GST_TYPE_CAPS,
G_PARAM_READABLE)); G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
} }

View file

@ -2544,7 +2544,8 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_FILENAME, g_object_class_install_property (gobject_class, ARG_FILENAME,
g_param_spec_string ("filename", "Filename", g_param_spec_string ("filename", "Filename",
"Filename of the image or video to save", "", G_PARAM_READWRITE)); "Filename of the image or video to save", "",
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:mode: * GstCameraBin:mode:
@ -2558,7 +2559,8 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_MODE, g_object_class_install_property (gobject_class, ARG_MODE,
g_param_spec_enum ("mode", "Mode", g_param_spec_enum ("mode", "Mode",
"The capture mode (still image capture or video recording)", "The capture mode (still image capture or video recording)",
GST_TYPE_CAMERABIN_MODE, DEFAULT_MODE, G_PARAM_READWRITE)); GST_TYPE_CAMERABIN_MODE, DEFAULT_MODE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:flags * GstCameraBin:flags
@ -2580,7 +2582,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_MUTE, g_object_class_install_property (gobject_class, ARG_MUTE,
g_param_spec_boolean ("mute", "Mute", g_param_spec_boolean ("mute", "Mute",
"True to mute the recording. False to record with audio", "True to mute the recording. False to record with audio",
ARG_DEFAULT_MUTE, G_PARAM_READWRITE)); ARG_DEFAULT_MUTE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:zoom: * GstCameraBin:zoom:
@ -2592,7 +2594,8 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_ZOOM, g_object_class_install_property (gobject_class, ARG_ZOOM,
g_param_spec_int ("zoom", "Zoom", g_param_spec_int ("zoom", "Zoom",
"The zoom. 100 for 1x, 200 for 2x and so on", "The zoom. 100 for 1x, 200 for 2x and so on",
MIN_ZOOM, MAX_ZOOM, DEFAULT_ZOOM, G_PARAM_READWRITE)); MIN_ZOOM, MAX_ZOOM, DEFAULT_ZOOM,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:image-post-processing: * GstCameraBin:image-post-processing:
@ -2605,7 +2608,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_param_spec_object ("image-post-processing", g_param_spec_object ("image-post-processing",
"Image post processing element", "Image post processing element",
"Image Post-Processing GStreamer element (default is NULL)", "Image Post-Processing GStreamer element (default is NULL)",
GST_TYPE_ELEMENT, G_PARAM_READWRITE)); GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:image-encoder: * GstCameraBin:image-encoder:
@ -2618,7 +2621,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_IMAGE_ENC, g_object_class_install_property (gobject_class, ARG_IMAGE_ENC,
g_param_spec_object ("image-encoder", "Image encoder", g_param_spec_object ("image-encoder", "Image encoder",
"Image encoder GStreamer element (default is jpegenc)", "Image encoder GStreamer element (default is jpegenc)",
GST_TYPE_ELEMENT, G_PARAM_READWRITE)); GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:video-post-processing: * GstCameraBin:video-post-processing:
@ -2632,7 +2635,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_param_spec_object ("video-post-processing", g_param_spec_object ("video-post-processing",
"Video post processing element", "Video post processing element",
"Video post processing GStreamer element (default is NULL)", "Video post processing GStreamer element (default is NULL)",
GST_TYPE_ELEMENT, G_PARAM_READWRITE)); GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:video-encoder: * GstCameraBin:video-encoder:
@ -2645,7 +2648,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_VIDEO_ENC, g_object_class_install_property (gobject_class, ARG_VIDEO_ENC,
g_param_spec_object ("video-encoder", "Video encoder", g_param_spec_object ("video-encoder", "Video encoder",
"Video encoder GStreamer element (default is theoraenc)", "Video encoder GStreamer element (default is theoraenc)",
GST_TYPE_ELEMENT, G_PARAM_READWRITE)); GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:audio-encoder: * GstCameraBin:audio-encoder:
@ -2658,7 +2661,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_AUDIO_ENC, g_object_class_install_property (gobject_class, ARG_AUDIO_ENC,
g_param_spec_object ("audio-encoder", "Audio encoder", g_param_spec_object ("audio-encoder", "Audio encoder",
"Audio encoder GStreamer element (default is vorbisenc)", "Audio encoder GStreamer element (default is vorbisenc)",
GST_TYPE_ELEMENT, G_PARAM_READWRITE)); GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:video-muxer: * GstCameraBin:video-muxer:
@ -2671,7 +2674,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_VIDEO_MUX, g_object_class_install_property (gobject_class, ARG_VIDEO_MUX,
g_param_spec_object ("video-muxer", "Video muxer", g_param_spec_object ("video-muxer", "Video muxer",
"Video muxer GStreamer element (default is oggmux)", "Video muxer GStreamer element (default is oggmux)",
GST_TYPE_ELEMENT, G_PARAM_READWRITE)); GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:viewfinder-sink: * GstCameraBin:viewfinder-sink:
@ -2685,7 +2688,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_VF_SINK, g_object_class_install_property (gobject_class, ARG_VF_SINK,
g_param_spec_object ("viewfinder-sink", "Viewfinder sink", g_param_spec_object ("viewfinder-sink", "Viewfinder sink",
"Viewfinder sink GStreamer element (NULL = default video sink)", "Viewfinder sink GStreamer element (NULL = default video sink)",
GST_TYPE_ELEMENT, G_PARAM_READWRITE)); GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:video-source: * GstCameraBin:video-source:
@ -2699,7 +2702,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_VIDEO_SRC, g_object_class_install_property (gobject_class, ARG_VIDEO_SRC,
g_param_spec_object ("video-source", "Video source element", g_param_spec_object ("video-source", "Video source element",
"Video source GStreamer element (NULL = default video src)", "Video source GStreamer element (NULL = default video src)",
GST_TYPE_ELEMENT, G_PARAM_READWRITE)); GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:audio-source: * GstCameraBin:audio-source:
* *
@ -2712,7 +2715,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_AUDIO_SRC, g_object_class_install_property (gobject_class, ARG_AUDIO_SRC,
g_param_spec_object ("audio-source", "Audio source element", g_param_spec_object ("audio-source", "Audio source element",
"Audio source GStreamer element (NULL = default audio src)", "Audio source GStreamer element (NULL = default audio src)",
GST_TYPE_ELEMENT, G_PARAM_READWRITE)); GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:video-source-filter: * GstCameraBin:video-source-filter:
@ -2729,7 +2732,8 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_VIDEO_SOURCE_FILTER, g_object_class_install_property (gobject_class, ARG_VIDEO_SOURCE_FILTER,
g_param_spec_object ("video-source-filter", "video source filter element", g_param_spec_object ("video-source-filter", "video source filter element",
"Optional video filter GStreamer element, filters all frames from" "Optional video filter GStreamer element, filters all frames from"
"the video source", GST_TYPE_ELEMENT, G_PARAM_READWRITE)); "the video source", GST_TYPE_ELEMENT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:video-source-caps: * GstCameraBin:video-source-caps:
@ -2743,7 +2747,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_INPUT_CAPS, g_object_class_install_property (gobject_class, ARG_INPUT_CAPS,
g_param_spec_boxed ("video-source-caps", "Video source caps", g_param_spec_boxed ("video-source-caps", "Video source caps",
"The allowed modes of the video source operation", "The allowed modes of the video source operation",
GST_TYPE_CAPS, G_PARAM_READABLE)); GST_TYPE_CAPS, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:filter-caps: * GstCameraBin:filter-caps:
@ -2757,7 +2761,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_FILTER_CAPS, g_object_class_install_property (gobject_class, ARG_FILTER_CAPS,
g_param_spec_boxed ("filter-caps", "Filter caps", g_param_spec_boxed ("filter-caps", "Filter caps",
"Filter video data coming from videosrc element", "Filter video data coming from videosrc element",
GST_TYPE_CAPS, G_PARAM_READWRITE)); GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:preview-caps: * GstCameraBin:preview-caps:
@ -2771,7 +2775,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_PREVIEW_CAPS, g_object_class_install_property (gobject_class, ARG_PREVIEW_CAPS,
g_param_spec_boxed ("preview-caps", "Preview caps", g_param_spec_boxed ("preview-caps", "Preview caps",
"Caps defining the preview image format", "Caps defining the preview image format",
GST_TYPE_CAPS, G_PARAM_READWRITE)); GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:viewfinder-filter: * GstCameraBin:viewfinder-filter:
@ -2786,7 +2790,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_object_class_install_property (gobject_class, ARG_VIEWFINDER_FILTER, g_object_class_install_property (gobject_class, ARG_VIEWFINDER_FILTER,
g_param_spec_object ("viewfinder-filter", "viewfinder filter element", g_param_spec_object ("viewfinder-filter", "viewfinder filter element",
"viewfinder filter GStreamer element", "viewfinder filter GStreamer element",
GST_TYPE_ELEMENT, G_PARAM_READWRITE)); GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin:block-after-capture: * GstCameraBin:block-after-capture:
@ -2803,7 +2807,8 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
g_param_spec_boolean ("block-after-capture", g_param_spec_boolean ("block-after-capture",
"Block viewfinder after capture", "Block viewfinder after capture",
"Block viewfinder after capturing an image or video", "Block viewfinder after capturing an image or video",
DEFAULT_BLOCK_VIEWFINDER, G_PARAM_READWRITE)); DEFAULT_BLOCK_VIEWFINDER,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstCameraBin::capture-start: * GstCameraBin::capture-start: