int sound_manager_get_device_product_id(sound_device_h device, int *product_id);
/**
+ * @brief Checks if the stream information is using the device.
+ * @since_tizen 5.5
+ *
+ * @param[in] stream_info The handle of stream information
+ * @param[in] device_id The device id
+ * @param[out] is_on Whether the stream info is using the device or not: (@c true = use, @c false = not use)
+ * @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_INTERNAL Internal error inside the sound system
+ * @see sound_manager_create_stream_information()
+ * @see sound_manager_destroy_stream_information()
+ * @see sound_manager_get_device_list()
+ * @see sound_manager_get_next_device()
+ * @see sound_manager_get_prev_device()
+ * @see sound_manager_get_device_id()
+ * @see sound_manager_get_device_name()
+ * @see sound_manager_free_device_list()
+ */
+int sound_manager_is_stream_on_device_by_id(sound_stream_info_h stream_info, int device_id, bool *is_on);
+
+/**
* @}
*/
int sound_manager_get_device_product_id(sound_device_h device, int *product_id);
/**
+ * @brief Checks if the stream information is using the device.
+ * @since_tizen 5.5
+ *
+ * @param[in] stream_info The handle of stream information
+ * @param[in] device_id The device id
+ * @param[out] is_on Whether the stream info is using the device or not: (@c true = use, @c false = not use)
+ * @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_INTERNAL Internal error inside the sound system
+ * @see sound_manager_create_stream_information()
+ * @see sound_manager_destroy_stream_information()
+ * @see sound_manager_get_device_list()
+ * @see sound_manager_get_next_device()
+ * @see sound_manager_get_prev_device()
+ * @see sound_manager_get_device_id()
+ * @see sound_manager_get_device_name()
+ * @see sound_manager_free_device_list()
+ */
+int sound_manager_is_stream_on_device_by_id(sound_stream_info_h stream_info, int device_id, bool *is_on);
+
+/**
* @}
*/
Name: capi-media-sound-manager
Summary: Sound Manager library
-Version: 0.5.17
+Version: 0.5.18
Release: 0
Group: Multimedia/API
License: Apache-2.0
return _convert_sound_manager_error_code(__func__, ret);
}
+
+int sound_manager_is_stream_on_device_by_id(sound_stream_info_h stream_info, int device_id, bool *is_on)
+{
+ int ret = MM_ERROR_NONE;
+ sound_stream_info_s *stream_h = (sound_stream_info_s*)stream_info;
+
+ LOGI(">> enter");
+
+ SM_NULL_ARG_CHECK(stream_h);
+ SM_NULL_ARG_CHECK(is_on);
+
+ ret = mm_sound_is_stream_on_device_by_id(stream_h->pa_index, device_id, is_on);
+
+ return _convert_sound_manager_error_code(__func__, ret);
+}
\ No newline at end of file
CURRENT_STATUS_SET_FILTER,
CURRENT_STATUS_SET_FILTER_PRESET,
CURRENT_STATUS_UNSET_FILTER,
+ CURRENT_STATUS_IS_STREAM_ON_DEVICE_BY_ID,
#ifndef TIZEN_FEATURE_TV_PROD
CURRENT_STATUS_GET_MAX_MASTER_VOLUME,
CURRENT_STATUS_SET_MASTER_VOLUME,
g_menu_state = CURRENT_STATUS_SET_FILTER_PRESET;
else if (strncmp(cmd, "uft", 3) == 0)
g_menu_state = CURRENT_STATUS_UNSET_FILTER;
+ else if (strncmp(cmd, "isd", 3) == 0)
+ g_menu_state = CURRENT_STATUS_IS_STREAM_ON_DEVICE_BY_ID;
#ifndef TIZEN_FEATURE_TV_PROD
else if (strncmp(cmd, "mgx", 3) == 0)
g_menu_state = CURRENT_STATUS_GET_MAX_MASTER_VOLUME;
g_print("sft. *Set Filter\t");
g_print("sfp. *Set Filter Preset\t");
g_print("uft. *Unset Filter\n");
+ g_print("isd. *Is Stream on Device by ID\n");
g_print(" * is for internal usage.\n");
g_print("=========================================================================================\n");
}
g_print("*** input filter preset of media stream (LOW_PASS(1:none 2:240hz 3:480hz), HIGH_PASS(3:none 4:240hz 5:480hz) DELAY(6:none 7:1sec 8:2sec) SOUNDALIVE(9:normal 10:concert_hall))\n");
else if (g_menu_state == CURRENT_STATUS_UNSET_FILTER)
g_print("*** press enter to unset filter of media stream\n");
+ else if (g_menu_state == CURRENT_STATUS_IS_STREAM_ON_DEVICE_BY_ID)
+ g_print("*** input device id\n");
#ifndef TIZEN_FEATURE_TV_PROD
else if (g_menu_state == CURRENT_STATUS_GET_MAX_MASTER_VOLUME)
g_print("*** press enter to get max master volume level\n");
reset_menu_state();
break;
}
+ case CURRENT_STATUS_IS_STREAM_ON_DEVICE_BY_ID: {
+ int ret = SOUND_MANAGER_ERROR_NONE;
+ int device_id = 0;
+ bool is_on = false;
+
+ device_id = atoi(cmd);
+ ret = sound_manager_is_stream_on_device_by_id(g_stream_info_h, device_id, &is_on);
+ if (ret)
+ g_print("fail to sound_manager_is_stream_on_device_by_id(), device_id(%d), ret(0x%x)\n", device_id, ret);
+ else
+ g_print("stream info is on the device_id(%d): %s\n", device_id, is_on ? "true" : "false");
+ reset_menu_state();
+ break;
+ }
#ifndef TIZEN_FEATURE_TV_PROD
case CURRENT_STATUS_GET_MAX_MASTER_VOLUME: {
int max_level;