Add internal function - sound_manager_get_internal_voip_stream_information() 49/113249/1
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 6 Feb 2017 06:50:21 +0000 (15:50 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Tue, 7 Feb 2017 04:25:57 +0000 (13:25 +0900)
[Version] 0.3.96
[Profile] Common
[Issue Type] Backward compatibility

Change-Id: I0272a0bcceb2b0c33d5c9408455a4902e40ba428
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
include/sound_manager_internal.h
packaging/capi-media-sound-manager.spec
src/sound_manager_internal.c

index 884a901dfee9089300a077689e429a50fb4d633f..90c5a451ef146df366a50a98c95edafb88c163b2 100644 (file)
@@ -216,6 +216,25 @@ int sound_manager_get_type_from_stream_information(sound_stream_info_h stream_in
  */
 int sound_manager_get_index_from_stream_information(sound_stream_info_h stream_info, int *index);
 
+/**
+ * @internal
+ * @brief Gets the internal stream information handle for VoIP session.
+ * @since_tizen 3.0
+ *
+ * @remarks    If VoIP session is not set in this process, it'll return #SOUND_MANAGER_ERROR_NO_DATA.
+ *
+ * @param[out] stream_info     The handle of stream information
+ *
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #SOUND_MANAGER_ERROR_NONE Success
+ * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SOUND_MANAGER_ERROR_NO_DATA No data
+ * @see sound_manager_set_session_type()
+ * @see sound_manager_set_voip_session_mode()
+ */
+int sound_manager_get_internal_voip_stream_information(sound_stream_info_h *stream_info);
+
 /**
  * @internal
  * @brief Creates a virtual stream handle.
index 110db00ef1ecc6b05fcf93f39d223367364506de..cd98d7a673f3c94b38c9bdfda4e5b2f2699896f2 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-sound-manager
 Summary:    Sound Manager library
-Version:    0.3.95
+Version:    0.3.96
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 33142f7d26aceb0a1a21c3ad0fb78575be3b6cfb..192c618afc2b81e7673a9c1b782e278ba5126c10 100644 (file)
@@ -22,6 +22,7 @@
 /* These variables will be removed when session features are deprecated. */
 extern int g_stream_info_count;
 extern pthread_mutex_t g_stream_info_count_mutex;
+extern sound_stream_info_s *g_voip_stream_info;
 
 #ifndef TIZEN_FEATURE_TV_PROD
 int sound_manager_get_max_master_volume(int *max_level)
@@ -168,6 +169,22 @@ int sound_manager_get_index_from_stream_information(sound_stream_info_h stream_i
        return _convert_sound_manager_error_code(__func__, ret);
 }
 
+/* This function is only for audio-io session backward compatibility */
+int sound_manager_get_internal_voip_stream_information(sound_stream_info_h *stream_info)
+{
+       SM_NULL_ARG_CHECK(stream_info);
+
+       if (g_voip_stream_info == NULL) {
+               LOGE("internal voip internal stream_info does not exist");
+               return SOUND_MANAGER_ERROR_NO_DATA;
+       }
+
+       LOGI("internal VoIP stream_info[%p]", g_voip_stream_info);
+       *stream_info = (sound_stream_info_h)g_voip_stream_info;
+
+       return SOUND_MANAGER_ERROR_NONE;
+}
+
 int sound_manager_create_virtual_stream(sound_stream_info_h stream_info, virtual_sound_stream_h *virtual_stream)
 {
        int ret = MM_ERROR_NONE;