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
4530ebfa
Commit
4530ebfa
authored
5 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Minor correction to frame id mapping
parent
de61f18c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
components/rgbd-sources/src/frameset.cpp
+3
-0
3 additions, 0 deletions
components/rgbd-sources/src/frameset.cpp
components/streams/src/receiver.cpp
+1
-1
1 addition, 1 deletion
components/streams/src/receiver.cpp
components/streams/src/stream.cpp
+10
-4
10 additions, 4 deletions
components/streams/src/stream.cpp
with
14 additions
and
5 deletions
components/rgbd-sources/src/frameset.cpp
+
3
−
0
View file @
4530ebfa
...
...
@@ -85,6 +85,8 @@ void Builder::push(int64_t timestamp, int ix, ftl::rgbd::Frame &frame) {
UNIQUE_LOCK
(
mutex_
,
lk
);
//LOG(INFO) << "BUILDER PUSH: " << timestamp << ", " << ix << ", " << size_;
// Size is determined by largest frame index received... note that size
// cannot therefore reduce.
if
(
ix
>=
size_
)
{
...
...
@@ -224,6 +226,7 @@ ftl::rgbd::FrameSet *Builder::_findFrameset(int64_t ts) {
ftl
::
rgbd
::
FrameSet
*
Builder
::
_getFrameset
()
{
for
(
auto
i
=
framesets_
.
begin
();
i
!=
framesets_
.
end
();
i
++
)
{
auto
*
f
=
*
i
;
//LOG(INFO) << "GET: " << f->count << " of " << size_;
if
(
!
f
->
stale
&&
f
->
count
>=
size_
)
{
//LOG(INFO) << "GET FRAMESET and remove: " << f->timestamp;
auto
j
=
framesets_
.
erase
(
i
);
...
...
This diff is collapsed.
Click to expand it.
components/streams/src/receiver.cpp
+
1
−
1
View file @
4530ebfa
...
...
@@ -232,7 +232,7 @@ void Receiver::_processVideo(const StreamPacket &spkt, const Packet &pkt) {
if
((
frame
.
completed
&
sel
)
==
sel
)
{
timestamp_
=
frame
.
timestamp
;
//LOG(INFO) << "BUILDER PUSH: " << timestamp_ << ", " << spkt.frameNumber();
//LOG(INFO) << "BUILDER PUSH: " << timestamp_ << ", " << spkt.frameNumber()
<< ", " << (int)pkt.frame_count
;
if
(
frame
.
state
.
getLeft
().
width
==
0
)
{
LOG
(
WARNING
)
<<
"Missing calibration, skipping frame"
;
...
...
This diff is collapsed.
Click to expand it.
components/streams/src/stream.cpp
+
10
−
4
View file @
4530ebfa
...
...
@@ -55,11 +55,15 @@ void Muxer::add(Stream *s) {
s
->
onPacket
([
this
,
s
,
i
](
const
ftl
::
codecs
::
StreamPacket
&
spkt
,
const
ftl
::
codecs
::
Packet
&
pkt
)
{
//SHARED_LOCK(mutex_, lk);
int
id
=
_lookup
(
i
,
spkt
.
frame_number
);
ftl
::
codecs
::
StreamPacket
spkt2
=
spkt
;
spkt2
.
streamID
=
0
;
spkt2
.
frame_number
=
id
;
if
(
spkt2
.
frame_number
<
255
)
{
int
id
=
_lookup
(
i
,
spkt
.
frame_number
);
spkt2
.
frame_number
=
id
;
}
_notify
(
spkt2
,
pkt
);
s
->
select
(
spkt
.
streamID
,
selected
(
0
));
});
...
...
@@ -79,6 +83,8 @@ bool Muxer::post(const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packe
auto
[
sid
,
ssid
]
=
revmap_
[
spkt
.
frame_number
];
auto
&
se
=
streams_
[
sid
];
//LOG(INFO) << "POST " << spkt.frame_number;
ftl
::
codecs
::
StreamPacket
spkt2
=
spkt
;
spkt2
.
streamID
=
0
;
spkt2
.
frame_number
=
ssid
;
...
...
@@ -138,7 +144,7 @@ int Muxer::_lookup(int sid, int ssid) {
void
Muxer
::
_notify
(
const
ftl
::
codecs
::
StreamPacket
&
spkt
,
const
ftl
::
codecs
::
Packet
&
pkt
)
{
SHARED_LOCK
(
mutex_
,
lk
);
available
(
spkt
.
frameSetID
())
+=
spkt
.
channel
;
if
(
cb_
)
cb_
(
spkt
,
pkt
);
if
(
cb_
)
cb_
(
spkt
,
pkt
);
// spkt.frame_number < 255 &&
}
// ==== Broadcaster ============================================================
...
...
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