|
1 /* |
|
2 * Copyright (c) 2008 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: Seek or trickplay |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 3 % |
|
19 |
|
20 |
|
21 |
|
22 #ifndef _MPXVIDEOSEEKER_H |
|
23 #define _MPXVIDEOSEEKER_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <e32base.h> |
|
27 |
|
28 #include "mpxhelixplaybackplugindefs.h" |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CMPXVideoPlaybackController; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 NONSHARABLE_CLASS(CMPXVideoSeeker) : public CBase |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 |
|
38 /** |
|
39 * Two-phased constructor. |
|
40 */ |
|
41 static CMPXVideoSeeker* NewL( CMPXVideoPlaybackController* aVideoPlaybackCtlr ); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 virtual ~CMPXVideoSeeker(); |
|
47 |
|
48 public: // New functions |
|
49 |
|
50 /** |
|
51 * Start seeking |
|
52 * @param aForward Seeking direction |
|
53 * @param aClipLength Clips length |
|
54 * @return void |
|
55 */ |
|
56 void StartSeekingL( TBool aForward, |
|
57 TMPXVideoPlaybackState aState, |
|
58 TInt64 aPosition, |
|
59 TInt64 aDuration ); |
|
60 |
|
61 /** |
|
62 * Stops seeking |
|
63 * @return void |
|
64 */ |
|
65 void StopSeekingL(); |
|
66 |
|
67 private: |
|
68 |
|
69 /** |
|
70 * C++ default constructor. |
|
71 */ |
|
72 CMPXVideoSeeker( CMPXVideoPlaybackController* aVideoPlaybackCtlr ); |
|
73 |
|
74 /** |
|
75 * By default Symbian 2nd phase constructor is private. |
|
76 */ |
|
77 void ConstructL(); |
|
78 |
|
79 private: |
|
80 |
|
81 /** |
|
82 * Timer callback for stopping trick play |
|
83 * @return KErrNone |
|
84 */ |
|
85 static TInt StopTrickPlay( TAny* aPtr ); |
|
86 |
|
87 /** |
|
88 * stop trick play after 5 sec |
|
89 * @return void |
|
90 */ |
|
91 void DoStopTrickPlay(); |
|
92 |
|
93 /** |
|
94 * convert to seeking from trick play |
|
95 * @return void |
|
96 */ |
|
97 void ConvertToSeeking(); |
|
98 |
|
99 /** |
|
100 * Timer callback for updating position info |
|
101 * @return KErrNone |
|
102 */ |
|
103 static TInt UpdatePosition( TAny* aPtr ); |
|
104 |
|
105 /** |
|
106 * Update position info |
|
107 * @return void |
|
108 */ |
|
109 void DoUpdatePosition(); |
|
110 |
|
111 private: // Data |
|
112 |
|
113 TBool iForward; |
|
114 TMPXVideoPlaybackState iPreviousState; |
|
115 |
|
116 TInt iIncrements; |
|
117 TInt64 iPosition; |
|
118 TInt64 iDuration; |
|
119 |
|
120 CPeriodic* iSeekTimer; |
|
121 CPeriodic* iTrickPlayTimer; |
|
122 |
|
123 CMPXVideoPlaybackController* iVideoPlaybackCtlr; |
|
124 }; |
|
125 |
|
126 #endif // _MPXVIDEOSEEKER_H |
|
127 |
|
128 // End of File |