Hello!
I'm using Player to play video from external URI. I need to store a video cache if the user went offline. I've tried to find out how the progressive downloading works. I've created the sample project called "Media Sample Application" and made some changes in _create_player() function of src/player/src/camera-player-view.c file:
static player_h _create_player(camera_player_view *this)
{
player_h player = NULL;
if(player_create(&player) == PLAYER_ERROR_NONE)
{
player_set_sound_type(player, SOUND_TYPE_MEDIA);
player_set_volume(player, 1.0, 1.0);
player_set_looping(player, true);
player_set_uri(player, "http:*Some external link. Forum don't allow to put it here*.mp4");
player_set_display(player, PLAYER_DISPLAY_TYPE_EVAS, GET_DISPLAY(this->video_rect));
player_set_display_mode(player, PLAYER_DISPLAY_MODE_FULL_SCREEN);
player_set_display_visible(player, true);
player_set_progressive_download_path(player, "/opt/usr/apps/org.tizen.media/shared/trusted");
player_prepare(player);
}
return player;
}
For testing I'm using emulator. Without player_set_progressive_download_path() function everything works fine. Video loaded from the server. But when I set the progressive download path, I get an error:
04-17 16:38:29.194 : ERROR / TIZEN_N_PLAYER ( 6663 : 6663 ) : player.c: __convert_error_code(218) > [player_start] PLAYER_ERROR_INVALID_OPERATION(0xffffffda) : core fw error(0x80000409)
I've tried many different paths such as "/opt/usr/apps/org.tizen.media/data" or "/opt/usr/apps/org.tizen.media/cache" but the problem is still present.
In Player API Reference written - "The player state must be set to PLAYER_STATE_IDLE by calling player_create() or player_unprepare()." So I put this function before calling player_prepare(player);
Unfortunately I didn't found any tutorials about progressive downloading method. So maybe I'm doing something wrong. Can you help me?