⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vrexrecorderadapter.h

📁 S60 实现了录制和播放的功能
💻 H
字号:
/*
* ============================================================================
*  Name     : CVideoRecorderAdapter from VRexRecorderAdapter.h
*  Part of  : Video Example
*  Created  : 30/08/2006 by Forum  Nokia
*  Implementation notes:
*  Version  : 2.0
*  Copyright: Nokia Corporation, 2006
* ============================================================================
*/

#ifndef __VIDEORECORDERADAPTER_H__
#define __VIDEORECORDERADAPTER_H__


#include <e32base.h>
#include <VideoRecorder.h>

class MPlayerUIControllerListener;
class CVRexEngine;

/**
 *  CVideoRecorderAdapter
 *  Used to handle video recorder specific tasks.
 */
class CVideoRecorderAdapter : public CBase, public MVideoRecorderUtilityObserver,
    public MBeating
	{
	public: // Constructors and destructor

		enum TRecorderState
		{
			ENotInitialized = 0,
			EInitialized,
			EOpenCompelete,
			ERecording,
			ERecordComplete
		};

		/**
         * Two-phased constructor.
         */
		static CVideoRecorderAdapter* NewL(CVRexEngine* aEngine);

		/**
         * Two-phased constructor.
         */
		static CVideoRecorderAdapter* NewLC(CVRexEngine* aEngine);

		/**
         * Destructor.
         */
		~CVideoRecorderAdapter();

	public: // New functions
		/**
		 * This method initiates recording sequence.
         * @param aCallback, callback listener
         * @param aCameraHandle, camera handle
         * @return void
		 */
		void StartL(MPlayerUIControllerListener* aCallback, TInt aCameraHandle);

		/**
		 * This method stops recording.
         * @return void
		 */
		void StopL();

 		/**
		 * This method gets the state of video recorder engine.
         * @return recorder state
		 */
		TRecorderState State() const { return iState; }

	public: // Functions from MVideoRecorderUtilityObserver
	    /**
		 * See MVideoRecorderUtilityObserver::MvpuoOpenComplete(TInt aError).
		 */
		void MvruoOpenComplete(TInt aError);

	    /**
		 * See MVideoRecorderUtilityObserver::MvpuoPrepareComplete(TInt aError).
		 */
		void MvruoPrepareComplete(TInt aError) ;

	    /**
		 * See MVideoRecorderUtilityObserver::MvruoRecordComplete(TInt aError).
		 */
		void MvruoRecordComplete(TInt aError);

	    /**
		 * See MVideoRecorderUtilityObserver::MvpuoEvent(const TMMFEvent& aEvent).
		 */
		void MvruoEvent(const TMMFEvent& aEvent);

 	public: // Functions from MBeating
        /**
		 * See MBeating::Beat()
		 */
        void Beat();

        /**
		 * See MBeating::Synchronize()
		 */
        void Synchronize();

	private:
	   /**
        * EPOC 2nd phase constructor.
        */
		void ConstructL();

	   /**
        * Default constructor.
        */
		CVideoRecorderAdapter(CVRexEngine* aEngine);

	   /**
        * This method starts recording.
		* @return void
		*/
		void Record();

	private: // data members
		CVRexEngine* iEngine;
		CVideoRecorderUtility* iUtility;
		TRecorderState iState;
		TDes8* iDes;

		// The UI listener for the video engine
		MPlayerUIControllerListener* iCtrlrListener;

		// Update the time progress when video is playing
		CHeartbeat* iProgressUpdater;

		// The poistion of a recording video clip
		TInt64 iRecPosition;

		// Controller and format uids
		TUid iControllerUid, iFormatUid;
	};

#endif //__VIDEORECORDERADAPTER_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -