harmony 鸿蒙native_avscreen_capture_base.h
native_avscreen_capture_base.h
Overview
The native_avscreen_capture_base.h file declares the common structs, character constants, and enums used for running screen capture.
Library: libnative_avscreen_capture.so
File to include:
System capability: SystemCapability.Multimedia.Media.AVScreenCapture
Since: 10
Related module: AVScreenCapture
Summary
Structs
Name | Description |
---|---|
struct OH_AudioCaptureInfo | Describes the audio capture information. |
struct OH_AudioEncInfo | Describes the audio encoding information. |
struct OH_AudioInfo | Describes the audio information. |
struct OH_VideoCaptureInfo | Describes the video capture information. |
struct OH_VideoEncInfo | Describes the video encoding information. |
struct OH_VideoInfo | Describes the video information. |
struct OH_RecorderInfo | Describes the recording file information. |
struct OH_AVScreenCaptureConfig | Describes the screen capture configuration. |
struct OH_AVScreenCaptureCallback | Describes all the asynchronous callback function pointers of an OH_AVScreenCapture instance. |
struct OH_Rect | Describes the width, height, and image information of the rectangle used for screen capture. |
struct OH_AudioBuffer | Describes the configuration such as the size, type, and timestamp of audio data. |
Types
Name | Description |
---|---|
typedef struct OH_NativeBuffer OH_NativeBuffer | Defines the native video stream class for screen capture. |
typedef struct OH_AVScreenCapture OH_AVScreenCapture | Defines a screen capture instance used to obtain original video and audio streams. |
typedef struct OH_AVScreenCapture_ContentFilter OH_AVScreenCapture_ContentFilter | Defines a struct that describes the filter used to filter audio and video content. |
typedef enum OH_CaptureMode OH_CaptureMode | Defines an enum for the screen capture modes. |
typedef enum OH_AudioCaptureSourceType OH_AudioCaptureSourceType | Defines an enum for the audio source types during screen capture. |
typedef enum OH_AudioCodecFormat OH_AudioCodecFormat | Defines an enum for the audio encoding formats. |
typedef enum OH_VideoCodecFormat OH_VideoCodecFormat | Defines an enum for the video encoding formats. |
typedef enum OH_DataType OH_DataType | Defines an enum for the data types of screen capture streams. |
typedef enum OH_VideoSourceType OH_VideoSourceType | Defines an enum for the video source formats. Currently, only the RGBA format is supported. |
typedef enum OH_ContainerFormatType OH_ContainerFormatType | Defines an enum for the types of files generated during screen capture. |
typedef struct OH_AudioCaptureInfo OH_AudioCaptureInfo | Defines a struct that describes the audio capture information. |
typedef struct OH_AudioEncInfo OH_AudioEncInfo | Defines a struct that describes the audio encoding information. |
typedef struct OH_AudioInfo OH_AudioInfo | Defines a struct that describes the audio information. |
typedef struct OH_VideoCaptureInfo OH_VideoCaptureInfo | Defines a struct that describes the video capture information. |
typedef struct OH_VideoEncInfo OH_VideoEncInfo | Defines a struct that describes the video encoding information. |
typedef struct OH_VideoInfo OH_VideoInfo | Defines a struct that describes the video information. |
typedef struct OH_RecorderInfo OH_RecorderInfo | Defines a struct that describes the recording file information. |
typedef struct OH_AVScreenCaptureConfig OH_AVScreenCaptureConfig | Defines a struct that describes the screen capture configuration. |
typedef void(* OH_AVScreenCaptureOnError) (OH_AVScreenCapture *capture, int32_t errorCode) | Defines a pointer to a callback function that is called when an error occurs during the running of an OH_AVScreenCapture instance. |
typedef void(* OH_AVScreenCaptureOnAudioBufferAvailable) (OH_AVScreenCapture *capture, bool isReady, OH_AudioCaptureSourceType type) | Defines a pointer to a callback function that is called when an audio buffer is available during the running of an OH_AVScreenCapture instance. |
typedef void(* OH_AVScreenCaptureOnVideoBufferAvailable) (OH_AVScreenCapture *capture, bool isReady) | Defines a pointer to a callback function that is called when a video buffer is available during the running of an OH_AVScreenCapture instance. |
typedef struct OH_AVScreenCaptureCallback OH_AVScreenCaptureCallback | Defines a struct that describes all the asynchronous callback function pointers of an OH_AVScreenCapture instance. |
typedef struct OH_Rect OH_Rect | Defines a struct that describes the width, height, and image information of the rectangle used for screen capture. |
typedef struct OH_AudioBuffer OH_AudioBuffer | Defines a struct that describes the configuration such as the size, type, and timestamp of audio data. |
typedef enum OH_AVScreenCaptureStateCode OH_AVScreenCaptureStateCode | Defines an enum for the screen capture states. |
typedef enum OH_AVScreenCaptureBufferType OH_AVScreenCaptureBufferType | Defines an enum for the buffer types. |
typedef enum OH_AVScreenCaptureFilterableAudioContent OH_AVScreenCaptureFilterableAudioContent | Defines an enum for the types of audio that can be added to a content filter. |
typedef void(* OH_AVScreenCapture_OnStateChange) (struct OH_AVScreenCapture *capture, OH_AVScreenCaptureStateCode stateCode, void *userData) | Defines a pointer to a callback function that is called when the state changes during the running of an OH_AVScreenCapture instance. |
typedef void(* OH_AVScreenCapture_OnError) (OH_AVScreenCapture *capture, int32_t errorCode, void *userData) | Defines a pointer to a callback function that is called when an error occurs during the running of an OH_AVScreenCapture instance. |
typedef void(* OH_AVScreenCapture_OnBufferAvailable) (OH_AVScreenCapture *capture, OH_AVBuffer *buffer, OH_AVScreenCaptureBufferType bufferType, int64_t timestamp, void *userData) | Defines a pointer to a callback function that is called when an audio or a video buffer is available during the running of an OH_AVScreenCapture instance. |
typedef void(* OH_AVScreenCapture_OnDisplaySelected) (OH_AVScreenCapture *capture, uint64_t displayId, void *userData) | Defines a pointer to a callback function that is called when screen capture starts. |
Enums
Name | Description |
---|---|
OH_CaptureMode { OH_CAPTURE_HOME_SCREEN = 0, OH_CAPTURE_SPECIFIED_SCREEN = 1, OH_CAPTURE_SPECIFIED_WINDOW = 2, OH_CAPTURE_INVAILD = -1 } |
Enumerates the screen capture modes. |
OH_AudioCaptureSourceType { OH_SOURCE_INVALID = -1, OH_SOURCE_DEFAULT = 0, OH_MIC = 1, OH_ALL_PLAYBACK = 2, OH_APP_PLAYBACK = 3 } |
Enumerates the audio source types during screen capture. |
OH_AudioCodecFormat { OH_AUDIO_DEFAULT = 0, OH_AAC_LC = 3, OH_AUDIO_CODEC_FORMAT_BUTT } |
Enumerates the audio encoding formats. |
OH_VideoCodecFormat { OH_VIDEO_DEFAULT = 0, OH_H264 = 2, OH_H265 = 4, OH_MPEG4 = 6, OH_VP8 = 8, OH_VP9 = 10, OH_VIDEO_CODEC_FORMAT_BUTT } |
Enumerates the video encoding formats. |
OH_DataType { OH_ORIGINAL_STREAM = 0, OH_ENCODED_STREAM = 1, OH_CAPTURE_FILE = 2, OH_INVAILD = -1 } |
Enumerates the data types of screen capture streams. |
OH_VideoSourceType { OH_VIDEO_SOURCE_SURFACE_YUV = 0, OH_VIDEO_SOURCE_SURFACE_ES, OH_VIDEO_SOURCE_SURFACE_RGBA, OH_VIDEO_SOURCE_BUTT } |
Enumerates the video source formats. Currently, only the RGBA format is supported. |
OH_ContainerFormatType { CFT_MPEG_4A = 0, CFT_MPEG_4 = 1 } |
Enumerates the types of files generated during screen capture. |
OH_AVScreenCaptureStateCode { OH_SCREEN_CAPTURE_STATE_STARTED = 0, OH_SCREEN_CAPTURE_STATE_CANCELED = 1, OH_SCREEN_CAPTURE_STATE_STOPPED_BY_USER = 2, OH_SCREEN_CAPTURE_STATE_INTERRUPTED_BY_OTHER = 3, OH_SCREEN_CAPTURE_STATE_STOPPED_BY_CALL = 4, OH_SCREEN_CAPTURE_STATE_MIC_UNAVAILABLE = 5, OH_SCREEN_CAPTURE_STATE_MIC_MUTED_BY_USER = 6, OH_SCREEN_CAPTURE_STATE_MIC_UNMUTED_BY_USER = 7, OH_SCREEN_CAPTURE_STATE_ENTER_PRIVATE_SCENE = 8, OH_SCREEN_CAPTURE_STATE_EXIT_PRIVATE_SCENE = 9, OH_SCREEN_CAPTURE_STATE_STOPPED_BY_USER_SWITCHES = 10 } |
Enumerates the screen capture states. |
OH_AVScreenCaptureBufferType { OH_SCREEN_CAPTURE_BUFFERTYPE_VIDEO = 0, OH_SCREEN_CAPTURE_BUFFERTYPE_AUDIO_INNER = 1, OH_SCREEN_CAPTURE_BUFFERTYPE_AUDIO_MIC = 2 } |
Enumerates the buffer types. |
OH_AVScreenCaptureFilterableAudioContent { OH_SCREEN_CAPTURE_NOTIFICATION_AUDIO = 0, OH_SCREEN_CAPTURE_CURRENT_APP_AUDIO = 1 } |
Enumerates the types of audio that can be added to a content filter. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙OH_AVRecorder_Config
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦