harmony 鸿蒙native_avcapability.h

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

native_avcapability.h

Overview

The native_avcapability.h file declares the native APIs used to query the codec capability.

Since

10

Related Modules

AVCapability

Summary

Structs

Name Description
OH_AVRange Defines the value range, which contains the minimum value and maximum value.

Types

Name Description
OH_BitrateMode Defines an enum that enumerates the bit rate modes of an encoder.
OH_AVRange Defines a struct for the value range, which contains the minimum value and maximum value.
OH_AVCodecCategory Defines an enum that enumerates the codec categories.

Enums

Name Description
OH_BitrateMode {
    BITRATE_MODE_CBR = 0,
    BITRATE_MODE_VBR = 1,
    BITRATE_MODE_CQ = 2
}
Enumerates the bit rate modes of an encoder.
OH_AVCodecCategory {
    HARDWARE = 0,
    SOFTWARE
}
Enumerates the codec categories.

Functions

Name Description
*OH_AVCodec_GetCapability (const char *mime, bool isEncoder) Obtains the codec capability recommended by the system.
*OH_AVCodec_GetCapabilityByCategory (const char *mime, bool isEncoder, OH_AVCodecCategory category) Obtains the codec capability by category, which can be a hardware codec or software codec.
OH_AVCapability_IsHardware (OH_AVCapability *capability) Checks whether a codec capability instance describes a hardware codec.
*OH_AVCapability_GetName (OH_AVCapability *capability) Obtains the codec name.
OH_AVCapability_GetMaxSupportedInstances (OH_AVCapability *capability) Obtains the maximum number of codec instances supported by a codec.
OH_AVCapability_GetEncoderBitrateRange (OH_AVCapability *capability, OH_AVRange *bitrateRange) Obtains the bit rate range supported by an encoder.
OH_AVCapability_IsEncoderBitrateModeSupported (OH_AVCapability *capability, OH_BitrateMode bitrateMode) Checks whether an encoder supports a specific bit rate mode.
OH_AVCapability_GetEncoderQualityRange (OH_AVCapability *capability, OH_AVRange *qualityRange) Obtains the quality range supported by an encoder.
OH_AVCapability_GetEncoderComplexityRange (OH_AVCapability *capability, OH_AVRange *complexityRange) Obtains the complexity range supported by an encoder.
OH_AVCapability_GetAudioSupportedSampleRates (OH_AVCapability *capability, const int32_t **sampleRates, uint32_t *sampleRateNum) Obtains the sampling rates supported by an audio codec.
OH_AVCapability_GetAudioChannelCountRange (OH_AVCapability *capability, OH_AVRange *channelCountRange) Obtains the count range of audio channels supported by an audio codec.
OH_AVCapability_GetVideoWidthAlignment (OH_AVCapability *capability, int32_t *widthAlignment) Obtains the video width alignment supported by a video codec.
OH_AVCapability_GetVideoHeightAlignment (OH_AVCapability *capability, int32_t *heightAlignment) Obtains the video height alignment supported by a video codec.
OH_AVCapability_GetVideoWidthRangeForHeight (OH_AVCapability *capability, int32_t height, OH_AVRange *widthRange) Obtains the video width range supported by a video codec based on a given height.
OH_AVCapability_GetVideoHeightRangeForWidth (OH_AVCapability *capability, int32_t width, OH_AVRange *heightRange) Obtains the video height range supported by a video codec based on a given width.
OH_AVCapability_GetVideoWidthRange (OH_AVCapability *capability, OH_AVRange *widthRange) Obtains the video width range supported by a video codec.
OH_AVCapability_GetVideoHeightRange (OH_AVCapability *capability, OH_AVRange *heightRange) Obtains the video height range supported by a video codec.
OH_AVCapability_IsVideoSizeSupported (OH_AVCapability *capability, int32_t width, int32_t height) Checks whether a video codec supports a specific video size.
OH_AVCapability_GetVideoFrameRateRange (OH_AVCapability *capability, OH_AVRange *frameRateRange) Obtains the video frame rate range supported by a video codec.
OH_AVCapability_GetVideoFrameRateRangeForSize (OH_AVCapability *capability, int32_t width, int32_t height, OH_AVRange *frameRateRange) Obtains the video frame rate range supported by a video codec based on a given video size.
OH_AVCapability_AreVideoSizeAndFrameRateSupported (OH_AVCapability *capability, int32_t width, int32_t height, int32_t frameRate) Checks whether a video codec supports the combination of a video size and frame rate.
OH_AVCapability_GetVideoSupportedPixelFormats (OH_AVCapability *capability, const int32_t **pixelFormats, uint32_t *pixelFormatNum) Obtains the video pixel formats supported by a video codec.
OH_AVCapability_GetSupportedProfiles (OH_AVCapability *capability, const int32_t **profiles, uint32_t *profileNum) Obtains the profiles supported by a codec.
OH_AVCapability_GetSupportedLevelsForProfile (OH_AVCapability *capability, int32_t profile, const int32_t **levels, uint32_t *levelNum) Obtains the codec levels supported by a profile.
OH_AVCapability_AreProfileAndLevelSupported (OH_AVCapability *capability, int32_t profile, int32_t level) Checks whether a codec supports the combination of a profile and level.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Native APIs

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙AVSource

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

0  赞