|
1 /* |
|
2 * Copyright (c) 2010 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 * Source file for the main class of the ConsolePlayer test app. |
|
16 * |
|
17 */ |
|
18 |
1 #ifndef OPENMAX_PLAYER_UTILITY_H |
19 #ifndef OPENMAX_PLAYER_UTILITY_H |
2 #define OPENMAX_PLAYER_UTILITY_H |
20 #define OPENMAX_PLAYER_UTILITY_H |
3 |
21 |
4 #include <string.h> |
22 #include <string.h> |
5 #include <e32std.h> |
23 #include <e32std.h> |
13 class COpenMaxPlayerUtility |
31 class COpenMaxPlayerUtility |
14 { |
32 { |
15 public: |
33 public: |
16 COpenMaxPlayerUtility(); |
34 COpenMaxPlayerUtility(); |
17 ~COpenMaxPlayerUtility(); |
35 ~COpenMaxPlayerUtility(); |
18 |
36 |
19 void VideoFrameSize(TSize& aSize) const; |
37 void VideoFrameSize(TSize& aSize) const; |
20 TTimeIntervalMicroSeconds Position() const; |
38 TTimeIntervalMicroSeconds Position() const; |
21 TTimeIntervalMicroSeconds Duration() const; |
39 TTimeIntervalMicroSeconds Duration() const; |
22 TInt Volume() const; |
40 TInt Volume() const; |
23 TInt MaxVolume() const; |
41 TInt MaxVolume() const; |
24 TInt Balance()const; |
42 TInt Balance()const; |
25 TVideoRotation Rotation() const; |
43 TVideoRotation Rotation() const; |
26 |
44 |
27 void SetVolume(TInt aVolume); |
45 void SetVolume(TInt aVolume); |
28 void SetBalance(TInt aBalance); |
46 void SetBalance(TInt aBalance); |
29 void SetPosition(const TTimeIntervalMicroSeconds& aPosition); |
47 void SetPosition(const TTimeIntervalMicroSeconds& aPosition); |
30 void SetRotation(const RWindow& aWindow, TVideoRotation aRotation); |
48 void SetRotation(const RWindow& aWindow, TVideoRotation aRotation); |
31 void SetScaleFactor(const RWindow& aWindow, TReal32 aWidthPercentage, TReal32 aHeightPercentage); |
49 void SetScaleFactor(const RWindow& aWindow, TReal32 aWidthPercentage, TReal32 aHeightPercentage); |
32 void SetAutoScale(const RWindow& aWindow, TAutoScaleType aScaleType); |
50 void SetAutoScale(const RWindow& aWindow, TAutoScaleType aScaleType); |
33 void StepFrame(TInt aStep); |
51 void StepFrame(TInt aStep); |
34 |
52 |
35 void OpenFile(const TDesC& aFileName,TUid aControllerUid = KNullUid); |
53 void OpenFile(const TDesC& aFileName,TUid aControllerUid = KNullUid); |
36 void OpenUrl(const TDesC& aUrl); |
54 void OpenUrl(const TDesC& aUrl); |
37 void Prepare(); |
55 void Prepare(); |
38 void Close(); |
56 void Close(); |
39 void Play(); |
57 void Play(); |
52 void SetBandLevel(XAint16 band, XAboolean increase); |
70 void SetBandLevel(XAint16 band, XAboolean increase); |
53 void PlaySource(const XADataLocator_URI &source); |
71 void PlaySource(const XADataLocator_URI &source); |
54 void PlayPause(bool); |
72 void PlayPause(bool); |
55 void MuteChanged(bool); |
73 void MuteChanged(bool); |
56 TInt SetPlayVelocity( TInt aVelocity ); |
74 TInt SetPlayVelocity( TInt aVelocity ); |
57 |
75 |
58 protected: |
76 protected: |
59 void StartBackLightTimer(); |
77 void StartBackLightTimer(); |
60 void CancelBackLightTimer(); |
78 void CancelBackLightTimer(); |
61 |
79 |
62 private: |
80 private: |
63 XAObjectItf m_engine; /* OpenMAX AL Engine */ |
81 XAObjectItf m_engine; /* OpenMAX AL Engine */ |
64 XAObjectItf player; |
82 XAObjectItf player; |
65 XAObjectItf m_outputMix; |
83 XAObjectItf m_outputMix; |
66 |
84 |
77 XADataSink m_videoSink; |
95 XADataSink m_videoSink; |
78 XADataFormat_MIME m_mime; |
96 XADataFormat_MIME m_mime; |
79 XADataLocator_OutputMix m_locator_outputmix; |
97 XADataLocator_OutputMix m_locator_outputmix; |
80 XADataLocator_NativeDisplay m_locator_displayregion; |
98 XADataLocator_NativeDisplay m_locator_displayregion; |
81 XADataLocator_URI uri; |
99 XADataLocator_URI uri; |
82 |
100 |
83 TRect m_displayRect; |
101 TRect m_displayRect; |
84 int m_nVolume; |
102 int m_nVolume; |
85 int m_Velocity; |
103 int m_Velocity; |
86 XAchar m_sourceName[1000]; |
104 XAchar m_sourceName[1000]; |
87 }; |
105 }; |