Release version 0.10.20
[platform/core/multimedia/libmm-camcorder.git] / src / include / mm_camcorder_internal.h
index 4d1e072..249c71c 100644 (file)
 #include <mm_attrs.h>
 #include <mm_attrs_private.h>
 #include <mm_message.h>
+#include <mm_sound_focus.h>
 #include <sndfile.h>
 #include <vconf.h>
 #include <gst/video/video-format.h>
 
 #include "mm_camcorder.h"
 #include "mm_debug.h"
+#include "mm_camcorder_resource.h"
 
 /* camcorder sub module */
 #include "mm_camcorder_attribute.h"
@@ -398,7 +400,6 @@ extern "C" {
 #define MM_CAMCORDER_STROBE_CONTROL_NUM                3       /**< Number of strobe control type */
 #define MM_CAMCORDER_DETECT_MODE_NUM           2       /**< Number of detect mode type */
 
-
 /*=======================================================================================
 | ENUM DEFINITIONS                                                                     |
 ========================================================================================*/
@@ -459,7 +460,6 @@ typedef enum {
 
        /* Pipeline element of Video output */
        _MMCAMCORDER_VIDEOSINK_QUE,
-       _MMCAMCORDER_VIDEOSINK_CLS,
        _MMCAMCORDER_VIDEOSINK_SINK,
 
        _MMCAMCORDER_PIPELINE_ELEMENT_NUM,
@@ -523,6 +523,7 @@ typedef enum {
 typedef enum {
        _MMCAMCORDER_STATE_CHANGE_NORMAL = 0,
        _MMCAMCORDER_STATE_CHANGE_BY_ASM,
+       _MMCAMCORDER_STATE_CHANGE_BY_RM,
 } _MMCamcorderStateChange;
 
 
@@ -566,7 +567,6 @@ typedef struct {
        pthread_mutex_t astream_cb_lock;                /**< Mutex (for audio stream callback) */
 } _MMCamcorderMTSafe;
 
-
 /**
  * MMCamcorder Sub Context
  */
@@ -628,7 +628,9 @@ typedef struct mmf_camcorder {
        GList *buffer_probes;                  /**< a list of buffer probe handle */
        GList *event_probes;                   /**< a list of event probe handle */
        GList *signals;                        /**< a list of signal handle */
+#ifdef _MMCAMCORDER_ENABLE_IDLE_MESSAGE_CALLBACK
        GList *msg_data;                       /**< a list of msg data */
+#endif /* _MMCAMCORDER_ENABLE_IDLE_MESSAGE_CALLBACK */
        camera_conf *conf_main;                /**< Camera configure Main structure */
        camera_conf *conf_ctrl;                /**< Camera configure Control structure */
        guint pipeline_cb_event_id;            /**< Event source ID of pipeline message callback */
@@ -668,6 +670,14 @@ typedef struct mmf_camcorder {
        char *software_version;                                 /**< software_version from system info */
        int capture_sound_count;                                /**< count for capture sound */
        char *root_directory;                                   /**< Root directory for device */
+       int resolution_changed;                                 /**< Flag for preview resolution change */
+       int sound_focus_register;                               /**< Use sound focus internally */
+       int sound_focus_id;                                     /**< id for sound focus */
+       int sound_focus_watch_id;                               /**< id for sound focus watch */
+       int interrupt_code;                                     /**< Interrupt code */
+       int acquired_focus;                                     /**< Current acquired focus */
+       int session_type;                                       /**< Session type */
+       int session_flags;                                      /**< Session flags */
 
        _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 */
@@ -683,6 +693,9 @@ typedef struct mmf_camcorder {
        pthread_cond_t task_thread_cond;                        /**< cond for task thread */
        _MMCamcorderTaskThreadState task_thread_state;          /**< state of task thread */
 
+       /* resource manager for H/W resources */
+       MMCamcorderResourceManager resource_manager;
+
        int reserved[4];                                        /**< reserved */
 } mmf_camcorder_t;
 
@@ -1154,6 +1167,17 @@ void _mmcamcorder_video_current_framerate_init(MMHandleType handle);
 int _mmcamcorder_video_current_framerate(MMHandleType handle);
 int _mmcamcorder_video_average_framerate(MMHandleType handle);
 
+/* sound focus related function */
+void __mmcamcorder_force_stop(mmf_camcorder_t *hcamcorder);
+void _mmcamcorder_sound_focus_cb(int id, 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);
+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);
+
+/* For hand over the server's caps informations to client */
+int _mmcamcorder_get_video_caps(MMHandleType handle, char **caps);
+
 #ifdef __cplusplus
 }
 #endif