rtsp
This commit is contained in:
parent
f62fbe974b
commit
9d39aa14d3
@ -30,7 +30,12 @@ GstRTSPMediaFactory *RTSPManager::create_media_factory(const Camera &cam)
|
|||||||
" ! video/x-raw,format=NV12,width=" + std::to_string(cam.width) +
|
" ! video/x-raw,format=NV12,width=" + std::to_string(cam.width) +
|
||||||
",height=" + std::to_string(cam.height) +
|
",height=" + std::to_string(cam.height) +
|
||||||
",framerate=" + std::to_string(cam.fps) + "/1"
|
",framerate=" + std::to_string(cam.fps) + "/1"
|
||||||
" ! videoconvert ! queue ! mpph264enc ! rtph264pay name=pay0 pt=96 )";
|
" ! queue max-size-buffers=4 leaky=2" // 新增 queue,防止阻塞
|
||||||
|
" ! videoconvert"
|
||||||
|
" ! video/x-raw,format=NV12" // 固定转换后的格式
|
||||||
|
" ! queue max-size-buffers=4 leaky=2" // 再加一层 queue,隔离 mpph264enc
|
||||||
|
" ! mpph264enc"
|
||||||
|
" ! rtph264pay name=pay0 pt=96 )";
|
||||||
|
|
||||||
GstRTSPMediaFactory *factory = gst_rtsp_media_factory_new();
|
GstRTSPMediaFactory *factory = gst_rtsp_media_factory_new();
|
||||||
gst_rtsp_media_factory_set_launch(factory, launch_str.c_str());
|
gst_rtsp_media_factory_set_launch(factory, launch_str.c_str());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user