|
Ring Daemon
|
#include <threadloop.h>


Public Types | |
| enum class | ThreadState : uint8_t { READY , RUNNING , STOPPING } |
Public Member Functions | |
| void | exit () |
| std::thread::id | get_id () const noexcept |
| bool | isRunning () const noexcept |
| bool | isStopping () const noexcept |
| void | join () |
| void | start () |
| virtual void | stop () |
| ThreadLoop (const std::function< bool()> &setup, const std::function< void()> &process, const std::function< void()> &cleanup) | |
| void | waitForCompletion () |
| virtual | ~ThreadLoop () |
Definition at line 35 of file threadloop.h.
|
strong |
| Enumerator | |
|---|---|
| READY | |
| RUNNING | |
| STOPPING | |
Definition at line 38 of file threadloop.h.
| jami::ThreadLoop::ThreadLoop | ( | const std::function< bool()> & | setup, |
| const std::function< void()> & | process, | ||
| const std::function< void()> & | cleanup | ||
| ) |
Definition at line 46 of file threadloop.cpp.
|
virtual |
Definition at line 55 of file threadloop.cpp.
References isRunning(), JAMI_ERR, and join().

| void jami::ThreadLoop::exit | ( | ) |
Definition at line 107 of file threadloop.cpp.
References stop().

|
inlinenoexcept |
Definition at line 53 of file threadloop.h.
Referenced by jami::InterruptedThreadLoop::wait(), jami::InterruptedThreadLoop::wait_for(), and jami::InterruptedThreadLoop::wait_for().
|
noexcept |
Definition at line 114 of file threadloop.cpp.
References jami::emitSignal(), and RUNNING.
Referenced by jami::video::VideoReceiveThread::decodeFrame(), jami::AudioInput::isCapturing(), jami::video::VideoReceiveThread::startSink(), jami::video::VideoReceiveThread::stopSink(), jami::AudioInput::switchInput(), and ~ThreadLoop().

|
inlinenoexcept |
Definition at line 52 of file threadloop.h.
References STOPPING.
Referenced by jami::video::VideoInput::restart(), jami::video::VideoReceiveThread::stopLoop(), jami::InterruptedThreadLoop::wait(), jami::InterruptedThreadLoop::wait_for(), and jami::InterruptedThreadLoop::wait_for().
| void jami::ThreadLoop::join | ( | ) |
Definition at line 92 of file threadloop.cpp.
References stop().
Referenced by jami::AudioRtpSession::stop(), jami::video::VideoRtpSession::stop(), jami::video::VideoReceiveThread::stopLoop(), jami::AudioInput::~AudioInput(), jami::AudioReceiveThread::~AudioReceiveThread(), jami::MediaPlayer::~MediaPlayer(), ~ThreadLoop(), jami::video::VideoInput::~VideoInput(), jami::video::VideoMixer::~VideoMixer(), and jami::video::VideoReceiveThread::~VideoReceiveThread().

| void jami::ThreadLoop::start | ( | ) |
Definition at line 64 of file threadloop.cpp.
References jami::emitSignal(), JAMI_DBG, JAMI_ERR, RUNNING, and STOPPING.
Referenced by jami::AudioInput::configureFilePlayback(), jami::video::VideoInput::configureFilePlayback(), jami::AudioInput::start(), jami::video::VideoReceiveThread::startLoop(), jami::AudioReceiveThread::startReceiver(), and jami::AudioInput::switchInput().

|
virtual |
Reimplemented in jami::InterruptedThreadLoop.
Definition at line 85 of file threadloop.cpp.
References jami::emitSignal(), RUNNING, and STOPPING.
Referenced by jami::video::VideoReceiveThread::decodeFrame(), exit(), join(), jami::InterruptedThreadLoop::stop(), jami::video::VideoReceiveThread::stopLoop(), and jami::AudioReceiveThread::stopReceiver().

| void jami::ThreadLoop::waitForCompletion | ( | ) |
Definition at line 100 of file threadloop.cpp.