2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 #ifndef __TIZEN_MULTIMEDIA_CAMERA_PRIVATE_H__
22 #define __TIZEN_MULTIMEDIA_CAMERA_PRIVATE_H__
24 #include <muse_core.h>
25 #include <muse_camera.h>
26 #include <mm_camcorder.h>
33 #define CAMERA_PARSE_STRING_SIZE 10
35 typedef struct _camera_cb_info_s {
37 GThread *msg_recv_thread;
38 GThread *msg_handler_thread;
39 gint msg_recv_running;
40 gint msg_handler_running;
41 GCond msg_handler_cond;
42 GMutex msg_handler_mutex;
44 GList *idle_event_list;
45 GCond idle_event_cond;
46 GMutex idle_event_mutex;
47 gpointer user_cb[MUSE_CAMERA_EVENT_TYPE_NUM];
48 gpointer user_data[MUSE_CAMERA_EVENT_TYPE_NUM];
49 gchar recv_msg[MUSE_CAMERA_MSG_MAX_LENGTH];
56 media_format_h pkt_fmt;
59 typedef struct _camera_message_s {
60 gchar recv_msg[MUSE_CAMERA_MSG_MAX_LENGTH];
61 muse_camera_api_e api;
64 typedef struct _camera_idle_event_s {
65 camera_cb_info_s *cb_info;
66 gchar recv_msg[MUSE_CAMERA_MSG_MAX_LENGTH];
67 muse_camera_event_e event;
69 } camera_idle_event_s;
71 typedef struct _camera_cli_s {
72 intptr_t remote_handle;
73 MMHandleType client_handle;
74 intptr_t display_handle;
75 camera_cb_info_s *cb_info;
77 MMCamWaylandInfo *wl_info;
78 #endif /* #ifdef HAVE_WAYLAND */
81 typedef struct _camera_media_packet_data {
84 tbm_bo buffer_bo[BUFFER_MAX_PLANE_NUM];
86 } camera_media_packet_data;
89 int _camera_get_tbm_surface_format(int in_format, uint32_t *out_format);
90 int _camera_get_media_packet_mimetype(int in_format, media_format_mimetype_e *mimetype);
91 int _camera_media_packet_finalize(media_packet_h pkt, int error_code, void *user_data);
92 int __convert_camera_error_code(const char* func, int code);
98 #endif //__TIZEN_MULTIMEDIA_CAMERA_PRIVATE_H__