equal
deleted
inserted
replaced
14 * Description: This class plays local video file |
14 * Description: This class plays local video file |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 // Version : %version: 29 % |
19 // Version : %version: 32 % |
20 |
20 |
21 |
21 |
22 // |
22 // |
23 // INCLUDE FILES |
23 // INCLUDE FILES |
24 // |
24 // |
68 // ------------------------------------------------------------------------------------------------ |
68 // ------------------------------------------------------------------------------------------------ |
69 // |
69 // |
70 CMPXVideoPlaybackMode::~CMPXVideoPlaybackMode() |
70 CMPXVideoPlaybackMode::~CMPXVideoPlaybackMode() |
71 { |
71 { |
72 MPX_DEBUG(_L("CMPXVideoPlaybackMode::~CMPXVideoPlaybackMode()")); |
72 MPX_DEBUG(_L("CMPXVideoPlaybackMode::~CMPXVideoPlaybackMode()")); |
73 |
73 |
74 if ( iPosterFrameSetter ) |
74 if ( iPosterFrameSetter ) |
75 { |
75 { |
76 delete iPosterFrameSetter; |
76 delete iPosterFrameSetter; |
77 iPosterFrameSetter = NULL; |
77 iPosterFrameSetter = NULL; |
78 } |
78 } |
221 if ( iVideoPlaybackCtlr->IsVideoCall() ) |
221 if ( iVideoPlaybackCtlr->IsVideoCall() ) |
222 { |
222 { |
223 MPX_TRAPD( err, |
223 MPX_TRAPD( err, |
224 iVideoPlaybackCtlr->iState->SendErrorToViewL( KMPXVideoCallOngoingError ) ); |
224 iVideoPlaybackCtlr->iState->SendErrorToViewL( KMPXVideoCallOngoingError ) ); |
225 } |
225 } |
|
226 else if ( iVideoPlaybackCtlr->IsKeyLocked() && |
|
227 iVideoPlaybackCtlr->iFileDetails->iVideoEnabled ) |
|
228 { |
|
229 // playback not allowed for the clip having video if keylock is true |
|
230 // Let playAllowed remain false |
|
231 } |
226 else |
232 else |
227 { |
233 { |
228 playAllowed = ETrue; |
234 playAllowed = ETrue; |
229 } |
235 } |
230 } |
236 } |
285 // ------------------------------------------------------------------------------------------------ |
291 // ------------------------------------------------------------------------------------------------ |
286 // CMPXVideoPlaybackMode::HandleSetPosterFrame() |
292 // CMPXVideoPlaybackMode::HandleSetPosterFrame() |
287 // ------------------------------------------------------------------------------------------------ |
293 // ------------------------------------------------------------------------------------------------ |
288 void CMPXVideoPlaybackMode::HandleFrameReady(TInt /*aError*/) |
294 void CMPXVideoPlaybackMode::HandleFrameReady(TInt /*aError*/) |
289 { |
295 { |
290 MPX_DEBUG(_L("CMPXLocalPlaybackMode::HandleFrameReady()")); |
296 MPX_DEBUG(_L("CMPXLocalPlaybackMode::HandleFrameReady()")); |
291 } |
297 } |
292 //************************************************************************************************// |
298 //************************************************************************************************// |
293 // CMPXLocalPlaybackMode |
299 // CMPXLocalPlaybackMode |
294 //************************************************************************************************// |
300 //************************************************************************************************// |
295 CMPXVideoPlaybackMode* |
301 CMPXVideoPlaybackMode* |
309 } |
315 } |
310 |
316 |
311 void CMPXLocalPlaybackMode::HandleSetPosterFrame() |
317 void CMPXLocalPlaybackMode::HandleSetPosterFrame() |
312 { |
318 { |
313 MPX_DEBUG(_L("CMPXLocalPlaybackMode::HandleSetPosterFrame()")); |
319 MPX_DEBUG(_L("CMPXLocalPlaybackMode::HandleSetPosterFrame()")); |
314 |
320 |
315 // create poster frame setter if it does not already exist |
321 // create poster frame setter if it does not already exist |
316 if ( ! iPosterFrameSetter ) |
322 if ( ! iPosterFrameSetter ) |
317 { |
323 { |
318 TRAP_IGNORE(iPosterFrameSetter = CMPXVideoPosterFrameSetter::NewL( iVideoPlaybackCtlr )); |
324 TRAP_IGNORE(iPosterFrameSetter = CMPXVideoPosterFrameSetter::NewL( iVideoPlaybackCtlr )); |
319 } |
325 } |
320 |
326 |
321 if ( iPosterFrameSetter ) |
327 if ( iPosterFrameSetter ) |
322 { |
328 { |
323 iPosterFrameSetter->RequestPosterFrame(); |
329 iPosterFrameSetter->RequestPosterFrame(); |
324 } |
330 } |
325 } |
331 } |
326 |
332 |
327 void CMPXLocalPlaybackMode::HandleFrameReady(TInt aError) |
333 void CMPXLocalPlaybackMode::HandleFrameReady(TInt aError) |
328 { |
334 { |
329 MPX_DEBUG(_L("CMPXLocalPlaybackMode::HandleFrameReady()")); |
335 MPX_DEBUG(_L("CMPXLocalPlaybackMode::HandleFrameReady()")); |
330 |
336 |
331 iPosterFrameSetter->HandlePosterFrameReady(aError); |
337 iPosterFrameSetter->HandlePosterFrameReady(aError); |
332 } |
338 } |
333 |
339 |
334 |
340 |
335 //************************************************************************************************// |
341 //************************************************************************************************// |
421 if ( iVideoPlaybackCtlr->IsVideoCall() ) |
427 if ( iVideoPlaybackCtlr->IsVideoCall() ) |
422 { |
428 { |
423 MPX_TRAPD(err, |
429 MPX_TRAPD(err, |
424 iVideoPlaybackCtlr->iState->SendErrorToViewL( KMPXVideoCallOngoingError )); |
430 iVideoPlaybackCtlr->iState->SendErrorToViewL( KMPXVideoCallOngoingError )); |
425 } |
431 } |
|
432 else if ( iVideoPlaybackCtlr->IsKeyLocked() && |
|
433 iVideoPlaybackCtlr->iFileDetails->iVideoEnabled ) |
|
434 { |
|
435 // playback not allowed for the clip having video if keylock is true |
|
436 // Let playAllowed remain false |
|
437 } |
426 else |
438 else |
427 { |
439 { |
428 MPX_TRAPD( err, |
440 MPX_TRAPD( err, |
429 playAllowed = !( iVideoPlaybackCtlr->IsVoiceCall() && IsNetworkMode2GL() ) ); |
441 playAllowed = !( iVideoPlaybackCtlr->IsVoiceCall() && IsNetworkMode2GL() ) ); |
430 |
442 |
555 |
567 |
556 void CMPXProgressiveDLPlaybackMode::ConstructL( CMPXVideoPlaybackController* aVideoPlaybackCtlr ) |
568 void CMPXProgressiveDLPlaybackMode::ConstructL( CMPXVideoPlaybackController* aVideoPlaybackCtlr ) |
557 { |
569 { |
558 iVideoPlaybackCtlr = aVideoPlaybackCtlr; |
570 iVideoPlaybackCtlr = aVideoPlaybackCtlr; |
559 |
571 |
|
572 #ifdef USE_S60_DOWNLOAD_MANAGER |
560 // |
573 // |
561 // Create the Download Mgr Interface |
574 // Create the Download Mgr Interface |
562 // |
575 // |
563 iDlMgrIf = CMPXVideoDlMgrIf::NewL( iVideoPlaybackCtlr ); |
576 iDlMgrIf = CMPXVideoDlMgrIf::NewL( iVideoPlaybackCtlr ); |
|
577 #endif // USE_S60_DOWNLOAD_MANAGER |
|
578 |
564 } |
579 } |
565 |
580 |
566 CMPXProgressiveDLPlaybackMode::~CMPXProgressiveDLPlaybackMode() |
581 CMPXProgressiveDLPlaybackMode::~CMPXProgressiveDLPlaybackMode() |
567 { |
582 { |
568 MPX_DEBUG(_L("CMPXProgressiveDLPlaybackMode::~CMPXProgressiveDLPlaybackMode()")); |
583 MPX_DEBUG(_L("CMPXProgressiveDLPlaybackMode::~CMPXProgressiveDLPlaybackMode()")); |
569 |
584 |
|
585 #ifdef USE_S60_DOWNLOAD_MANAGER |
570 if ( iDlMgrIf ) |
586 if ( iDlMgrIf ) |
571 { |
587 { |
572 delete iDlMgrIf; |
588 delete iDlMgrIf; |
573 iDlMgrIf = NULL; |
589 iDlMgrIf = NULL; |
574 } |
590 } |
575 } |
591 #endif // USE_S60_DOWNLOAD_MANAGER |
|
592 |
|
593 } |
|
594 |
|
595 #ifdef USE_S60_DOWNLOAD_MANAGER |
576 |
596 |
577 // ------------------------------------------------------------------------------------------------ |
597 // ------------------------------------------------------------------------------------------------ |
578 // CMPXProgressiveDLPlaybackMode::ConnectToDownloadL() |
598 // CMPXProgressiveDLPlaybackMode::ConnectToDownloadL() |
579 // ------------------------------------------------------------------------------------------------ |
599 // ------------------------------------------------------------------------------------------------ |
580 // |
600 // |
635 MMPXPlaybackPluginObserver::EPPositionChanged, |
655 MMPXPlaybackPluginObserver::EPPositionChanged, |
636 aPosition / KPbMilliMultiplier, |
656 aPosition / KPbMilliMultiplier, |
637 KErrNone ); |
657 KErrNone ); |
638 } |
658 } |
639 |
659 |
|
660 // ------------------------------------------------------------------------------------------------ |
|
661 // CMPXProgressiveDLPlaybackMode::OpenFileL() |
|
662 // ------------------------------------------------------------------------------------------------ |
|
663 void CMPXProgressiveDLPlaybackMode::OpenFileL( const RFile& aMediaFile ) |
|
664 { |
|
665 MPX_ENTER_EXIT(_L("CMPXProgressiveDLPlaybackMode::OpenFileL()")); |
|
666 |
|
667 iDlMgrIf->UpdateDownloadSizeL(); |
|
668 CMPXVideoPlaybackMode::OpenFileL( aMediaFile ); |
|
669 } |
|
670 |
|
671 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
672 // ------------------------------------------------------------------------------------------------ |
|
673 // CMPXProgressiveDLPlaybackMode::OpenFile64L() |
|
674 // ------------------------------------------------------------------------------------------------ |
|
675 void CMPXProgressiveDLPlaybackMode::OpenFile64L( const RFile64& aMediaFile ) |
|
676 { |
|
677 MPX_ENTER_EXIT(_L("CMPXProgressiveDLPlaybackMode::OpenFile64L( RFile64 )")); |
|
678 |
|
679 iDlMgrIf->UpdateDownloadSizeL(); |
|
680 CMPXVideoPlaybackMode::OpenFile64L( aMediaFile ); |
|
681 } |
|
682 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
683 |
|
684 #endif // USE_S60_DOWNLOAD_MANAGER |
|
685 |
640 // End of file |
686 // End of file |