# GStD

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

GStreamer 守护进程 (GStD) 是一个使用进程间通信协议 (IPC) 控制音频视频流的框架。

- 它是对 `gst-launch` 工具的增强。
- 它使您能够创建 pipeline，并在 pipeline 处于活动状态时控制播放和暂停等设置。

GStD 分两部分部署：

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

## 已知问题

QCS9075 和 QCS8275 目前不支持 GStD。

## GStD 项目

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

GStD 提供内核和 IPC 端点。 | GStD 设计组件 | 说明 |
| --- | --- |
| 核心 | 保存 GStreamer 守护进程 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 并在创建 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-70017-50SC/topic/local-use-cases.html)**  

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

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

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

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

**上一级主题：** [GStreamer 工具](https://docs.qualcomm.com/doc/80-70017-50SC/topic/im-sdk-base-uitilities.html)

Last Published: Nov 11, 2025

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