diff options
author | Sylvain Pineau <sylvain.pineau@canonical.com> | 2016-02-18 15:01:34 +0000 |
---|---|---|
committer | Sylvain Pineau <> | 2016-02-18 15:01:34 +0000 |
commit | b5ae22430fcec6c162fa0a258fdf547e56408c74 (patch) | |
tree | d0b05467aede7fe61358b7cb74aab8771958cf03 /bin | |
parent | 4b03e473b7f64bbbd9ff4f67f05d486e9432d12d (diff) | |
parent | f76d5b5ce3a3cd29a26909235dd030927f6e3f51 (diff) |
"automatic merge of lp:~sylvain-pineau/checkbox/fix-1078884/ by tarmac [r=sylvain-pineau][bug=1078884][author=sylvain-pineau]"
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/camera_test | 16 |
1 files changed, 12 insertions, 4 deletions
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): """ |