1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/src/Client/Video/mmfvideocallback.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,75 @@
1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef __MMF_VIDEO_CALLBACK_H__
1.20 +#define __MMF_VIDEO_CALLBACK_H__
1.21 +
1.22 +#include <videoplayer.h>
1.23 +#include <videorecorder.h>
1.24 +#include <fbs.h>
1.25 +
1.26 +/**
1.27 +Active object utility class to allow the Callback to be called asynchronously.
1.28 +*/
1.29 +class CMMFVideoPlayerCallback : public CActive
1.30 + {
1.31 +public:
1.32 + enum TCallbackEvent {
1.33 + EOpenCompleteEvent,
1.34 + EFrameReadyEvent,
1.35 + EPlayCompleteEvent
1.36 + };
1.37 +
1.38 +public:
1.39 + CMMFVideoPlayerCallback(MVideoPlayerUtilityObserver& aCallback);
1.40 + ~CMMFVideoPlayerCallback();
1.41 + void Signal(TInt aError, TCallbackEvent event);
1.42 + void SetFrame(CFbsBitmap& aBitmap);
1.43 + TRequestStatus& ActiveStatus();
1.44 +private:
1.45 + void RunL();
1.46 + void DoCancel();
1.47 +private:
1.48 + TCallbackEvent iEvent;
1.49 + MVideoPlayerUtilityObserver& iCallback;
1.50 + CFbsBitmap* iBitmap;
1.51 + TInt iError;
1.52 + };
1.53 +
1.54 +/**
1.55 +Active object utility class to allow the Callback to be called asynchronously.
1.56 +*/
1.57 +class CMMFVideoRecorderCallback : public CActive
1.58 + {
1.59 +public:
1.60 + enum TCallbackEvent {
1.61 + EOpenCompleteEvent,
1.62 + EPrepareCompleteEvent,
1.63 + ERecordCompleteEvent
1.64 + };
1.65 +public:
1.66 + CMMFVideoRecorderCallback(MVideoRecorderUtilityObserver& aCallback);
1.67 + ~CMMFVideoRecorderCallback();
1.68 + void Signal(TInt aError, TCallbackEvent event);
1.69 +private:
1.70 + void RunL();
1.71 + void DoCancel();
1.72 +private:
1.73 + TCallbackEvent iEvent;
1.74 + MVideoRecorderUtilityObserver& iCallback;
1.75 + TInt iError;
1.76 + };
1.77 +
1.78 +#endif //__MMF_VIDEO_CALLBACK_H__