正在加载图片...
中国科学技术大学电子工程与信息科学系©2018 <uses-feature android:name="android.hardware.camera"/> <uses-feature android:name="android.hardware.camera.autofocus"/> 表2 android.hardware..Camera的成员函数 成员函数名称 final void addCallbackBuffer(byte[]callbackBuffer) Adds a pre-allocated buffer to the preview callback buffer queue. final void autoFocus(Camera.AutoFocusCallback cb) Starts camera auto-focus and registers a callback function to run when the camera is focused. final void cancelAutoFocus() Cancels any auto-focus function in progress. final boolean enableShutterSound(boolean enabled) Enable or disable the default shutter sound when taking a picture static void getCameralnfo(int camerald,Camera.Cameralnfo cameralnfo) Returns the information about a particular camera. static int getNumberOfCameras() Returns the number of physical cameras available on this device. Camera.Parameters getParameters() Returns the current settings for this Camera service. final void lockO Re-locks the camera to prevent other processes from accessing it. static Camera open(int camerald) Creates a new Camera object to access a particular hardware camera. static Camera open() Creates a new Camera object to access the first back-facing camera on the device. final void reconnect() Reconnects to the camera service after another process used it. final void release() Disconnects and releases the Camera object resources. void setAutoFocusMoveCallback(Camera.AutoFocusMoveCallback cb) Sets camera auto-focus move callback. final void setDisplayOrientation(int degrees) Set the clockwise rotation of preview display in degrees. final void setErrorCallback(Camera.ErrorCallback cb) Registers a callback to be invoked when an error occurs. final void setFaceDetectionListener(Camera.FaceDetectionListener listener) Registers a listener to be notified about the faces detected in the preview frame. final void setOneShotPreviewCallback(Camera.PreviewCallback cb) Installs a callback to be invoked for the next preview frame in addition to displaying it on the screen. void setParameters(Camera.Parameters params) Changes the settings for this Camera service. final void setPreviewCallback(Camera.PreviewCallback cb) Installs a callback to be invoked for every preview frame in addition to displaying them on the screen. final void setPreviewCallback WithBuffer(Camera.PreviewCallback cb) Installs a callback to be invoked for every preview frame,using buffers supplied with addCallbackBuffer(byte[]),in addition to displaying them on the screen. final void setPreviewDisplay(SurfaceHolder holder) Sets the Surface to be used for live preview. 如果您在阅读过程中发现疏漏和错误,请联系《多媒体技术基础》课程组{network,cxh}@ustc.edu.cn中国科学技术大学电子工程与信息科学系© 2018 如果您在阅读过程中发现疏漏和错误,请联系《多媒体技术基础》课程组{network,cxh}@ustc.edu.cn <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera.autofocus" /> 表 2 android.hardware.Camera 的成员函数 成员函数名称 final void addCallbackBuffer(byte[] callbackBuffer) Adds a pre-allocated buffer to the preview callback buffer queue. final void autoFocus(Camera.AutoFocusCallback cb) Starts camera auto-focus and registers a callback function to run when the camera is focused. final void cancelAutoFocus() Cancels any auto-focus function in progress. final boolean enableShutterSound(boolean enabled) Enable or disable the default shutter sound when taking a picture. static void getCameraInfo(int cameraId, Camera.CameraInfo cameraInfo) Returns the information about a particular camera. static int getNumberOfCameras() Returns the number of physical cameras available on this device. Camera.Parameters getParameters() Returns the current settings for this Camera service. final void lock() Re-locks the camera to prevent other processes from accessing it. static Camera open(int cameraId) Creates a new Camera object to access a particular hardware camera. static Camera open() Creates a new Camera object to access the first back-facing camera on the device. final void reconnect() Reconnects to the camera service after another process used it. final void release() Disconnects and releases the Camera object resources. void setAutoFocusMoveCallback(Camera.AutoFocusMoveCallback cb) Sets camera auto-focus move callback. final void setDisplayOrientation(int degrees) Set the clockwise rotation of preview display in degrees. final void setErrorCallback(Camera.ErrorCallback cb) Registers a callback to be invoked when an error occurs. final void setFaceDetectionListener(Camera.FaceDetectionListener listener) Registers a listener to be notified about the faces detected in the preview frame. final void setOneShotPreviewCallback(Camera.PreviewCallback cb) Installs a callback to be invoked for the next preview frame in addition to displaying it on the screen. void setParameters(Camera.Parameters params) Changes the settings for this Camera service. final void setPreviewCallback(Camera.PreviewCallback cb) Installs a callback to be invoked for every preview frame in addition to displaying them on the screen. final void setPreviewCallbackWithBuffer(Camera.PreviewCallback cb) Installs a callback to be invoked for every preview frame, using buffers supplied with addCallbackBuffer(byte[]), in addition to displaying them on the screen. final void setPreviewDisplay(SurfaceHolder holder) Sets the Surface to be used for live preview
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有