}
+static void __enable_extra_preview_and_callback(camera_h camera)
+{
+ int err = 0;
+ int stream_id = 0;
+ int width = 0;
+ int height = 0;
+ int fps = 0;
+ int pixel_format = 0;
+
+ g_print("\n\t- Format list");
+ g_print("\n\t0:NV12, 1:NV12T, 2:NV16, 3:NV21, 4:YUYV, 5:UYVY, 6:422P, 7:I420, 8:YV12, 9:RGB565, 10:RGB888");
+ g_print("\n\t11:RGBA, 12:ARGB, 13:ENCODED(JPEG), 14:INTERLEAVED_JPEG_UYVY, 15:H264, 16:INVZ, 17:MJPEG, 18:VP8, 19:VP9");
+ g_print("\n\tSet extra preview format[stream_id width height fps format] : ");
+
+ err = scanf("%d %d %d %d %d", &stream_id, &width, &height, &fps, &pixel_format);
+ flush_stdin();
+
+ err = camera_set_extra_preview_stream_format(camera, stream_id, pixel_format, width, height, fps);
+ if (err != CAMERA_ERROR_NONE) {
+ g_print("\n\tcamera_set_extra_preview_stream_format failed[0x%x]\n", err);
+ return;
+ }
+
+ err = camera_set_extra_preview_cb(camera, _camera_extra_preview_cb, camera);
+ if (err != CAMERA_ERROR_NONE) {
+ g_print("\n\tcamera_set_extra_preview_cb failed[0x%x]\n", err);
+ return;
+ }
+
+ g_print("\n\tDump extra preview data to file - NO[0], YES[Others] : ");
+ err = scanf("%d", &g_camera_extra_preview_cb_dump);
+ flush_stdin();
+}
+
+
/**
* This function is to change camcorder mode.
*
{
int err = 0;
int camera_type = 0;
+ int enable_extra_preview = 0;
switch (buf) {
case '1':
}
hcamcorder->type = camera_device;
-
break;
}
break;
/*camera_set_display_flip(hcamcorder->camera, CAMERA_FLIP_VERTICAL);*/
/*camera_set_preview_cb(hcamcorder->camera, _preview_cb, hcamcorder->camera);*/
+ if (camera_is_supported_extra_preview(hcamcorder->camera)) {
+ g_print("\n\tEnable extra preview callback - NO[0], YES[Others] : ");
+ err = scanf("%d", (int *)&enable_extra_preview);
+ flush_stdin();
+
+ if (enable_extra_preview)
+ __enable_extra_preview_and_callback(hcamcorder->camera);
+ }
+
camera_start_preview(hcamcorder->camera);
gettimeofday(¤t_time, NULL);