Skip to content
Snippets Groups Projects
Commit dda749ea authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

decoding (frames)

parent 85a07a96
No related branches found
No related tags found
1 merge request!200python ftl-file v3
Pipeline #17177 passed
This commit is part of merge request !200. Comments created here will be created in the context of that merge request.
...@@ -262,7 +262,7 @@ class FTLStreamReader: ...@@ -262,7 +262,7 @@ class FTLStreamReader:
Reads data for until the next timestamp. Returns False if there is no Reads data for until the next timestamp. Returns False if there is no
more data to read, otherwise returns True. more data to read, otherwise returns True.
todo: make decoding optional todo: make (frame) decoding optional
''' '''
self._frame = None self._frame = None
...@@ -276,22 +276,28 @@ class FTLStreamReader: ...@@ -276,22 +276,28 @@ class FTLStreamReader:
if self._p.block_total != 1 or self._p.block_number != 0: if self._p.block_total != 1 or self._p.block_number != 0:
raise Exception("Unsupported block format (todo)") raise Exception("Unsupported block format (todo)")
# calibration/pose cached
# todo: should be done by user instead?
if self._sp.channel == ftl.Channel.Calibration: if self._sp.channel == ftl.Channel.Calibration:
self._update_calib(self._sp, self._p) self._update_calib(self._sp, self._p)
elif self._sp.channel == ftl.Channel.Pose: elif self._sp.channel == ftl.Channel.Pose:
self._update_pose(self._sp, self._p) self._update_pose(self._sp, self._p)
elif self._sp.channel in (ftl.Channel.Left,ftl.Channel.Left): # decode if codec supported
# Decode Left/Right if self._p.codec == ftl.codec_t.HEVC:
if self._p.codec == ftl.codec_t.HEVC: self._decode_hevc(self._sp, self._p)
self._decode_hevc(self._sp, self._p)
elif self._p.codec == ftl.codec_t.PNG:
self._decode_opencv(self._sp, self._p)
elif self._p.codec == ftl.codec_t.PNG: elif self._p.codec == ftl.codec_t.JPG:
self._decode_opencv(self._sp, self._p) self._decode_opencv(self._sp, self._p)
elif self._p.codec == ftl.codec_t.JPG: else:
self._decode_opencv(self._sp, self._p) # todo (unsupported codec)
pass
return True return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment