Removed "player_interrupted_code_e" depricated enum values. 70/172170/2
authorNidhi jain <nidhi.j@samsung.com>
Thu, 8 Mar 2018 09:28:10 +0000 (14:58 +0530)
committerNidhi jain <nidhi.j@samsung.com>
Mon, 12 Mar 2018 09:41:57 +0000 (15:11 +0530)
    Removed _vp_mm_player_priv_convert_interrupt().
    Removed the code, handling the depricated enums values:
    PLAYER_INTERRUPTED_COMPLETED
    PLAYER_INTERRUPTED_BY_MEDIA
    PLAYER_INTERRUPTED_BY_CALL
    PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG
    PLAYER_INTERRUPTED_BY_ALARM
    PLAYER_INTERRUPTED_BY_EMERGENCY
    PLAYER_INTERRUPTED_BY_NOTIFICATION

Change-Id: Ic50866bcf889d21a614b78ef97bd1e69684f18ee

playview/src/core/vp-mm-player.c
playview/src/view/vp-play-normal-view.c

index fa1a0d8..d9a0490 100644 (file)
@@ -234,43 +234,6 @@ static int _vp_mm_player_priv_convert_error(int nCode, bool bAppToFW)
  * @param bAppToFW
  * @return
  */
-static int _vp_mm_player_priv_convert_interrupt(int nCode, bool bAppToFW)
-{
-
-       if (bAppToFW) {
-               switch (nCode) {
-               case PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT:
-                       return VP_MM_PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT;
-               }
-       } else {
-               switch (nCode) {
-               case VP_MM_PLAYER_INTERRUPTED_COMPLETED:
-                       return PLAYER_INTERRUPTED_COMPLETED;
-               case VP_MM_PLAYER_INTERRUPTED_BY_MEDIA:
-                       return PLAYER_INTERRUPTED_BY_MEDIA;
-               case VP_MM_PLAYER_INTERRUPTED_BY_CALL:
-                       return PLAYER_INTERRUPTED_BY_CALL;
-               case VP_MM_PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG:
-                       return PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG;
-               case VP_MM_PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT:
-                       return PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT;
-               case VP_MM_PLAYER_INTERRUPTED_BY_ALARM:
-                       return PLAYER_INTERRUPTED_BY_ALARM;
-               case VP_MM_PLAYER_INTERRUPTED_BY_EMERGENCY:
-                       return PLAYER_INTERRUPTED_BY_EMERGENCY;
-               case VP_MM_PLAYER_INTERRUPTED_NOTIFICATION:
-                       return PLAYER_INTERRUPTED_BY_NOTIFICATION;
-               }
-       }
-       return 0;
-}
-
-/**
- *
- * @param nCode
- * @param bAppToFW
- * @return
- */
 static int _vp_mm_player_priv_convert_player_state(int nCode,
                                                                                                   bool bAppToFW)
 {
@@ -437,15 +400,12 @@ static void __vp_mm_player_pipe_interrupted_cb(void *pUserData,
        MMPlayer *pMMPlayer = (MMPlayer *) pUserData;
 
        if (pMMPlayer->pCbFunc->pInterruptedCb) {
-               int nInterruptCode = 0;
                if (pMMPlayer->pInterruptParam) {
-                       nInterruptCode =
-                               _vp_mm_player_priv_convert_interrupt
-                               (pMMPlayer->pInterruptParam->nInterrupt, TRUE);
+                       int nInterruptCode = pMMPlayer->pInterruptParam->nInterrupt;
+                       if (nInterruptCode == PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT) {
+                               pMMPlayer->pCbFunc->pInterruptedCb(nInterruptCode, pMMPlayer->pParam);
+                       }
                }
-
-               pMMPlayer->pCbFunc->pInterruptedCb(nInterruptCode,
-                                                                                  pMMPlayer->pParam);
        }
 
        return;
index 2d6b96c..8a5425c 100644 (file)
@@ -4667,41 +4667,11 @@ static void __vp_normal_interrupted_cb(vp_mm_player_interrupt_t nCode,
                return;
        }
 
-       NormalView *pNormalView = (NormalView *) pUserData;
-       PlayView *pPlayView = pNormalView->pPlayView;
-
-       if (!pPlayView) {
-               VideoLogError("pPlayView is NULL");
-       }
        VideoLogWarning("== %d ==", nCode);
 
-       if (nCode == VP_MM_PLAYER_INTERRUPTED_COMPLETED) {
-               if (pNormalView->bManualPause == FALSE) {
-                       vp_mm_player_play(pNormalView->pPlayerHandle);
-                       if (pPlayView && pPlayView->win_minicon) {
-                               vp_minicontroller_update_control(pPlayView);
-                       }
-                       if (pPlayView && pPlayView->win_lockmini) {
-                               vp_lockscreenmini_update_control(pPlayView);
-                       }
-               }
-       } else if (nCode == VP_MM_PLAYER_INTERRUPTED_BY_MEDIA) {
-               pNormalView->bManualPause = TRUE;
-       } else if (nCode == VP_MM_PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG) {
-               if (pNormalView->bDeviceRemoveInterrupt) {
-                       if (pNormalView->bManualPause == FALSE) {
-                               vp_mm_player_play(pNormalView->pPlayerHandle);
-                               if (pPlayView && pPlayView->win_minicon) {
-                                       vp_minicontroller_update_control(pPlayView);
-                               }
-                               if (pPlayView && pPlayView->win_lockmini) {
-                                       vp_lockscreenmini_update_control(pPlayView);
-                               }
-                       }
-                       pNormalView->bDeviceRemoveInterrupt = FALSE;
-               }
-       } else if (nCode == VP_MM_PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT) {
+       if (nCode == VP_MM_PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT) {
 
+               NormalView *pNormalView = (NormalView *) pUserData;
                PlayView *pPlayView = pNormalView->pPlayView;
                if (!pPlayView) {
                        VideoLogError("pPlayView is NULL");
@@ -4717,8 +4687,6 @@ static void __vp_normal_interrupted_cb(vp_mm_player_interrupt_t nCode,
                return;
        }
 
-       _vp_play_normal_view_set_play_state(pNormalView);
-       _vp_play_normal_view_on_capture_mode(pNormalView);
 }
 
 /**