Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Pope
ftl
Merge requests
!200
python ftl-file v3
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
python ftl-file v3
feature/python-ftlf
into
master
Overview
1
Commits
7
Pipelines
3
Changes
1
Merged
Sebastian Hahta
requested to merge
feature/python-ftlf
into
master
5 years ago
Overview
1
Commits
7
Pipelines
3
Changes
1
Expand
msgpack calibration and color conversions for ftlf v3+
Edited
5 years ago
by
Sebastian Hahta
0
0
Merge request reports
Viewing commit
dda749ea
Prev
Next
Show latest version
1 file
+
15
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
dda749ea
decoding (frames)
· dda749ea
Sebastian Hahta
authored
5 years ago
python/ftl/ftlstream.py
+
15
−
9
Options
@@ -262,7 +262,7 @@ class FTLStreamReader:
Reads data for until the next timestamp. Returns False if there is no
more data to read, otherwise returns True.
todo: make decoding optional
todo: make
(frame)
decoding optional
'''
self
.
_frame
=
None
@@ -276,22 +276,28 @@ class FTLStreamReader:
if
self
.
_p
.
block_total
!=
1
or
self
.
_p
.
block_number
!=
0
:
raise
Exception
(
"
Unsupported block format (todo)
"
)
# calibration/pose cached
# todo: should be done by user instead?
if
self
.
_sp
.
channel
==
ftl
.
Channel
.
Calibration
:
self
.
_update_calib
(
self
.
_sp
,
self
.
_p
)
elif
self
.
_sp
.
channel
==
ftl
.
Channel
.
Pose
:
self
.
_update_pose
(
self
.
_sp
,
self
.
_p
)
elif
self
.
_sp
.
channel
in
(
ftl
.
Channel
.
Left
,
ftl
.
Channel
.
Left
):
# Decode Left/Right
if
self
.
_p
.
codec
==
ftl
.
codec_t
.
HEVC
:
self
.
_decode_hevc
(
self
.
_sp
,
self
.
_p
)
# decode if codec supported
if
self
.
_p
.
codec
==
ftl
.
codec_t
.
HEVC
:
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
.
P
N
G
:
self
.
_decode_opencv
(
self
.
_sp
,
self
.
_p
)
elif
self
.
_p
.
codec
==
ftl
.
codec_t
.
J
PG
:
self
.
_decode_opencv
(
self
.
_sp
,
self
.
_p
)
elif
self
.
_p
.
codec
==
ftl
.
codec_t
.
JPG
:
self
.
_decode_opencv
(
self
.
_sp
,
self
.
_p
)
else
:
# todo (unsupported codec)
pass
return
True
Loading