PLAYER_ERROR_NOT_SUPPORTED_VIDEO_CODEC = PLAYER_ERROR_CLASS | 0x0f, /**< Not supported video codec but audio can be played (Since 4.0) */
PLAYER_ERROR_NOT_SUPPORTED_SUBTITLE = PLAYER_ERROR_CLASS | 0x10, /**< Not supported subtitle format (Since 4.0) */
PLAYER_ERROR_NOT_SUPPORTED_FORMAT = PLAYER_ERROR_CLASS | 0x11, /**< Not supported format (Since 5.5) */
+ PLAYER_ERROR_NOT_AVAILABLE = PLAYER_ERROR_CLASS | 0x12, /**< Not available operation (Since 5.5)*/
} player_error_e;
/**
} player_audio_extract_option_e;
/**
+ * @brief Enumeration for codec type.
+ * @since_tizen 5.5
+ */
+typedef enum {
+ PLAYER_CODEC_TYPE_HW, /**< This is an optional flag for using the H/W codec */
+ PLAYER_CODEC_TYPE_SW, /**< This is an optional flag for using the S/W codec */
+} player_codec_type_e;
+
+/**
* @}
*/
* If it's high mode, audio output interval can be increased so, it can keep more audio data to play.
* But, state transition like pause or resume can be more slower than default(mid) mode.
* @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION and
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE and
* this will not work at all even if it was called before enabling offload. (Since 5.5)
* @param[in] player The handle to the media player
* @param[in] latency_mode The latency mode to be applied to the audio
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @see #audio_latency_mode_e
* @see player_get_audio_latency_mode()
* @see player_audio_offload_set_enabled()
+ * @see player_audio_offload_is_enabled()
*/
int player_set_audio_latency_mode(player_h player, audio_latency_mode_e latency_mode);
* @brief Gets the current audio latency mode.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
* @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[out] latency_mode The latency mode to get from the audio
* @return @c 0 on success,
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @see #audio_latency_mode_e
* @see player_set_audio_latency_mode()
* @see player_audio_offload_set_enabled()
+ * @see player_audio_offload_is_enabled()
*/
int player_get_audio_latency_mode(player_h player, audio_latency_mode_e *latency_mode);
* The packet has to be destroyed as quickly as possible after rendering the data\n
* and all the packets have to be destroyed before player_unprepare() is called.\n
* @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION and
- * this will not work at all even if it was called before enabling offload. (Since 5.5)
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE and
+ * this will not work at all even if this was called before enabling offload.
+ * @remarks This function could be unavailable depending on the audio codec type and
+ * this will return #PLAYER_ERROR_NOT_AVAILABLE.
* @remarks If the content is encrypted or there are copyright issues with it,
* this function could be unsupported depending on the DRM policy.
* @param[in] player The handle to the media player
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_STATE Invalid state
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available
* @pre The player's state must be #PLAYER_STATE_IDLE.
* @see player_unset_media_packet_audio_frame_decoded_cb()
* @see player_audio_offload_set_enabled()
+ * @see player_audio_offload_is_enabled()
+ * @see player_set_audio_codec_type()
+ * @see player_get_audio_codec_type()
* @par Example
@code
#include <player.h>
/**
* @brief Unsets the media packet audio frame decoded callback function.
* @since_tizen 5.5
+ * @remarks Depending on the audio codec type or by enabling audio offload,
+ * this function could be unavailable and this will return #PLAYER_ERROR_NOT_AVAILABLE.
* @param[in] player The handle to the media player
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_STATE Invalid state
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available
* @pre The player's state must be #PLAYER_STATE_READY or #PLAYER_STATE_IDLE
* @see player_set_media_packet_audio_frame_decoded_cb()
+ * @see player_audio_offload_set_enabled()
+ * @see player_audio_offload_is_enabled()
+ * @see player_set_audio_codec_type()
+ * @see player_get_audio_codec_type()
*/
int player_unset_media_packet_audio_frame_decoded_cb(player_h player);
/**
* @brief Gets the number of equalizer bands.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
- * @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * @remarks If player_audio_effect_equalizer_is_available() returns @a available parameter as @c false,
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[out] count The number of equalizer bands
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation (Since 5.5)
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @see player_audio_effect_equalizer_is_available()
* @see player_audio_effect_set_equalizer_band_level()
* @see player_audio_effect_set_equalizer_all_bands()
- * @see player_audio_offload_set_enabled()
*/
int player_audio_effect_get_equalizer_bands_count(player_h player, int *count);
/**
* @brief Sets the gain set for the given equalizer band.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
- * @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION and
- * this will not work at all even if it was called before enabling offload. (Since 5.5)
+ * @remarks If player_audio_effect_equalizer_is_available() returns @a available parameter as @c false,
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE and
+ * this will not work at all even if it was called before enabling audio offload
+ * which makes audio effect function group unavailable. (Since 5.5)
* @param[in] player The handle to the media player
* @param[in] index The index of the equalizer band to be set
* @param[in] level The new gain in decibel that is set to the given band [dB]
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @see player_audio_effect_equalizer_is_available()
* @see player_audio_effect_get_equalizer_bands_count()
* @see player_audio_effect_get_equalizer_level_range()
/**
* @brief Gets the gain set for the given equalizer band.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
- * @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * @remarks If player_audio_effect_equalizer_is_available() returns @a available parameter as @c false,
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[in] index The index of the requested equalizer band
* @param[out] level The gain in decibel of the given band [dB]
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation (Since 5.5)
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @see player_audio_effect_equalizer_is_available()
* @see player_audio_effect_set_equalizer_band_level()
- * @see player_audio_offload_set_enabled()
*/
int player_audio_effect_get_equalizer_band_level(player_h player, int index, int *level);
/**
* @brief Sets all bands of the equalizer.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
- * @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION and
- * this will not work at all even if it was called before enabling offload. (Since 5.5)
+ * @remarks If player_audio_effect_equalizer_is_available() returns @a available parameter as @c false,
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE and
+ * this will not work at all even if it was called before enabling audio offload
+ * which makes audio effect function group unavailable. (Since 5.5)
* @param[in] player The handle to the media player
* @param[in] band_levels The list of band levels to be set
* @param[in] length The length of the band level
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @see player_audio_effect_equalizer_is_available()
* @see player_audio_effect_get_equalizer_bands_count()
* @see player_audio_effect_get_equalizer_level_range()
/**
* @brief Gets the valid band level range of the equalizer.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
- * @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * @remarks If player_audio_effect_equalizer_is_available() returns @a available parameter as @c false,
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[out] min The minimum value to be set [dB]
* @param[out] max The maximum value to be set [dB]
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @see player_audio_effect_equalizer_is_available()
* @see player_audio_effect_set_equalizer_band_level()
* @see player_audio_effect_set_equalizer_all_bands()
- * @see player_audio_offload_set_enabled()
*/
int player_audio_effect_get_equalizer_level_range(player_h player, int *min, int *max);
/**
* @brief Gets the band frequency of the equalizer.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
- * @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * @remarks If player_audio_effect_equalizer_is_available() returns @a available parameter as @c false,
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[in] index The index of the requested equalizer band
* @param[out] frequency The frequency of the given band [dB]
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation (Since 5.5)
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @see player_audio_effect_equalizer_is_available()
- * @see player_audio_offload_set_enabled()
*/
int player_audio_effect_get_equalizer_band_frequency(player_h player, int index, int *frequency);
/**
* @brief Gets the band frequency range of the equalizer.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
- * @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * @remarks If player_audio_effect_equalizer_is_available() returns @a available parameter as @c false,
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[in] index The index of the requested equalizer band
* @param[out] range The frequency range of the given band [dB]
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation (Since 5.5)
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @see player_audio_effect_equalizer_is_available()
- * @see player_audio_offload_set_enabled()
*/
int player_audio_effect_get_equalizer_band_frequency_range(player_h player, int index, int *range);
/**
* @brief Clears the equalizer effect.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
- * @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * @remarks If player_audio_effect_equalizer_is_available() returns @a available parameter as @c false,
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @see player_audio_effect_equalizer_is_available()
* @see player_audio_effect_set_equalizer_band_level()
* @see player_audio_effect_set_equalizer_all_bands()
- * @see player_audio_offload_set_enabled()
*/
int player_audio_effect_equalizer_clear(player_h player);
/**
* @brief Checks whether the custom equalizer effect is available.
+ * @details This function returns the availability of the audio effect function group and
+ * it could be unavailable depending on the platform capabilities.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
* @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
- * @param[in] player The handle to the media player
+ * @a available will be @c false.
+ * @param[in] player The handle to the media player
* @param[out] available If @c true the specified audio effect is available,
* otherwise @c false
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation (Since 5.5)
* @see player_audio_effect_set_equalizer_band_level()
* @see player_audio_effect_set_equalizer_all_bands()
* @see player_audio_offload_set_enabled()
+ * @see player_audio_offload_is_enabled()
+ * @see player_set_audio_codec_type()
+ * @see player_get_audio_codec_type()
*/
int player_audio_effect_equalizer_is_available(player_h player, bool *available);
* @remarks No operation is performed, if @a rate is @c 0.
* @remarks The sound is muted, when playback rate is under @c 0.0 and over @c 2.0.
* @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[in] rate The playback rate (-5.0x ~ 5.0x)
* @return @c 0 on success,
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
* @see player_audio_offload_set_enabled()
*/
* @details Index starts from 0.
* @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
* @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[in] type The type of target stream which is #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_TEXT
* @param[out] index The index of track
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED
* @see player_audio_offload_set_enabled()
*/
* @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
* @remarks @a code must be released with @c free() by caller
* @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[in] type The type of target stream which is #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_TEXT
* @param[in] index The index of track
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED
* @see player_audio_offload_set_enabled()
*/
* @brief Gets the track count.
* @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
* @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[in] type The type of target stream which is #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_TEXT
* @param[out] count The number of track
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED
* @see player_audio_offload_set_enabled()
*/
* @brief Selects a track to play.
* @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
* @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[in] type The type of target stream which is #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_TEXT
* @param[in] index The index of track
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED
* @see player_get_current_track()
* @see player_audio_offload_set_enabled()
* If it is @c false, the replaygain isn't affected by tag and properties.
* @since_tizen 5.0
* @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION and
- * this will not work at all even if it was called before enabling offload. (Since 5.5)
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE and
+ * this will not work at all even if this was called before enabling offload. (Since 5.5)
+ * @remarks This function could be unavailable depending on the audio codec type and
+ * this will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[in] enabled The new replaygain status: (@c true = enable, @c false = disable)
* @return @c 0 on success,
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @see player_is_replaygain_enabled()
* @see player_audio_offload_set_enabled()
+ * @see player_audio_offload_is_enabled()
+ * @see player_set_audio_codec_type()
+ * @see player_get_audio_codec_type()
*/
int player_set_replaygain_enabled(player_h player, bool enabled);
/**
* @brief Gets the player's replaygain status.
* @since_tizen 5.0
- * @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * @remarks Depending on audio codec type or by enabling audio offload,
+ * this function could be unavailable and this will return #PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
* @param[in] player The handle to the media player
* @param[out] enabled Pointer to store current replaygain status:
* (@c true = enabled replaygain,
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
* @see player_set_replaygain_enabled()
* @see player_audio_offload_set_enabled()
+ * @see player_audio_offload_is_enabled()
+ * @see player_set_audio_codec_type()
+ * @see player_get_audio_codec_type()
*/
int player_is_replaygain_enabled(player_h player, bool *enabled);
* @remarks This function is used for audio content only.
* @remarks Enabling pitch control could increase the CPU usage on some devices.
* @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION and
- * this will not work at all even if it was called before enabling offload. (Since 5.5)
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE and
+ * this will not work at all even if this was called before enabling offload.
+ * @remarks This function could be unavailable depending on the audio codec type and
+ * this will return #PLAYER_ERROR_NOT_AVAILABLE.
* @param[in] player The handle to the media player
* @param[in] enabled The new audio pitch control status (default: false)
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available
* @pre The player state must be #PLAYER_STATE_IDLE.
* @see player_audio_pitch_is_enabled()
* @see player_audio_pitch_set_value()
* @see player_audio_pitch_get_value()
* @see player_audio_offload_set_enabled()
+ * @see player_audio_offload_is_enabled()
+ * @see player_set_audio_codec_type()
+ * @see player_get_audio_codec_type()
*/
int player_audio_pitch_set_enabled(player_h player, bool enabled);
* @brief Gets the status of controlling the pitch of audio.
* @since_tizen 5.5
* @remarks This function is used for audio content only.
- * @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * @remarks Depending on audio codec type or by enabling audio offload,
+ * this function could be unavailable and this will return #PLAYER_ERROR_NOT_AVAILABLE.
* @param[in] player The handle to the media player
* @param[out] enabled The audio pitch control status (default: false)
* @return @c 0 on success,
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available
* @see player_audio_pitch_set_enabled()
* @see player_audio_pitch_set_value()
* @see player_audio_pitch_get_value()
* @see player_audio_offload_set_enabled()
+ * @see player_audio_offload_is_enabled()
+ * @see player_set_audio_codec_type()
+ * @see player_get_audio_codec_type()
*/
int player_audio_pitch_is_enabled(player_h player, bool *enabled);
* @since_tizen 5.5
* @remarks This function is used for audio content only.
* @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION and
- * this will not work at all even if it was called before enabling offload. (Since 5.5)
+ * this function will return #PLAYER_ERROR_NOT_AVAILABLE and
+ * this will not work at all even if this was called before enabling offload.
+ * @remarks This function could be unavailable depending on the audio codec type and
+ * this will return #PLAYER_ERROR_NOT_AVAILABLE.
* @param[in] player The handle to the media player
* @param[in] value The audio stream pitch value \n
* Valid range is 0.5~2. Default value is 1.
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available
* @pre The pitch control must be enabled by calling player_audio_pitch_set_enabled() function.
* @see player_audio_pitch_set_enabled()
* @see player_audio_pitch_is_enabled()
* @see player_audio_pitch_get_value()
* @see player_audio_offload_set_enabled()
+ * @see player_audio_offload_is_enabled()
+ * @see player_set_audio_codec_type()
+ * @see player_get_audio_codec_type()
*/
int player_audio_pitch_set_value(player_h player, float value);
* @brief Gets the pitch of audio.
* @since_tizen 5.5
* @remarks This function is used for audio content only.
- * @remarks If audio offload is enabled by calling player_audio_offload_set_enabled(),
- * this function will return #PLAYER_ERROR_INVALID_OPERATION. (Since 5.5)
+ * @remarks Depending on audio codec type or by enabling audio offload,
+ * this function could be unavailable and this will return #PLAYER_ERROR_NOT_AVAILABLE.
* @param[in] player The handle to the media player
* @param[out] value The audio stream pitch value \n
* Valid range is 0.5~2. Default value is 1.
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_NOT_AVAILABLE Not available
* @see player_audio_pitch_set_enabled()
* @see player_audio_pitch_is_enabled()
* @see player_audio_pitch_set_value()
* @see player_audio_offload_set_enabled()
+ * @see player_audio_offload_is_enabled()
+ * @see player_set_audio_codec_type()
+ * @see player_get_audio_codec_type()
*/
int player_audio_pitch_get_value(player_h player, float *value);
* @since_tizen 5.5
* @remarks This function is related to the following feature:\n
* %http://tizen.org/feature/multimedia.player.audio_offload\n
- * The sound stream type of the player should be #SOUND_STREAM_TYPE_MEDIA.\n
- * If audio offload is enabled, the following functions will return #PLAYER_ERROR_INVALID_OPERATION
+ * @remarks The sound stream type of the player should be #SOUND_STREAM_TYPE_MEDIA.\n
+ * @remarks If audio offload is enabled, functions for audio effect are not available.\n
+ * @remarks If audio offload is enabled, the following functions will return #PLAYER_ERROR_NOT_AVAILABLE
* and they will not work at all even if they were called before enabling offload. :\n
- * player_audio_effect_get_equalizer_bands_count()\n
- * player_audio_effect_set_equalizer_band_level()\n
- * player_audio_effect_get_equalizer_band_level()\n
- * player_audio_effect_set_equalizer_all_bands()\n
- * player_audio_effect_get_equalizer_level_range()\n
- * player_audio_effect_get_equalizer_band_frequency()\n
- * player_audio_effect_get_equalizer_band_frequency_range()\n
- * player_audio_effect_equalizer_clear()\n
- * player_audio_effect_equalizer_is_available()\n
* player_set_media_packet_audio_frame_decoded_cb()\n
+ * player_unset_media_packet_audio_frame_decoded_cb()\n
* player_set_audio_latency_mode()\n
* player_get_audio_latency_mode()\n
* player_set_playback_rate()\n
* @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature
* @pre The player state must be #PLAYER_STATE_IDLE.
* @see player_set_sound_stream_info()
+ * @see player_audio_effect_equalizer_is_available()
* @see player_set_interrupted_cb()
* @see player_audio_offload_foreach_supported_format()
* @see player_audio_offload_is_enabled()
int player_audio_offload_is_activated(player_h player, bool *activated);
/**
+ * @brief Sets the default codec type of the audio decoder.
+ * @since_tizen 5.5
+ * @remarks The default codec type could be different depending on the device capability.
+ * S/W codec type is supported basically.
+ * @remarks If selected H/W audio codec type does not support in some cases,
+ * S/W audio codec type could be used instead.\n
+ * @remarks If application use the H/W audio codec type by default,
+ * following functions should be called after setting codec type
+ * because the availability could be changed depending on the codec capability. :\n
+ * player_audio_effect_equalizer_is_available()\n
+ * player_set_media_packet_audio_frame_decoded_cb()\n
+ * player_unset_media_packet_audio_frame_decoded_cb()\n
+ * player_set_replaygain_enabled()\n
+ * player_is_replaygain_enabled()\n
+ * player_audio_pitch_set_enabled()\n
+ * player_audio_pitch_is_enabled()\n
+ * player_audio_pitch_set_value()\n
+ * player_audio_pitch_get_value()\n
+ * @param[in] player The handle to the media player
+ * @param[in] codec_type The default codec type
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #PLAYER_ERROR_NONE Successful
+ * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
+ * @retval #PLAYER_ERROR_NOT_SUPPORTED_AUDIO_CODEC Not support audio codec type
+ * @pre The player state must be #PLAYER_STATE_IDLE by player_create() or player_unprepare().
+ * @see player_get_audio_codec_type()
+ */
+int player_set_audio_codec_type(player_h player, player_codec_type_e codec_type);
+
+/**
+ * @brief Gets the default codec type of the audio decoder.
+ * @since_tizen 5.5
+ * @param[in] player The handle to the media player
+ * @param[out] codec_type The default codec type
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #PLAYER_ERROR_NONE Successful
+ * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @see player_set_audio_codec_type()
+ */
+int player_get_audio_codec_type(player_h player, player_codec_type_e *codec_type);
+
+/**
* @}
*/
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif
- * @see player_get_streaming_buffering_time()
+ * @see player_set_streaming_buffering_time()
*/
int player_get_streaming_buffering_time(player_h player, int *prebuffer_ms, int *rebuffer_ms);