Correct implementation of DeviceSource resize

previous commit was bad...
This commit is contained in:
Bruno
2021-05-25 20:20:43 +02:00
parent 0e48cf4505
commit 61fa062794
5 changed files with 29 additions and 11 deletions

View File

@@ -384,13 +384,14 @@ void DeviceSource::setDevice(const std::string &devicename)
pipeline << " ! videoconvert";
dettach();
// resize render buffer
if (renderbuffer_)
renderbuffer_->resize(best.width, best.height);
// open gstreamer
stream_->open( pipeline.str(), best.width, best.height);
stream_->play(true);
// will be ready after init and one frame rendered
ready_ = false;
}