hi_audio_stream

Description

Defines the audio streams.

Prototype

typedef struct {
    hi_u8 ATTRIBUTE *stream;    /* the virtual address of stream */
    hi_u64 ATTRIBUTE phys_addr;  /* the physical address of stream */
    hi_u32 len;                 /* stream length, by bytes */
    hi_u64 time_stamp;          /* frame time stamp */
    hi_u32 seq;                 /* frame seq, if stream is not a valid frame,seq is 0 */
} hi_audio_stream;

Members

Member

Description

stream

Pointer to the audio stream

phys_addr

Physical address of the audio stream

len

Audio stream length (unit: byte).

  • Call the hi_mpi_adec_create_chn interface to set the decoding mode to pack. The length must be the length of a frame of audio stream (stream data + header length), and the maximum length of a frame of stream is 16384.
  • 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 the hi_mpi_adec_send_stream API is called to send streams and the block mode is set, the value of the len parameter is within the value range of the hi_u32 data type, excluding 0.

time_stamp

Timestamp of the audio stream

seq

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