1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MUSHENGCLIPVIDEOPLAYER_H |
|
20 #define MUSHENGCLIPVIDEOPLAYER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "musenglocalvideoplayer.h" |
|
24 #include "musunittesting.h" |
|
25 #include <lcsourcefilecontrol.h> |
|
26 |
|
27 // CLASS DECLARATION |
|
28 class CMusEngClipVideoPlayer : |
|
29 public CMusEngLocalVideoPlayer, |
|
30 public MLcSourceFileControl |
|
31 { |
|
32 MUS_UNITTEST( UT_CMusEngClipVideoPlayer ) |
|
33 |
|
34 public: // Constructors and destructor |
|
35 |
|
36 static CMusEngClipVideoPlayer* NewL( |
|
37 MMusEngDisplayHandler& aDisplayHandler, |
|
38 MLcAudioControl& aLcAudioControl ); |
|
39 |
|
40 ~CMusEngClipVideoPlayer(); |
|
41 |
|
42 public: // New functions |
|
43 |
|
44 TBool HasClipEnded(); |
|
45 |
|
46 void SetBufferingPeriod( const TTimeIntervalMicroSeconds& aPeriod ); |
|
47 |
|
48 public: // From MLcVideoPlayer |
|
49 |
|
50 TBool LcIsPlayingL(); |
|
51 |
|
52 void LcPlayL(); |
|
53 |
|
54 void LcPauseL(); |
|
55 |
|
56 MLcSourceFileControl* LcSourceFileControl(); |
|
57 |
|
58 public: // From MLcSourceFileControl |
|
59 |
|
60 void SetLcFileNameL( const TFileName& aFileName ); |
|
61 |
|
62 TFileName& LcFileName(); |
|
63 |
|
64 void LcFastForwardL( TBool aUseFFWD ); |
|
65 |
|
66 void LcFastRewindL( TBool aUseFRWD ); |
|
67 |
|
68 TTimeIntervalSeconds LcFileDurationL(); |
|
69 |
|
70 TTimeIntervalSeconds LcFilePositionL(); |
|
71 |
|
72 void SetLcFilePositionL( const TTimeIntervalSeconds& aPosition ); |
|
73 |
|
74 private: // Constructors |
|
75 |
|
76 CMusEngClipVideoPlayer( |
|
77 MMusEngDisplayHandler& aDisplayHandler, |
|
78 MLcAudioControl& aLcAudioControl ); |
|
79 |
|
80 private: // Helper functions |
|
81 |
|
82 TBool IsProtectedFileL( const TDesC& aClipFile ); |
|
83 |
|
84 TTimeIntervalMicroSeconds PositionMicroSecondsL( |
|
85 TBool aActualPosition = EFalse ); |
|
86 |
|
87 TTimeIntervalMicroSeconds GetVideoSinkRelativeFilePos( |
|
88 const TTimeIntervalMicroSeconds& aActualPosition, |
|
89 const TTimeIntervalMicroSeconds& aDuration ); |
|
90 |
|
91 private: // Data |
|
92 |
|
93 TFileName iFileName; |
|
94 TTime iFFWDStartTime; |
|
95 TTime iFRWDStartTime; |
|
96 TTimeIntervalMicroSeconds iBufferingPeriod; |
|
97 TTimeIntervalMicroSeconds iDelayFileEndingPos; |
|
98 TTimeIntervalMicroSeconds iPreviousPos; |
|
99 TBool iRewindedToBeginning; |
|
100 }; |
|
101 |
|
102 #endif // MUSHENGCLIPVIDEOPLAYER_H |
|
103 |
|
104 // End of file |
|
105 |
|