# GStD 框架

Source: [https://docs.qualcomm.com/doc/80-70020-50SC/topic/gstreamer-daemon.html](https://docs.qualcomm.com/doc/80-70020-50SC/topic/gstreamer-daemon.html)

GStreamer 守护进程 (GStD) 使用进程间通信协议 (IPC) 来控制音视频流传输。

- 这是对 `gst-launch` 工具的一种改进。
- 它允许您创建 pipeline，并在 pipeline 处于活动状态时控制播放和暂停等设置。

GStD 分两部分部署：

- **Daemon** 在后台启动进程。
- **控制应用程序**可以用任何语言编写，可以在同一处理器或单独的机器上运行。

## 已知问题

Dragonwing IQ-9075 和 Dragonwing IQ-8275 目前不支持 GStD。

## GStD 项目

GStD 项目包括核心、GstdClient 和 IPC 接口。

GStD 提供核心和 IPC 端点。 | GStD 设计组件 | 说明 |
| --- | --- |
| 核心 | 保存 GStreamer 守护进程 pipeline 的当前状态，以及每个 pipeline 的各自状态、每个 pipeline 中的元素和每个元素的属性。 |
| IPC | <ul class="ul" id="gstreamer-daemon__ul_fqq_hdm_qbc"><br>                                    <li class="li">允许客户端应用程序使用 IPC 机制（例如 TCP、HTTP、DBus、套接字等）更改 GStD 核心状态。</li><br><br>                                    <li class="li">允许自定义应用更改 GStD 核心的状态。例如，IPC 可用于执行以下操作：<ul class="ul" id="gstreamer-daemon__ul_adx_2dm_qbc"><br>                                            <li class="li">创建 pipeline。</li><br><br>                                            <li class="li">将状态设置为 play。</li><br><br>                                            <li class="li">在 pipeline 运行中更改元素属性。</li><br><br>                                        </ul><br></li><br><br>                                </ul> |

自定义应用程序提供查看和客户端逻辑。 | 定制应用设计 | 说明 |
| --- | --- |
| 查看 | <ul class="ul" id="gstreamer-daemon__ul_nnv_xdm_qbc"><br>                                    <li class="li">提供 GStD 核心状态的视觉反馈。</li><br><br>                                    <li class="li">表示图形用户界面、网页、命令行应用程序。</li><br><br>                                    <li class="li">允许您查看由模型更新后的视图。</li><br><br>                                </ul> |
| 客户端逻辑 | <ul class="ul" id="gstreamer-daemon__ul_okb_b2m_qbc"><br>                                    <li class="li">提供应用程序的自定义功能。</li><br><br>                                    <li class="li">允许您使用 IPC 来更改 GStD 核心或模型，并通过 GUI/视图接收反馈。</li><br><br>                                </ul> |

GStreamer 客户端（GstdClient）随项目一起分发。这是一个基于命令行的应用，它通过 TCP 与 GStD 进行通信。

- GstdClient 允许您创建和启动 pipeline。
- 与 `gst-launch`不同，GstdClient 允许您拥有多个活动 pipeline，能够控制 pipeline 并在创建 pipeline 后接收反馈。

有关 GStD 的更多信息，请参见 [https://developer.ridgerun.com/wiki/index.php/GStreamer_Daemon](https://developer.ridgerun.com/wiki/index.php/GStreamer_Daemon)。

## 运行 GStD

1. 启动 GStD：

        gstd
        # This will start the process in the background. Using 'gstd &' is not required becauses gstd daemonizes itself by default.
        
        # To run gstd in foreground
        gstd -D
        
        # To view a list of all supported options,
        gstd --help-all
        Copy to clipboard
2. 启动 GstdClient：

        gst-client
        # gstd prompt will appear like,
        # gstd>
        # In the prompt, we can interact with the server creating/playing pipelines, etc.
        
        # To list all the possible commands
        gstd> help
        
        # Alternatively, instead of opening gstd prompt, can give the command as argument to gst-client
        gst-client list_pipelines
        Copy to clipboard

- **[运行本地用例](https://docs.qualcomm.com/doc/80-70020-50SC/topic/local-use-cases.html)**  

使用运行在同一处理器上的控制应用控制 GStD 框架。
- **[运行 TCP 用例](https://docs.qualcomm.com/doc/80-70020-50SC/topic/tcp-use-cases.html)**  

使用通过 TCP 远程连接的控制应用来控制 GStD 框架。
- **[运行 HTTP 用例](https://docs.qualcomm.com/doc/80-70020-50SC/topic/run-http-use-cases.html)**  

使用通过 HTTP 远程连接的控制应用程序来控制 GStD 框架。
- **[通过 MQTT 启用消息支持](https://docs.qualcomm.com/doc/80-70020-50SC/topic/mqtt-configuration.html)**  

消息队列遥测传输 (MQTT) 是一种用于设备间通信的轻量级发布-订阅协议。Qualcomm IM SDK 支持通过 MQTT 协议向主机设备发送消息。

**Parent Topic:** [使用 GStreamer 工具来管理自定义插件](https://docs.qualcomm.com/doc/80-70020-50SC/topic/im-sdk-base-uitilities.html)

Last Published: Jul 23, 2025

[Previous Topic
GSt 调试](https://docs.qualcomm.com/bundle/publicresource/80-70020-50SC/topics/imsdk_debug_gst.md) [Next Topic
运行本地用例](https://docs.qualcomm.com/bundle/publicresource/80-70020-50SC/topics/local-use-cases.md)