os/mm/mmlibs/mmfw/src/Client/Video/mmfvideocallback.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2002-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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __MMF_VIDEO_CALLBACK_H__
    17 #define __MMF_VIDEO_CALLBACK_H__
    18 
    19 #include <videoplayer.h>
    20 #include <videorecorder.h>
    21 #include <fbs.h>
    22 
    23 /**
    24 Active object utility class to allow the Callback to be called asynchronously.
    25 */
    26 class CMMFVideoPlayerCallback : public CActive
    27 	{
    28 public:
    29 	enum TCallbackEvent {
    30 		EOpenCompleteEvent,
    31 		EFrameReadyEvent,
    32 		EPlayCompleteEvent
    33 		};
    34 
    35 public:
    36 	CMMFVideoPlayerCallback(MVideoPlayerUtilityObserver& aCallback);
    37 	~CMMFVideoPlayerCallback();
    38 	void Signal(TInt aError, TCallbackEvent event);
    39 	void SetFrame(CFbsBitmap& aBitmap);
    40 	TRequestStatus& ActiveStatus();
    41 private:
    42 	void RunL();
    43 	void DoCancel();
    44 private:
    45 	TCallbackEvent iEvent;
    46 	MVideoPlayerUtilityObserver& iCallback;
    47 	CFbsBitmap* iBitmap;
    48 	TInt iError;
    49 	};
    50 
    51 /**
    52 Active object utility class to allow the Callback to be called asynchronously.
    53 */
    54 class CMMFVideoRecorderCallback : public CActive
    55 	{
    56 public:
    57 	enum TCallbackEvent {
    58 		EOpenCompleteEvent,
    59 		EPrepareCompleteEvent,
    60 		ERecordCompleteEvent
    61 		};
    62 public:
    63 	CMMFVideoRecorderCallback(MVideoRecorderUtilityObserver& aCallback);
    64 	~CMMFVideoRecorderCallback();
    65 	void Signal(TInt aError, TCallbackEvent event);
    66 private:
    67 	void RunL();
    68 	void DoCancel();
    69 private:
    70 	TCallbackEvent iEvent;
    71 	MVideoRecorderUtilityObserver& iCallback;
    72 	TInt iError;
    73 	};
    74 
    75 #endif //__MMF_VIDEO_CALLBACK_H__