summaryrefslogtreecommitdiff
path: root/test/gstreamer/gstreamer_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/gstreamer/gstreamer_test.cpp')
-rw-r--r--test/gstreamer/gstreamer_test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/gstreamer/gstreamer_test.cpp b/test/gstreamer/gstreamer_test.cpp
index 4947b7bb..fe8e8e15 100644
--- a/test/gstreamer/gstreamer_test.cpp
+++ b/test/gstreamer/gstreamer_test.cpp
@@ -73,7 +73,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)
* Atleast one camera should be available with numStreams streams,
* otherwise skip the test entirely.
*/
- if (!checkMinCameraStreams(numStreams)) {
+ if (!checkMinCameraStreamsAndSetCameraName(numStreams)) {
status_ = TestSkip;
return;
}
@@ -81,7 +81,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)
status_ = TestPass;
}
-bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)
+bool GstreamerTest::checkMinCameraStreamsAndSetCameraName(unsigned int numStreams)
{
libcamera::CameraManager cm;
bool cameraFound = false;
@@ -93,6 +93,7 @@ bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)
continue;
cameraFound = true;
+ cameraName_ = camera->id();
break;
}
@@ -121,6 +122,7 @@ int GstreamerTest::createPipeline()
return TestFail;
}
+ g_object_set(libcameraSrc_, "camera-name", cameraName_.c_str(), NULL);
g_object_ref_sink(libcameraSrc_);
return TestPass;