X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Finclude%2Fmm_camcorder_internal.h;h=f5428626da99c5f3cab2fb3deb7cff7047b26711;hb=f183b5e0b23f3e3a8631fb69f23f674f846fb6b6;hp=41f9a279158142f2f363e4624de6d59f51e7fabf;hpb=a3c107313f2e0f6378caf8696cdb6762566d706a;p=platform%2Fcore%2Fmultimedia%2Flibmm-camcorder.git diff --git a/src/include/mm_camcorder_internal.h b/src/include/mm_camcorder_internal.h index 41f9a27..f542862 100644 --- a/src/include/mm_camcorder_internal.h +++ b/src/include/mm_camcorder_internal.h @@ -39,6 +39,7 @@ #include #include #include +#include /* device policy manager */ #include "mm_camcorder.h" #include "mm_debug.h" @@ -329,15 +330,19 @@ extern "C" { #define _MMCAMCORDER_GET_COND(handle) (_MMCAMCORDER_CAST_MTSAFE(handle).cond) #define _MMCAMCORDER_WAIT(handle) g_cond_wait(&_MMCAMCORDER_GET_COND(handle), &_MMCAMCORDER_GET_LOCK(handle)) -#define _MMCAMCORDER_WAIT_UNTIL(handle, timeout) g_cond_wait_until(&_MMCAMCORDER_GET_COND(handle), &_MMCAMCORDER_GET_LOCK(handle), &end_time) +#define _MMCAMCORDER_WAIT_UNTIL(handle, end_time) g_cond_wait_until(&_MMCAMCORDER_GET_COND(handle), &_MMCAMCORDER_GET_LOCK(handle), end_time) #define _MMCAMCORDER_SIGNAL(handle) g_cond_signal(&_MMCAMCORDER_GET_COND(handle)); #define _MMCAMCORDER_BROADCAST(handle) g_cond_broadcast(&_MMCAMCORDER_GET_COND(handle)); /* for command */ #define _MMCAMCORDER_GET_CMD_LOCK(handle) (_MMCAMCORDER_CAST_MTSAFE(handle).cmd_lock) +#define _MMCAMCORDER_GET_CMD_COND(handle) (_MMCAMCORDER_CAST_MTSAFE(handle).cmd_cond) #define _MMCAMCORDER_LOCK_CMD(handle) _MMCAMCORDER_LOCK_FUNC(_MMCAMCORDER_GET_CMD_LOCK(handle)) #define _MMCAMCORDER_TRYLOCK_CMD(handle) _MMCAMCORDER_TRYLOCK_FUNC(_MMCAMCORDER_GET_CMD_LOCK(handle)) #define _MMCAMCORDER_UNLOCK_CMD(handle) _MMCAMCORDER_UNLOCK_FUNC(_MMCAMCORDER_GET_CMD_LOCK(handle)) +#define _MMCAMCORDER_CMD_WAIT(handle) g_cond_wait(&_MMCAMCORDER_GET_CMD_COND(handle), &_MMCAMCORDER_GET_CMD_LOCK(handle)) +#define _MMCAMCORDER_CMD_WAIT_UNTIL(handle, end_time) g_cond_wait_until(&_MMCAMCORDER_GET_CMD_COND(handle), &_MMCAMCORDER_GET_CMD_LOCK(handle), end_time) +#define _MMCAMCORDER_CMD_SIGNAL(handle) g_cond_signal(&_MMCAMCORDER_GET_CMD_COND(handle)); /* for ASM */ #define _MMCAMCORDER_GET_ASM_LOCK(handle) (_MMCAMCORDER_CAST_MTSAFE(handle).asm_lock) @@ -543,6 +548,7 @@ typedef enum { _MMCAMCORDER_STATE_CHANGE_NORMAL = 0, _MMCAMCORDER_STATE_CHANGE_BY_ASM, _MMCAMCORDER_STATE_CHANGE_BY_RM, + _MMCAMCORDER_STATE_CHANGE_BY_DPM } _MMCamcorderStateChange; @@ -576,6 +582,7 @@ typedef struct { GMutex lock; /**< Mutex (for general use) */ GCond cond; /**< Condition (for general use) */ GMutex cmd_lock; /**< Mutex (for command) */ + GCond cmd_cond; /**< Condition (for command) */ GMutex asm_lock; /**< Mutex (for ASM) */ GMutex state_lock; /**< Mutex (for state change) */ GMutex gst_state_lock; /**< Mutex (for gst pipeline state change) */ @@ -624,6 +631,7 @@ typedef struct { type_element *VideosinkElement; /**< configure data of videosink element */ type_element *VideoconvertElement; /**< configure data of videoconvert element */ + type_element *VideodecoderElementH264; /**< configure data of video decoder element for H.264 format */ gboolean SensorEncodedCapture; /**< whether camera sensor support encoded image capture */ gboolean internal_encode; /**< whether use internal encoding function */ } _MMCamcorderSubContext; @@ -695,6 +703,7 @@ typedef struct mmf_camcorder { int acquired_focus; /**< Current acquired focus */ int session_type; /**< Session type */ int session_flags; /**< Session flags */ + int recreate_decoder; /**< Flag of decoder element recreation for encoded preview format */ _MMCamcorderInfoConverting caminfo_convert[CAMINFO_CONVERT_NUM]; /**< converting structure of camera info */ _MMCamcorderEnumConvert enum_conv[ENUM_CONVERT_NUM]; /**< enum converting list that is modified by ini info */ @@ -718,6 +727,11 @@ typedef struct mmf_camcorder { _MMCamcorderGDbusCbInfo gdbus_info_sound; /**< Informations for the gbus cb of sound play */ _MMCamcorderGDbusCbInfo gdbus_info_solo_sound; /**< Informations for the gbus cb of solo sound play */ + /* DPM(device policy manager) */ + dpm_context_h dpm_context; /**< DPM context handle */ + dpm_restriction_policy_h dpm_policy; /**< DPM restriction policy handle */ + int dpm_camera_cb_id; /**< DPM camera policy changed callback id */ + int reserved[4]; /**< reserved */ } mmf_camcorder_t; @@ -1197,6 +1211,9 @@ void _mmcamcorder_sound_focus_cb(int id, mm_sound_focus_type_e focus_type, void _mmcamcorder_sound_focus_watch_cb(mm_sound_focus_type_e focus_type, mm_sound_focus_state_e focus_state, const char *reason_for_change, const char *additional_info, void *user_data); +/* device policy manager */ +void _mmcamcorder_dpm_camera_policy_changed_cb(const char *name, const char *value, void *user_data); + /* For hand over the server's caps information to client */ int _mmcamcorder_get_video_caps(MMHandleType handle, char **caps);