test
This commit is contained in:
parent
2a49aef598
commit
345fdc5f46
@ -33,7 +33,6 @@ GstRTSPMediaFactory *RTSPManager::create_media_factory(const Camera &cam)
|
||||
if (cam.width == 1280 && cam.height == 960)
|
||||
{
|
||||
out_height = 720;
|
||||
// 使用 videocrop 元素从顶部裁剪 120 像素,总共裁剪 960->720
|
||||
int crop_top = (960 - 720) / 2;
|
||||
videocrop_str = " ! videocrop top=" + std::to_string(crop_top) + " bottom=" + std::to_string(crop_top);
|
||||
}
|
||||
@ -43,12 +42,11 @@ GstRTSPMediaFactory *RTSPManager::create_media_factory(const Camera &cam)
|
||||
" ! video/x-raw,format=NV12,width=" + std::to_string(cam.width) +
|
||||
",height=" + std::to_string(cam.height) +
|
||||
",framerate=" + std::to_string(cam.fps) + "/1"
|
||||
" ! queue max-size-buffers=4 leaky=2"
|
||||
" ! videoconvert"
|
||||
" ! video/x-raw,format=NV12" +
|
||||
" ! queue max-size-buffers=8 leaky=2" +
|
||||
videocrop_str +
|
||||
" ! queue max-size-buffers=4 leaky=2"
|
||||
" ! queue max-size-buffers=8 leaky=2"
|
||||
" ! mpph264enc"
|
||||
" ! h264parse"
|
||||
" ! rtph264pay name=pay0 pt=96 )";
|
||||
|
||||
GstRTSPMediaFactory *factory = gst_rtsp_media_factory_new();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user