First draft of an automatic discoverer for gst device source caps

(framerate, resolution and image format) to enable auto creation of
DeviceSource.
This commit is contained in:
brunoherbelin
2020-09-25 00:05:35 +02:00
parent 84caf2da9a
commit 202db9eaa2
4 changed files with 193 additions and 11 deletions

View File

@@ -72,11 +72,14 @@ guint Stream::texture() const
}
void Stream::open(const std::string &gstreamer_description)
void Stream::open(const std::string &gstreamer_description, int w, int h)
{
// set gstreamer pipeline source
description_ = gstreamer_description;
if (w>0) width_ = w;
if (h>0) height_ = h;
// close before re-openning
if (isOpen())
close();
@@ -95,7 +98,6 @@ int Stream::id() const
return id_;
}
void Stream::execute_open()
{
// reset