Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Toggle main menu visibility
Loading...
Searching...
No Matches
profiling_reader.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019 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_audio/profiling_reader.h
10
//! @brief Profiling reader.
11
12
#ifndef ROC_AUDIO_PROFILING_READER_H_
13
#define ROC_AUDIO_PROFILING_READER_H_
14
15
#include "
roc_audio/iframe_reader.h
"
16
#include "
roc_audio/profiler.h
"
17
#include "
roc_core/noncopyable.h
"
18
#include "
roc_core/rate_limiter.h
"
19
#include "
roc_core/time.h
"
20
#include "
roc_packet/units.h
"
21
22
namespace
roc
{
23
namespace
audio
{
24
25
//! Profiling reader.
26
class
ProfilingReader
:
public
IFrameReader
,
public
core::NonCopyable
<> {
27
public
:
28
//! Initialization.
29
ProfilingReader
(
IFrameReader
& reader,
30
core::IArena
& arena,
31
const
SampleSpec
& sample_spec,
32
ProfilerConfig
profiler_config);
33
34
//! Check if the profiler was succefully constructed.
35
bool
is_valid
()
const
;
36
37
//! Read audio frame.
38
virtual
bool
read
(
Frame
& frame);
39
40
private
:
41
core::nanoseconds_t
read_(
Frame
& frame,
bool
& ret);
42
43
Profiler
profiler_;
44
IFrameReader
& reader_;
45
};
46
47
}
// namespace audio
48
}
// namespace roc
49
50
#endif
// ROC_AUDIO_PROFILING_READER_H_
roc::audio::Frame
Audio frame.
Definition
frame.h:25
roc::audio::IFrameReader
Frame reader interface.
Definition
iframe_reader.h:22
roc::audio::Profiler
Profiler The role of the profiler is to report the average processing speed (# of samples processed p...
Definition
profiler.h:65
roc::audio::ProfilingReader::read
virtual bool read(Frame &frame)
Read audio frame.
roc::audio::ProfilingReader::ProfilingReader
ProfilingReader(IFrameReader &reader, core::IArena &arena, const SampleSpec &sample_spec, ProfilerConfig profiler_config)
Initialization.
roc::audio::ProfilingReader::is_valid
bool is_valid() const
Check if the profiler was succefully constructed.
roc::audio::SampleSpec
Sample specification. Describes sample rate and channels.
Definition
sample_spec.h:30
roc::core::IArena
Memory arena interface.
Definition
iarena.h:23
roc::core::NonCopyable
Base class for non-copyable objects.
Definition
noncopyable.h:23
iframe_reader.h
Frame reader interface.
roc::audio
Audio frames and audio processing.
roc::core::nanoseconds_t
int64_t nanoseconds_t
Nanoseconds.
Definition
time.h:58
roc
Root namespace.
noncopyable.h
Non-copyable object.
profiler.h
Profiler.
rate_limiter.h
Rate limiter.
roc::audio::ProfilerConfig
Profiler Configuration Parameters. Controls profiling interval and duration of each circular buffer c...
Definition
profiler.h:30
time.h
Time definitions.
units.h
Various units used in packets.
roc_audio
profiling_reader.h
Generated by
1.17.0