update video_io/sv_video_input.cpp.

预编译指令顶格写,注意缩进

Signed-off-by: jario-jin <jariof@foxmail.com>
This commit is contained in:
jario-jin 2023-07-20 09:36:10 +00:00 committed by Gitee
parent 5f832abaf0
commit b810d4728d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 8 additions and 9 deletions

View File

@ -67,15 +67,14 @@ void Camera::openImpl()
this->_fps = 30; this->_fps = 30;
} }
#ifdef PLATFORM_X86_CUDA
#ifdef PLATFORM_X86_CUDA sprintf(pipe, "rtsp://%s:%d/H264?W=%d&H=%d&FPS=%d&BR=4000000", this->_ip.c_str(), this->_port, this->_width, this->_height, this->_fps);
sprintf(pipe, "rtsp://%s:%d/H264?W=%d&H=%d&FPS=%d&BR=4000000", this->_ip.c_str(), this->_port, this->_width, this->_height, this->_fps); this->_cap.open(pipe);
this->_cap.open(pipe); #endif
#endif #ifdef PLATFORM_JETSON
#ifdef PLATFORM_JETSON sprintf(pipe, "rtspsrc location=rtsp://%s:%d/H264?W=%d&H=%d&FPS=%d&BR=4000000 latency=100 ! application/x-rtp,media=video ! rtph264depay ! parsebin ! nvv4l2decoder enable-max-performancegst=1 ! nvvidconv ! video/x-raw,format=(string)BGRx ! videoconvert ! appsink sync=false", this->_ip.c_str(), this->_port, this->_width, this->_height, this->_fps);
sprintf(pipe, "rtspsrc location=rtsp://%s:%d/H264?W=%d&H=%d&FPS=%d&BR=4000000 latency=100 ! application/x-rtp,media=video ! rtph264depay ! parsebin ! nvv4l2decoder enable-max-performancegst=1 ! nvvidconv ! video/x-raw,format=(string)BGRx ! videoconvert ! appsink sync=false", this->_ip.c_str(), this->_port, this->_width, this->_height, this->_fps); this->_cap.open(pipe, cv::CAP_GSTREAMER);
this->_cap.open(pipe, cv::CAP_GSTREAMER); #endif
#endif
} }
else if (this->_type == CameraType::MIPI) else if (this->_type == CameraType::MIPI)
{ {