4 * Copyright (c) 2022 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jeongmo Yang <jm80.yang@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License f(r the specific language governing permissions and
18 * limitations under the License.
21 #include "camera_test.h"
24 static GMainLoop *g_mainloop_camera_test;
27 void set_display(cam_handle_t *hcamcorder)
29 g_print("Display type : NULL for headless\n");
30 camera_set_display(hcamcorder->camera, CAMERA_DISPLAY_TYPE_NONE, NULL);
36 g_main_loop_quit(g_mainloop_camera_test);
40 int main(int argc, char **argv)
42 cam_handle_t *handle = init_handle();
43 GIOChannel *stdin_channel = g_io_channel_unix_new(fileno(stdin));/* read from stdin */
45 g_io_add_watch(stdin_channel, G_IO_IN, (GIOFunc)cmd_input, NULL);
51 g_mainloop_camera_test = g_main_loop_new(NULL, FALSE);
53 g_main_loop_run(g_mainloop_camera_test);
55 g_print("\n\treturn main loop\n\n");
57 g_main_loop_unref(g_mainloop_camera_test);
60 g_io_channel_unref(stdin_channel);