g_print("\t 'p' Picture format \n");
g_print("\t 'E' EXIF orientation \n");
g_print("\t 'F' Get facing direction of camera module\n");
+ g_print("\t 's' Extra preview stream format\n");
g_print("\t >>>>>>>>>>>>>>>>>>>> [Display/Filter]\n");
g_print("\t 'v' Visible \n");
g_print("\t 'o' Output mode \n");
int height = 0;
int result = 0;
int set_bridge = 0;
+ int stream_id;
+ int pixel_format;
+ int fps;
switch (buf) {
/* Camera setting */
else
camera_attr_set_tag_orientation(hcamcorder->camera, idx);
break;
- case 'F': /* Getting > Get Facing direction */
+ case 'F': /* Setting > Get Facing direction */
g_print("* Get facing direction of camera module\n");
err = camera_get_facing_direction(hcamcorder->camera, (camera_facing_direction_e *)&idx);
if (CAMERA_ERROR_NONE == err)
else
g_print("* Error : %d\n", err);
break;
+ case 's': /* Setting > Set extra preview stream format */
+ g_print("* Set extra preview stream format\n");
+
+ g_print("\tstream_id,pixel format[NV12:0,H264:15,VP8:18],width,height,fps : ");
+ err = scanf("%d,%d,%d,%d,%d", &stream_id, &pixel_format, &width, &height, &fps);
+ flush_stdin();
+
+ err = camera_set_extra_preview_stream_format(hcamcorder->camera,
+ stream_id, pixel_format, width, height, fps);
+ if (err != CAMERA_ERROR_NONE) {
+ g_print("* Set Error : 0x%x\n", err);
+ break;
+ }
+
+ pixel_format = width = height = fps = -1;
+
+ err = camera_get_extra_preview_stream_format(hcamcorder->camera,
+ stream_id, &pixel_format, &width, &height, &fps);
+ if (err != CAMERA_ERROR_NONE) {
+ g_print("* Get Error : 0x%x\n", err);
+ break;
+ }
+
+ g_print("\tGet stream_id[%d],pixel format[%d],res[%dx%d],fps[%d]\n",
+ stream_id, pixel_format, width, height, fps);
+ break;
/* Display / Filter setting */
case 'v': /* Display visible */
g_print("* Display visible setting !\n");