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 20
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];
50 GCond api_cond[MUSE_CAMERA_API_MAX];
51 GMutex api_mutex[MUSE_CAMERA_API_MAX];
57 media_format_h pkt_fmt;
60 typedef struct _camera_message_s {
61 gchar recv_msg[MUSE_CAMERA_MSG_MAX_LENGTH];
62 muse_camera_api_e api;
65 typedef struct _camera_idle_event_s {
66 camera_cb_info_s *cb_info;
67 gchar recv_msg[MUSE_CAMERA_MSG_MAX_LENGTH];
68 muse_camera_event_e event;
70 } camera_idle_event_s;
72 typedef struct _camera_cli_s {
73 intptr_t remote_handle;
74 MMHandleType client_handle;
75 intptr_t display_handle;
76 camera_cb_info_s *cb_info;
78 MMCamWaylandInfo *wl_info;
79 #endif /* #ifdef HAVE_WAYLAND */
82 typedef struct _camera_media_packet_data {
85 tbm_bo buffer_bo[BUFFER_MAX_PLANE_NUM];
87 } camera_media_packet_data;
90 int _camera_get_tbm_surface_format(int in_format, uint32_t *out_format);
91 int _camera_get_media_packet_mimetype(int in_format, media_format_mimetype_e *mimetype);
92 int _camera_media_packet_finalize(media_packet_h pkt, int error_code, void *user_data);
93 int __convert_camera_error_code(const char* func, int code);
99 #endif /* __TIZEN_MULTIMEDIA_CAMERA_PRIVATE_H__ */