Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
rtp_audio_silence_generator.h
Go to the documentation of this file.
1
10#ifndef RTP_AUDIO_SILENCE_GENERATOR_H
11#define RTP_AUDIO_SILENCE_GENERATOR_H
12
13#include "config.h"
14
15#include <QIODevice>
16
20class AudioSilenceGenerator : public QIODevice
21{
22public:
27 explicit AudioSilenceGenerator(QObject *parent = nullptr);
28
31
36 qint64 size() const override;
37
43 qint64 pos() const override;
44
51 bool seek(qint64 off) override;
52
53protected:
61 qint64 readData(char *data, qint64 maxSize) override;
62
70 qint64 writeData(const char *data, qint64 maxSize) override;
71
72private:
73 quint64 pos_;
74};
75
76#endif // RTP_AUDIO_SILENCE_GENERATOR_H
A QIODevice that produces an infinite stream of silence (zero-valued PCM samples).
Definition rtp_audio_silence_generator.h:21
bool seek(qint64 off) override
Seek to an absolute byte offset within the silence stream.
Definition rtp_audio_silence_generator.cpp:30
~AudioSilenceGenerator()
Destroy the generator. No resources are released.
Definition rtp_audio_silence_generator.h:30
qint64 size() const override
Return the logical size of the silence stream.
Definition rtp_audio_silence_generator.cpp:20
qint64 readData(char *data, qint64 maxSize) override
Fill data with up to maxSize zero-valued (silent) bytes.
Definition rtp_audio_silence_generator.cpp:36
qint64 pos() const override
Return the current read position within the silence stream.
Definition rtp_audio_silence_generator.cpp:25
qint64 writeData(const char *data, qint64 maxSize) override
Not supported — this device is read-only.
Definition rtp_audio_silence_generator.cpp:44