mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Change READY state of source
a source is ready after rendering one frame (which is after being initialized)
This commit is contained in:
@@ -342,7 +342,7 @@ DeviceSource::~DeviceSource()
|
||||
}
|
||||
|
||||
void DeviceSource::setDevice(const std::string &devicename)
|
||||
{
|
||||
{
|
||||
device_ = devicename;
|
||||
Log::Notify("Creating Source with device '%s'", device_.c_str());
|
||||
|
||||
@@ -384,8 +384,12 @@ void DeviceSource::setDevice(const std::string &devicename)
|
||||
|
||||
pipeline << " ! videoconvert";
|
||||
|
||||
// open gstreamer
|
||||
stream_->open( pipeline.str(), best.width, best.height);
|
||||
stream_->play(true);
|
||||
|
||||
// will be ready after init and one frame rendered
|
||||
ready_ = false;
|
||||
}
|
||||
else
|
||||
Log::Warning("No such device '%s'", device_.c_str());
|
||||
|
||||
Reference in New Issue
Block a user