PLAYER_INSTANCE_CHECK(player);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
+ if (!__player_state_validate(handle, PLAYER_STATE_READY))
{
LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
return PLAYER_ERROR_INVALID_STATE;
{
PLAYER_INSTANCE_CHECK(player);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
int value = 0;
if(looping==TRUE)
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(looping);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
int count;
+
int ret = mm_player_get_attribute(handle->mm_handle, NULL,MM_PLAYER_PLAYBACK_COUNT , &count, (char*)NULL);
if(ret != MM_ERROR_NONE)
{
int wl_window_height = 0;
#endif
int ret;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
if (type != PLAYER_DISPLAY_TYPE_NONE && display == NULL)
{
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(count);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE (0x%08x) : current state - %d" ,__FUNCTION__, PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
int ret = mm_player_audio_effect_custom_get_eq_bands_number(handle->mm_handle, count);
if(ret != MM_ERROR_NONE)
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(band_levels);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE (0x%08x) : current state - %d" ,__FUNCTION__, PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
int ret = mm_player_audio_effect_custom_set_level_eq_from_list(handle->mm_handle, band_levels, length);
if(ret != MM_ERROR_NONE)
{
PLAYER_INSTANCE_CHECK(player);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE (0x%08x) : current state - %d" ,__FUNCTION__, PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
int ret = mm_player_audio_effect_custom_set_level(handle->mm_handle,MM_AUDIO_EFFECT_CUSTOM_EQ, index, level);
if(ret != MM_ERROR_NONE)
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(level);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE (0x%08x) : current state - %d" ,__FUNCTION__, PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
int ret = mm_player_audio_effect_custom_get_level(handle->mm_handle,MM_AUDIO_EFFECT_CUSTOM_EQ, index, level);
if(ret != MM_ERROR_NONE)
PLAYER_NULL_ARG_CHECK(min);
PLAYER_NULL_ARG_CHECK(max);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE (0x%08x) : current state - %d" ,__FUNCTION__, PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
int ret = mm_player_audio_effect_custom_get_level_range(handle->mm_handle, MM_AUDIO_EFFECT_CUSTOM_EQ, min, max);
if(ret != MM_ERROR_NONE)
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(frequency);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE (0x%08x) : current state - %d" ,__FUNCTION__, PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
int ret = mm_player_audio_effect_custom_get_eq_bands_freq(handle->mm_handle, index, frequency);
if(ret != MM_ERROR_NONE)
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(range);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE (0x%08x) : current state - %d" ,__FUNCTION__, PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
int ret = mm_player_audio_effect_custom_get_eq_bands_width(handle->mm_handle, index, range);
if(ret != MM_ERROR_NONE)
{
PLAYER_INSTANCE_CHECK(player);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE (0x%08x) : current state - %d" ,__FUNCTION__, PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
int ret = mm_player_audio_effect_custom_clear_eq_all(handle->mm_handle);
if(ret != MM_ERROR_NONE)
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(available);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE (0x%08x) : current state - %d" ,__FUNCTION__, PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
int ret = mm_player_is_supported_custom_effect_type(handle->mm_handle, MM_AUDIO_EFFECT_CUSTOM_EQ);
if(ret != MM_ERROR_NONE)
{
PLAYER_INSTANCE_CHECK(player);
player_s * handle = (player_s *) player;
- /**/
- PLAYER_CHECK_CONDITION(handle->error_code == PLAYER_ERROR_NONE, PLAYER_ERROR_NOT_SUPPORTED_FILE, "can't support this format");
- if (handle->state < PLAYER_STATE_IDLE || handle->state > PLAYER_STATE_PAUSED)
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,
- __FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
+ PLAYER_CHECK_CONDITION(handle->error_code == PLAYER_ERROR_NONE,
+ PLAYER_ERROR_NOT_SUPPORTED_FILE, "can't support this format");
int ret = mm_player_submit_packet(handle->mm_handle, packet);
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(max_size);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
+
unsigned long long _max_size;
int ret = mm_player_get_media_stream_buffer_max_size(handle->mm_handle, type, &_max_size);
if(ret != MM_ERROR_NONE)
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(percent);
player_s * handle = (player_s *) player;
- if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
- {
- LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
- return PLAYER_ERROR_INVALID_STATE;
- }
+
unsigned int _value;
int ret = mm_player_get_media_stream_buffer_min_percent(handle->mm_handle, type, &_value);
if(ret != MM_ERROR_NONE)
case PLAYER_STREAM_TYPE_AUDIO:
track_type = MM_PLAYER_TRACK_TYPE_AUDIO;
break;
- case PLAYER_STREAM_TYPE_VIDEO:
- track_type = MM_PLAYER_TRACK_TYPE_VIDEO;
- break;
case PLAYER_STREAM_TYPE_TEXT:
track_type = MM_PLAYER_TRACK_TYPE_TEXT;
break;
case PLAYER_STREAM_TYPE_AUDIO:
track_type = MM_PLAYER_TRACK_TYPE_AUDIO;
break;
- case PLAYER_STREAM_TYPE_VIDEO:
- track_type = MM_PLAYER_TRACK_TYPE_VIDEO;
- break;
case PLAYER_STREAM_TYPE_TEXT:
track_type = MM_PLAYER_TRACK_TYPE_TEXT;
break;
case PLAYER_STREAM_TYPE_AUDIO:
track_type = MM_PLAYER_TRACK_TYPE_AUDIO;
break;
- case PLAYER_STREAM_TYPE_VIDEO:
- track_type = MM_PLAYER_TRACK_TYPE_VIDEO;
- break;
case PLAYER_STREAM_TYPE_TEXT:
track_type = MM_PLAYER_TRACK_TYPE_TEXT;
break;