MythTV  master
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
MythExternRecApp Class Reference

#include <MythExternRecApp.h>

Inheritance diagram for MythExternRecApp:
Inheritance graph
[legend]
Collaboration diagram for MythExternRecApp:
Collaboration graph
[legend]

Public Slots

void ProcStarted (void)
 
void ProcFinished (int exitCode, QProcess::ExitStatus exitStatus)
 
void ProcStateChanged (QProcess::ProcessState newState)
 
void ProcError (QProcess::ProcessError error)
 
void ProcReadStandardError (void)
 
void ProcReadStandardOutput (void)
 
void Close (void)
 
void StartStreaming (const QString &serial)
 
void StopStreaming (const QString &serial, bool silent)
 
void LockTimeout (const QString &serial)
 
void HasTuner (const QString &serial)
 
void Cleanup (void)
 
void DataStarted (void)
 
void LoadChannels (const QString &serial)
 
void FirstChannel (const QString &serial)
 
void NextChannel (const QString &serial)
 
void NewEpisodeStarting (const QString &channum)
 
void TuneChannel (const QString &serial, const QString &channum)
 
void TuneStatus (const QString &serial)
 
void HasPictureAttributes (const QString &serial)
 
void SetBlockSize (const QString &serial, int blksz)
 

Signals

void SetDescription (const QString &desc)
 
void SendMessage (const QString &func, const QString &serial, const QString &msg)
 
void ErrorMessage (const QString &msg)
 
void Opened (void)
 
void Done (void)
 
void Streaming (bool val)
 
void Fill (const QByteArray &buffer)
 

Public Member Functions

 MythExternRecApp (QString command, QString conf_file, QString log_file, QString logging)
 
 ~MythExternRecApp (void) override
 
bool Open (void)
 
void Run (void)
 
void ReplaceVariables (QString &cmd) const
 
QString Desc (void) const
 
void MythLog (const QString &msg)
 
void SetErrorMsg (const QString &msg)
 

Protected Member Functions

void GetChannel (const QString &serial, const QString &func)
 
void TerminateProcess (QProcess &proc, const QString &desc) const
 

Private Member Functions

bool config (void)
 

Private Attributes

bool m_fatal { false }
 
QString m_fatalMsg
 
std::atomic< boolm_run { true }
 
std::condition_variable m_runCond
 
std::mutex m_runMutex
 
std::atomic< boolm_streaming { false }
 
int m_result { 0 }
 
uint m_bufferMax { 188 * 10000 }
 
uint m_blockSize { m_bufferMax / 4 }
 
QProcess m_proc
 
QString m_command
 
QString m_cleanup
 
QString m_recCommand
 
QString m_recDesc
 
QMap< QString, QString > m_appEnv
 
QMap< QString, QString > m_settingVars
 
QProcess m_tuneProc
 
QProcess m_finishTuneProc
 
QString m_tuneCommand
 
QString m_onDataStart
 
QString m_newEpisodeCommand
 
QString m_channelsIni
 
uint m_lockTimeout { 0 }
 
QString m_scanCommand
 
uint m_scanTimeout { 120000 }
 
QString m_logFile
 
QString m_logging
 
QString m_configIni
 
QString m_desc
 
QString m_tuningChannel
 
QString m_tunedChannel
 
QSettings * m_chanSettings { nullptr }
 
QStringList m_channels
 
int m_channelIdx { -1 }
 

Detailed Description

Definition at line 36 of file MythExternRecApp.h.

Constructor & Destructor Documentation

◆ MythExternRecApp()

MythExternRecApp::MythExternRecApp ( QString  command,
QString  conf_file,
QString  log_file,
QString  logging 
)

Definition at line 40 of file MythExternRecApp.cpp.

◆ ~MythExternRecApp()

MythExternRecApp::~MythExternRecApp ( void  )
override

Definition at line 66 of file MythExternRecApp.cpp.

Member Function Documentation

◆ Open()

bool MythExternRecApp::Open ( void  )

Definition at line 193 of file MythExternRecApp.cpp.

Referenced by LockTimeout().

◆ Run()

void MythExternRecApp::Run ( void  )

Definition at line 303 of file MythExternRecApp.cpp.

Referenced by main().

◆ ReplaceVariables()

void MythExternRecApp::ReplaceVariables ( QString &  cmd) const

Definition at line 71 of file MythExternRecApp.cpp.

Referenced by config(), DataStarted(), Desc(), MythExternRecApp(), and TuneChannel().

◆ Desc()

QString MythExternRecApp::Desc ( void  ) const

Definition at line 90 of file MythExternRecApp.cpp.

Referenced by StartStreaming(), StopStreaming(), TuneChannel(), and TuneStatus().

◆ MythLog()

void MythExternRecApp::MythLog ( const QString &  msg)
inline

◆ SetErrorMsg()

void MythExternRecApp::SetErrorMsg ( const QString &  msg)
inline

Definition at line 52 of file MythExternRecApp.h.

◆ SetDescription

void MythExternRecApp::SetDescription ( const QString &  desc)
signal

◆ SendMessage

void MythExternRecApp::SendMessage ( const QString &  func,
const QString &  serial,
const QString &  msg 
)
signal

◆ ErrorMessage

void MythExternRecApp::ErrorMessage ( const QString &  msg)
signal

Referenced by main(), and SetErrorMsg().

◆ Opened

void MythExternRecApp::Opened ( void  )
signal

Referenced by main(), and Open().

◆ Done

void MythExternRecApp::Done ( void  )
signal

Referenced by Close(), main(), and Run().

◆ Streaming

void MythExternRecApp::Streaming ( bool  val)
signal

◆ Fill

void MythExternRecApp::Fill ( const QByteArray &  buffer)
signal

Referenced by main(), ProcReadStandardOutput(), and Run().

◆ ProcStarted

Q_SLOT void MythExternRecApp::ProcStarted ( void  )
slot

Definition at line 920 of file MythExternRecApp.cpp.

Referenced by Open().

◆ ProcFinished

Q_SLOT void MythExternRecApp::ProcFinished ( int  exitCode,
QProcess::ExitStatus  exitStatus 
)
slot

Definition at line 927 of file MythExternRecApp.cpp.

Referenced by Open().

◆ ProcStateChanged

Q_SLOT void MythExternRecApp::ProcStateChanged ( QProcess::ProcessState  newState)
slot

Definition at line 942 of file MythExternRecApp.cpp.

Referenced by Open().

◆ ProcError

Q_SLOT void MythExternRecApp::ProcError ( QProcess::ProcessError  error)
slot

Definition at line 968 of file MythExternRecApp.cpp.

Referenced by Open().

◆ ProcReadStandardError

Q_SLOT void MythExternRecApp::ProcReadStandardError ( void  )
slot

Definition at line 975 of file MythExternRecApp.cpp.

Referenced by Open().

◆ ProcReadStandardOutput

Q_SLOT void MythExternRecApp::ProcReadStandardOutput ( void  )
slot

Definition at line 993 of file MythExternRecApp.cpp.

Referenced by Open().

◆ Close

Q_SLOT void MythExternRecApp::Close ( void  )
slot

Definition at line 277 of file MythExternRecApp.cpp.

Referenced by main(), and ~MythExternRecApp().

◆ StartStreaming

Q_SLOT void MythExternRecApp::StartStreaming ( const QString &  serial)
slot

Definition at line 833 of file MythExternRecApp.cpp.

Referenced by main().

◆ StopStreaming

Q_SLOT void MythExternRecApp::StopStreaming ( const QString &  serial,
bool  silent 
)
slot

Definition at line 889 of file MythExternRecApp.cpp.

Referenced by main().

◆ LockTimeout

Q_SLOT void MythExternRecApp::LockTimeout ( const QString &  serial)
slot

Definition at line 791 of file MythExternRecApp.cpp.

Referenced by main().

◆ HasTuner

Q_SLOT void MythExternRecApp::HasTuner ( const QString &  serial)
slot

Definition at line 815 of file MythExternRecApp.cpp.

Referenced by main().

◆ Cleanup

Q_SLOT void MythExternRecApp::Cleanup ( void  )
slot

Definition at line 336 of file MythExternRecApp.cpp.

Referenced by main().

◆ DataStarted

Q_SLOT void MythExternRecApp::DataStarted ( void  )
slot

Definition at line 370 of file MythExternRecApp.cpp.

Referenced by main().

◆ LoadChannels

Q_SLOT void MythExternRecApp::LoadChannels ( const QString &  serial)
slot

Definition at line 439 of file MythExternRecApp.cpp.

Referenced by main().

◆ FirstChannel

Q_SLOT void MythExternRecApp::FirstChannel ( const QString &  serial)
slot

Definition at line 554 of file MythExternRecApp.cpp.

Referenced by main().

◆ NextChannel

Q_SLOT void MythExternRecApp::NextChannel ( const QString &  serial)
slot

Definition at line 560 of file MythExternRecApp.cpp.

Referenced by main().

◆ NewEpisodeStarting

void MythExternRecApp::NewEpisodeStarting ( const QString &  channum)
slot

Definition at line 565 of file MythExternRecApp.cpp.

Referenced by TuneChannel().

◆ TuneChannel

Q_SLOT void MythExternRecApp::TuneChannel ( const QString &  serial,
const QString &  channum 
)
slot

Definition at line 615 of file MythExternRecApp.cpp.

Referenced by main().

◆ TuneStatus

Q_SLOT void MythExternRecApp::TuneStatus ( const QString &  serial)
slot

Definition at line 761 of file MythExternRecApp.cpp.

Referenced by main().

◆ HasPictureAttributes

Q_SLOT void MythExternRecApp::HasPictureAttributes ( const QString &  serial)
slot

Definition at line 822 of file MythExternRecApp.cpp.

Referenced by main().

◆ SetBlockSize

Q_SLOT void MythExternRecApp::SetBlockSize ( const QString &  serial,
int  blksz 
)
slot

Definition at line 827 of file MythExternRecApp.cpp.

Referenced by main().

◆ GetChannel()

void MythExternRecApp::GetChannel ( const QString &  serial,
const QString &  func 
)
protected

Definition at line 509 of file MythExternRecApp.cpp.

Referenced by FirstChannel(), and NextChannel().

◆ TerminateProcess()

void MythExternRecApp::TerminateProcess ( QProcess &  proc,
const QString &  desc 
) const
protected

◆ config()

bool MythExternRecApp::config ( void  )
private

Definition at line 103 of file MythExternRecApp.cpp.

Referenced by MythExternRecApp().

Member Data Documentation

◆ m_fatal

bool MythExternRecApp::m_fatal { false }
private

Definition at line 96 of file MythExternRecApp.h.

Referenced by config(), and Open().

◆ m_fatalMsg

QString MythExternRecApp::m_fatalMsg
private

Definition at line 97 of file MythExternRecApp.h.

Referenced by config(), and Open().

◆ m_run

std::atomic<bool> MythExternRecApp::m_run { true }
private

Definition at line 99 of file MythExternRecApp.h.

Referenced by Close(), and Run().

◆ m_runCond

std::condition_variable MythExternRecApp::m_runCond
private

Definition at line 100 of file MythExternRecApp.h.

Referenced by Close(), and Run().

◆ m_runMutex

std::mutex MythExternRecApp::m_runMutex
private

Definition at line 101 of file MythExternRecApp.h.

Referenced by Run().

◆ m_streaming

std::atomic<bool> MythExternRecApp::m_streaming { false }
private

Definition at line 102 of file MythExternRecApp.h.

Referenced by ProcFinished(), ProcStateChanged(), StartStreaming(), and StopStreaming().

◆ m_result

int MythExternRecApp::m_result { 0 }
private

Definition at line 103 of file MythExternRecApp.h.

Referenced by ProcFinished().

◆ m_bufferMax

uint MythExternRecApp::m_bufferMax { 188 * 10000 }
private

Definition at line 105 of file MythExternRecApp.h.

◆ m_blockSize

uint MythExternRecApp::m_blockSize { m_bufferMax / 4 }
private

Definition at line 106 of file MythExternRecApp.h.

Referenced by ProcReadStandardOutput(), Run(), and SetBlockSize().

◆ m_proc

QProcess MythExternRecApp::m_proc
private

◆ m_command

QString MythExternRecApp::m_command
private

Definition at line 109 of file MythExternRecApp.h.

Referenced by MythExternRecApp(), Open(), StartStreaming(), and TuneChannel().

◆ m_cleanup

QString MythExternRecApp::m_cleanup
private

Definition at line 110 of file MythExternRecApp.h.

Referenced by Cleanup(), and config().

◆ m_recCommand

QString MythExternRecApp::m_recCommand
private

Definition at line 112 of file MythExternRecApp.h.

Referenced by config(), MythExternRecApp(), and TuneChannel().

◆ m_recDesc

QString MythExternRecApp::m_recDesc
private

Definition at line 113 of file MythExternRecApp.h.

Referenced by config(), MythExternRecApp(), and TuneChannel().

◆ m_appEnv

QMap<QString, QString> MythExternRecApp::m_appEnv
private

Definition at line 115 of file MythExternRecApp.h.

Referenced by config(), and Open().

◆ m_settingVars

QMap<QString, QString> MythExternRecApp::m_settingVars
private

Definition at line 116 of file MythExternRecApp.h.

Referenced by config(), and ReplaceVariables().

◆ m_tuneProc

QProcess MythExternRecApp::m_tuneProc
private

Definition at line 118 of file MythExternRecApp.h.

Referenced by Close(), NewEpisodeStarting(), TuneChannel(), and TuneStatus().

◆ m_finishTuneProc

QProcess MythExternRecApp::m_finishTuneProc
private

Definition at line 119 of file MythExternRecApp.h.

Referenced by DataStarted().

◆ m_tuneCommand

QString MythExternRecApp::m_tuneCommand
private

Definition at line 120 of file MythExternRecApp.h.

Referenced by config(), HasTuner(), MythExternRecApp(), TuneChannel(), and TuneStatus().

◆ m_onDataStart

QString MythExternRecApp::m_onDataStart
private

Definition at line 121 of file MythExternRecApp.h.

Referenced by config(), and DataStarted().

◆ m_newEpisodeCommand

QString MythExternRecApp::m_newEpisodeCommand
private

Definition at line 122 of file MythExternRecApp.h.

Referenced by config(), NewEpisodeStarting(), and TuneChannel().

◆ m_channelsIni

QString MythExternRecApp::m_channelsIni
private

◆ m_lockTimeout

uint MythExternRecApp::m_lockTimeout { 0 }
private

Definition at line 124 of file MythExternRecApp.h.

Referenced by config(), and LockTimeout().

◆ m_scanCommand

QString MythExternRecApp::m_scanCommand
private

Definition at line 126 of file MythExternRecApp.h.

Referenced by config(), LoadChannels(), LockTimeout(), and MythExternRecApp().

◆ m_scanTimeout

uint MythExternRecApp::m_scanTimeout { 120000 }
private

Definition at line 127 of file MythExternRecApp.h.

Referenced by config(), and LoadChannels().

◆ m_logFile

QString MythExternRecApp::m_logFile
private

Definition at line 129 of file MythExternRecApp.h.

Referenced by ProcReadStandardError(), and TuneChannel().

◆ m_logging

QString MythExternRecApp::m_logging
private

Definition at line 130 of file MythExternRecApp.h.

Referenced by TuneChannel().

◆ m_configIni

QString MythExternRecApp::m_configIni
private

Definition at line 131 of file MythExternRecApp.h.

Referenced by config(), and MythExternRecApp().

◆ m_desc

QString MythExternRecApp::m_desc
private

Definition at line 132 of file MythExternRecApp.h.

Referenced by Desc(), MythExternRecApp(), and TuneChannel().

◆ m_tuningChannel

QString MythExternRecApp::m_tuningChannel
private

Definition at line 134 of file MythExternRecApp.h.

Referenced by TuneChannel(), and TuneStatus().

◆ m_tunedChannel

QString MythExternRecApp::m_tunedChannel
private

Definition at line 135 of file MythExternRecApp.h.

Referenced by Cleanup(), DataStarted(), StartStreaming(), TuneChannel(), and TuneStatus().

◆ m_chanSettings

QSettings* MythExternRecApp::m_chanSettings { nullptr }
private

Definition at line 138 of file MythExternRecApp.h.

Referenced by GetChannel(), and LoadChannels().

◆ m_channels

QStringList MythExternRecApp::m_channels
private

Definition at line 139 of file MythExternRecApp.h.

Referenced by GetChannel(), and LoadChannels().

◆ m_channelIdx

int MythExternRecApp::m_channelIdx { -1 }
private

Definition at line 140 of file MythExternRecApp.h.

Referenced by FirstChannel(), and GetChannel().


The documentation for this class was generated from the following files: