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 physics 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).

  • 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.