- void createAndAddVideoSource() {
- // TODO: rework this function
- GstElement *src, *wrapper;
- QString wrapperSrc = conf->wrapperVideoSource();
- QString prop = conf->wrapperVideoSourceProperty();
-
- if (!prop.isEmpty() && !wrapperSrc.isEmpty()) {
- wrapper = gst_element_factory_make(wrapperSrc.toAscii(), "QCameraWrapperVideoSrc");
- if (!wrapper) {
- qCritical() << "Failed to create wrapper source" << wrapperSrc;
- return;
- }
- }
+ void createAndAddVideoSourceAndWrapper() {
+ videoSource = gst_element_factory_make(conf->videoSource().toUtf8().constData(),
+ "QtCameraVideoSrc");
+ wrapperVideoSource = gst_element_factory_make(conf->wrapperVideoSource().toUtf8().constData(),
+ "QCameraWrapperVideoSrc");