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
Commits
ccb2ce7f
Commit
ccb2ce7f
authored
5 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
WIP File format changes to codec
parent
c1b7e004
No related branches found
No related tags found
1 merge request
!127
Implements #196 stream capturing
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/codecs/include/ftl/codecs/bitrates.hpp
+10
-1
10 additions, 1 deletion
components/codecs/include/ftl/codecs/bitrates.hpp
components/codecs/include/ftl/codecs/packet.hpp
+10
-2
10 additions, 2 deletions
components/codecs/include/ftl/codecs/packet.hpp
with
20 additions
and
3 deletions
components/codecs/include/ftl/codecs/bitrates.hpp
+
10
−
1
View file @
ccb2ce7f
...
@@ -14,7 +14,14 @@ enum struct codec_t : uint8_t {
...
@@ -14,7 +14,14 @@ enum struct codec_t : uint8_t {
JPG
=
0
,
JPG
=
0
,
PNG
,
PNG
,
H264
,
H264
,
HEVC
// H265
HEVC
,
// H265
// TODO: Add audio codecs
JSON
=
100
,
// A JSON string
CALIBRATION
,
// Camera parameters object
POSE
,
// 4x4 eigen matrix
RAW
// Some unknown binary format (msgpack?)
};
};
/**
/**
...
@@ -29,6 +36,8 @@ enum struct definition_t : uint8_t {
...
@@ -29,6 +36,8 @@ enum struct definition_t : uint8_t {
SD480
=
5
,
SD480
=
5
,
LD360
=
6
,
LD360
=
6
,
Any
=
7
Any
=
7
// TODO: Add audio definitions
};
};
/**
/**
...
...
This diff is collapsed.
Click to expand it.
components/codecs/include/ftl/codecs/packet.hpp
+
10
−
2
View file @
ccb2ce7f
...
@@ -10,6 +10,12 @@
...
@@ -10,6 +10,12 @@
namespace
ftl
{
namespace
ftl
{
namespace
codecs
{
namespace
codecs
{
struct
Header
{
const
char
magic
[
4
]
=
{
'F'
,
'T'
,
'L'
,
'F'
};
uint8_t
version
;
};
/**
/**
* A single network packet for the compressed video stream. It includes the raw
* A single network packet for the compressed video stream. It includes the raw
* data along with any block metadata required to reconstruct. The underlying
* data along with any block metadata required to reconstruct. The underlying
...
@@ -21,9 +27,10 @@ struct Packet {
...
@@ -21,9 +27,10 @@ struct Packet {
ftl
::
codecs
::
definition_t
definition
;
ftl
::
codecs
::
definition_t
definition
;
uint8_t
block_total
;
// Packets expected per frame
uint8_t
block_total
;
// Packets expected per frame
uint8_t
block_number
;
// This packets number within a frame
uint8_t
block_number
;
// This packets number within a frame
uint8_t
flags
;
// Codec dependent flags
std
::
vector
<
uint8_t
>
data
;
std
::
vector
<
uint8_t
>
data
;
MSGPACK_DEFINE
(
codec
,
definition
,
block_total
,
block_number
,
data
);
MSGPACK_DEFINE
(
codec
,
definition
,
block_total
,
block_number
,
flags
,
data
);
};
};
/**
/**
...
@@ -33,9 +40,10 @@ struct Packet {
...
@@ -33,9 +40,10 @@ struct Packet {
*/
*/
struct
StreamPacket
{
struct
StreamPacket
{
int64_t
timestamp
;
int64_t
timestamp
;
uint8_t
streamID
;
// Source number...
uint8_t
channel
;
// first bit = channel, second bit indicates second channel being sent
uint8_t
channel
;
// first bit = channel, second bit indicates second channel being sent
MSGPACK_DEFINE
(
timestamp
,
channel
);
MSGPACK_DEFINE
(
timestamp
,
streamID
,
channel
);
};
};
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment