SDRAngel
4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
|
#include <filesinkthread.h>
Inherits QThread.
Public Member Functions | |
FileSinkThread (std::ofstream *samplesStream, SampleSourceFifo *sampleFifo, QObject *parent=0) | |
~FileSinkThread () | |
void | startWork () |
void | stopWork () |
void | setSamplerate (int samplerate) |
void | setLog2Interpolation (int log2Interpolation) |
void | setBuffer (std::size_t chunksize) |
bool | isRunning () const |
std::size_t | getSamplesCount () const |
void | setSamplesCount (int samplesCount) |
void | connectTimer (const QTimer &timer) |
Private Slots | |
void | tick () |
Private Member Functions | |
void | run () |
Private Attributes | |
QMutex | m_startWaitMutex |
QWaitCondition | m_startWaiter |
volatile bool | m_running |
std::ofstream * | m_ofstream |
std::size_t | m_bufsize |
unsigned int | m_samplesChunkSize |
SampleSourceFifo * | m_sampleFifo |
std::size_t | m_samplesCount |
int | m_samplerate |
int | m_log2Interpolation |
int | m_throttlems |
int | m_maxThrottlems |
QElapsedTimer | m_elapsedTimer |
bool | m_throttleToggle |
Interpolators< qint16, SDR_TX_SAMP_SZ, 16 > | m_interpolators |
int16_t * | m_buf |
Definition at line 38 of file filesinkthread.h.
FileSinkThread::FileSinkThread | ( | std::ofstream * | samplesStream, |
SampleSourceFifo * | sampleFifo, | ||
QObject * | parent = 0 |
||
) |
FileSinkThread::~FileSinkThread | ( | ) |
Definition at line 45 of file filesinkthread.cpp.
References m_buf, m_running, and stopWork().
void FileSinkThread::connectTimer | ( | const QTimer & | timer | ) |
Definition at line 162 of file filesinkthread.cpp.
References tick().
Referenced by setSamplesCount(), and FileSinkOutput::start().
|
inline |
Definition at line 51 of file filesinkthread.h.
References m_samplesCount.
Referenced by FileSinkOutput::handleMessage().
|
inline |
|
private |
void FileSinkThread::setBuffer | ( | std::size_t | chunksize | ) |
void FileSinkThread::setLog2Interpolation | ( | int | log2Interpolation | ) |
Definition at line 116 of file filesinkthread.cpp.
References m_buf, m_log2Interpolation, m_running, m_samplerate, startWork(), and stopWork().
Referenced by FileSinkOutput::applySettings(), and FileSinkOutput::start().
void FileSinkThread::setSamplerate | ( | int | samplerate | ) |
Definition at line 82 of file filesinkthread.cpp.
References m_buf, m_log2Interpolation, m_running, m_sampleFifo, m_samplerate, m_samplesChunkSize, m_throttlems, SampleSourceFifo::resize(), startWork(), and stopWork().
Referenced by FileSinkOutput::applySettings(), and FileSinkOutput::start().
|
inline |
Definition at line 52 of file filesinkthread.h.
References connectTimer(), and m_samplesCount.
void FileSinkThread::startWork | ( | ) |
Definition at line 54 of file filesinkthread.cpp.
References m_elapsedTimer, m_maxThrottlems, m_ofstream, m_running, m_startWaiter, and m_startWaitMutex.
Referenced by FileSinkOutput::handleMessage(), setLog2Interpolation(), setSamplerate(), and FileSinkOutput::start().
void FileSinkThread::stopWork | ( | ) |
Definition at line 75 of file filesinkthread.cpp.
References m_running.
Referenced by FileSinkOutput::handleMessage(), setLog2Interpolation(), setSamplerate(), FileSinkOutput::stop(), and ~FileSinkThread().
|
privateslot |
Definition at line 168 of file filesinkthread.cpp.
References Interpolators< T, SdrBits, OutputBits >::interpolate16_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate2_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate32_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate4_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate64_cen(), Interpolators< T, SdrBits, OutputBits >::interpolate8_cen(), m_buf, m_elapsedTimer, m_interpolators, m_log2Interpolation, m_ofstream, m_running, m_sampleFifo, m_samplerate, m_samplesChunkSize, m_samplesCount, m_throttlems, m_throttleToggle, leansdr::min(), and SampleSourceFifo::readAdvance().
Referenced by connectTimer().
|
private |
Definition at line 75 of file filesinkthread.h.
Referenced by setLog2Interpolation(), setSamplerate(), tick(), and ~FileSinkThread().
|
private |
Definition at line 62 of file filesinkthread.h.
|
private |
Definition at line 71 of file filesinkthread.h.
Referenced by startWork(), and tick().
|
private |
Definition at line 74 of file filesinkthread.h.
Referenced by tick().
|
private |
Definition at line 68 of file filesinkthread.h.
Referenced by setLog2Interpolation(), setSamplerate(), and tick().
|
private |
Definition at line 70 of file filesinkthread.h.
Referenced by startWork().
|
private |
Definition at line 61 of file filesinkthread.h.
Referenced by FileSinkThread(), startWork(), and tick().
|
private |
Definition at line 59 of file filesinkthread.h.
Referenced by isRunning(), run(), setLog2Interpolation(), setSamplerate(), startWork(), stopWork(), tick(), and ~FileSinkThread().
|
private |
Definition at line 64 of file filesinkthread.h.
Referenced by setSamplerate(), and tick().
|
private |
Definition at line 67 of file filesinkthread.h.
Referenced by setLog2Interpolation(), setSamplerate(), and tick().
|
private |
Definition at line 63 of file filesinkthread.h.
Referenced by setSamplerate(), and tick().
|
private |
Definition at line 65 of file filesinkthread.h.
Referenced by getSamplesCount(), setSamplesCount(), and tick().
|
private |
Definition at line 58 of file filesinkthread.h.
Referenced by run(), and startWork().
|
private |
Definition at line 57 of file filesinkthread.h.
Referenced by startWork().
|
private |
Definition at line 69 of file filesinkthread.h.
Referenced by setSamplerate(), and tick().
|
private |
Definition at line 72 of file filesinkthread.h.
Referenced by tick().