hi_audio_stream

Function

Defines the audio streams.

Definition

typedef struct {
    hi_u8 ATTRIBUTE *stream;
    hi_u64 ATTRIBUTE phys_addr;
    hi_u32 len;
    hi_u64 time_stamp;
    hi_u32 seq;
} hi_audio_stream;

For details about basic data types hi_u8, hi_u64, and hi_u32, see Basic Data Types.

Members

Member

Description

stream

Pointer to the audio stream.

phys_addr

Physical address of the audio stream.

len

Audio stream length (unit: byte).

  • If hi_mpi_adec_create_chn is called to set the decoding mode to the pack mode, this parameter needs to be set to the length of one audio stream frame (stream data length + header length). The maximum length of a stream frame is 16384 bytes.
  • If hi_mpi_adec_create_chn is called to set the decoding mode to the stream mode:
    • When hi_mpi_adec_send_stream is called to send streams in non-blocking mode, the range of the len parameter is (0, 16384].
    • When hi_mpi_adec_send_stream is called to send streams in blocking mode, the range of the len parameter is subject to the range of the hi_u32 data type but does not include the value 0.

time_stamp

Timestamp of the audio stream.

seq

Sequence number of the audio stream. If a stream is invalid, seq is 0.