native_avmuxer.h
Overview
The native_avmuxer.h file declares the native APIs used for audio and video muxing.
Library: libnative_media_avmuxer.so
Since: 10
Related module: AVMuxer
Summary
Types
Name | Description |
---|---|
typedef struct OH_AVMuxer OH_AVMuxer | Defines a struct that describes a native object for the muxer interface. |
Functions
Name | Description |
---|---|
OH_AVMuxer * OH_AVMuxer_Create (int32_t fd, OH_AVOutputFormat format) | Creates an OH_AVMuxer instance by using the file descriptor and encapsulation format. |
OH_AVErrCode OH_AVMuxer_SetRotation (OH_AVMuxer *muxer, int32_t rotation) | Sets the rotation angle (clockwise) of an output video. |
OH_AVErrCode OH_AVMuxer_AddTrack (OH_AVMuxer *muxer, int32_t *trackIndex, OH_AVFormat *trackFormat) | Adds a media track to the muxer. |
OH_AVErrCode OH_AVMuxer_Start (OH_AVMuxer *muxer) | Starts the muxer. |
OH_AVErrCode OH_AVMuxer_WriteSample (OH_AVMuxer *muxer, uint32_t trackIndex, OH_AVMemory *sample, OH_AVCodecBufferAttr info) | Writes data to the muxer. |
OH_AVErrCode OH_AVMuxer_WriteSampleBuffer (OH_AVMuxer *muxer, uint32_t trackIndex, const OH_AVBuffer *sample) | Writes data to the muxer. |
OH_AVErrCode OH_AVMuxer_Stop (OH_AVMuxer *muxer) | Stops the muxer. |
OH_AVErrCode OH_AVMuxer_Destroy (OH_AVMuxer *muxer) | Clears internal resources and destroys an OH_AVMuxer instance. |