Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Toggle main menu visibility
Loading...
Searching...
No Matches
ipipeline_task_scheduler.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 Roc Streaming authors
3
*
4
* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
*/
8
9
//! @file roc_pipeline/ipipeline_task_scheduler.h
10
//! @brief Pipeline task scheduler interface.
11
12
#ifndef ROC_PIPELINE_IPIPELINE_TASK_SCHEDULER_H_
13
#define ROC_PIPELINE_IPIPELINE_TASK_SCHEDULER_H_
14
15
#include "
roc_core/time.h
"
16
17
namespace
roc
{
18
namespace
pipeline
{
19
20
class
PipelineLoop
;
21
22
//! Pipeline task scheduler interface.
23
//! PipelineLoop uses this interface to schedule asynchronous work.
24
//! Method calls may come from different threads, but are serialized.
25
class
IPipelineTaskScheduler
{
26
public
:
27
virtual
~IPipelineTaskScheduler
();
28
29
//! Schedule asynchronous work.
30
//!
31
//! @p pipeline calls this when it wants to invoke PipelineLoop::process_tasks()
32
//! asynchronously.
33
//!
34
//! @p deadline is a hint when it's better to invoke the method. It's an absolute
35
//! timestamp in nanoseconds from the same clock domain as core::timestamp().
36
//!
37
//! Zero deadline means invoke as soon as possible.
38
virtual
void
schedule_task_processing
(
PipelineLoop
&
pipeline
,
39
core::nanoseconds_t
deadline) = 0;
40
41
//! Cancel previously scheduled asynchronous work.
42
virtual
void
cancel_task_processing
(
PipelineLoop
&
pipeline
) = 0;
43
};
44
45
}
// namespace pipeline
46
}
// namespace roc
47
48
#endif
// ROC_PIPELINE_IPIPELINE_TASK_SCHEDULER_H_
roc::pipeline::IPipelineTaskScheduler
Pipeline task scheduler interface. PipelineLoop uses this interface to schedule asynchronous work....
Definition
ipipeline_task_scheduler.h:25
roc::pipeline::IPipelineTaskScheduler::schedule_task_processing
virtual void schedule_task_processing(PipelineLoop &pipeline, core::nanoseconds_t deadline)=0
Schedule asynchronous work.
roc::pipeline::IPipelineTaskScheduler::cancel_task_processing
virtual void cancel_task_processing(PipelineLoop &pipeline)=0
Cancel previously scheduled asynchronous work.
roc::pipeline::PipelineLoop
Base class for task-based pipelines.
Definition
pipeline_loop.h:236
roc::core::nanoseconds_t
int64_t nanoseconds_t
Nanoseconds.
Definition
time.h:58
roc::pipeline
Sender and receiver processing pipelines.
roc
Root namespace.
time.h
Time definitions.
roc_pipeline
ipipeline_task_scheduler.h
Generated by
1.17.0