stream is on device 61/104161/3 accepted/tizen/3.0/common/20161215.163000 accepted/tizen/3.0/ivi/20161215.043856 accepted/tizen/3.0/mobile/20161215.043710 accepted/tizen/3.0/tv/20161215.043755 accepted/tizen/3.0/wearable/20161215.043808 submit/tizen_3.0/20161213.132802 submit/tizen_3.0/20161214.084609
authorJeongho Mok <jho.mok@samsung.com>
Mon, 12 Dec 2016 12:12:42 +0000 (21:12 +0900)
committerJeongho Mok <jho.mok@samsung.com>
Tue, 13 Dec 2016 13:12:45 +0000 (22:12 +0900)
[Version] 0.3.87
[Profile] Common
[Issue Type] API

Change-Id: I25b925e778e0d48fa3030282ea9b6fa0d59e9b06

include/sound_manager_private.h
packaging/capi-media-sound-manager.spec
src/sound_manager.c
src/sound_manager_private.c

index d41d03014d84e8034d6ddb37f9f58200cb4e6b75..2fe3bb95771aa134e10a21045ea38050d41a04c0 100644 (file)
@@ -269,7 +269,7 @@ int _set_volume_level(const char *direction, const char *volume_type, unsigned i
 
 int _get_current_volume_type(const char *direction, char **volume_type);
 
-int _get_current_media_routing_path(const char *direction, char **device_type);
+int _get_current_media_routing_path(const char *direction, sound_device_type_e *device_type);
 
 void _update_focus_status(unsigned int index, unsigned int acquired_focus_status);
 
index 5bb5fabe4edb126a4fa1fcf0efdcf9eec23943c6..d62c01e048852a9f4e28351524f69bb903b50747 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-sound-manager
 Summary:    Sound Manager library
-Version:    0.3.86
+Version:    0.3.87
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index afea15f6d4637c7005292c30f01ef562fd4bb3ca..9971da02be38891610cc2b89c22f7d6abafe90f7 100644 (file)
@@ -439,33 +439,21 @@ int sound_manager_is_stream_on_device(sound_stream_info_h stream_info, sound_dev
        SM_NULL_ARG_CHECK(stream_h);
        SM_NULL_ARG_CHECK(device);
        SM_NULL_ARG_CHECK(is_on);
-#if 0
-       ret = mm_sound_get_device_id(device, &device_id);
-       if (ret == MM_ERROR_NONE)
-               ret = _is_using_device(stream_h->index, device_id, is_on);
 
-       if (ret == MM_ERROR_NONE)
-               LOGI("stream info index(%u), device_id(%d), is_on(%d)", stream_h->index, device_id, *is_on);
-#endif
+       ret = mm_sound_is_stream_on_device(stream_h->index, device, is_on);
+
        return _convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_get_current_media_playback_device_type(sound_device_type_e *device_type)
 {
        int ret = MM_ERROR_NONE;
-#if 0
-       char *device_type_str = NULL;
-#endif
 
        LOGI(">> enter");
 
        SM_NULL_ARG_CHECK(device_type);
 
-#if 0
-       ret = _get_current_media_routing_path("out", &device_type_str);
-       if (ret == MM_ERROR_NONE)
-               ret = _convert_device_type_str_to_enum(device_type_str, device_type);
-#endif
+       ret = _get_current_media_routing_path("out", device_type);
 
        return _convert_sound_manager_error_code(__func__, ret);
 }
index b2fc92cab838ce0404f525ca05263686da83229f..129eaeac5607997eea7871c7821ce60245dbbd0c 100644 (file)
@@ -1123,7 +1123,7 @@ LEAVE:
        return ret;
 }
 
-int _get_current_media_routing_path(const char *direction, char **device_type)
+int _get_current_media_routing_path(const char *direction, sound_device_type_e *device_type)
 {
        int ret = MM_ERROR_NONE;
        GVariant *result = NULL;
@@ -1164,7 +1164,8 @@ int _get_current_media_routing_path(const char *direction, char **device_type)
        LOGI("g_dbus_connection_call_sync() success, method return value is (%s, %s)", dbus_device_type, dbus_ret);
        if (!strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret))) {
                ret = MM_ERROR_NONE;
-               *device_type = strdup(dbus_device_type);
+               if (_convert_device_type_str_to_enum(dbus_device_type, device_type) < 0)
+                       ret = MM_ERROR_SOUND_INTERNAL;
        } else {
                ret = MM_ERROR_SOUND_INTERNAL;
        }