lowpower_avsink_base.h
Overview
The file declares the basic dependencies for OH_LowPowerAudioSink and OH_LowPowerVideoSink.
File to include: <multimedia/player_framework/lowpower_avsink_base.h>
Library: liblowpower_avsink.so
System capability: SystemCapability.Multimedia.Media.LowPowerAVSink
Since: 20
Related module: AVSinkBase
Summary
Structs
| Name | typedef Keyword | Description |
|---|---|---|
| OH_AVSamplesBuffer | OH_AVSamplesBuffer | Describes the input data of the LowPowerAVSink. After receiving the DataNeeded callback, the application must pack data into an OH_AVSamplesBuffer instance and pass it to the corresponding lowpower_avsink. |
Functions
| Name | Description |
|---|---|
| OH_AVErrCode OH_AVSamplesBuffer_AppendOneBuffer(OH_AVSamplesBuffer *samplesBuffer, OH_AVBuffer *avBuffer) | Appends data from an OH_AVBuffer instance to an OH_AVSamplesBuffer instance. |
| int32_t OH_AVSamplesBuffer_GetRemainedCapacity(OH_AVSamplesBuffer *samplesBuffer) | Obtains the remaining capacity available in an OH_AVSamplesBuffer instance. |
| OH_LowPowerAVSink_Capability *OH_LowPowerAVSink_GetCapability() | Obtains the capability of the low-power player. It mainly helps you find out what the low-power player can do, including the media formats and features it supports. When you call this function, you can learn about the device's capabilities in audio and video processing. For example, you can find out which encoding and decoding formats are supported, as well as the range of bit rates that the device can handle. |
Function Description
OH_AVSamplesBuffer_AppendOneBuffer()
OH_AVErrCode OH_AVSamplesBuffer_AppendOneBuffer(OH_AVSamplesBuffer *samplesBuffer, OH_AVBuffer *avBuffer)
Description
Appends data from an OH_AVBuffer instance to an OH_AVSamplesBuffer instance.
Since: 20
Parameters
| Name | Description |
|---|---|
| OH_AVSamplesBuffer *samplesBuffer | Pointer to an OH_AVSamplesBuffer instance. |
| OH_AVBuffer *avBuffer | Pointer to an OH_AVBuffer instance. |
Returns
| Type | Description |
|---|---|
| OH_AVErrCode | AV_ERR_OK: The operation is successful. AV_ERR_INVALID_VAL: An input parameter is nullptr or invalid. AV_ERR_NO_MEMORY: The framePacketBuffer does not have sufficient remaining capacity to append an OH_AVBuffer. AV_ERR_UNKNOWN: An unknown error occurs. |
OH_AVSamplesBuffer_GetRemainedCapacity()
int32_t OH_AVSamplesBuffer_GetRemainedCapacity(OH_AVSamplesBuffer *samplesBuffer)
Description
Obtains the remaining capacity available in an OH_AVSamplesBuffer instance.
Since: 20
Parameters
| Name | Description |
|---|---|
| OH_AVSamplesBuffer *samplesBuffer | Pointer to an OH_AVSamplesBuffer instance. |
Returns
| Type | Description |
|---|---|
| int32_t | Remaining capacity available in the OH_AVSamplesBuffer instance, in bytes. If sampleBuffer or data pointer is nullptr or invalid, 3 is returned. |
OH_LowPowerAVSink_GetCapability()
OH_LowPowerAVSink_Capability *OH_LowPowerAVSink_GetCapability()
Description
Obtains the capability of the low-power player. It mainly helps you find out what the low-power player can do, including the media formats and features it supports.
When you call this function, you can learn about the device's capabilities in audio and video processing. For example, you can find out which encoding and decoding formats are supported, as well as the range of bit rates that the device can handle.
Since: 21
Returns
| Type | Description |
|---|---|
| OH_LowPowerAVSink_Capability * | OH_LowPowerAVSink_Capability: The low-power player is supported. nullptr: The low-power player is not supported or the capability fails to be obtained. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 capi-avrecorder-oh-avrecorder-range
openharmony 鸿蒙 errorcode-media
openharmony 鸿蒙 capi-avplayer-base-h
openharmony 鸿蒙 capi-avimage-generator-h
openharmony 鸿蒙 capi-avscreencapture-oh-rect
openharmony 鸿蒙 capi-videoprocessing-videoprocessing-callback
openharmony 鸿蒙 capi-avsinkbase
openharmony 鸿蒙 capi-avmetadataextractor
openharmony 鸿蒙 capi-avscreencapture-oh-multidisplaycapability