#include <stdbool.h>
#include <notification.h>
+#include "ivug-datatypes.h"
+
#ifdef __cplusplus
extern "C" {
#endif
bool ivug_ext_launch_gallery();
-bool ivug_ext_launch_videoplayer(const char *uri, bool isLockScreen);
+bool ivug_ext_launch_videoplayer(const char *uri, bool isLockScreen, ivug_view_by type);
#ifdef __cplusplus
}
* @param isLockScreen: lockscreen locked or not
* @return
*/
-bool ivug_ext_launch_videoplayer(const char *uri, bool isLockScreen)
+bool ivug_ext_launch_videoplayer(const char *uri, bool isLockScreen, ivug_view_by type)
{
MSG_IMAGEVIEW_HIGH("URI = %s", uri);
goto VIDEO_PLAYER_END;
}
+ // We need to provide the view to video-player to get the correct video list and keep sync of item order
+ // in between the gallery app and video-player.
+ // folder: videos list from a specific folder. folder is obtained from path of passed file
+ // all_folder_video: video list from the folder available
+ // favorite: List of favorite videos
+ char *list_type_value = NULL;
+ if(type == IVUG_VIEW_BY_FAVORITES) {
+ list_type_value = "favorite";
+ } else {
+ list_type_value = (type == IVUG_VIEW_BY_FOLDER)? "folder" : "all_folder_video";
+ }
+ ret = app_control_add_extra_data(handle, "video_list_type", list_type_value);
+ if (ret != APP_CONTROL_ERROR_NONE) {
+ MSG_IMAGEVIEW_ERROR("app_control_add_extra_data failed, 0x%08x", ret);
+ goto VIDEO_PLAYER_END;
+ }
+
ret = app_control_send_launch_request(handle, ivug_ext_app_control_reply_cb, NULL);
if (ret != APP_CONTROL_ERROR_NONE) {
MSG_IMAGEVIEW_ERROR("app_control_send_launch_request failed, 0x%08x", ret);
} else {
MSG_MAIN_HIGH("Launching video player");
if (pMainView->mode == IVUG_MODE_CAMERA_SIMPLE) {
- ivug_ext_launch_videoplayer(mdata->filepath, true);
+ ivug_ext_launch_videoplayer(mdata->filepath, true, pMainView->view_by);
} else {
- ivug_ext_launch_videoplayer(mdata->filepath, false);
+ ivug_ext_launch_videoplayer(mdata->filepath, false, pMainView->view_by);
}
}
}