Add mm_handle field to use it in gdbus sound eos callback 87/95387/1
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 3 Nov 2016 05:52:19 +0000 (14:52 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 3 Nov 2016 05:52:19 +0000 (14:52 +0900)
[Version] 0.10.89
[Profile] Common
[Issue Type] Update
[Dependency module] N/A
[Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-mobile_20161101.3]

Change-Id: Ib9e3b13e5012b8710b07d8b1ef27a83d977379c7
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/libmm-camcorder.spec
src/include/mm_camcorder_util.h
src/mm_camcorder_internal.c
src/mm_camcorder_util.c

index 35208a7..81dd040 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.88
+Version:    0.10.89
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 1a5ff0e..f47de14 100644 (file)
@@ -181,6 +181,7 @@ typedef struct {
        int param;
        int is_playing;
        guint subscribe_id;
+       void *mm_handle;
 } _MMCamcorderGDbusCbInfo;
 
 /**
index bec6530..b117f6e 100644 (file)
@@ -163,8 +163,11 @@ int _mmcamcorder_create(MMHandleType *handle, MMCamPreset *info)
 
        if (info->videodev_type != MM_VIDEO_DEVICE_NONE) {
                /* init for gdbus */
+               hcamcorder->gdbus_info_sound.mm_handle = hcamcorder;
                g_mutex_init(&hcamcorder->gdbus_info_sound.sync_mutex);
                g_cond_init(&hcamcorder->gdbus_info_sound.sync_cond);
+
+               hcamcorder->gdbus_info_solo_sound.mm_handle = hcamcorder;
                g_mutex_init(&hcamcorder->gdbus_info_solo_sound.sync_mutex);
                g_cond_init(&hcamcorder->gdbus_info_solo_sound.sync_cond);
        }
index 6414afd..8a4f12f 100644 (file)
@@ -162,6 +162,7 @@ static void __gdbus_stream_eos_cb(GDBusConnection *connection,
 {
        int played_idx = 0;
        _MMCamcorderGDbusCbInfo *gdbus_info = NULL;
+       mmf_camcorder_t *hcamcorder = NULL;
 
        _mmcam_dbg_log("entered");
 
@@ -171,13 +172,14 @@ static void __gdbus_stream_eos_cb(GDBusConnection *connection,
        }
 
        gdbus_info = (_MMCamcorderGDbusCbInfo *)user_data;
+       hcamcorder = (mmf_camcorder_t *)gdbus_info->mm_handle;
 
        g_variant_get(param, "(i)", &played_idx);
 
        g_mutex_lock(&gdbus_info->sync_mutex);
 
-       _mmcam_dbg_log("gdbus_info->param %d, played_idx : %d",
-               gdbus_info->param, played_idx);
+       _mmcam_dbg_log("gdbus_info->param %d, played_idx : %d, handle : %p",
+               gdbus_info->param, played_idx, hcamcorder);
 
        if (gdbus_info->param == played_idx) {
                g_dbus_connection_signal_unsubscribe(connection, gdbus_info->subscribe_id);