MythTV
master
|
#include <mythbackend/playbacksock.h>
Public Member Functions | |
PlaybackSock (MythSocket *lsock, QString lhostname, PlaybackSockEventsMode eventsMode) | |
void | SetDisconnected (void) |
bool | IsDisconnected (void) const |
MythSocket * | getSocket (void) const |
QString | getHostname (void) const |
bool | isLocal (void) const |
bool | wantsEvents (void) const |
bool | wantsNonSystemEvents (void) const |
bool | wantsSystemEvents (void) const |
bool | wantsOnlySystemEvents (void) const |
PlaybackSockEventsMode | eventsMode (void) const |
bool | getBlockShutdown (void) const |
void | setBlockShutdown (bool value) |
bool | IsFrontend (void) const |
void | SetAsFrontend (void) |
bool | isSlaveBackend (void) const |
void | setAsSlaveBackend (void) |
bool | isMediaServer (void) const |
void | setAsMediaServer (void) |
void | setIP (const QString &lip) |
QString | getIP (void) const |
bool | GoToSleep (void) |
Tells a slave to go to sleep. More... | |
void | GetDiskSpace (QStringList &o_strlist) |
Appends host's dir's total and used space in kilobytes. More... | |
int | DeleteFile (const QString &filename, const QString &sgroup) |
int | StopRecording (const ProgramInfo *pginfo) |
int | CheckRecordingActive (const ProgramInfo *pginfo) |
int | DeleteRecording (const ProgramInfo *pginfo, bool forceMetadataDelete=false) |
bool | FillProgramInfo (ProgramInfo &pginfo, const QString &playbackhost) |
QStringList | GetSGFileList (const QString &host, const QString &groupname, const QString &directory, bool fileNamesOnly) |
QStringList | GetSGFileQuery (const QString &host, const QString &groupname, const QString &filename) |
QString | GetFileHash (const QString &filename, const QString &storageGroup) |
QStringList | GetFindFile (const QString &host, const QString &filename, const QString &storageGroup, bool useRegex) |
QStringList | GenPreviewPixmap (const QString &token, const ProgramInfo *pginfo) |
QStringList | GenPreviewPixmap (const QString &token, const ProgramInfo *pginfo, std::chrono::seconds time, long long frame, const QString &outputFile, QSize outputSize) |
QDateTime | PixmapLastModified (const ProgramInfo *pginfo) |
bool | CheckFile (ProgramInfo *pginfo) |
bool | IsBusy (int capturecardnum, InputInfo *busy_input=nullptr, std::chrono::seconds time_buffer=5s) |
int | GetEncoderState (int capturecardnum) |
long long | GetMaxBitrate (int capturecardnum) |
ProgramInfo * | GetRecording (uint cardid) |
Returns the ProgramInfo being used by any current recording. More... | |
bool | EncoderIsRecording (int capturecardnum, const ProgramInfo *pginfo) |
RecStatus::Type | StartRecording (int capturecardnum, ProgramInfo *pginfo) |
RecStatus::Type | GetRecordingStatus (int capturecardnum) |
void | RecordPending (int capturecardnum, const ProgramInfo *pginfo, std::chrono::seconds secsleft, bool hasLater) |
std::chrono::milliseconds | SetSignalMonitoringRate (int capturecardnum, std::chrono::milliseconds rate, int notifyFrontend) |
void | SetNextLiveTVDir (int capturecardnum, const QString &dir) |
void | CancelNextRecording (int capturecardnum, bool cancel) |
QStringList | ForwardRequest (const QStringList &slist) |
bool | ReadStringList (QStringList &list) |
bool | AddChildInput (uint childid) |
Tells a slave to add a child input. More... | |
![]() | |
ReferenceCounter (const QString &debugName, bool logDebug=true) | |
Creates reference counter with an initial value of 1. More... | |
virtual int | IncrRef (void) |
Increments reference count. More... | |
virtual int | DecrRef (void) |
Decrements reference count and deletes on 0. More... | |
Protected Member Functions | |
~PlaybackSock () override | |
![]() | |
virtual | ~ReferenceCounter (void) |
Called on destruction, will warn if object deleted with references in place. More... | |
Private Member Functions | |
bool | SendReceiveStringList (QStringList &strlist, uint min_reply_length=0) |
Private Attributes | |
MythSocket * | m_sock {nullptr} |
QString | m_hostname |
QString | m_ip |
bool | m_local {true} |
PlaybackSockEventsMode | m_eventsMode |
bool | m_blockshutdown {true} |
bool | m_backend {false} |
bool | m_mediaserver {false} |
bool | m_frontend {false} |
QMutex | m_sockLock |
bool | m_disconnected {false} |
Additional Inherited Members | |
![]() | |
static void | PrintDebug (void) |
Print out any leaks if that level of debugging is enabled. More... | |
![]() | |
bool | m_logDebug |
This is used to suppress creating LoggingItem classes for LoggingItem reference count changes. More... | |
QAtomicInt | m_referenceCount {1} |
Definition at line 27 of file playbacksock.h.
PlaybackSock::PlaybackSock | ( | MythSocket * | lsock, |
QString | lhostname, | ||
PlaybackSockEventsMode | eventsMode | ||
) |
Definition at line 22 of file playbacksock.cpp.
|
overrideprotected |
Definition at line 35 of file playbacksock.cpp.
|
inline |
Definition at line 33 of file playbacksock.h.
|
inline |
Definition at line 34 of file playbacksock.h.
|
inline |
Definition at line 36 of file playbacksock.h.
Referenced by RenameThread::run().
|
inline |
Definition at line 37 of file playbacksock.h.
|
inline |
Definition at line 39 of file playbacksock.h.
bool PlaybackSock::wantsEvents | ( | void | ) | const |
Definition at line 41 of file playbacksock.cpp.
bool PlaybackSock::wantsNonSystemEvents | ( | void | ) | const |
Definition at line 46 of file playbacksock.cpp.
bool PlaybackSock::wantsSystemEvents | ( | void | ) | const |
Definition at line 52 of file playbacksock.cpp.
bool PlaybackSock::wantsOnlySystemEvents | ( | void | ) | const |
Definition at line 58 of file playbacksock.cpp.
PlaybackSockEventsMode PlaybackSock::eventsMode | ( | void | ) | const |
Definition at line 63 of file playbacksock.cpp.
|
inline |
Definition at line 46 of file playbacksock.h.
|
inline |
Definition at line 47 of file playbacksock.h.
|
inline |
Definition at line 49 of file playbacksock.h.
|
inline |
Definition at line 50 of file playbacksock.h.
|
inline |
Definition at line 53 of file playbacksock.h.
|
inline |
Definition at line 54 of file playbacksock.h.
|
inline |
Definition at line 56 of file playbacksock.h.
|
inline |
Definition at line 57 of file playbacksock.h.
|
inline |
Definition at line 59 of file playbacksock.h.
Referenced by V2Status::GetBackendStatus().
|
inline |
Definition at line 60 of file playbacksock.h.
Referenced by V2Status::GetBackendStatus().
bool PlaybackSock::GoToSleep | ( | void | ) |
Tells a slave to go to sleep.
Definition at line 132 of file playbacksock.cpp.
Referenced by EncoderLink::GoToSleep().
void PlaybackSock::GetDiskSpace | ( | QStringList & | o_strlist | ) |
Appends host's dir's total and used space in kilobytes.
Definition at line 142 of file playbacksock.cpp.
Referenced by EncoderLink::GetDiskSpace().
int PlaybackSock::DeleteFile | ( | const QString & | filename, |
const QString & | sgroup | ||
) |
Definition at line 163 of file playbacksock.cpp.
int PlaybackSock::StopRecording | ( | const ProgramInfo * | pginfo | ) |
Definition at line 175 of file playbacksock.cpp.
Referenced by MainServer::DoHandleStopRecording().
int PlaybackSock::CheckRecordingActive | ( | const ProgramInfo * | pginfo | ) |
Definition at line 152 of file playbacksock.cpp.
Referenced by MainServer::HandleCheckRecordingActive().
int PlaybackSock::DeleteRecording | ( | const ProgramInfo * | pginfo, |
bool | forceMetadataDelete = false |
||
) |
Definition at line 186 of file playbacksock.cpp.
Referenced by MainServer::DoHandleDeleteRecording().
bool PlaybackSock::FillProgramInfo | ( | ProgramInfo & | pginfo, |
const QString & | playbackhost | ||
) |
Definition at line 204 of file playbacksock.cpp.
Referenced by MainServer::HandleQueryRecordings().
QStringList PlaybackSock::GetSGFileList | ( | const QString & | host, |
const QString & | groupname, | ||
const QString & | directory, | ||
bool | fileNamesOnly | ||
) |
Definition at line 224 of file playbacksock.cpp.
Referenced by MainServer::HandleSGGetFileList().
QStringList PlaybackSock::GetSGFileQuery | ( | const QString & | host, |
const QString & | groupname, | ||
const QString & | filename | ||
) |
Definition at line 238 of file playbacksock.cpp.
Referenced by MainServer::HandleSGFileQuery().
QString PlaybackSock::GetFileHash | ( | const QString & | filename, |
const QString & | storageGroup | ||
) |
Definition at line 251 of file playbacksock.cpp.
Referenced by MainServer::HandleQueryFileHash().
QStringList PlaybackSock::GetFindFile | ( | const QString & | host, |
const QString & | filename, | ||
const QString & | storageGroup, | ||
bool | useRegex | ||
) |
Definition at line 261 of file playbacksock.cpp.
Referenced by MainServer::HandleQueryFindFile().
QStringList PlaybackSock::GenPreviewPixmap | ( | const QString & | token, |
const ProgramInfo * | pginfo | ||
) |
Definition at line 275 of file playbacksock.cpp.
Referenced by MainServer::HandleGenPreviewPixmap().
QStringList PlaybackSock::GenPreviewPixmap | ( | const QString & | token, |
const ProgramInfo * | pginfo, | ||
std::chrono::seconds | time, | ||
long long | frame, | ||
const QString & | outputFile, | ||
QSize | outputSize | ||
) |
Definition at line 287 of file playbacksock.cpp.
QDateTime PlaybackSock::PixmapLastModified | ( | const ProgramInfo * | pginfo | ) |
Definition at line 316 of file playbacksock.cpp.
Referenced by MainServer::HandlePixmapLastModified().
bool PlaybackSock::CheckFile | ( | ProgramInfo * | pginfo | ) |
Definition at line 331 of file playbacksock.cpp.
Referenced by EncoderLink::CheckFile(), and MainServer::HandleQueryCheckFile().
bool PlaybackSock::IsBusy | ( | int | capturecardnum, |
InputInfo * | busy_input = nullptr , |
||
std::chrono::seconds | time_buffer = 5s |
||
) |
Definition at line 346 of file playbacksock.cpp.
Referenced by EncoderLink::IsBusy().
int PlaybackSock::GetEncoderState | ( | int | capturecardnum | ) |
Returns the maximum bits per second the recorder can produce.
capturecardnum | Recorder ID in the database. |
Definition at line 389 of file playbacksock.cpp.
Referenced by EncoderLink::GetFlags(), and EncoderLink::GetState().
long long PlaybackSock::GetMaxBitrate | ( | int | capturecardnum | ) |
Definition at line 406 of file playbacksock.cpp.
Referenced by EncoderLink::GetMaxBitrate().
ProgramInfo * PlaybackSock::GetRecording | ( | uint | cardid | ) |
Returns the ProgramInfo being used by any current recording.
Caller is responsible for deleting the ProgramInfo when done with it.
Definition at line 421 of file playbacksock.cpp.
Referenced by EncoderLink::GetRecording().
bool PlaybackSock::EncoderIsRecording | ( | int | capturecardnum, |
const ProgramInfo * | pginfo | ||
) |
Definition at line 439 of file playbacksock.cpp.
Referenced by EncoderLink::MatchesRecording().
RecStatus::Type PlaybackSock::StartRecording | ( | int | capturecardnum, |
ProgramInfo * | pginfo | ||
) |
Definition at line 452 of file playbacksock.cpp.
Referenced by EncoderLink::StartRecording().
RecStatus::Type PlaybackSock::GetRecordingStatus | ( | int | capturecardnum | ) |
Definition at line 470 of file playbacksock.cpp.
Referenced by EncoderLink::GetRecordingStatus().
void PlaybackSock::RecordPending | ( | int | capturecardnum, |
const ProgramInfo * | pginfo, | ||
std::chrono::seconds | secsleft, | ||
bool | hasLater | ||
) |
Definition at line 487 of file playbacksock.cpp.
Referenced by EncoderLink::RecordPending().
std::chrono::milliseconds PlaybackSock::SetSignalMonitoringRate | ( | int | capturecardnum, |
std::chrono::milliseconds | rate, | ||
int | notifyFrontend | ||
) |
Definition at line 499 of file playbacksock.cpp.
Referenced by EncoderLink::SetSignalMonitoringRate().
void PlaybackSock::SetNextLiveTVDir | ( | int | capturecardnum, |
const QString & | dir | ||
) |
Definition at line 513 of file playbacksock.cpp.
Referenced by EncoderLink::SetNextLiveTVDir().
void PlaybackSock::CancelNextRecording | ( | int | capturecardnum, |
bool | cancel | ||
) |
Definition at line 522 of file playbacksock.cpp.
Referenced by EncoderLink::CancelNextRecording().
QStringList PlaybackSock::ForwardRequest | ( | const QStringList & | slist | ) |
Definition at line 533 of file playbacksock.cpp.
Referenced by MainServer::HandleMusicCalcTrackLen(), MainServer::HandleMusicFindAlbumArt(), MainServer::HandleMusicFindLyrics(), MainServer::HandleMusicSaveLyrics(), MainServer::HandleMusicTagAddImage(), MainServer::HandleMusicTagChangeImage(), MainServer::HandleMusicTagGetImage(), MainServer::HandleMusicTagRemoveImage(), MainServer::HandleMusicTagUpdateMetadata(), MainServer::HandleMusicTagUpdateVolatile(), MainServer::HandlePixmapGetIfModified(), and MainServer::HandleScanMusic().
bool PlaybackSock::ReadStringList | ( | QStringList & | list | ) |
Definition at line 68 of file playbacksock.cpp.
Tells a slave to add a child input.
Definition at line 545 of file playbacksock.cpp.
Referenced by EncoderLink::AddChildInput().
|
private |
Definition at line 82 of file playbacksock.cpp.
Referenced by AddChildInput(), CancelNextRecording(), CheckFile(), CheckRecordingActive(), DeleteFile(), DeleteRecording(), EncoderIsRecording(), FillProgramInfo(), ForwardRequest(), GenPreviewPixmap(), GetDiskSpace(), GetEncoderState(), GetFileHash(), GetFindFile(), GetMaxBitrate(), GetRecording(), GetRecordingStatus(), GetSGFileList(), GetSGFileQuery(), GoToSleep(), IsBusy(), PixmapLastModified(), RecordPending(), SetNextLiveTVDir(), SetSignalMonitoringRate(), StartRecording(), and StopRecording().
|
private |
Definition at line 117 of file playbacksock.h.
Referenced by getSocket(), ReadStringList(), SendReceiveStringList(), and ~PlaybackSock().
|
private |
Definition at line 118 of file playbacksock.h.
Referenced by getHostname(), and PlaybackSock().
|
private |
Definition at line 119 of file playbacksock.h.
Definition at line 121 of file playbacksock.h.
Referenced by isLocal(), and PlaybackSock().
|
private |
Definition at line 122 of file playbacksock.h.
Referenced by eventsMode(), wantsEvents(), wantsNonSystemEvents(), wantsOnlySystemEvents(), and wantsSystemEvents().
Definition at line 123 of file playbacksock.h.
Referenced by getBlockShutdown(), and setBlockShutdown().
Definition at line 124 of file playbacksock.h.
Referenced by isSlaveBackend(), and setAsSlaveBackend().
Definition at line 125 of file playbacksock.h.
Referenced by isMediaServer(), setAsMediaServer(), and setAsSlaveBackend().
Definition at line 126 of file playbacksock.h.
Referenced by IsFrontend(), and SetAsFrontend().
|
private |
Definition at line 128 of file playbacksock.h.
Referenced by ReadStringList(), and SendReceiveStringList().
Definition at line 130 of file playbacksock.h.
Referenced by IsDisconnected(), and SetDisconnected().