javauis/mmapi_akn/baseline/src/cmmavideourlplayerclipstreamdelegate.cpp
branchRCL_3
changeset 71 d5e927d5853b
parent 66 2455ef1f5bbc
child 83 26b2b12093af
equal deleted inserted replaced
66:2455ef1f5bbc 71:d5e927d5853b
    68     TInt err = aEvent.iErrorCode;
    68     TInt err = aEvent.iErrorCode;
    69 
    69 
    70     if ((aEvent.iEventType == KMMFEventCategoryVideoLoadingComplete) &&
    70     if ((aEvent.iEventType == KMMFEventCategoryVideoLoadingComplete) &&
    71             (iPlayer.iState == ERealized))
    71             (iPlayer.iState == ERealized))
    72     {
    72     {
    73         // Call pause only when doing prefetch.
    73           DEBUG("MMA:CMMAVideoUrlPlayer: Clip stream: HandleEvent KMMFEventCategoryVideoLoadingComplete player State = 200");
    74         // Loading complete will come also when looping.
    74         
    75         if (err == KErrNone)
    75             // Call pause only when doing prefetch.
    76         {
    76             // Loading complete will come also when looping.
    77             err = iPlayer.iController.Pause();
    77             if (err == KErrNone)
    78         }
    78             {
    79 
    79                 err = iPlayer.iController.Pause();
    80         // VideoLoadingComplete-event only completes prefetch sequence
    80             }
    81         // for non-live streams.
    81     
    82         iPlayer.CompletePrefetch(err);
    82             // VideoLoadingComplete-event only completes prefetch sequence
    83     }
    83             // for non-live streams.
       
    84             iPlayer.CompletePrefetch(err);
       
    85             iPlayer.PrepareDisplay();
       
    86    }
    84     else if (aEvent.iEventType == KMMFEventCategoryVideoPrepareComplete)
    87     else if (aEvent.iEventType == KMMFEventCategoryVideoPrepareComplete)
    85     {
    88     {
    86         // going to prefetch state, after Play
    89         // going to prefetch state, after Play
    87         // KMMFEventCategoryVideoLoadingComplete event will be received
    90         // KMMFEventCategoryVideoLoadingComplete event will be received
    88 
    91         DEBUG("MMA:CMMAVideoUrlPlayer: Clip stream: HandleEvent KMMFEventCategoryVideoPrepareComplete");
    89         if (err == KErrNone)
    92         if (err == KErrNone)
    90         {
    93         {
    91             iPlayer.PrepareDisplay();
    94             //iPlayer.PrepareDisplay();
    92 
    95 
    93             // Buffering is done only for non-live streams.
    96             // Buffering is done only for non-live streams.
    94             err = iPlayer.iController.Play();
    97             err = iPlayer.iController.Play();
    95         }
    98         }
    96 
    99