mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
examples: camerabin2: Fix GOptionEntry array
Use no flags instead of passing G_OPTION_ARG_OPTIONAL to options that must have an argument
This commit is contained in:
parent
7ee207b359
commit
0bbbbd22d1
1 changed files with 14 additions and 15 deletions
|
@ -756,41 +756,40 @@ main (int argc, char *argv[])
|
||||||
gchar *fn_option = NULL;
|
gchar *fn_option = NULL;
|
||||||
|
|
||||||
GOptionEntry options[] = {
|
GOptionEntry options[] = {
|
||||||
{"ev-compensation", '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_STRING,
|
{"ev-compensation", '\0', 0, G_OPTION_ARG_STRING, &ev_option,
|
||||||
&ev_option,
|
|
||||||
"EV compensation for source element GstPhotography interface", NULL},
|
"EV compensation for source element GstPhotography interface", NULL},
|
||||||
{"aperture", '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_INT, &aperture,
|
{"aperture", '\0', 0, G_OPTION_ARG_INT, &aperture,
|
||||||
"Aperture (size of lens opening) for source element GstPhotography interface",
|
"Aperture (size of lens opening) for source element GstPhotography interface",
|
||||||
NULL},
|
NULL},
|
||||||
{"flash-mode", '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_INT,
|
{"flash-mode", '\0', 0, G_OPTION_ARG_INT,
|
||||||
&flash_mode,
|
&flash_mode,
|
||||||
"Flash mode for source element GstPhotography interface", NULL},
|
"Flash mode for source element GstPhotography interface", NULL},
|
||||||
{"scene-mode", '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_INT,
|
{"scene-mode", '\0', 0, G_OPTION_ARG_INT,
|
||||||
&scene_mode,
|
&scene_mode,
|
||||||
"Scene mode for source element GstPhotography interface", NULL},
|
"Scene mode for source element GstPhotography interface", NULL},
|
||||||
{"exposure", '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_INT64,
|
{"exposure", '\0', 0, G_OPTION_ARG_INT64,
|
||||||
&exposure,
|
&exposure,
|
||||||
"Exposure time (in ms) for source element GstPhotography interface",
|
"Exposure time (in ms) for source element GstPhotography interface",
|
||||||
NULL},
|
NULL},
|
||||||
{"iso-speed", '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_INT,
|
{"iso-speed", '\0', 0, G_OPTION_ARG_INT,
|
||||||
&iso_speed,
|
&iso_speed,
|
||||||
"ISO speed for source element GstPhotography interface", NULL},
|
"ISO speed for source element GstPhotography interface", NULL},
|
||||||
{"white-balance-mode", '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_INT,
|
{"white-balance-mode", '\0', 0, G_OPTION_ARG_INT,
|
||||||
&wb_mode,
|
&wb_mode,
|
||||||
"White balance mode for source element GstPhotography interface", NULL},
|
"White balance mode for source element GstPhotography interface", NULL},
|
||||||
{"colour-tone-mode", '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_INT,
|
{"colour-tone-mode", '\0', 0, G_OPTION_ARG_INT,
|
||||||
&color_mode,
|
&color_mode,
|
||||||
"Colour tone mode for source element GstPhotography interface", NULL},
|
"Colour tone mode for source element GstPhotography interface", NULL},
|
||||||
{"directory", '\0', 0, G_OPTION_ARG_STRING, &fn_option,
|
{"directory", '\0', 0, G_OPTION_ARG_STRING, &fn_option,
|
||||||
"Directory for capture file(s) (default is current directory)", NULL},
|
"Directory for capture file(s) (default is current directory)", NULL},
|
||||||
{"mode", '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_INT, &mode,
|
{"mode", '\0', 0, G_OPTION_ARG_INT, &mode,
|
||||||
"Capture mode (default = 1 (image), 2 = video)", NULL},
|
"Capture mode (default = 1 (image), 2 = video)", NULL},
|
||||||
{"capture-time", '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_INT,
|
{"capture-time", '\0', 0, G_OPTION_ARG_INT,
|
||||||
&capture_time,
|
&capture_time,
|
||||||
"Time to capture video in seconds (default = 10)", NULL},
|
"Time to capture video in seconds (default = 10)", NULL},
|
||||||
{"capture-total", '\0', 0, G_OPTION_ARG_INT, &capture_total,
|
{"capture-total", '\0', 0, G_OPTION_ARG_INT, &capture_total,
|
||||||
"Total number of captures to be done (default = 1)", NULL},
|
"Total number of captures to be done (default = 1)", NULL},
|
||||||
{"zoom", '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_INT, &zoom,
|
{"zoom", '\0', 0, G_OPTION_ARG_INT, &zoom,
|
||||||
"Zoom (100 = 1x (default), 200 = 2x etc.)", NULL},
|
"Zoom (100 = 1x (default), 200 = 2x etc.)", NULL},
|
||||||
{"wrapper-source", '\0', 0, G_OPTION_ARG_STRING, &wrappersrc_name,
|
{"wrapper-source", '\0', 0, G_OPTION_ARG_STRING, &wrappersrc_name,
|
||||||
"Camera source wrapper used for setting the video source (default is wrappercamerabinsrc)",
|
"Camera source wrapper used for setting the video source (default is wrappercamerabinsrc)",
|
||||||
|
@ -825,13 +824,13 @@ main (int argc, char *argv[])
|
||||||
"Video encoding profile name", NULL},
|
"Video encoding profile name", NULL},
|
||||||
{"encoding-profile-filename", '\0', 0, G_OPTION_ARG_STRING, &gep_filename,
|
{"encoding-profile-filename", '\0', 0, G_OPTION_ARG_STRING, &gep_filename,
|
||||||
"Video encoding profile filename", NULL},
|
"Video encoding profile filename", NULL},
|
||||||
{"image-capture-caps", '\0', G_OPTION_FLAG_OPTIONAL_ARG,
|
{"image-capture-caps", '\0', 0,
|
||||||
G_OPTION_ARG_STRING, &image_capture_caps_str,
|
G_OPTION_ARG_STRING, &image_capture_caps_str,
|
||||||
"Image capture caps (e.g. video/x-raw-rgb,width=640,height=480)", NULL},
|
"Image capture caps (e.g. video/x-raw-rgb,width=640,height=480)", NULL},
|
||||||
{"viewfinder-caps", '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_STRING,
|
{"viewfinder-caps", '\0', 0, G_OPTION_ARG_STRING,
|
||||||
&viewfinder_caps_str,
|
&viewfinder_caps_str,
|
||||||
"Viewfinder caps (e.g. video/x-raw-rgb,width=640,height=480)", NULL},
|
"Viewfinder caps (e.g. video/x-raw-rgb,width=640,height=480)", NULL},
|
||||||
{"video-capture-caps", '\0', G_OPTION_FLAG_OPTIONAL_ARG,
|
{"video-capture-caps", '\0', 0,
|
||||||
G_OPTION_ARG_STRING, &video_capture_caps_str,
|
G_OPTION_ARG_STRING, &video_capture_caps_str,
|
||||||
"Video capture caps (e.g. video/x-raw-rgb,width=640,height=480)", NULL},
|
"Video capture caps (e.g. video/x-raw-rgb,width=640,height=480)", NULL},
|
||||||
{NULL}
|
{NULL}
|
||||||
|
|
Loading…
Reference in a new issue