# SnapshotConfig (/zh-CN/api-reference/rtc/cpp-all-platforms/class-snapshotconfig)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

<a id="class_snapshotconfig__prototype"></a>

```cpp
struct SnapshotConfig {
  const char* filePath;
  media::base::VIDEO_MODULE_POSITION position;
};
```

<a id="class_snapshotconfig__parameters"></a>

## 属性 [#属性]

<ParameterList>
<a id="filepath"></a>
<Parameter name="filePath">

:::note
注： 请确保指定的路径存在且可写。
:::

截图的本地路径（包含文件扩展名）。例如：

- Windows: `C:\Users\<user_name>\AppData\Local\声网\<process_name>\example.jpg`
- iOS: `/App Sandbox/Library/Caches/example.jpg`
- macOS: `～/Library/Logs/example.jpg`
- Android: `/storage/emulated/0/Android/data/<package name>/files/example.jpg`。

</Parameter>
<a id="position"></a>
<Parameter name="position">

截图视频帧在视频处理流程中的位置，详见 [VIDEO_MODULE_POSITION](/zh-CN/api-reference/rtc/cpp-all-platforms/enum-videomoduleposition)。具体取值取决于调用 `takeSnapshot` 或 `takeSnapshotEx` 时传入的 `uid`：

- `uid` 为 `0`：`position` 支持 `2`、`4` 和 `8`。
- `uid` 不为 `0`：`position` 仅支持 `2`。

</Parameter>
</ParameterList>
