Return SOUND_MANAGER_ERROR_NOT_SUPPORTED enumerator when incoming stream type of... 59/62959/1 accepted/tizen/common/20160321.151129 accepted/tizen/ivi/20160322.002953 accepted/tizen/mobile/20160322.002905 accepted/tizen/tv/20160322.002919 accepted/tizen/wearable/20160322.002933 submit/tizen/20160321.102845
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 21 Mar 2016 08:35:17 +0000 (17:35 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 21 Mar 2016 08:42:35 +0000 (17:42 +0900)
[Version] Release 0.3.47
[Profile] Common
[Issue Type] Bug fix

Change-Id: I438c5f4e4e3047621b67c202abefed0cb8cf4d2d

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

index e7fb13cfb75f5bbd643a978926dab980963b99ad..37cb1260cfb8971076ec4ca32defe9ff84f201c2 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-sound-manager
 Summary:    Sound Manager library
-Version:    0.3.46
+Version:    0.3.47
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 2c1ec5ec79f1dd52aefd46071678934659c18ed9..68eea307ed20d1e52d208b7779d70859ed0fd45f 100644 (file)
@@ -680,8 +680,8 @@ int _get_stream_conf_info(const char *stream_type, stream_conf_info_s *info)
        g_variant_unref(result);
 
        if (info->priority == -1) {
-               LOGE("could not find the info of stream type(%s)", *stream_type);
-               ret = MM_ERROR_SOUND_INTERNAL;
+               LOGE("could not find the info of stream type(%s)", stream_type);
+               ret = MM_ERROR_NOT_SUPPORT_API;
        }
 
 LEAVE:
@@ -1363,13 +1363,19 @@ int _make_pa_connection_and_register_focus(sound_stream_info_s *stream_h, sound_
        int i = 0;
        bool is_focus_cb_thread = false;
 
-       ret = mm_sound_focus_is_cb_thread(&is_focus_cb_thread);
-       if (ret)
+       if ((ret = mm_sound_focus_is_cb_thread(&is_focus_cb_thread)))
                return ret;
 
        if (is_focus_cb_thread)
                return MM_ERROR_SOUND_INVALID_OPERATION;
 
+       /* get configuration information of this stream type */
+       if ((ret = _get_stream_conf_info(stream_h->stream_type, &stream_h->stream_conf_info)))
+               return ret;
+
+       LOGI("stream_conf_info : stream type[%s], priority[%d], route type[%d]",
+               stream_h->stream_type, stream_h->stream_conf_info.priority, stream_h->stream_conf_info.route_type);
+
        if (!(stream_h->pa_mainloop = pa_threaded_mainloop_new()))
                goto PA_ERROR;
 
@@ -1404,14 +1410,6 @@ int _make_pa_connection_and_register_focus(sound_stream_info_s *stream_h, sound_
        /* get uniq id of this context */
        stream_h->index = pa_context_get_index(stream_h->pa_context);
 
-       /* get configuration information of this stream type */
-       ret = _get_stream_conf_info(stream_h->stream_type, &stream_h->stream_conf_info);
-       if (ret)
-               goto PA_ERROR_WITH_UNLOCK;
-       else
-               LOGI("stream_conf_info : stream type[%s], priority[%d], route type[%d]",
-                       stream_h->stream_type, stream_h->stream_conf_info.priority, stream_h->stream_conf_info.route_type);
-
        pa_threaded_mainloop_unlock(stream_h->pa_mainloop);
 
        /* register focus */