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
Admin message
Maintenance on Tuesday 15.4. at 14:00. ETA 60 - 90 minutes.
Show more breadcrumbs
Nicolas Pope
ftl
Commits
fbb344fe
Commit
fbb344fe
authored
4 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Use different schedule mechanism
parent
0eade1e2
No related branches found
No related tags found
1 merge request
!332
Use different schedule mechanism
Pipeline
#29034
passed
4 years ago
Stage: all
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
applications/vision/src/main.cpp
+1
-1
1 addition, 1 deletion
applications/vision/src/main.cpp
components/streams/src/builder.cpp
+5
-5
5 additions, 5 deletions
components/streams/src/builder.cpp
with
6 additions
and
6 deletions
applications/vision/src/main.cpp
+
1
−
1
View file @
fbb344fe
...
@@ -164,7 +164,7 @@ static void run(ftl::Configurable *root) {
...
@@ -164,7 +164,7 @@ static void run(ftl::Configurable *root) {
// Send channels on flush
// Send channels on flush
auto
flushhandle
=
pool
.
onFlushSet
([
sender
,
&
encodable
](
ftl
::
data
::
FrameSet
&
fs
,
ftl
::
codecs
::
Channel
c
)
{
auto
flushhandle
=
pool
.
onFlushSet
([
sender
,
&
encodable
](
ftl
::
data
::
FrameSet
&
fs
,
ftl
::
codecs
::
Channel
c
)
{
if
(
!
fs
.
test
(
ftl
::
data
::
FSFlag
::
AUTO_SEND
))
return
true
;
if
(
c
!=
Channel
::
EndFrame
&&
!
fs
.
test
(
ftl
::
data
::
FSFlag
::
AUTO_SEND
))
return
true
;
// Always send data channels
// Always send data channels
if
((
int
)
c
>=
32
)
sender
->
post
(
fs
,
c
);
if
((
int
)
c
>=
32
)
sender
->
post
(
fs
,
c
);
...
...
This diff is collapsed.
Click to expand it.
components/streams/src/builder.cpp
+
5
−
5
View file @
fbb344fe
...
@@ -367,20 +367,20 @@ std::shared_ptr<ftl::data::FrameSet> ForeignBuilder::_findFrameset(int64_t ts) {
...
@@ -367,20 +367,20 @@ std::shared_ptr<ftl::data::FrameSet> ForeignBuilder::_findFrameset(int64_t ts) {
* Note: Must occur inside a mutex lock.
* Note: Must occur inside a mutex lock.
*/
*/
std
::
shared_ptr
<
ftl
::
data
::
FrameSet
>
ForeignBuilder
::
_getFrameset
()
{
std
::
shared_ptr
<
ftl
::
data
::
FrameSet
>
ForeignBuilder
::
_getFrameset
()
{
ftl
::
data
::
FrameSetPtr
f
;
auto
i
=
framesets_
.
begin
();
auto
i
=
framesets_
.
begin
();
int
N
=
bufferSize_
;
int
N
=
bufferSize_
;
// Skip N frames to fixed buffer location
// Skip N frames to fixed buffer location
if
(
bufferSize_
>
0
)
{
if
(
bufferSize_
>
0
)
{
while
(
N
--
>
0
&&
i
!=
framesets_
.
end
())
++
i
;
while
(
N
--
>
0
&&
i
!=
framesets_
.
end
())
++
i
;
// Otherwise skip to first fully completed frame
if
(
i
!=
framesets_
.
end
())
f
=
*
i
;
}
else
{
}
else
{
while
(
i
!=
framesets_
.
end
()
&&
!
(
*
i
)
->
isComplete
())
++
i
;
// Always choose oldest frameset when it completes
if
(
framesets_
.
size
()
>
0
&&
framesets_
.
back
()
->
isComplete
())
f
=
framesets_
.
back
();
}
}
if
(
i
!=
framesets_
.
end
())
{
if
(
f
)
{
auto
f
=
*
i
;
// Lock to force completion of on going construction first
// Lock to force completion of on going construction first
UNIQUE_LOCK
(
f
->
smtx
,
slk
);
UNIQUE_LOCK
(
f
->
smtx
,
slk
);
last_frame_
=
f
->
timestamp
();
last_frame_
=
f
->
timestamp
();
...
...
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