forked from floratest1/SpireCV
Hardware decoding G1
This commit is contained in:
parent
182c2d9f0b
commit
5f656487a1
|
@ -72,14 +72,19 @@ void Camera::openImpl()
|
||||||
this->_fps = 30;
|
this->_fps = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
#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);
|
|
||||||
this->_cap.open(pipe);
|
|
||||||
#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 ! \
|
||||||
this->_cap.open(pipe, cv::CAP_GSTREAMER);
|
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);
|
||||||
|
#else
|
||||||
|
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 ! avdec_h264 ! \
|
||||||
|
videoconvert ! appsink sync=false",
|
||||||
|
this->_ip.c_str(), this->_port, this->_width, this->_height, this->_fps);
|
||||||
#endif
|
#endif
|
||||||
|
printf("%s\r\n",pipe);
|
||||||
|
this->_cap.open(pipe, cv::CAP_GSTREAMER);
|
||||||
}
|
}
|
||||||
else if (this->_type == CameraType::GX40)
|
else if (this->_type == CameraType::GX40)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue