MythTV
master
|
Provides an interface to both local and remote TVRec's for the mythbackend. More...
#include <mythbackend/encoderlink.h>
Public Member Functions | |
EncoderLink (int inputid, PlaybackSock *lsock, QString lhostname) | |
This is the EncoderLink constructor for non-local recorders. More... | |
EncoderLink (int inputid, TVRec *ltv) | |
This is the EncoderLink constructor for local recorders. More... | |
~EncoderLink () | |
Destructor does nothing for non-local EncoderLink instances, but deletes the TVRec for local EncoderLink instances. More... | |
void | SetSocket (PlaybackSock *lsock) |
Used to set the socket for a non-local EncoderLink. More... | |
PlaybackSock * | GetSocket (void) |
Returns the socket, if set, for a non-local EncoderLink. More... | |
void | SetSleepStatus (SleepStatus newStatus) |
Used to set the asleep status of an encoder. More... | |
QDateTime | GetSleepStatusTime (void) const |
Get the last time the sleep status was changed. More... | |
QDateTime | GetLastSleepTime (void) const |
Get the last time the encoder was put to sleep. More... | |
void | SetLastWakeTime (QDateTime newTime) |
Used to set the last wake time of an encoder. More... | |
QDateTime | GetLastWakeTime (void) const |
Get the last time the encoder was awakened. More... | |
QString | GetHostName (void) const |
Returns the remote host for a non-local EncoderLink. More... | |
bool | IsLocal (void) const |
Returns true for a local EncoderLink. More... | |
bool | IsConnected (void) const |
Returns true if the EncoderLink instance is usable. More... | |
bool | IsAwake (void) const |
Returns true if the encoder is awake. More... | |
bool | IsAsleep (void) const |
Returns true if the encoder is asleep. More... | |
bool | IsWaking (void) const |
Returns true if the encoder is waking up. More... | |
bool | IsFallingAsleep (void) const |
Returns true if the encoder is falling asleep. More... | |
bool | CanSleep (void) const |
Returns true if the encoder can sleep. More... | |
SleepStatus | GetSleepStatus (void) const |
Returns the current Sleep Status of the encoder. More... | |
int | GetInputID (void) const |
Returns the inputid used to refer to the recorder in the DB. More... | |
TVRec * | GetTVRec (void) |
Returns the TVRec used by a local EncoderLink instance. More... | |
bool | GoToSleep (void) |
Tell a slave backend to go to sleep. More... | |
int | LockTuner (void) |
Lock the tuner for exclusive use. More... | |
void | FreeTuner (void) |
Unlock the tuner. More... | |
bool | IsTunerLocked (void) const |
Returns true iff the tuner is locked. More... | |
bool | CheckFile (ProgramInfo *pginfo) |
Checks if program is stored locally. More... | |
void | GetDiskSpace (QStringList &o_strlist) |
Appends total and used disk space in Kilobytes. More... | |
long long | GetMaxBitrate (void) |
Returns maximum bits per second this recorder might output. More... | |
std::chrono::milliseconds | SetSignalMonitoringRate (std::chrono::milliseconds rate, int notifyFrontend) |
Sets the signal monitoring rate. More... | |
bool | IsBusy (InputInfo *busy_input=nullptr, std::chrono::seconds time_buffer=5s) |
Returns true if the recorder is busy, or will be within the next time_buffer seconds. More... | |
bool | IsBusyRecording (void) |
Returns true if the TVRec state is in a recording state. More... | |
TVState | GetState () |
Returns the TVState of the recorder. More... | |
uint | GetFlags (void) |
Returns the flag state of the recorder. More... | |
bool | IsRecording (const ProgramInfo *rec) |
Returns true if rec is scheduled for recording. More... | |
bool | MatchesRecording (const ProgramInfo *rec) |
Returns true if rec is actually being recorded by TVRec. More... | |
void | RecordPending (const ProgramInfo *rec, std::chrono::seconds secsleft, bool hasLater) |
Tells TVRec there is a pending recording "rec" in "secsleft" seconds. More... | |
RecStatus::Type | StartRecording (ProgramInfo *rec) |
Tells TVRec to Start recording the program "rec" as soon as possible. More... | |
RecStatus::Type | GetRecordingStatus (void) |
void | StopRecording (bool killFile=false) |
Tells TVRec to stop recording immediately. This only works on local recorders. More... | |
void | FinishRecording (void) |
Tells TVRec to stop recording, but only after "overrecord" seconds. This only works on local recorders. More... | |
void | FrontendReady (void) |
Tells TVRec that the frontend is ready for data. This only works on local recorders. More... | |
void | CancelNextRecording (bool cancel) |
Tells TVRec to cancel the next recording. More... | |
bool | WouldConflict (const ProgramInfo *rec) |
Checks a recording against any recording current or pending recordings on the recorder represented by this EncoderLink. More... | |
bool | IsReallyRecording (void) |
Checks if the RecorderBase held by TVRec is actually recording. This only works on local recorders. More... | |
ProgramInfo * | GetRecording (void) |
Returns TVRec's current recording. More... | |
float | GetFramerate (void) |
Returns the recording frame rate from TVRec. This only works on local recorders. More... | |
long long | GetFramesWritten (void) |
Returns number of frames written to disk by TVRec's RecorderBase instance. This only works on local recorders. More... | |
long long | GetFilePosition (void) |
Returns total number of bytes written by TVRec's RingBuffer. This only works on local recorders. More... | |
int64_t | GetKeyframePosition (uint64_t desired) |
Returns byte position in RingBuffer of a keyframe. More... | |
bool | GetKeyframePositions (int64_t start, int64_t end, frm_pos_map_t &map) |
bool | GetKeyframeDurations (int64_t start, int64_t end, frm_pos_map_t &map) |
void | SpawnLiveTV (LiveTVChain *chain, bool pip, QString startchan) |
Tells TVRec to Spawn a "Live TV" recorder. This only works on local recorders. More... | |
QString | GetChainID (void) |
Get the LiveTV chain id that's in use. More... | |
void | StopLiveTV (void) |
Tells TVRec to stop a "Live TV" recorder. This only works on local recorders. More... | |
void | PauseRecorder (void) |
Tells TVRec to pause a recorder, used for channel and input changes. This only works on local recorders. More... | |
void | SetLiveRecording (int recording) |
Tells TVRec to keep a LiveTV recording if 'recording' is 1. and to not keep a LiveTV recording if 'recording; is 0. This only works on local recorders. More... | |
void | SetNextLiveTVDir (const QString &dir) |
Tells TVRec where to put the next LiveTV recording. More... | |
QString | GetInput (void) const |
Returns TVRec's recorders current input. This only works on local recorders. More... | |
QString | SetInput (QString input) |
Tells TVRec's recorder to change to the specified input. This only works on local recorders. More... | |
void | ToggleChannelFavorite (const QString &changroup) |
Toggles whether the current channel should be on our favorites list. More... | |
void | ChangeChannel (ChannelChangeDirection channeldirection) |
Changes to the next or previous channel. More... | |
void | SetChannel (const QString &name) |
Changes to a named channel on the current tuner. This only works on local recorders. More... | |
int | GetPictureAttribute (PictureAttribute attr) |
Changes brightness/contrast/colour/hue of a recording. This only works on local recorders. More... | |
int | ChangePictureAttribute (PictureAdjustType type, PictureAttribute attr, bool direction) |
Changes brightness/contrast/colour/hue of a recording. This only works on local recorders. More... | |
bool | CheckChannel (const QString &name) |
Checks if named channel exists on current tuner. This only works on local recorders. More... | |
bool | ShouldSwitchToAnotherInput (const QString &channelid) |
Checks if named channel exists on current tuner, or another tuner. This only works on local recorders. More... | |
bool | CheckChannelPrefix (const QString &prefix, uint &complete_valid_channel_on_rec, bool &is_extra_char_useful, QString &needed_spacer) |
Checks a prefix against the channels in the DB. This only works on local recorders. More... | |
void | GetNextProgram (BrowseDirection direction, QString &title, QString &subtitle, QString &desc, QString &category, QString &starttime, QString &endtime, QString &callsign, QString &iconpath, QString &channelname, uint &chanid, QString &seriesid, QString &programid) |
Returns information about the program that would be seen if we changed the channel using ChangeChannel(int) with "direction". More... | |
bool | GetChannelInfo (uint &chanid, uint &sourceid, QString &callsign, QString &channum, QString &channame, QString &xmltv) const |
bool | SetChannelInfo (uint chanid, uint sourceid, const QString &oldchannum, const QString &callsign, const QString &channum, const QString &channame, const QString &xmltv) |
bool | AddChildInput (uint childid) |
Private Member Functions | |
bool | HasSockAndIncrRef () |
Atomicly checks if sock is not null and increases its refcount. More... | |
bool | HasSockAndDecrRef () |
Atomicly checks if sock is not null and decreases its refcount. More... | |
Private Attributes | |
int | m_inputid |
PlaybackSock * | m_sock {nullptr} |
QMutex | m_sockLock |
QString | m_hostname |
TVRec * | m_tv {nullptr} |
bool | m_local {false} |
bool | m_locked {false} |
SleepStatus | m_sleepStatus {sStatus_Undefined} |
QDateTime | m_sleepStatusTime |
QDateTime | m_lastSleepTime |
QDateTime | m_lastWakeTime |
QDateTime | m_endRecordingTime |
QDateTime | m_startRecordingTime |
uint | m_chanid {0} |
Provides an interface to both local and remote TVRec's for the mythbackend.
This class be instantiated for either a local or remote TVRec's. Many of the methods will work with either, but many only work for a local TVRec's and these are labeled appropriately in this document.
When used with a remote TVRec all calls go through a PlaybackSock instance.
This class is used primarily by the MainServer, Scheduler and AutoExpire classes.
Definition at line 23 of file encoderlink.h.
EncoderLink::EncoderLink | ( | int | inputid, |
PlaybackSock * | lsock, | ||
QString | lhostname | ||
) |
This is the EncoderLink constructor for non-local recorders.
Definition at line 45 of file encoderlink.cpp.
EncoderLink::EncoderLink | ( | int | inputid, |
TVRec * | ltv | ||
) |
This is the EncoderLink constructor for local recorders.
Definition at line 60 of file encoderlink.cpp.
EncoderLink::~EncoderLink | ( | ) |
Destructor does nothing for non-local EncoderLink instances, but deletes the TVRec for local EncoderLink instances.
Definition at line 74 of file encoderlink.cpp.
void EncoderLink::SetSocket | ( | PlaybackSock * | lsock | ) |
Used to set the socket for a non-local EncoderLink.
Increases refcount on lsock, decreases refcount on old sock, if exists.
Definition at line 117 of file encoderlink.cpp.
Referenced by MainServer::HandleAddChildInput(), and ~EncoderLink().
|
inline |
Returns the socket, if set, for a non-local EncoderLink.
Definition at line 34 of file encoderlink.h.
Referenced by MainServer::HandleAddChildInput().
void EncoderLink::SetSleepStatus | ( | SleepStatus | newStatus | ) |
Used to set the asleep status of an encoder.
Sets the sleep status of a recorder.
Definition at line 143 of file encoderlink.cpp.
Referenced by SetSocket().
|
inline |
Get the last time the sleep status was changed.
Definition at line 39 of file encoderlink.h.
Referenced by Scheduler::HandleWakeSlave().
|
inline |
Get the last time the encoder was put to sleep.
Definition at line 41 of file encoderlink.h.
|
inline |
Used to set the last wake time of an encoder.
Definition at line 43 of file encoderlink.h.
|
inline |
Get the last time the encoder was awakened.
Definition at line 45 of file encoderlink.h.
Referenced by Scheduler::HandleRecording(), and Scheduler::HandleWakeSlave().
|
inline |
Returns the remote host for a non-local EncoderLink.
Definition at line 48 of file encoderlink.h.
Referenced by AutoExpire::ExpireRecordings(), Scheduler::GetNextLiveTVDir(), MainServer::HandleGetRecorderFromNum(), MainServer::HandleGetRecorderNum(), Scheduler::HandleRecording(), Scheduler::HandleWakeSlave(), and Scheduler::PutInactiveSlavesToSleep().
|
inline |
Returns true for a local EncoderLink.
Definition at line 50 of file encoderlink.h.
Referenced by MainServer::DoHandleStopRecording(), AutoExpire::ExpireRecordings(), Scheduler::GetNextLiveTVDir(), GoToSleep(), MainServer::HandleCheckRecordingActive(), MainServer::HandleGetRecorderFromNum(), MainServer::HandleGetRecorderNum(), IsConnected(), and Scheduler::PutInactiveSlavesToSleep().
|
inline |
Returns true if the EncoderLink instance is usable.
Definition at line 52 of file encoderlink.h.
Referenced by AutoExpire::CalcParams(), AutoExpire::ExpireRecordings(), GetFlags(), GetState(), MainServer::HandleGetRecorderFromNum(), MainServer::HandleGetRecorderNum(), MainServer::HandleRecorderQuery(), Scheduler::HandleRecording(), and WouldConflict().
|
inline |
Returns true if the encoder is awake.
Definition at line 54 of file encoderlink.h.
|
inline |
Returns true if the encoder is asleep.
Definition at line 56 of file encoderlink.h.
Referenced by Scheduler::HandleWakeSlave().
|
inline |
Returns true if the encoder is waking up.
Definition at line 58 of file encoderlink.h.
Referenced by Scheduler::HandleRecording(), and Scheduler::HandleWakeSlave().
|
inline |
Returns true if the encoder is falling asleep.
Definition at line 60 of file encoderlink.h.
Referenced by SetSocket().
|
inline |
Returns true if the encoder can sleep.
Definition at line 63 of file encoderlink.h.
|
inline |
Returns the current Sleep Status of the encoder.
Definition at line 66 of file encoderlink.h.
Referenced by MainServer::HandleRemoteEncoder().
|
inline |
Returns the inputid used to refer to the recorder in the DB.
Definition at line 69 of file encoderlink.h.
Referenced by AutoExpire::CalcParams(), MainServer::HandleRecorderQuery(), and MainServer::HandleRemoteEncoder().
|
inline |
Returns the TVRec used by a local EncoderLink instance.
Definition at line 71 of file encoderlink.h.
bool EncoderLink::GoToSleep | ( | void | ) |
Tell a slave backend to go to sleep.
Tell a slave to go to sleep.
Definition at line 405 of file encoderlink.cpp.
int EncoderLink::LockTuner | ( | void | ) |
Lock the tuner for exclusive use.
Definition at line 420 of file encoderlink.cpp.
Referenced by MainServer::HandleLockTuner().
|
inline |
Unlock the tuner.
Definition at line 78 of file encoderlink.h.
Referenced by MainServer::HandleFreeTuner().
|
inline |
Returns true iff the tuner is locked.
Definition at line 81 of file encoderlink.h.
Referenced by Scheduler::HandleRecording().
bool EncoderLink::CheckFile | ( | ProgramInfo * | pginfo | ) |
Checks if program is stored locally.
Definition at line 332 of file encoderlink.cpp.
Referenced by AutoExpire::ExpireRecordings().
void EncoderLink::GetDiskSpace | ( | QStringList & | o_strlist | ) |
Appends total and used disk space in Kilobytes.
o_strlist | list to append to |
Definition at line 348 of file encoderlink.cpp.
long long EncoderLink::GetMaxBitrate | ( | void | ) |
Returns maximum bits per second this recorder might output.
Definition at line 363 of file encoderlink.cpp.
Referenced by AutoExpire::CalcParams(), Scheduler::FillRecordingDir(), MainServer::HandleRecorderQuery(), and MainServer::HandleRemoteEncoder().
std::chrono::milliseconds EncoderLink::SetSignalMonitoringRate | ( | std::chrono::milliseconds | rate, |
int | notifyFrontend | ||
) |
Sets the signal monitoring rate.
May be a local or remote query.
rate | Milliseconds between each signal check, 0 to disable, -1 to preserve old value. |
notifyFrontend | If 1 SIGNAL messages are sent to the frontend, if 0 SIGNAL messages will not be sent, and if -1 the old value is preserved. |
Definition at line 390 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
bool EncoderLink::IsBusy | ( | InputInfo * | busy_input = nullptr , |
std::chrono::seconds | time_buffer = 5s |
||
) |
Returns true if the recorder is busy, or will be within the next time_buffer seconds.
Definition at line 154 of file encoderlink.cpp.
Referenced by Scheduler::AssignGroupInput(), AutoExpire::CalcParams(), MainServer::HandleRemoteEncoder(), and Scheduler::IsBusyRecording().
bool EncoderLink::IsBusyRecording | ( | void | ) |
Returns true if the TVRec state is in a recording state.
Contrast with IsBusy() which returns true if a recording is pending and is generally the safer call to make.
Definition at line 176 of file encoderlink.cpp.
Referenced by MainServer::DoHandleStopRecording(), and MatchesRecording().
TVState EncoderLink::GetState | ( | ) |
Returns the TVState of the recorder.
Definition at line 195 of file encoderlink.cpp.
Referenced by MainServer::DoHandleStopRecording(), MainServer::HandleRemoteEncoder(), IsBusyRecording(), and MatchesRecording().
uint EncoderLink::GetFlags | ( | void | ) |
Returns the flag state of the recorder.
Definition at line 222 of file encoderlink.cpp.
Referenced by MainServer::HandleRemoteEncoder().
bool EncoderLink::IsRecording | ( | const ProgramInfo * | rec | ) |
Returns true if rec is scheduled for recording.
rec | Recording to check. |
Definition at line 249 of file encoderlink.cpp.
bool EncoderLink::MatchesRecording | ( | const ProgramInfo * | rec | ) |
Returns true if rec is actually being recorded by TVRec.
This waits for TVRec to enter a state other than kState_ChangingState Then it checks TVRec::GetRecording() against rec.
rec | Recording to check against TVRec::GetRecording(). |
Definition at line 263 of file encoderlink.cpp.
Referenced by MainServer::DoHandleStopRecording(), MainServer::HandleCheckRecordingActive(), MainServer::HandleGetRecorderNum(), and MainServer::HandleRemoteEncoder().
void EncoderLink::RecordPending | ( | const ProgramInfo * | rec, |
std::chrono::seconds | secsleft, | ||
bool | hasLater | ||
) |
Tells TVRec there is a pending recording "rec" in "secsleft" seconds.
rec | Recording to make. |
secsleft | Seconds to wait before starting recording. |
hasLater | If true, a later non-conflicting showing is available. |
Definition at line 302 of file encoderlink.cpp.
Referenced by Scheduler::HandleRecording(), and MainServer::HandleRemoteEncoder().
RecStatus::Type EncoderLink::StartRecording | ( | ProgramInfo * | rec | ) |
Tells TVRec to Start recording the program "rec" as soon as possible.
Definition at line 435 of file encoderlink.cpp.
Referenced by Scheduler::ChangeRecordingEnd(), Scheduler::HandleRecording(), and MainServer::HandleRemoteEncoder().
RecStatus::Type EncoderLink::GetRecordingStatus | ( | void | ) |
Definition at line 470 of file encoderlink.cpp.
Referenced by MainServer::HandleRemoteEncoder().
Tells TVRec to stop recording immediately. This only works on local recorders.
Definition at line 527 of file encoderlink.cpp.
Referenced by MainServer::DoHandleStopRecording(), and MainServer::HandleRemoteEncoder().
void EncoderLink::FinishRecording | ( | void | ) |
Tells TVRec to stop recording, but only after "overrecord" seconds. This only works on local recorders.
Definition at line 545 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
void EncoderLink::FrontendReady | ( | void | ) |
Tells TVRec that the frontend is ready for data. This only works on local recorders.
Definition at line 662 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
void EncoderLink::CancelNextRecording | ( | bool | cancel | ) |
Tells TVRec to cancel the next recording.
This is used when the user is watching "Live TV" and does not want to allow the recorder to be taken for a pending recording.
Definition at line 678 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery(), and MainServer::HandleRemoteEncoder().
bool EncoderLink::WouldConflict | ( | const ProgramInfo * | rec | ) |
Checks a recording against any recording current or pending recordings on the recorder represented by this EncoderLink.
rec | Recording to check against current/pending recording. |
Definition at line 320 of file encoderlink.cpp.
bool EncoderLink::IsReallyRecording | ( | void | ) |
Checks if the RecorderBase held by TVRec is actually recording. This only works on local recorders.
Definition at line 560 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
ProgramInfo * EncoderLink::GetRecording | ( | void | ) |
Returns TVRec's current recording.
Caller is responsible for deleting the ProgramInfo when done with it.
Definition at line 507 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery(), and MainServer::HandleRemoteEncoder().
float EncoderLink::GetFramerate | ( | void | ) |
Returns the recording frame rate from TVRec. This only works on local recorders.
Definition at line 576 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
long long EncoderLink::GetFramesWritten | ( | void | ) |
Returns number of frames written to disk by TVRec's RecorderBase instance. This only works on local recorders.
Definition at line 592 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
long long EncoderLink::GetFilePosition | ( | void | ) |
Returns total number of bytes written by TVRec's RingBuffer. This only works on local recorders.
Definition at line 607 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
int64_t EncoderLink::GetKeyframePosition | ( | uint64_t | desired | ) |
Returns byte position in RingBuffer of a keyframe.
This only works on local recorders.
Definition at line 622 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
bool EncoderLink::GetKeyframePositions | ( | int64_t | start, |
int64_t | end, | ||
frm_pos_map_t & | map | ||
) |
Definition at line 631 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
bool EncoderLink::GetKeyframeDurations | ( | int64_t | start, |
int64_t | end, | ||
frm_pos_map_t & | map | ||
) |
Definition at line 644 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
void EncoderLink::SpawnLiveTV | ( | LiveTVChain * | chain, |
bool | pip, | ||
QString | startchan | ||
) |
Tells TVRec to Spawn a "Live TV" recorder. This only works on local recorders.
chain | The LiveTV chain to use |
startchan | The channel the LiveTV should start with |
pip | Tells TVRec's RingBuffer that this is for a Picture in Picture display. |
Definition at line 700 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
QString EncoderLink::GetChainID | ( | void | ) |
Get the LiveTV chain id that's in use.
Definition at line 711 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
void EncoderLink::StopLiveTV | ( | void | ) |
Tells TVRec to stop a "Live TV" recorder. This only works on local recorders.
Definition at line 725 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
void EncoderLink::PauseRecorder | ( | void | ) |
Tells TVRec to pause a recorder, used for channel and input changes. This only works on local recorders.
Definition at line 739 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
void EncoderLink::SetLiveRecording | ( | int | recording | ) |
Tells TVRec to keep a LiveTV recording if 'recording' is 1. and to not keep a LiveTV recording if 'recording; is 0. This only works on local recorders.
Definition at line 752 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
void EncoderLink::SetNextLiveTVDir | ( | const QString & | dir | ) |
Tells TVRec where to put the next LiveTV recording.
Definition at line 764 of file encoderlink.cpp.
Referenced by Scheduler::GetNextLiveTVDir(), and MainServer::HandleSetNextLiveTVDir().
QString EncoderLink::GetInput | ( | void | ) | const |
Returns TVRec's recorders current input. This only works on local recorders.
Definition at line 781 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
QString EncoderLink::SetInput | ( | QString | input | ) |
Tells TVRec's recorder to change to the specified input. This only works on local recorders.
You must call PauseRecorder(void) before calling this.
input | Input to switch to, or "SwitchToNextInput". |
Definition at line 800 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
void EncoderLink::ToggleChannelFavorite | ( | const QString & | changroup | ) |
Toggles whether the current channel should be on our favorites list.
This only works on local recorders.
Definition at line 814 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
void EncoderLink::ChangeChannel | ( | ChannelChangeDirection | channeldirection | ) |
Changes to the next or previous channel.
This only works on local recorders.
You must call PauseRecorder() before calling this.
channeldirection | channel change direction |
Definition at line 829 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
void EncoderLink::SetChannel | ( | const QString & | name | ) |
Changes to a named channel on the current tuner. This only works on local recorders.
You must call PauseRecorder() before calling this.
name | Name of channel to change to. |
Definition at line 844 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
int EncoderLink::GetPictureAttribute | ( | PictureAttribute | attr | ) |
Changes brightness/contrast/colour/hue of a recording. This only works on local recorders.
Note: In practice this only works with frame grabbing recorders.
Definition at line 860 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
int EncoderLink::ChangePictureAttribute | ( | PictureAdjustType | type, |
PictureAttribute | attr, | ||
bool | direction | ||
) |
Changes brightness/contrast/colour/hue of a recording. This only works on local recorders.
Note: In practice this only works with frame grabbing recorders.
Definition at line 880 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
bool EncoderLink::CheckChannel | ( | const QString & | name | ) |
Checks if named channel exists on current tuner. This only works on local recorders.
name | Channel to verify against current tuner. |
Definition at line 903 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
bool EncoderLink::ShouldSwitchToAnotherInput | ( | const QString & | channelid | ) |
Checks if named channel exists on current tuner, or another tuner. This only works on local recorders.
channelid | channel to verify against tuners. |
Definition at line 921 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
bool EncoderLink::CheckChannelPrefix | ( | const QString & | prefix, |
uint & | complete_valid_channel_on_rec, | ||
bool & | is_extra_char_useful, | ||
QString & | needed_spacer | ||
) |
Checks a prefix against the channels in the DB. This only works on local recorders.
Definition at line 938 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
void EncoderLink::GetNextProgram | ( | BrowseDirection | direction, |
QString & | title, | ||
QString & | subtitle, | ||
QString & | desc, | ||
QString & | category, | ||
QString & | starttime, | ||
QString & | endtime, | ||
QString & | callsign, | ||
QString & | iconpath, | ||
QString & | channelname, | ||
uint & | _chanid, | ||
QString & | seriesid, | ||
QString & | programid | ||
) |
Returns information about the program that would be seen if we changed the channel using ChangeChannel(int) with "direction".
This only works on local recorders.
Definition at line 963 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
bool EncoderLink::GetChannelInfo | ( | uint & | chanid, |
uint & | sourceid, | ||
QString & | callsign, | ||
QString & | channum, | ||
QString & | channame, | ||
QString & | xmltv | ||
) | const |
Definition at line 984 of file encoderlink.cpp.
Referenced by MainServer::HandleRecorderQuery().
bool EncoderLink::SetChannelInfo | ( | uint | chanid, |
uint | sourceid, | ||
const QString & | oldchannum, | ||
const QString & | callsign, | ||
const QString & | channum, | ||
const QString & | channame, | ||
const QString & | xmltv | ||
) |
Definition at line 998 of file encoderlink.cpp.
Definition at line 1014 of file encoderlink.cpp.
Referenced by MainServer::HandleAddChildInput().
|
private |
Atomicly checks if sock is not null and increases its refcount.
Definition at line 87 of file encoderlink.cpp.
Referenced by CancelNextRecording(), CheckFile(), EncoderLink(), GetDiskSpace(), GetFlags(), GetMaxBitrate(), GetRecording(), GetRecordingStatus(), GetState(), GoToSleep(), IsBusy(), MatchesRecording(), RecordPending(), SetNextLiveTVDir(), SetSignalMonitoringRate(), and StartRecording().
|
private |
Atomicly checks if sock is not null and decreases its refcount.
Definition at line 101 of file encoderlink.cpp.
Referenced by SetSocket().
|
private |
Definition at line 152 of file encoderlink.h.
Referenced by CancelNextRecording(), GetFlags(), GetInputID(), GetMaxBitrate(), GetRecording(), GetRecordingStatus(), GetState(), IsBusy(), LockTuner(), MatchesRecording(), RecordPending(), SetNextLiveTVDir(), SetSignalMonitoringRate(), and StartRecording().
|
private |
Definition at line 154 of file encoderlink.h.
Referenced by AddChildInput(), CancelNextRecording(), CheckFile(), GetDiskSpace(), GetFlags(), GetMaxBitrate(), GetRecording(), GetRecordingStatus(), GetSocket(), GetState(), GoToSleep(), HasSockAndDecrRef(), HasSockAndIncrRef(), IsBusy(), IsConnected(), MatchesRecording(), RecordPending(), SetNextLiveTVDir(), SetSignalMonitoringRate(), SetSocket(), and StartRecording().
|
private |
Definition at line 155 of file encoderlink.h.
Referenced by HasSockAndDecrRef(), and HasSockAndIncrRef().
|
private |
Definition at line 156 of file encoderlink.h.
Referenced by GetHostName(), and SetSocket().
|
private |
Definition at line 158 of file encoderlink.h.
Referenced by CancelNextRecording(), ChangeChannel(), ChangePictureAttribute(), CheckChannel(), CheckChannelPrefix(), FinishRecording(), FrontendReady(), GetChainID(), GetChannelInfo(), GetFilePosition(), GetFlags(), GetFramerate(), GetFramesWritten(), GetInput(), GetKeyframeDurations(), GetKeyframePosition(), GetKeyframePositions(), GetMaxBitrate(), GetNextProgram(), GetPictureAttribute(), GetRecording(), GetRecordingStatus(), GetState(), GetTVRec(), IsBusy(), IsReallyRecording(), MatchesRecording(), PauseRecorder(), RecordPending(), SetChannel(), SetChannelInfo(), SetInput(), SetLiveRecording(), SetNextLiveTVDir(), SetSignalMonitoringRate(), ShouldSwitchToAnotherInput(), SpawnLiveTV(), StartRecording(), StopLiveTV(), StopRecording(), ToggleChannelFavorite(), and ~EncoderLink().
Definition at line 160 of file encoderlink.h.
Referenced by AddChildInput(), CancelNextRecording(), ChangeChannel(), ChangePictureAttribute(), CheckChannel(), CheckChannelPrefix(), FinishRecording(), FrontendReady(), GetChainID(), GetChannelInfo(), GetFilePosition(), GetFlags(), GetFramerate(), GetFramesWritten(), GetInput(), GetKeyframeDurations(), GetKeyframePosition(), GetKeyframePositions(), GetMaxBitrate(), GetNextProgram(), GetPictureAttribute(), GetRecording(), GetRecordingStatus(), GetState(), IsBusy(), IsLocal(), IsReallyRecording(), MatchesRecording(), PauseRecorder(), RecordPending(), SetChannel(), SetChannelInfo(), SetInput(), SetLiveRecording(), SetNextLiveTVDir(), SetSignalMonitoringRate(), ShouldSwitchToAnotherInput(), SpawnLiveTV(), StartRecording(), StopLiveTV(), StopRecording(), and ToggleChannelFavorite().
Definition at line 161 of file encoderlink.h.
Referenced by FreeTuner(), IsTunerLocked(), and LockTuner().
|
private |
Definition at line 163 of file encoderlink.h.
Referenced by CanSleep(), GetSleepStatus(), IsAsleep(), IsAwake(), IsFallingAsleep(), IsWaking(), and SetSleepStatus().
|
private |
Definition at line 164 of file encoderlink.h.
Referenced by GetSleepStatusTime(), and SetSleepStatus().
|
private |
Definition at line 165 of file encoderlink.h.
Referenced by GetLastSleepTime(), and GoToSleep().
|
private |
Definition at line 166 of file encoderlink.h.
Referenced by GetLastWakeTime(), and SetLastWakeTime().
|
private |
Definition at line 168 of file encoderlink.h.
Referenced by FinishRecording(), GetRecordingStatus(), StartRecording(), StopRecording(), and WouldConflict().
|
private |
Definition at line 169 of file encoderlink.h.
Referenced by GetRecordingStatus(), IsRecording(), StartRecording(), and StopRecording().
|
private |
Definition at line 170 of file encoderlink.h.
Referenced by GetRecordingStatus(), IsRecording(), StartRecording(), and StopRecording().