---
title: hi_audio_stream
description: "定义音频码流结构体。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/aadgc/aclcppdevg_03_1143.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/aadgc/aclcppdevg_03_1143.html
indexId: 7914538ae771110e191cce1f65ab7b54bc270b2487fa5f3a027cb7fc57b8bbad105
---
# hi_audio_stream

#### 说明

定义音频码流结构体。


#### 定义

```
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;
```


#### 成员

| 成员名称 | 描述 |
| --- | --- |
| stream | 音频码流数据指针。 |
| phys\_addr | 音频码流的物理地址。 |
| len | 音频码流长度（单位：byte）。 调用hi\_mpi\_adec\_create\_chn接口设置pack方式解码，必须为一帧音频码流的长度（指码流数据+头长度），且一帧码流最大长度为16384。 调用hi\_mpi\_adec\_create\_chn接口设置stream方式解码： 调用hi\_mpi\_adec\_send\_stream接口发送码流时，设置非阻塞方式时，len参数取值范围：(0, 16384]。 调用hi\_mpi\_adec\_send\_stream接口发送码流时，设置阻塞方式时，len参数取值范围在hi\_u32数据类型的取值范围内，但不包括0。 |
| time\_stamp | 音频码流时间戳。 |
| seq | 音频码流序号，如果stream无效，seq为0。 |
