diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index 18c9ad1114e260e8815a209e9f199aff24ac1b89..2549186bb979e1605b97ba47c1c02c40d112a6ec 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -316,6 +316,62 @@ declare namespace camera { width: number; } + /** + * Point parameter. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + interface Point { + /** + * x co-ordinate + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + x: number; + /** + * y co-ordinate + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + y: number; + } + + /** + * Enum for camera format type. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + enum CameraFormat { + /** + * YUV 420 Format. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + CAMERA_FORMAT_YUV_420_SP = 0, + + /** + * H.264 Format. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + CAMERA_FORMAT_H264, + + /** + * H.265 Format. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + CAMERA_FORMAT_H265, + + /** + * JPEG Format. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + CAMERA_FORMAT_JPEG + + } + /** * Camera input object. * @since 9 @@ -338,6 +394,108 @@ declare namespace camera { */ getCameraId(): Promise; + /** + * Get supported preview sizes. + * @param format Format to get the supported sizes. + * @param callback Callback used to return the array of supported sizes. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getSupportedPreviewSizes(format: CameraFormat, callback: AsyncCallback>): void; + + /** + * Get supported preview sizes. + * @param format Format to get the supported sizes. + * @return Promise used to return the array of supported sizes. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getSupportedPreviewSizes(format: CameraFormat): Promise>; + + /** + * Get supported photo sizes. + * @param format Format to get the supported sizes. + * @param callback Callback used to return the array of supported sizes. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getSupportedPhotoSizes(format: CameraFormat, callback: AsyncCallback>): void; + + /** + * Get supported photo sizes. + * @param format Format to get the supported sizes. + * @return Promise used to return the array of supported sizes. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getSupportedPhotoSizes(format: CameraFormat): Promise>; + + /** + * Get supported video sizes. + * @param format Format to get the supported sizes. + * @param callback Callback used to return the array of supported sizes. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getSupportedVideoSizes(format: CameraFormat, callback: AsyncCallback>): void; + + /** + * Get supported video sizes. + * @param format Format to get the supported sizes. + * @return Promise used to return the array of supported sizes. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getSupportedVideoSizes(format: CameraFormat): Promise>; + + /** + * Get supported preview Formats. + * @param callback Callback used to return the array of supported formats. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getSupportedPreviewFormats(callback: AsyncCallback>): void; + + /** + * Get supported preview Formats. + * @return Promise used to return the array of supported formats. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getSupportedPreviewFormats(): Promise>; + + /** + * Get supported photo Formats. + * @param callback Callback used to return the array of supported formats. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getSupportedPhotoFormats(callback: AsyncCallback>): void; + + /** + * Get supported photo Formats. + * @return Promise used to return the array of supported formats. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getSupportedPhotoFormats(): Promise>; + + /** + * Get supported video Formats. + * @param callback Callback used to return the array of supported formats. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getSupportedVideoFormats(callback: AsyncCallback>): void; + + /** + * Get supported video Formats. + * @return Promise used to return the array of supported formats. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getSupportedVideoFormats(): Promise>; + /** * Check if device has flash light. * @param callback Callback used to return the flash light support status. @@ -407,6 +565,158 @@ declare namespace camera { setFlashMode(flashMode: FlashMode): Promise; /** + * Checks whether a specified exposure mode is supported. + * @param aeMode Exposure mode. + * @param callback Callback used to return the exposure mode support status. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + isExposureModeSupported(aeMode: ExposureMode, callback: AsyncCallback): void; + + /** + * Checks whether a specified exposure mode is supported. + * @param aeMode Exposure mode + * @return Promise used to return exposure mode support status. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + isExposureModeSupported(aeMode: ExposureMode): Promise; + + /** + * Gets current exposure mode. + * @param callback Callback used to return the current exposure mode. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getExposureMode(callback: AsyncCallback): void; + + /** + * Gets current exposure mode. + * @return Promise used to return the current exposure mode. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getExposureMode(): Promise; + + /** + * Sets exposure mode. + * @param aeMode Exposure mode + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setExposureMode(aeMode: ExposureMode, callback: AsyncCallback): void; + + /** + * Sets Exposure mode. + * @param aeMode Exposure mode + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setExposureMode(aeMode: ExposureMode): Promise; + + /** + * Gets current exposure point. + * @param callback Callback used to return the current exposure point. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getExposurePoint(callback: AsyncCallback): void; + + /** + * Gets current exposure point. + * @return Promise used to return the current exposure point. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getExposurePoint(): Promise; + + /** + * Set the center point of the exposure area. + * @param exposurePoint Exposure point + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setExposurePoint(exposurePoint: Point, callback: AsyncCallback): void; + + /** + * Set the center point of the exposure area. + * @param exposurePoint Exposure point + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setExposurePoint(exposurePoint: Point): Promise; + + /** + * Query the exposure compensation range. + * @param callback Callback used to return the array of compenstation range. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getExposureBiasRange(callback: AsyncCallback>): void; + + /** + * Query the exposure compensation range. + * @return Promise used to return the array of compenstation range. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getExposureBiasRange(): Promise>; + + /** + * Set exposure compensation. + * @param exposureBias Exposure compensation + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setExposureBias(exposureBias: number, callback: AsyncCallback): void; + + /** + * Set exposure compensation. + * @param exposureBias Exposure compensation + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setExposureBias(exposureBias: number): Promise; + + /** + * Query exposure step size. + * @param callback Callback used to return the compenstation step. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getExposureBiasStep(callback: AsyncCallback): void; + + /** + * Query exposure step size. + * @return Promise used to return the compenstation step. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getExposureBiasStep(): Promise; + + /** + * Query the exposure value. + * @param callback Callback used to return the exposure value. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getExposureValue(callback: AsyncCallback): void; + + /** + * Query the exposure value. + * @return Promise used to return the exposure value. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getExposureValue(): Promise; + + /** * Checks whether a specified focus mode is supported. * @param afMode Focus mode. * @param callback Callback used to return the device focus support status. @@ -458,6 +768,56 @@ declare namespace camera { */ setFocusMode(afMode: FocusMode): Promise; + /** + * Sets focus point. + * @param point Target focus point. + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setFocusPoint(point: Point, callback: AsyncCallback): void; + + /** + * Sets focus point. + * @param afMode Target focus point. + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setFocusPoint(point: Point): Promise; + + /** + * Gets current focus point. + * @param callback Callback used to return the current focus point. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getFocusPoint(callback: AsyncCallback): void; + + /** + * Gets current focus point. + * @return Promise used to return the current focus point. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getFocusPoint(): Promise; + + /** + * Gets current focal length. + * @param callback Callback used to return the current focal point. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getFocalLength(callback: AsyncCallback): void; + + /** + * Gets current focal length. + * @return Promise used to return the current focal point. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getFocalLength(): Promise; + /** * Gets all supported zoom ratio range. * @param callback Callback used to return the zoom ratio range. @@ -508,6 +868,58 @@ declare namespace camera { */ setZoomRatio(zoomRatio: number): Promise; + /** + * Query the supported frame rate range. + * @param callback Callback used to return the array of frame rates. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getFrameRateRange(callback: AsyncCallback>): void; + + /** + * Query the supported frame rate range. + * @return Promise used to return the array of frame rates. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getFrameRateRange(): Promise>; + + /** + * Set the minimum frame rate value. + * @param minFrameRate Minimum frame rate that needs to be supported. + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setMinFrameRate(minFrameRate: number, callback: AsyncCallback): void; + + /** + * Set the minimum frame rate value. + * @param minFrameRate Minimum frame rate that needs to be supported. + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setMinFrameRate(minFrameRate: number): Promise; + + /** + * Set the maximum frame rate value. + * @param maxFrameRate Maximum frame rate that needs to be supported. + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setMaxFrameRate(maxFrameRate: number, callback: AsyncCallback): void; + + /** + * Set the maximum frame rate value. + * @param maxFrameRate Maximum frame rate that needs to be supported. + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setMaxFrameRate(maxFrameRate: number): Promise; + /** * Releases instance. * @param callback Callback used to return the result. @@ -533,6 +945,15 @@ declare namespace camera { */ on(type: 'focusStateChange', callback: AsyncCallback): void; + /** + * Subscribes exposure status change event callback. + * @param type Event type. + * @param callback Callback used to get the exposure state change. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + on(type: 'exposureStateChange', callback: AsyncCallback): void; + /** * Subscribes error event callback. * @param type Event type. @@ -597,6 +1018,28 @@ declare namespace camera { FLASH_MODE_ALWAYS_OPEN } + /** + * Enum for exposure mode. + * @since 9 + */ + enum ExposureMode { + /** + * Lock exposure mode. + * @since 9 + */ + EXPOSURE_MODE_LOCKED = 0, + /** + * Auto exposure mode. + * @since 9 + */ + EXPOSURE_MODE_AUTO, + /** + * Continuous automatic exposure. + * @since 9 + */ + EXPOSURE_MODE_CONTINUOUS_AUTO + } + /** * Enum for focus mode. * @since 9 @@ -664,6 +1107,23 @@ declare namespace camera { */ function createCaptureSession(context: Context, callback: AsyncCallback): void; + /** + * Enum for exposure state. + * @since 9 + */ + enum ExposureState { + /** + * Scan state. + * @since 8 + */ + EXPOSURE_STATE_SCAN = 0, + /** + * Converged state. + * @since 8 + */ + EXPOSURE_STATE_CONVERGED + } + /** * Gets a CaptureSession instance. * @param context Current application context. @@ -784,7 +1244,25 @@ declare namespace camera { addOutput(videoOutput: VideoOutput): Promise; /** - * Removes a camera input. + * Adds a camera metadata output. + * @param metadataOutput Target metadata output to add. + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + addOutput(metadataOutput: MetadataOutput, callback: AsyncCallback): void; + + /** + * Adds a camera metadata output. + * @param metadataOutput Target metadata output to add. + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + addOutput(metadataOutput: MetadataOutput): Promise; + + /** + * Removes a camera input. * @param cameraInput Target camera input to remove. * @param callback Callback used to return the result. * @since 9 @@ -855,6 +1333,24 @@ declare namespace camera { */ removeOutput(videoOutput: VideoOutput): Promise; + /** + * Removes a camera metadata output. + * @param metadataOutput Target metadata output to remove. + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + removeOutput(metadataOutput: MetadataOutput, callback: AsyncCallback): void; + + /** + * Removes a camera metadata output. + * @param metadataOutput Target metadata output to remove. + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + removeOutput(metadataOutput: MetadataOutput): Promise; + /** * Starts capture session. * @param callback Callback used to return the result. @@ -1070,6 +1566,26 @@ declare namespace camera { ROTATION_270 = 270 } + interface Location { + /** + * Latitude. + * @since 9 + */ + latitude: number; + + /** + * Longitude. + * @since 9 + */ + longitude: number; + + /** + * Altitude. + * @since 9 + */ + altitude: number; + } + /** * Enumerates the image quality levels. * @since 9 @@ -1115,6 +1631,13 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core */ rotation?: ImageRotation; + + /** + * Photo location. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + location?: Location; } /** @@ -1165,6 +1688,40 @@ declare namespace camera { */ release(): Promise; + /** + * whether to support mirror photo. + * @param callback Callback used to return the mirror support status. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + isMirrorSupported(callback: AsyncCallback): void; + + /** + * Check if device has flash light. + * @return Promise used to return the mirror support status. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + isMirrorSupported(): Promise; + + /** + * Set the mirror photo function switch. + * @param mirror whether to enable the mirror. + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setMirror(mirror: boolean, callback: AsyncCallback): void; + + /** + * Set the mirror photo function switch. + * @param mirror whether to enable the mirror. + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setMirror(mirror: boolean): Promise; + /** * Subscribes capture start event callback. * @param type Event type. @@ -1278,6 +1835,38 @@ declare namespace camera { */ function createVideoOutput(surfaceId: string): Promise; + /** + * Enum for video stabilization mode. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + enum VideoStabilizationMode { + /** + * Turn off video stablization. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + OFF = 0, + /** + * Use standard anti-shake algorithm. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + STANDARD, + /** + * Use anit-shake algorithm that achieve cinematic effects. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + MOVIE, + /** + * Automatic selection. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + AUTO + } + /** * Video output object. * @since 9 @@ -1292,7 +1881,7 @@ declare namespace camera { */ start(callback: AsyncCallback): void; - /** + /** * Start video output. * @return Promise used to return the result. * @since 9 @@ -1316,6 +1905,90 @@ declare namespace camera { */ stop(): Promise; + /** + * pause video recording. + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + pause(callback: AsyncCallback): void; + + /** + * pause video recording. + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + pause(): Promise; + + /** + * resume video recording. + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + resume(callback: AsyncCallback): void; + + /** + * resume video recording. + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + resume(): Promise; + + /** + * Query whether the specified video stabilization mode is supported. + * @param vsMode Video Stabilization mode. + * @param callback Callback used to return if video stablization mode is supported. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + isVideoStablizationModeSupported(vsMode: VideoStabilizationMode, callback: AsyncCallback): void; + + /** + * Query whether the specified video stabilization mode is supported. + * @param callback Callback used to return if video stablization mode is supported. + * @return Promise used to return flash mode support status. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + isVideoStablizationModeSupported(vsMode: VideoStabilizationMode): Promise; + + /** + * Query the video stabilization mode currently in use. + * @param callback Callback used to return the current video stabilization mode. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getActiveVideoStabilizationMode(callback: AsyncCallback): void; + + /** + * Query the video stabilization mode currently in use. + * @return Promise used to return the current video stabilization mode. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getActiveVideoStabilizationMode(): Promise; + + /** + * Set video stabilization mode. + * @param mode video stabilization mode to set. + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setVideoStabilizationMode(mode: VideoStabilizationMode, callback: AsyncCallback): void; + + /** + * Set video stabilization mode. + * @param mode video stabilization mode to set. + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setVideoStabilizationMode(mode: VideoStabilizationMode): Promise; + /** * Release output instance. * @param callback Callback used to return the result. @@ -1377,6 +2050,212 @@ declare namespace camera { interface VideoOutputError extends Error { code: VideoOutputErrorCode; } + + /** + * Creates a MetadataOutput instance. + * @param callback Callback used to return the MetadataOutput instance. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + function createMetadataOutput(callback: AsyncCallback): void; + + /** + * Creates a MetadataOutput instance. + * @return Promise used to return the MetadataOutput instance. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + function createMetadataOutput(): Promise; + + /** + * metadata output type. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + enum MetadataObjectType { + FACE = 0 + } + + /** + * Rectangle + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + interface Rect { + /** + * X coordinator of top left point. + * @param Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + topLeftX: number; + /** + * Y coordinator of top left point. + * @param Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + topLeftY: number; + /** + * Width of this rectangle. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + width: number; + /** + * Height of this rectangle. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + height: number; + } + + /** + * metadata object. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + + interface MetadataObject { + /** + * Get current metadata object type. + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getType(callback: AsyncCallback): void; + + /** + * Get current metadata object type. + * @param Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getType(): Promise; + + /** + * Get current metadata object timestamp in milliseconds. + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getTimestamp(callback: AsyncCallback): void; + + /** + * Get current metadata object timestamp in milliseconds. + * @param Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getTimestamp(): Promise; + + /** + * Get the axis-aligned bounding box of detected metadata object. + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getBoundingBox(callback: AsyncCallback): void; + + /** + * Get the axis-aligned bounding box of detected metadata object. + * @param Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getBoundingBox(): Promise; + } + + /** + * Metadata face object. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + interface MetadataFaceObject extends MetadataObject { + } + + /** + * Metadata Output object + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + interface MetadataOutput { + /** + * get all the available metadata Object Types + * @param callback Callback used to return the array of metadata object types. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getAvailableMetadataObjectTypes(callback: AsyncCallback>): void; + + /** + * get all the available metadata Object Types + * @return Promise used to return an array of metadata object types. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + getAvailableMetadataObjectTypes(): Promise>; + + /** + * Set target metadata object types to be captured. + * @param metadataObjectTypes Array of MetadataObjectType. + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setCapturingMetadataObjectTypes(metadataObjectTypes: Array, callback: AsyncCallback): void; + + /** + * Set target metadata object types to be captured. + * @param metadataObjectTypes Array of MetadataObjectType. + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + setCapturingMetadataObjectTypes(metadataObjectTypes: Array): Promise; + + /** + * Start output metadata + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + start(callback: AsyncCallback): void; + + /** + * Start output metadata + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + start(): Promise; + + /** + * Stop output metadata + * @param callback Callback used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + stop(callback: AsyncCallback): void; + + /** + * Stop output metadata + * @return Promise used to return the result. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + stop(): Promise; + + /** + * Subscribes to metadata objects available event callback. + * @param type Event type. + * @param callback Callback used to get the available metadata objects. + * @since 9 + * @syscap SystemCapability.Multimedia.Camera.Core + */ + on(type: 'metadataObjectsAvailable', callback: AsyncCallback>): void; + } } export default camera; +