kunlang_video/include/rtsp_manager.hpp
2025-09-08 14:55:07 +08:00

22 lines
462 B
C++

// rtsp_manager.hpp
#pragma once
#include <gst/gst.h>
#include <gst/rtsp-server/rtsp-server.h>
#include "app_config.hpp"
// RTSP 管理器,负责启动/关闭 RTSP 服务器
class RTSPManager
{
public:
static void init();
static void start(const std::vector<Camera> &cameras);
static void stop();
private:
static GMainLoop *loop;
static GstRTSPServer *server;
static GstRTSPMediaFactory *create_media_factory(const Camera &cam);
};