From f76d5b5ce3a3cd29a26909235dd030927f6e3f51 Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Sat, 13 Feb 2016 14:21:18 +0100 Subject: providers:checkbox:bin:camera_test: Display the still picture using GST (not eog) Fixes: https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1078884 --- bin/camera_test | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/camera_test b/bin/camera_test index 235eaaf..794578b 100755 --- a/bin/camera_test +++ b/bin/camera_test @@ -303,10 +303,18 @@ class CameraTest: self._pipeline.set_state(Gst.State.NULL) if not quiet: - try: - check_call(["timeout", "-k", "11", "10", "eog", filename]) - except CalledProcessError: - pass + import imghdr + image_type = imghdr.what(filename) + pipespec = ("filesrc location=%(filename)s ! " + "%(type)sdec ! " + "videoscale ! " + "imagefreeze ! autovideosink" + % {'filename': filename, + 'type': image_type}) + self._pipeline = Gst.parse_launch(pipespec) + self._pipeline.set_state(Gst.State.PLAYING) + time.sleep(10) + self._pipeline.set_state(Gst.State.NULL) def _supported_resolutions_to_string(self, supported_resolutions): """ -- cgit v1.2.3