else {
qWarning() << "Failed to create both video and wrapper sources";
}
+ }
+
+ void createAndAddVideoSource() {
+ videoSource = gst_element_factory_make(conf->videoSource().toUtf8().constData(),
+ "QtCameraVideoSrc");
+ if (!videoSource) {
+ qCritical() << "Failed to create video source";
+ }
+ else {
+ g_object_set(cameraBin, "camera-source", videoSource, NULL);
+ }
+ }
+ void setDevicePoperty() {
if (videoSource) {
if (conf->deviceScannerType() == SCANNER_TYPE_ENUM) {
int dev = id.toInt();
}
}
- void createAndAddVideoSource() {
- videoSource = gst_element_factory_make(conf->videoSource().toUtf8().constData(),
- "QtCameraVideoSrc");
- if (!videoSource) {
- qCritical() << "Failed to create video source";
- }
- else {
- g_object_set(cameraBin, "camera-source", videoSource, NULL);
- }
- }
-
bool setViewfinderSink() {
GstElement *sink = 0;
g_object_get(cameraBin, "viewfinder-sink", &sink, NULL);