First public contribution.
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef MDFPLAYERENGINE_H
17 #define MDFPLAYERENGINE_H
21 class MMdfVideoPlayerHwDeviceObserver
24 /** Get system time. May come from a local or external source.
25 @return The system time as a TUint.
27 virtual TUint Time() const = 0;
30 Is a frame (a decoded picture) available.
31 @return ETrue if a frame is available.
33 virtual TBool FrameAvailable() const = 0;
38 virtual void DisplayFrame() = 0;
43 virtual void DiscardFrame() = 0;
48 This manages the playing of decoded frames for the DevVideo hardware device.
51 class CMdfVideoPlayerEngine : public CBase
54 static CMdfVideoPlayerEngine* NewL(MMdfVideoPlayerHwDeviceObserver& aDeviceObserver);
55 ~CMdfVideoPlayerEngine();
57 void StartL(TUint aFrameRate);
63 CMdfVideoPlayerEngine(MMdfVideoPlayerHwDeviceObserver& aDeviceObserver);
65 static TInt DisplayFrame(TAny* aObject);
66 void DoDisplayFrame();
68 // indicate that player should run unsynchronized
69 static const TInt KUnsynchronized = -1;
72 // the maximum frame rate of the engine, in fps
73 // NB the actual maximum frame rate of the decoder may be higher.
74 static const TInt KMaxFrameRate = 100;
76 // tick timer to manage playback
83 // count of frames processed by the engine
86 // the HwDevice observer
87 MMdfVideoPlayerHwDeviceObserver& iDeviceObserver;
90 #endif // MDFPLAYERENGINE_H