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 #ifndef MLCVIDEOPLAYER_H |
|
19 #define MLCVIDEOPLAYER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32std.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class MLcWindow; |
|
26 class MLcCameraControl; |
|
27 class MLcCamera; |
|
28 class MLcSourceFileControl; |
|
29 class MLcDestinationFileControl; |
|
30 class MLcAudioControl; |
|
31 class MLcZoomControl; |
|
32 class MLcBrightnessControl; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 /** |
|
36 * A class representing a video player and its controls. |
|
37 */ |
|
38 class MLcVideoPlayer |
|
39 { |
|
40 public: |
|
41 |
|
42 |
|
43 /** |
|
44 * The list of possible video player sources. |
|
45 */ |
|
46 enum TLcVideoPlayerSource |
|
47 { |
|
48 ECameraSource, |
|
49 EFileSource |
|
50 }; |
|
51 |
|
52 /** |
|
53 * The list of possible video player states. |
|
54 */ |
|
55 enum TLcVideoPlayerState |
|
56 { |
|
57 EInit, |
|
58 EPreparing, |
|
59 EBuffering, |
|
60 EPlaying, |
|
61 EPaused, |
|
62 EUnavailable |
|
63 }; |
|
64 |
|
65 /** |
|
66 * Returns the current video player state. |
|
67 * @return the video player state |
|
68 */ |
|
69 virtual TLcVideoPlayerState LcVideoPlayerState() const = 0; |
|
70 |
|
71 /** |
|
72 * Checks whether the video is currently being played. |
|
73 * @return ETrue if the video is being played, otherwise EFalse. |
|
74 */ |
|
75 virtual TBool LcIsPlayingL() = 0; |
|
76 |
|
77 /** |
|
78 * Returns the current video player source. |
|
79 * @return the video player source. |
|
80 */ |
|
81 virtual TLcVideoPlayerSource LcVideoPlayerSourceL() { return ECameraSource; }; |
|
82 |
|
83 /** |
|
84 * Starts to play the source mentioned in the argument |
|
85 * @aSource : One of the sources in TLcVideoPlayerSource enum. |
|
86 * default : Play from camera. |
|
87 */ |
|
88 virtual void LcPlayL( TLcVideoPlayerSource aSource=ECameraSource ) = 0; |
|
89 |
|
90 /** |
|
91 * Pauses the playing of the video. |
|
92 */ |
|
93 virtual void LcPauseL() = 0; |
|
94 |
|
95 /** |
|
96 * Returns the window for the player, if present. |
|
97 * @return the window for the player or NULL if not present |
|
98 */ |
|
99 virtual MLcWindow* LcWindow() = 0; |
|
100 |
|
101 /** |
|
102 * Returns the camera control, |
|
103 * if the video player uses the device's camera |
|
104 * as the source of the played video. |
|
105 * @return the camera control or NULL if not present |
|
106 */ |
|
107 virtual MLcCameraControl* LcCameraControl() = 0; |
|
108 |
|
109 /** |
|
110 * Returns the source file control for the video player, |
|
111 * if the video is played from a local video file. |
|
112 * @return the source file control or NULL if not present |
|
113 */ |
|
114 virtual MLcSourceFileControl* LcSourceFileControl() = 0; |
|
115 |
|
116 /** |
|
117 * Returns the destination file control for the video player, |
|
118 * if the video is being recorded to a local video file. |
|
119 * @return the destination file control or NULL if not present |
|
120 */ |
|
121 virtual MLcDestinationFileControl* LcDestinationFileControl() = 0; |
|
122 |
|
123 /** |
|
124 * Returns the audio control for the player, if present. |
|
125 * @return the audio control for the player or NULL if not present |
|
126 */ |
|
127 virtual MLcAudioControl* LcAudioControl() = 0; |
|
128 |
|
129 /** |
|
130 * Returns the zoom control for the player, if present. |
|
131 * @return the zoom control for the player or NULL if not present |
|
132 */ |
|
133 virtual MLcZoomControl* LcZoomControl() = 0; |
|
134 |
|
135 /** |
|
136 * Returns the brightness control for the player, if present. |
|
137 * @return the brightness control for the player or NULL if not present |
|
138 */ |
|
139 virtual MLcBrightnessControl* LcBrightnessControl() = 0; |
|
140 }; |
|
141 |
|
142 #endif // MLCVIDEOPLAYER_H |
|
143 |
|
144 // end of file |
|