sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __MMF_VIDEO_CALLBACK_H__ sl@0: #define __MMF_VIDEO_CALLBACK_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: /** sl@0: Active object utility class to allow the Callback to be called asynchronously. sl@0: */ sl@0: class CMMFVideoPlayerCallback : public CActive sl@0: { sl@0: public: sl@0: enum TCallbackEvent { sl@0: EOpenCompleteEvent, sl@0: EFrameReadyEvent, sl@0: EPlayCompleteEvent sl@0: }; sl@0: sl@0: public: sl@0: CMMFVideoPlayerCallback(MVideoPlayerUtilityObserver& aCallback); sl@0: ~CMMFVideoPlayerCallback(); sl@0: void Signal(TInt aError, TCallbackEvent event); sl@0: void SetFrame(CFbsBitmap& aBitmap); sl@0: TRequestStatus& ActiveStatus(); sl@0: private: sl@0: void RunL(); sl@0: void DoCancel(); sl@0: private: sl@0: TCallbackEvent iEvent; sl@0: MVideoPlayerUtilityObserver& iCallback; sl@0: CFbsBitmap* iBitmap; sl@0: TInt iError; sl@0: }; sl@0: sl@0: /** sl@0: Active object utility class to allow the Callback to be called asynchronously. sl@0: */ sl@0: class CMMFVideoRecorderCallback : public CActive sl@0: { sl@0: public: sl@0: enum TCallbackEvent { sl@0: EOpenCompleteEvent, sl@0: EPrepareCompleteEvent, sl@0: ERecordCompleteEvent sl@0: }; sl@0: public: sl@0: CMMFVideoRecorderCallback(MVideoRecorderUtilityObserver& aCallback); sl@0: ~CMMFVideoRecorderCallback(); sl@0: void Signal(TInt aError, TCallbackEvent event); sl@0: private: sl@0: void RunL(); sl@0: void DoCancel(); sl@0: private: sl@0: TCallbackEvent iEvent; sl@0: MVideoRecorderUtilityObserver& iCallback; sl@0: TInt iError; sl@0: }; sl@0: sl@0: #endif //__MMF_VIDEO_CALLBACK_H__