*/
/**
- * @addtogroup CAPI_MEDIA_PLAYER_MODULE
- * @{
- */
-
-/**
* @brief The media player's type handle.
* @since_tizen 2.3
*/
#endif
/**
- * @}
- */
-
-/**
- * @addtogroup CAPI_MEDIA_PLAYER_DISPLAY_MODULE
- * @{
- */
-
-/**
* @brief Enumeration for display rotation type.
* @since_tizen 2.3
*/
} player_display_mode_e;
/**
- * @}
- */
-
-/**
- * @addtogroup CAPI_MEDIA_PLAYER_STREAM_INFO_MODULE
- * @{
- */
-
-/**
* @brief Enumeration for media stream content information.
* @since_tizen 2.3
*/
} player_content_info_e;
/**
- * @}
- */
-
-
-/**
- * @addtogroup CAPI_MEDIA_PLAYER_SUBTITLE_MODULE
- * @{
- */
-
-/**
* @brief Called when the subtitle is updated.
* @since_tizen 2.3
* @param[in] duration The duration of the updated subtitle
typedef void (*player_subtitle_updated_cb)(unsigned long duration, char *text, void *user_data);
/**
- * @}
- */
-
-/**
- * @addtogroup CAPI_MEDIA_PLAYER_MODULE
- * @{
- */
-
-/**
* @brief Called when the media player is prepared.
* @since_tizen 2.3
* @details It will be invoked when player has reached the begin of stream.
/**
* @brief Called to register for notifications about delivering video data when every video frame is decoded.
- * @param[in] video_data video stream data
+ * @param[in] video_data video decoded data
* @param[in] user_data The user data passed from the callback registration function
*/
typedef bool (*legacy_player_media_packet_video_decoded_cb)(void *video_data, void *user_data);
int legacy_player_get_media_stream_buffer_min_threshold(legacy_player_h player, player_stream_type_e type, unsigned int *percent);
/**
- * @}
- */
-
-/**
- * @addtogroup CAPI_MEDIA_PLAYER_DISPLAY_MODULE
- * @{
- */
-
-/**
* @brief Sets the video display mode.
* @since_tizen 2.3
* @remarks If no display is set, no operation is performed.
*/
int legacy_player_get_display_rotation(legacy_player_h player, player_display_rotation_e *rotation);
-/**
- * @}
- */
-
-
-/**
- * @addtogroup CAPI_MEDIA_PLAYER_STREAM_INFO_MODULE
- * @{
- */
-
/**
* @brief Gets the media content information.
* @since_tizen 2.3
int legacy_player_get_duration(legacy_player_h player, int64_t *duration);
/**
- * @}
- */
-
-
-/**
- * @addtogroup CAPI_MEDIA_PLAYER_AUDIO_EFFECT_MODULE
- * @{
- */
-
-/**
* @brief Gets the number of equalizer bands.
* @since_tizen 2.3
* @param[in] player The handle to the media player
int legacy_player_audio_effect_equalizer_is_available(legacy_player_h player, bool *available);
/**
- * @}
- */
-
-
-/**
- * @addtogroup CAPI_MEDIA_PLAYER_MODULE
- * @{
- */
-
-/**
* @brief Captures the video frame, asynchronously.
* @since_tizen 2.3
* @param[in] player The handle to the media player
int legacy_player_set_playback_rate(legacy_player_h player, float rate);
/**
- * @}
- */
-
-/**
- * @addtogroup CAPI_MEDIA_PLAYER_SUBTITLE_MODULE
- * @{
- */
-
-/**
* @brief Sets a subtitle path.
* @since_tizen 2.3
* @remarks Only MicroDVD/SubViewer(*.sub), SAMI(*.smi), and SubRip(*.srt) subtitle formats are supported.
int legacy_player_pitch_set_value(legacy_player_h player, float pitch);
int legacy_player_pitch_get_value(legacy_player_h player, float *pitch);
-/**
- * @}
- */
-
#ifdef __cplusplus
}
#endif
PLAYER_NULL_ARG_CHECK(callback);
PLAYER_STATE_CHECK(handle, PLAYER_STATE_IDLE);
- ret = mm_player_set_video_stream_callback(handle->mm_handle, (mm_player_video_stream_callback)callback, user_data);
+ ret = mm_player_set_video_decoded_callback(handle->mm_handle, (mm_player_video_decoded_callback)callback, user_data);
if (ret != MM_ERROR_NONE)
return __player_convert_error_code(ret, (char *)__FUNCTION__);
int ret = MM_ERROR_NONE;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(callback);
+ mmplayer_audio_extract_opt_e opt = MM_PLAYER_AUDIO_EXTRACT_DEINTERLEAVE; /* sync is true */
PLAYER_STATE_CHECK(handle, PLAYER_STATE_IDLE);
- ret = mm_player_set_audio_stream_callback(handle->mm_handle, sync, __audio_stream_callback, (void *)handle);
+ if (!sync)
+ opt = MM_PLAYER_AUDIO_EXTRACT_NO_SYNC_WITH_CLOCK | MM_PLAYER_AUDIO_EXTRACT_DEINTERLEAVE;
+
+ ret = mm_player_set_audio_decoded_callback(handle->mm_handle, opt, __audio_stream_callback, (void *)handle);
if (ret != MM_ERROR_NONE)
return __player_convert_error_code(ret, (char *)__FUNCTION__);
return ret;
}
-static void _audio_frame_decoded_cb(player_audio_raw_data_s *audio_frame, void *user_data)
+static void _audio_decoded_cb(player_audio_raw_data_s *audio_frame, void *user_data)
{
muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_AUDIO_FRAME;
set_callback_func[type] (muse_player->player_handle, module, set);
} else {
ret = PLAYER_ERROR_INVALID_OPERATION;
+ PLAYER_RETURN_MSG(MUSE_PLAYER_API_SET_CALLBACK, ret, module);
}
return ret;
muse_player = (muse_player_handle_t *)muse_server_ipc_get_handle(module);
player_msg_get(sync, muse_server_module_get_msg(module));
- ret = legacy_player_set_pcm_extraction_mode(muse_player->player_handle, sync, _audio_frame_decoded_cb, module);
+ ret = legacy_player_set_pcm_extraction_mode(muse_player->player_handle, sync, _audio_decoded_cb, module);
PLAYER_RETURN_MSG(api, ret, module);