Udpate for force stop function
[platform/core/multimedia/libmm-camcorder.git] / src / include / mm_camcorder_internal.h
index 3b0b83c..1dac082 100644 (file)
@@ -693,9 +693,7 @@ typedef struct mmf_camcorder {
        int type;               /**< mmcamcorder_mode_type */
        int device_type;        /**< device type */
        int state;              /**< state of camcorder */
-       int target_state;       /**< Target state that want to set. This is a flag that
-                                                          * stands for async state changing. If this value differ from state,
-                                                          * it means state is changing now asychronously. */
+       int old_state;          /**< old state of camcorder */
 
        /* handles */
        MMHandleType attributes;               /**< Attribute handle */
@@ -778,6 +776,7 @@ typedef struct mmf_camcorder {
 #ifdef _MMCAMCORDER_MURPHY_SUPPORT
        /* resource manager for H/W resources */
        MMCamcorderResourceManager resource_manager;
+       gboolean resource_release_cb_calling;
 #endif /* _MMCAMCORDER_MURPHY_SUPPORT */
 
        /* gdbus */
@@ -1111,6 +1110,7 @@ int _mmcamcorder_display_init(void);
  *
  */
 int _mmcamcorder_get_state(MMHandleType handle);
+int _mmcamcorder_get_state2(MMHandleType handle, int *state, int *old_state);
 
 /**
  * This function sets new state of camcorder.
@@ -1125,18 +1125,6 @@ int _mmcamcorder_get_state(MMHandleType handle);
 void _mmcamcorder_set_state(MMHandleType handle, int state);
 
 /**
- * This function gets asynchronous status of MSL Camcroder.
- *
- * @param[in]  handle          Handle of camcorder context.
- * @param[in]  target_state    setting target_state value of camcorder.
- * @return     This function returns asynchrnous state.
- * @remarks
- * @see                _mmcamcorder_set_async_state()
- *
- */
-int _mmcamcorder_get_async_state(MMHandleType handle);
-
-/**
  * This function allocates structure of subsidiary attributes.
  *
  * @param[in]  type            Allocation type of camcorder context.
@@ -1257,18 +1245,6 @@ void _mmcamcorder_destroy_pipeline(MMHandleType handle, int type);
  */
 int _mmcamcorder_gst_set_state(MMHandleType handle, GstElement *pipeline, GstState target_state);
 
-/**
- * This function sets gstreamer element status, asynchronously.
- * Regardless of processing, it returns immediately.
- *
- * @param[in]  pipeline        Pointer of pipeline
- * @param[in]  target_state    newly setting status
- * @return     This function returns zero on success, or negative value with error code.
- * @remarks
- * @see
- *
- */
-int _mmcamcorder_gst_set_state_async(MMHandleType handle, GstElement *pipeline, GstState target_state);
 
 /* For xvimagesink */
 GstBusSyncReply __mmcamcorder_sync_callback(GstBus *bus, GstMessage *message, gulong data);
@@ -1282,7 +1258,7 @@ 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_force_stop(mmf_camcorder_t *hcamcorder, int state_change_by_system);
 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,
        int option, const char *additional_info, void *user_data);