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

📄 vrexviewfinder.h

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

#ifndef __VIDEOVIEWFINDER_H__
#define __VIDEOVIEWFINDER_H__

#include <e32base.h>
#include <ecam.h>
#include <coecntrl.h>

/**
 *  CVideoViewFinder class
 *  Contains the video view finder control.
 */
class CVideoViewFinder : public CCoeControl, public MCameraObserver
    {
    public: // Constructors and destructor
        /**
         * C++ default constructor.
         */
        CVideoViewFinder();

        /**
         * Destructor.
         */
        virtual ~CVideoViewFinder();

	    /**
         * Second phase constructor.
         */
    	void ConstructL(TInt aCamera);

	public:	// New functions
	    enum TFinderState
	    	{
	    	EFinderInactive = 0,
	    	EFinderInitializing,
	    	EFinderFailed,
	    	EFinderActive
	    	};

		/**
		 * This method starts video view finder.
         * @return void
		 */
		void StartL();

		/**
		 * This method stops video view finder.
		 * @return void
		 */
		void Stop();

		/**
		 * This method gets the state of video view finder.
		 * @return finder state
		 */
		TFinderState State() const;

		/**
		 * This method returns camera handle.
		 * @return camera handle
		 */
		TInt CameraHandle();

	private: // from CCoeControl
		/**
		 * See CCoeControl::Draw(const TRect& aRect) const
		 */
    	void Draw(const TRect& aRect) const;

    private: // Data
	    TFinderState iState;
        CCamera* iCamera;
        TPoint iFinderPosition;

	public: // Functions from MCameraObserver
		/**
		 * See MCameraObserver::ReserveComplete(TInt aError)
		 */
	 	void ReserveComplete(TInt aError);

		/**
		 * See MCameraObserver::PowerOnComplete(TInt aError)
		 */
		void PowerOnComplete(TInt aError);

		/**
		 * See MCameraObserver::ViewFinderFrameReady(CFbsBitmap& aFrame)
		 */
		void ViewFinderFrameReady(CFbsBitmap& aFrame);

		/**
		 * See MCameraObserver::ImageReady(CFbsBitmap* aBitmap, HBufC8* aData, 
         * TInt aError)
		 */
		void ImageReady(CFbsBitmap* aBitmap, HBufC8* aData, TInt aError);

		/**
		 * See MCameraObserver::FrameBufferReady(MFrameBuffer* aFrameBuffer, 
         * TInt aError)
		 */
		void FrameBufferReady(MFrameBuffer* aFrameBuffer, TInt aError);
    };

#endif // _VIDEOVIEWFINDER_H

⌨️ 快捷键说明

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