harmony 鸿蒙native_avscreen_capture.h

  • 2023-10-30
  • 浏览 (385)

native_avscreen_capture.h

Overview

The native_avscreen_capture.h file declares the native APIs used to create an OH_AVScreenCapture instance.

Since

10

Related Modules

AVScreenCapture

Summary

Functions

Name Description
OH_AVScreenCapture_Create (void) Creates an OH_AVScreenCapture instance.
OH_AVScreenCapture_Init (struct OH_AVScreenCapture *capture, OH_AVScreenCaptureConfig config) Initializes parameters related to an OH_AVScreenCapture instance.
OH_AVScreenCapture_StartScreenCapture (struct OH_AVScreenCapture *capture) Starts screen capture and collects original streams. After calling this function, the application can use the callback listeners OH_AVScreenCaptureOnAudioBufferAvailable and OH_AVScreenCaptureOnVideoBufferAvailable to check whether streams are generated.
OH_AVScreenCapture_StopScreenCapture (struct OH_AVScreenCapture *capture) Stops screen capture. This function is used in pair with OH_AVScreenCapture_StartScreenCapture. After calling this function, the application stops screen capture or screen share and releases the microphone.
OH_AVScreenCapture_StartScreenRecording (struct OH_AVScreenCapture *capture) Starts screen recording and collects encoded streams.
NOTE: This function is reserved and will be provided in later versions.
OH_AVScreenCapture_StopScreenRecording (struct OH_AVScreenCapture *capture) Stops screen recording. This function is used in pair with OH_AVScreenCapture_StartScreenRecording.
NOTE: This function is reserved and will be provided in later versions.
OH_AVScreenCapture_AcquireAudioBuffer (struct OH_AVScreenCapture *capture, OH_AudioBuffer **audiobuffer, OH_AudioCaptureSourceType type) Obtains an audio buffer. When calling this function, the application must allocate the memory of the corresponding struct size to the audio buffer.
OH_AVScreenCapture_AcquireVideoBuffer (struct OH_AVScreenCapture *capture, int32_t *fence, int64_t *timestamp, struct OH_Rect *region) Obtains a video buffer. An application can call this function to obtain information such as the video buffer and timestamp.
OH_AVScreenCapture_ReleaseAudioBuffer (struct OH_AVScreenCapture *capture, OH_AudioCaptureSourceType type) Releases an audio buffer.
OH_AVScreenCapture_ReleaseVideoBuffer (struct OH_AVScreenCapture *capture) Releases a video buffer.
OH_AVScreenCapture_SetCallback (struct OH_AVScreenCapture *capture, struct OH_AVScreenCaptureCallback callback) Sets a callback to listen for available video buffers and audio buffers and errors that occur during the function calling.
OH_AVScreenCapture_Release (struct OH_AVScreenCapture *capture) Releases an OH_AVScreenCapture instance. This function is used in pair with OH_AVScreenCapture_Create.
OH_AVScreenCapture_SetMicrophoneEnabled (struct OH_AVScreenCapture *capture, bool isMicrophone) Enables or disables the microphone.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Native APIs

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙AVSource

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

0  赞