线程的问题,一个线程没有关闭导致不停显示之前的图片

另外就是传给rtsp的图片,需要和8,16,32等对齐

这一行比较重要:g_source_remove(sourceID[cameraIndex]);

https://forums.developer.nvidia.com/t/rtsp-server-cleanup-from-thread-does-not-stop-client-apps-video/107137

sourceID[cameraIndex] = gst_rtsp_server_attach(server, nullptr);

    g_source_remove(sourceID[cameraIndex]);
    gst_rtsp_mount_points_remove_factory(mounts, fac_Str.c_str());
    g_object_unref(mounts);
    gst_element_set_state(pipelineEle, GST_STATE_NULL);
    gst_object_unref(GST_OBJECT(pipelineEle));
    g_main_loop_quit(loop);
    g_main_loop_unref(loop);
Logo

火山引擎开发者社区是火山引擎打造的AI技术生态平台,聚焦Agent与大模型开发,提供豆包系列模型(图像/视频/视觉)、智能分析与会话工具,并配套评测集、动手实验室及行业案例库。社区通过技术沙龙、挑战赛等活动促进开发者成长,新用户可领50万Tokens权益,助力构建智能应用。

更多推荐