From: Jeongmo Yang Date: Thu, 3 Nov 2016 05:52:19 +0000 (+0900) Subject: Add mm_handle field to use it in gdbus sound eos callback X-Git-Tag: accepted/tizen/common/20161109.140301~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=278645885dd971376916769fded66c1666833310;hp=3e99440e80d0ccf5bb33ab747a4ee7a9b9c69f01;p=platform%2Fcore%2Fmultimedia%2Flibmm-camcorder.git Add mm_handle field to use it in gdbus sound eos callback [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 --- diff --git a/packaging/libmm-camcorder.spec b/packaging/libmm-camcorder.spec index 35208a7..81dd040 100644 --- a/packaging/libmm-camcorder.spec +++ b/packaging/libmm-camcorder.spec @@ -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 diff --git a/src/include/mm_camcorder_util.h b/src/include/mm_camcorder_util.h index 1a5ff0e..f47de14 100644 --- a/src/include/mm_camcorder_util.h +++ b/src/include/mm_camcorder_util.h @@ -181,6 +181,7 @@ typedef struct { int param; int is_playing; guint subscribe_id; + void *mm_handle; } _MMCamcorderGDbusCbInfo; /** diff --git a/src/mm_camcorder_internal.c b/src/mm_camcorder_internal.c index bec6530..b117f6e 100644 --- a/src/mm_camcorder_internal.c +++ b/src/mm_camcorder_internal.c @@ -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); } diff --git a/src/mm_camcorder_util.c b/src/mm_camcorder_util.c index 6414afd..8a4f12f 100644 --- a/src/mm_camcorder_util.c +++ b/src/mm_camcorder_util.c @@ -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);