575 { |
576 { |
576 aMedia->SetTextValueL( |
577 aMedia->SetTextValueL( |
577 TMPXAttribute( KMPXMediaVideoKeywords ), |
578 TMPXAttribute( KMPXMediaVideoKeywords ), |
578 *( iVideoPlaybackCtlr->iFileDetails->iKeywords ) ); |
579 *( iVideoPlaybackCtlr->iFileDetails->iKeywords ) ); |
579 } |
580 } |
|
581 |
|
582 // |
|
583 // Creation date/time |
|
584 // |
|
585 if ( attrV & KMPXMediaVideoCreated.iAttributeId ) |
|
586 { |
|
587 aMedia->SetTObjectValueL<TInt>( |
|
588 TMPXAttribute( KMPXMediaVideoCreated ), |
|
589 iVideoPlaybackCtlr->iFileDetails->iCreationTime ); |
|
590 } |
|
591 |
|
592 // |
|
593 // Last Modified date/time |
|
594 // |
|
595 if ( attrV & KMPXMediaVideoLastModified.iAttributeId ) |
|
596 { |
|
597 aMedia->SetTObjectValueL<TInt>( |
|
598 TMPXAttribute( KMPXMediaVideoLastModified ), |
|
599 iVideoPlaybackCtlr->iFileDetails->iModificationTime ); |
|
600 } |
|
601 |
580 } |
602 } |
581 |
603 |
582 // ------------------------------------------------------------------------------------------------ |
604 // ------------------------------------------------------------------------------------------------ |
583 // CMPXVideoPlaybackState::SendErrorToViewL |
605 // CMPXVideoPlaybackState::SendErrorToViewL |
584 // ------------------------------------------------------------------------------------------------ |
606 // ------------------------------------------------------------------------------------------------ |
1714 { |
1736 { |
1715 MPX_DEBUG(_L("CMPXBufferingState::~CMPXBufferingState()")); |
1737 MPX_DEBUG(_L("CMPXBufferingState::~CMPXBufferingState()")); |
1716 } |
1738 } |
1717 |
1739 |
1718 // ------------------------------------------------------------------------------------------------ |
1740 // ------------------------------------------------------------------------------------------------ |
1719 // CMPXBufferingState::HandleLoadingStarted() |
1741 // CMPXBufferingState::HandleLoadingStarted() |
1720 // |
|
1721 // We transition to Buffering state after Play command is issued initially |
|
1722 // |
|
1723 // No state transitions necessary here as we are already in Buffering state |
|
1724 // ------------------------------------------------------------------------------------------------ |
1742 // ------------------------------------------------------------------------------------------------ |
1725 void CMPXBufferingState::HandleLoadingStarted() |
1743 void CMPXBufferingState::HandleLoadingStarted() |
1726 { |
1744 { |
1727 MPX_DEBUG(_L("CMPXBufferingState::HandleLoadingStarted()")); |
1745 MPX_DEBUG(_L("CMPXBufferingState::HandleLoadingStarted()")); |
1728 |
1746 |
1729 // no need to send any events - we are already in buffering state |
1747 TInt loadingPercentage = RetrieveBufferingPercentage(); |
|
1748 |
|
1749 if ( loadingPercentage < 100 ) |
|
1750 { |
|
1751 MPX_TRAPD( err, |
|
1752 { |
|
1753 CMPXMessage* message = CMPXMessage::NewL(); |
|
1754 CleanupStack::PushL( message ); |
|
1755 |
|
1756 message->SetTObjectValueL<TMPXMessageId>( KMPXMessageGeneralId, |
|
1757 KMPXMediaIdVideoPlayback ); |
|
1758 |
|
1759 message->SetTObjectValueL<TMPXVideoPlaybackCommand>( KMPXMediaVideoPlaybackCommand, |
|
1760 EPbCmdLoadingStarted ); |
|
1761 |
|
1762 iVideoPlaybackCtlr->iMPXPluginObs->HandlePlaybackMessage( message, KErrNone ); |
|
1763 |
|
1764 CleanupStack::PopAndDestroy( message ); |
|
1765 } ); |
|
1766 } |
1730 } |
1767 } |
1731 |
1768 |
1732 // ------------------------------------------------------------------------------------------------ |
1769 // ------------------------------------------------------------------------------------------------ |
1733 // CMPXBufferingState::HandleLoadingComplete() |
1770 // CMPXBufferingState::HandleLoadingComplete() |
1734 // ------------------------------------------------------------------------------------------------ |
1771 // ------------------------------------------------------------------------------------------------ |