openharmony 鸿蒙 native-apidiff-avcodec

2023-10-30 浏览 (439)

Native API Differences

Compared with earlier versions, OpenHarmony 4.0.8.5 has the following API changes in its native APIs: *

Standard System API Changes

ModuleAPIChange TypeChange Description
avmuxerOH_AVMuxer *OH_AVMuxer_Create(int32_t fd, OH_AVOutputFormat format);AddedThis API is added to create an OH_AVMuxer instance.
avmuxerOH_AVErrCode OH_AVMuxer_SetRotation(OH_AVMuxer *muxer, int32_t rotation);AddedThis API is added to set the rotation angle of an output video.
avmuxerOH_AVErrCode OH_AVMuxer_AddTrack(OH_AVMuxer *muxer, int32_t *trackIndex, OH_AVFormat *trackFormat);AddedThis API is added to add a media track.
avmuxerOH_AVErrCode OH_AVMuxer_Start(OH_AVMuxer *muxer);AddedThis API is added to start encapsulation.
avmuxerOH_AVErrCode OH_AVMuxer_WriteSample(OH_AVMuxer *muxer, uint32_t trackIndex, OH_AVMemory *sample, OH_AVCodecBufferAttr info);AddedThis API is added to write data to the muxer.
avmuxerOH_AVErrCode OH_AVMuxer_Stop(OH_AVMuxer *muxer);AddedThis API is added to stop encapsulation.
avmuxerOH_AVErrCode OH_AVMuxer_Destroy(OH_AVMuxer *muxer);AddedThis API is added to destroy an OH_AVMuxer instance.
avsourceOH_AVSource *OH_AVSource_CreateWithURI(char *uri);AddedThis API is added to create an OH_AVSource instance based on a URI.
avsourceOH_AVSource *OH_AVSource_CreateWithFD(int32_t fd, int64_t offset, int64_t size);AddedThis API is added to create an OH_AVSource instance based on a file descriptor (FD).
avsourceOH_AVErrCode OH_AVSource_Destroy(OH_AVSource *source);AddedThis API is added to destroy an OH_AVSource instance.
avsourceOH_AVFormat *OH_AVSource_GetSourceFormat(OH_AVSource *source);AddedThis API is added to obtain source information.
avsourceOH_AVFormat *OH_AVSource_GetTrackFormat(OH_AVSource *source, uint32_t trackCount);AddedThis API is added to obtain track information.
avdemuxerOH_AVDemuxer *OH_AVDemuxer_CreateWithSource(OH_AVSource *source);AddedThis API is added to create an OH_AVDemuxer instance based on source information.
avdemuxerOH_AVErrCode OH_AVDemuxer_Destroy(OH_AVDemuxer *demuxer);AddedThis API is added to destroy an OH_AVDemuxer instance.
avdemuxerOH_AVErrCode OH_AVDemuxer_SelectTrackByID(OH_AVDemuxer *demuxer, uint32_t trackIndex);AddedThis API is added to select a track, from which the demuxer reads data.
avdemuxerOH_AVErrCode OH_AVDemuxer_UnselectTrackByID(OH_AVDemuxer *demuxer, uint32_t trackIndex);AddedThis API is added to deselect a track.
avdemuxerOH_AVErrCode OH_AVDemuxer_ReadSample(OH_AVDemuxer *demuxer, uint32_t trackIndex, OH_AVMemory *sample, OH_AVCodecBufferAttr *info);AddedThis API is added to read the frame from a track specified by trackIndex.
avdemuxerOH_AVErrCode OH_AVDemuxer_SeekToTime(OH_AVDemuxer *demuxer, int64_t millisecond, OH_AVSeekMode mode);AddedThis API is added to seek to the specified time.
avcapabilityOH_AVCapability *OH_AVCodec_GetCapability(const char *mime, bool isEncoder);AddedThis API is added to obtain a handle to the codec capability recommended by the system.
avcapabilityOH_AVCapability *OH_AVCodec_GetCapabilityByCategory(const char *mime, bool isEncoder, OH_AVCodecCategory category);AddedThis API is added to obtain a handle to the codec capability by category, which can be a hardware codec or software codec.
avcapabilitybool OH_AVCapability_IsHardware(OH_AVCapability *capability);AddedThis API is added to check whether a codec capability instance describes a hardware codec.
avcapabilityconst char *OH_AVCapability_GetName(OH_AVCapability *capability);AddedThis API is added to obtain the codec name.
avcapabilityint32_t OH_AVCapability_GetMaxSupportedInstances(OH_AVCapability *capability);AddedThis API is added to obtain the maximum number of codec instances supported by a codec.
avcapabilityOH_AVErrCode OH_AVCapability_GetEncoderBitrateRange(OH_AVCapability *capability, OH_AVRange *bitrateRange);AddedThis API is added to obtain the bit rate range supported by an encoder.
avcapabilitybool OH_AVCapability_IsEncoderBitrateModeSupported(OH_AVCapability *capability, OH_BitrateMode bitrateMode);AddedThis API is added to check whether a specific bit rate mode is supported.
avcapabilityOH_AVErrCode OH_AVCapability_GetEncoderQualityRange(OH_AVCapability *capability, OH_AVRange *qualityRange);AddedThis API is added to obtain the quality range supported by an encoder.
avcapabilityOH_AVErrCode OH_AVCapability_GetEncoderComplexityRange(OH_AVCapability *capability, OH_AVRange *complexityRange);AddedThis API is added to obtain the complexity range supported by an encoder.
avcapabilityOH_AVErrCode OH_AVCapability_GetAudioSupportedSampleRates(OH_AVCapability *capability, const int32_t **sampleRates, uint32_t *sampleRateNum);AddedThis API is added to obtain the sampling rates supported by an audio codec.
avcapabilityOH_AVErrCode OH_AVCapability_GetAudioChannelCountRange(OH_AVCapability *capability, OH_AVRange *channelCountRange);AddedThis API is added to obtain the count range of audio channels supported by an audio codec.
avcapabilityOH_AVErrCode OH_AVCapability_GetVideoWidthAlignment(OH_AVCapability *capability, int32_t *widthAlignment);AddedThis API is added to obtain the video width alignment.
avcapabilityOH_AVErrCode OH_AVCapability_GetVideoHeightAlignment(OH_AVCapability *capability, int32_t *heightAlignment);AddedThis API is added to obtain the video height alignment.
avcapabilityOH_AVErrCode OH_AVCapability_GetVideoWidthRangeForHeight(OH_AVCapability *capability, int32_t height, OH_AVRange *widthRange);AddedThis API is added to obtain the video width range based on a given height.
avcapabilityOH_AVErrCode OH_AVCapability_GetVideoHeightRangeForWidth(OH_AVCapability *capability, int32_t width, OH_AVRange *heightRange);AddedThis API is added to obtain the video height range based on a given width.
avcapabilityOH_AVErrCode OH_AVCapability_GetVideoWidthRange(OH_AVCapability *capability, OH_AVRange *widthRange);AddedThis API is added to obtain the video width range.
avcapabilityOH_AVErrCode OH_AVCapability_GetVideoHeightRange(OH_AVCapability *capability, OH_AVRange *heightRange);AddedThis API is added to obtain the video height range.
avcapabilitybool OH_AVCapability_IsVideoSizeSupported(OH_AVCapability *capability, int32_t width, int32_t height);AddedThis API is added to check whether a video size is supported.
avcapabilityOH_AVErrCode OH_AVCapability_GetVideoFrameRateRange(OH_AVCapability *capability, OH_AVRange *frameRateRange);AddedThis API is added to obtain the video frame rate range.
avcapabilityOH_AVErrCode OH_AVCapability_GetVideoFrameRateRangeForSize(OH_AVCapability *capability, int32_t width, int32_t height, OH_AVRange *frameRateRange);AddedThis API is added to obtain the video frame rate range based on a given size.
avcapabilitybool OH_AVCapability_AreVideoSizeAndFrameRateSupported(OH_AVCapability *capability, int32_t width, int32_t height, int32_t frameRate);AddedThis API is added to check whether the combination of a video size and frame rate is supported.
avcapabilityOH_AVErrCode OH_AVCapability_GetVideoSupportedPixelFormats(OH_AVCapability *capability, const int32_t **pixFormats, uint32_t *pixFormatNum);AddedThis API is added to obtain the video pixel formats supported.
avcapabilityOH_AVErrCode OH_AVCapability_GetSupportedProfiles(OH_AVCapability *capability, const int32_t **profiles, uint32_t *profileNum);AddedThis API is added to obtain the profiles supported.
avcapabilityOH_AVErrCode OH_AVCapability_GetSupportedLevelsForProfile(OH_AVCapability *capability, int32_t profile, const int32_t **levels,uint32_t *levelNum);AddedThis API is added to obtain the codec levels supported by a profile.
avcapabilitybool OH_AVCapability_AreProfileAndLevelSupported(OH_AVCapability *capability, int32_t profile, int32_t level);AddedThis API is added to check whether the combination of a profile and level is supported.
avformatstruct OH_AVFormat *OH_AVFormat_CreateAudioFormat(const char *mimeType, int32_t sampleRate, int32_t channelCount);AddedThis API is added to create an OH_AVFormat instance for an audio track (used in avmuxer).
avformatstruct OH_AVFormat *OH_AVFormat_CreateVideoFormat(const char *mimeType, int32_t width, int32_t height);AddedThis API is added to create an OH_AVFormat instance for a video track (used in avmuxer).
avmemoryOH_AVMemory *OH_AVMemory_Create(int32_t size);AddedThis API is added to create an OH_AVMemory instance.
avmemoryOH_AVErrCode OH_AVMemory_Destroy(struct OH_AVMemory *mem);AddedThis API is added to destroy an OH_AVMemory instance.
avcodecOH_AVErrCode OH_AudioDecoder_IsValid(OH_AVCodec *codec, bool *isValid);AddedThis API is added to check whether a codec instance is valid. It is used for fault rectification.
avcodecOH_AVErrCode OH_AudioEncoder_IsValid(OH_AVCodec *codec, bool *isValid);AddedThis API is added to check whether a codec instance is valid. It is used for fault rectification.
avcodecOH_AVErrCode OH_VideoDecoder_IsValid(OH_AVCodec *codec, bool *isValid);AddedThis API is added to check whether a codec instance is valid.
avcodecOH_AVErrCode OH_VideoEncoder_IsValid(OH_AVCodec *codec, bool *isValid);AddedThis API is added to check whether a codec instance is valid.
avcodecOH_AVErrCode OH_VideoEncoder_PushInputData(OH_AVCodec *codec, uint32_t index, OH_AVCodecBufferAttr attr);AddedThis API is added to push the input buffer filled with data to a video encoder.
avcodecOH_AVFormat *OH_VideoEncoder_GetInputDescription(OH_AVCodec *codec);AddedThis API is added to obtain the description received by a video encoder.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙1.0.0 (2022/03/09)

harmony 鸿蒙1.0.0 (2022/03/09)

harmony 鸿蒙OpenHarmony Docker镜像

harmony 鸿蒙OpenHarmony Docker Image

harmony 鸿蒙Legal Notices

harmony 鸿蒙OpenHarmony Project

harmony 鸿蒙IDL Specifications and User Guide (for System Applications Only)

harmony 鸿蒙Application Development

harmony 鸿蒙Accessibility Kit

harmony 鸿蒙Introduction to Accessibility Kit

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/0cc7dc3833484697a0f39b46a13b896d