diff options
author | Gabriel Jover-Manas <gjover@cells.es> | 2014-08-11 16:30:15 +0200 |
---|---|---|
committer | cpascual <cpascual@cells.es> | 2014-10-23 12:14:30 +0200 |
commit | 140fe301017788cf967da8b66354ec6d7200e1b9 (patch) | |
tree | 230b2d6012086a2f52ab5afbc6d63c0a422e7aa8 /taurus/lib/taurus/core/util | |
parent | 42b6276fccd73a19c8ab46f4c552c0db21a956cf (diff) |
The video decoder return the coding format Id
Diffstat (limited to 'taurus/lib/taurus/core/util')
-rw-r--r-- | taurus/lib/taurus/core/util/codecs.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/taurus/lib/taurus/core/util/codecs.py b/taurus/lib/taurus/core/util/codecs.py index af8350c3..cc7013b6 100644 --- a/taurus/lib/taurus/core/util/codecs.py +++ b/taurus/lib/taurus/core/util/codecs.py @@ -585,7 +585,13 @@ class VideoImageCodec(Codec): img1D = numpy.fromstring(imgBuffer, dtype) img2D = img1D.reshape(header['height'],header['width']) - return '',img2D + + try: + fmt = self.__getFormatId(header['imageMode']) + except: + fmt = "" + + return fmt, img2D def __yuv2rgb(self, y, u, v): '''YUV444 to RGB888 conversion''' @@ -673,7 +679,7 @@ class VideoImageCodec(Codec): #'BAYER BG16' : Core.BAYER_BG16, #'I420' : Core.I420, #'YUV411' : Core.YUV411, - 16 : 'Y'#Core.YUV422, + 16 : 'YUV422'#Core.YUV422, #'YUV444' : Core.YUV444 }[mode] |