* For more details, please refer to sound_manager.h
* @remarks This API must be called before calling the player_prepare() or player_prepare_async()
* to reflect the sound stream information when the player is building.
- *
+ * @remarks This function is related to the following feature:\n
+ * %http://tizen.org/feature/multimedia.player.stream_info\n
+ * If this feature is not supported, the stream_type of the player is fixed to the #SOUND_STREAM_TYPE_MEDIA.
* @param[in] player The handle to the media player
* @param[in] stream_info The sound manager info type
* @return @c 0 on success,
} \
} while (0)
+#define PLAYER_FEATURE_CHECK(fkey) \
+do { \
+ bool __supported__ = false; \
+ if (system_info_get_platform_bool(fkey, &__supported__) != SYSTEM_INFO_ERROR_NONE) { \
+ LOGE("failed to get system feature info"); \
+ return PLAYER_ERROR_INVALID_OPERATION; \
+ } \
+ if (!__supported__) { \
+ LOGW("sound stream feature is not supported."); \
+ return PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE; \
+ } \
+} while (0)
+
#define CONNECTION_RETRY 51
#define CONNECTION_TIME_OUT 50 /* ms */
#define CREATE_CB_TIME_OUT 400 /* ms */
Name: capi-media-player
Summary: A Media Player API
-Version: 0.3.78
+Version: 0.3.79
Release: 0
Group: Multimedia/API
License: Apache-2.0
#define INVALID_DEFAULT_VALUE -1
#define MAX_S_PATH_LEN 32
+#define PLAYER_FEATURE_SOUND_STREAM "http://tizen.org/feature/multimedia.player.stream_info"
typedef enum {
TIZEN_PROFILE_UNKNOWN = 0,
int player_set_sound_stream_info(player_h player, sound_stream_info_h stream_info)
{
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SOUND_STREAM);
PLAYER_INSTANCE_CHECK(player);
muse_player_api_e api = MUSE_PLAYER_API_SET_SOUND_STREAM_INFO;
}
if (is_available == false) {
- ret = PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE;
+ ret = PLAYER_ERROR_INVALID_PARAMETER;
} else {
char *stream_type = NULL;
int stream_index = 0;