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... | |
FileSystemInfoList | GetDiskSpace () |
Gets the total and used space in kilobytes for the host's directories. 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) |
Returns the maximum bits per second the recorder can produce. More... | |
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 28 of file playbacksock.h.
PlaybackSock::PlaybackSock | ( | MythSocket * | lsock, |
QString | lhostname, | ||
PlaybackSockEventsMode | eventsMode | ||
) |
Definition at line 23 of file playbacksock.cpp.
|
overrideprotected |
Definition at line 36 of file playbacksock.cpp.
Tells a slave to add a child input.
Definition at line 547 of file playbacksock.cpp.
Referenced by EncoderLink::AddChildInput().
void PlaybackSock::CancelNextRecording | ( | int | capturecardnum, |
bool | cancel | ||
) |
Definition at line 524 of file playbacksock.cpp.
Referenced by EncoderLink::CancelNextRecording().
bool PlaybackSock::CheckFile | ( | ProgramInfo * | pginfo | ) |
Definition at line 333 of file playbacksock.cpp.
Referenced by EncoderLink::CheckFile(), and MainServer::HandleQueryCheckFile().
int PlaybackSock::CheckRecordingActive | ( | const ProgramInfo * | pginfo | ) |
Definition at line 154 of file playbacksock.cpp.
Referenced by MainServer::HandleCheckRecordingActive().
int PlaybackSock::DeleteFile | ( | const QString & | filename, |
const QString & | sgroup | ||
) |
Definition at line 165 of file playbacksock.cpp.
int PlaybackSock::DeleteRecording | ( | const ProgramInfo * | pginfo, |
bool | forceMetadataDelete = false |
||
) |
Definition at line 188 of file playbacksock.cpp.
Referenced by MainServer::DoHandleDeleteRecording().
bool PlaybackSock::EncoderIsRecording | ( | int | capturecardnum, |
const ProgramInfo * | pginfo | ||
) |
Definition at line 441 of file playbacksock.cpp.
Referenced by EncoderLink::MatchesRecording().
PlaybackSockEventsMode PlaybackSock::eventsMode | ( | void | ) | const |
Definition at line 64 of file playbacksock.cpp.
bool PlaybackSock::FillProgramInfo | ( | ProgramInfo & | pginfo, |
const QString & | playbackhost | ||
) |
Definition at line 206 of file playbacksock.cpp.
Referenced by MainServer::HandleQueryRecordings().
QStringList PlaybackSock::ForwardRequest | ( | const QStringList & | slist | ) |
Definition at line 535 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().
QStringList PlaybackSock::GenPreviewPixmap | ( | const QString & | token, |
const ProgramInfo * | pginfo | ||
) |
Definition at line 277 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 289 of file playbacksock.cpp.
|
inline |
Definition at line 47 of file playbacksock.h.
FileSystemInfoList PlaybackSock::GetDiskSpace | ( | ) |
Gets the total and used space in kilobytes for the host's directories.
Definition at line 143 of file playbacksock.cpp.
int PlaybackSock::GetEncoderState | ( | int | capturecardnum | ) |
Returns the maximum bits per second the recorder can produce.
capturecardnum | Recorder ID in the database. |
Definition at line 391 of file playbacksock.cpp.
Referenced by EncoderLink::GetFlags(), and EncoderLink::GetState().
QString PlaybackSock::GetFileHash | ( | const QString & | filename, |
const QString & | storageGroup | ||
) |
Definition at line 253 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 263 of file playbacksock.cpp.
Referenced by MainServer::HandleQueryFindFile().
|
inline |
Definition at line 38 of file playbacksock.h.
|
inline |
Definition at line 61 of file playbacksock.h.
Referenced by V2Status::GetBackendStatus().
long long PlaybackSock::GetMaxBitrate | ( | int | capturecardnum | ) |
Definition at line 408 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 423 of file playbacksock.cpp.
Referenced by EncoderLink::GetRecording().
RecStatus::Type PlaybackSock::GetRecordingStatus | ( | int | capturecardnum | ) |
Definition at line 472 of file playbacksock.cpp.
Referenced by EncoderLink::GetRecordingStatus().
QStringList PlaybackSock::GetSGFileList | ( | const QString & | host, |
const QString & | groupname, | ||
const QString & | directory, | ||
bool | fileNamesOnly | ||
) |
Definition at line 226 of file playbacksock.cpp.
Referenced by MainServer::HandleSGGetFileList().
QStringList PlaybackSock::GetSGFileQuery | ( | const QString & | host, |
const QString & | groupname, | ||
const QString & | filename | ||
) |
Definition at line 240 of file playbacksock.cpp.
Referenced by MainServer::HandleSGFileQuery().
|
inline |
Definition at line 37 of file playbacksock.h.
Referenced by RenameThread::run().
bool PlaybackSock::GoToSleep | ( | void | ) |
Tells a slave to go to sleep.
Definition at line 133 of file playbacksock.cpp.
Referenced by EncoderLink::GoToSleep().
bool PlaybackSock::IsBusy | ( | int | capturecardnum, |
InputInfo * | busy_input = nullptr , |
||
std::chrono::seconds | time_buffer = 5s |
||
) |
Definition at line 348 of file playbacksock.cpp.
Referenced by EncoderLink::IsBusy().
|
inline |
Definition at line 35 of file playbacksock.h.
|
inline |
Definition at line 50 of file playbacksock.h.
|
inline |
Definition at line 40 of file playbacksock.h.
|
inline |
Definition at line 57 of file playbacksock.h.
|
inline |
Definition at line 54 of file playbacksock.h.
QDateTime PlaybackSock::PixmapLastModified | ( | const ProgramInfo * | pginfo | ) |
Definition at line 318 of file playbacksock.cpp.
Referenced by MainServer::HandlePixmapLastModified().
bool PlaybackSock::ReadStringList | ( | QStringList & | list | ) |
Definition at line 69 of file playbacksock.cpp.
void PlaybackSock::RecordPending | ( | int | capturecardnum, |
const ProgramInfo * | pginfo, | ||
std::chrono::seconds | secsleft, | ||
bool | hasLater | ||
) |
Definition at line 489 of file playbacksock.cpp.
Referenced by EncoderLink::RecordPending().
|
private |
Definition at line 83 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().
|
inline |
Definition at line 51 of file playbacksock.h.
|
inline |
Definition at line 58 of file playbacksock.h.
|
inline |
Definition at line 55 of file playbacksock.h.
|
inline |
Definition at line 48 of file playbacksock.h.
|
inline |
Definition at line 34 of file playbacksock.h.
|
inline |
Definition at line 60 of file playbacksock.h.
Referenced by V2Status::GetBackendStatus().
void PlaybackSock::SetNextLiveTVDir | ( | int | capturecardnum, |
const QString & | dir | ||
) |
Definition at line 515 of file playbacksock.cpp.
Referenced by EncoderLink::SetNextLiveTVDir().
std::chrono::milliseconds PlaybackSock::SetSignalMonitoringRate | ( | int | capturecardnum, |
std::chrono::milliseconds | rate, | ||
int | notifyFrontend | ||
) |
Definition at line 501 of file playbacksock.cpp.
Referenced by EncoderLink::SetSignalMonitoringRate().
RecStatus::Type PlaybackSock::StartRecording | ( | int | capturecardnum, |
ProgramInfo * | pginfo | ||
) |
Definition at line 454 of file playbacksock.cpp.
Referenced by EncoderLink::StartRecording().
int PlaybackSock::StopRecording | ( | const ProgramInfo * | pginfo | ) |
Definition at line 177 of file playbacksock.cpp.
Referenced by MainServer::DoHandleStopRecording().
bool PlaybackSock::wantsEvents | ( | void | ) | const |
Definition at line 42 of file playbacksock.cpp.
bool PlaybackSock::wantsNonSystemEvents | ( | void | ) | const |
Definition at line 47 of file playbacksock.cpp.
bool PlaybackSock::wantsOnlySystemEvents | ( | void | ) | const |
Definition at line 59 of file playbacksock.cpp.
bool PlaybackSock::wantsSystemEvents | ( | void | ) | const |
Definition at line 53 of file playbacksock.cpp.
Definition at line 125 of file playbacksock.h.
Referenced by isSlaveBackend(), and setAsSlaveBackend().
Definition at line 124 of file playbacksock.h.
Referenced by getBlockShutdown(), and setBlockShutdown().
Definition at line 131 of file playbacksock.h.
Referenced by IsDisconnected(), and SetDisconnected().
|
private |
Definition at line 123 of file playbacksock.h.
Referenced by eventsMode(), wantsEvents(), wantsNonSystemEvents(), wantsOnlySystemEvents(), and wantsSystemEvents().
Definition at line 127 of file playbacksock.h.
Referenced by IsFrontend(), and SetAsFrontend().
|
private |
Definition at line 119 of file playbacksock.h.
Referenced by getHostname(), and PlaybackSock().
|
private |
Definition at line 120 of file playbacksock.h.
Definition at line 122 of file playbacksock.h.
Referenced by isLocal(), and PlaybackSock().
Definition at line 126 of file playbacksock.h.
Referenced by isMediaServer(), setAsMediaServer(), and setAsSlaveBackend().
|
private |
Definition at line 118 of file playbacksock.h.
Referenced by getSocket(), ReadStringList(), SendReceiveStringList(), and ~PlaybackSock().
|
private |
Definition at line 129 of file playbacksock.h.
Referenced by ReadStringList(), and SendReceiveStringList().