Go to the documentation of this file.
88 bool IsBusy(
InputInfo *busy_input =
nullptr, std::chrono::seconds time_buffer = 5s);
131 bool &is_extra_char_useful, QString &needed_spacer);
133 QString &title, QString &subtitle, QString &desc,
134 QString &category, QString &starttime,
135 QString &endtime, QString &callsign, QString &iconpath,
136 QString &channelname,
uint &chanid,
137 QString &seriesid, QString &programid);
139 QString &callsign, QString &channum,
140 QString &channame, QString &xmltv)
const;
142 const QString& oldchannum,
143 const QString& callsign,
const QString& channum,
144 const QString& channame,
const QString& xmltv);
QString GetHostName(void) const
Returns the remote host for a non-local EncoderLink.
BrowseDirection
Used to request ProgramInfo for channel browsing.
bool GetChannelInfo(uint &chanid, uint &sourceid, QString &callsign, QString &channum, QString &channame, QString &xmltv) const
QDateTime m_sleepStatusTime
QDateTime m_lastSleepTime
bool IsRecording(const ProgramInfo *rec)
Returns true if rec is scheduled for recording.
Provides an interface to both local and remote TVRec's for the mythbackend.
float GetFramerate(void)
Returns the recording frame rate from TVRec. This only works on local recorders.
@ sStatus_Waking
A slave is marked as waking when the master runs the slave's wakeup command.
QDateTime m_endRecordingTime
int64_t GetKeyframePosition(uint64_t desired)
Returns byte position in RingBuffer of a keyframe.
TVState GetState()
Returns the TVState of the recorder.
QString GetInput(void) const
Returns TVRec's recorders current input. This only works on local recorders.
bool IsLocal(void) const
Returns true for a local EncoderLink.
void SetNextLiveTVDir(const QString &dir)
Tells TVRec where to put the next LiveTV recording.
@ sStatus_Undefined
A slave's sleep status is undefined when it has never connected to the master backend or is not able ...
void StopLiveTV(void)
Tells TVRec to stop a "Live TV" recorder. This only works on local recorders.
ChannelChangeDirection
ChannelChangeDirection is an enumeration of possible channel changing directions.
bool IsReallyRecording(void)
Checks if the RecorderBase held by TVRec is actually recording. This only works on local recorders.
bool IsAsleep(void) const
Returns true if the encoder is asleep.
bool GoToSleep(void)
Tell a slave backend to go to sleep.
void PauseRecorder(void)
Tells TVRec to pause a recorder, used for channel and input changes. This only works on local recorde...
QString SetInput(QString input)
Tells TVRec's recorder to change to the specified input. This only works on local recorders.
bool AddChildInput(uint childid)
bool GetKeyframeDurations(int64_t start, int64_t end, frm_pos_map_t &map)
RecStatus::Type GetRecordingStatus(void)
SleepStatus
SleepStatus is an enumeration of the awake/sleep status of a slave.
int GetInputID(void) const
Returns the inputid used to refer to the recorder in the DB.
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.
int ChangePictureAttribute(PictureAdjustType type, PictureAttribute attr, bool direction)
Changes brightness/contrast/colour/hue of a recording. This only works on local recorders.
bool IsWaking(void) const
Returns true if the encoder is waking up.
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.
void FrontendReady(void)
Tells TVRec that the frontend is ready for data. This only works on local recorders.
void ToggleChannelFavorite(const QString &changroup)
Toggles whether the current channel should be on our favorites list.
std::chrono::milliseconds SetSignalMonitoringRate(std::chrono::milliseconds rate, int notifyFrontend)
Sets the signal monitoring rate.
@ sStatus_FallingAsleep
A slave is marked as falling asleep when told to shutdown by the master.
QDateTime GetLastSleepTime(void) const
Get the last time the encoder was put to sleep.
@ sStatus_Awake
A slave is awake when it is connected to the master.
bool CheckFile(ProgramInfo *pginfo)
Checks if program is stored locally.
bool CheckChannel(const QString &name)
Checks if named channel exists on current tuner. This only works on local recorders.
void SetSocket(PlaybackSock *lsock)
Used to set the socket for a non-local EncoderLink.
void SpawnLiveTV(LiveTVChain *chain, bool pip, QString startchan)
Tells TVRec to Spawn a "Live TV" recorder. This only works on local recorders.
PlaybackSock * GetSocket(void)
Returns the socket, if set, for a non-local EncoderLink.
bool WouldConflict(const ProgramInfo *rec)
Checks a recording against any recording current or pending recordings on the recorder represented by...
bool ShouldSwitchToAnotherInput(const QString &channelid)
Checks if named channel exists on current tuner, or another tuner. This only works on local recorders...
long long GetMaxBitrate(void)
Returns maximum bits per second this recorder might output.
void ChangeChannel(ChannelChangeDirection channeldirection)
Changes to the next or previous channel.
void FreeTuner(void)
Unlock the tuner.
QDateTime m_startRecordingTime
void GetDiskSpace(QStringList &o_strlist)
Appends total and used disk space in Kilobytes.
bool IsFallingAsleep(void) const
Returns true if the encoder is falling asleep.
@ sStatus_Asleep
A slave is considered asleep when it is not awake and not undefined.
bool HasSockAndIncrRef()
Atomicly checks if sock is not null and increases its refcount.
bool IsConnected(void) const
Returns true if the EncoderLink instance is usable.
void SetLastWakeTime(QDateTime newTime)
Used to set the last wake time of an encoder.
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 ChangeChanne...
long long GetFilePosition(void)
Returns total number of bytes written by TVRec's RingBuffer. This only works on local recorders.
~EncoderLink()
Destructor does nothing for non-local EncoderLink instances, but deletes the TVRec for local EncoderL...
EncoderLink(int inputid, PlaybackSock *lsock, QString lhostname)
This is the EncoderLink constructor for non-local recorders.
QMap< long long, long long > frm_pos_map_t
Frame # -> File offset map.
bool SetChannelInfo(uint chanid, uint sourceid, const QString &oldchannum, const QString &callsign, const QString &channum, const QString &channame, const QString &xmltv)
void RecordPending(const ProgramInfo *rec, std::chrono::seconds secsleft, bool hasLater)
Tells TVRec there is a pending recording "rec" in "secsleft" seconds.
bool IsAwake(void) const
Returns true if the encoder is awake.
void SetChannel(const QString &name)
Changes to a named channel on the current tuner. This only works on local recorders.
QDateTime GetSleepStatusTime(void) const
Get the last time the sleep status was changed.
bool GetKeyframePositions(int64_t start, int64_t end, frm_pos_map_t &map)
RecStatus::Type StartRecording(ProgramInfo *rec)
Tells TVRec to Start recording the program "rec" as soon as possible.
uint GetFlags(void)
Returns the flag state of the recorder.
Holds information on recordings and videos.
void CancelNextRecording(bool cancel)
Tells TVRec to cancel the next recording.
int GetPictureAttribute(PictureAttribute attr)
Changes brightness/contrast/colour/hue of a recording. This only works on local recorders.
bool IsTunerLocked(void) const
Returns true iff the tuner is locked.
This is the coordinating class of the Recorder Subsystem.
TVRec * GetTVRec(void)
Returns the TVRec used by a local EncoderLink instance.
TVState
TVState is an enumeration of the states used by TV and TVRec.
QString GetChainID(void)
Get the LiveTV chain id that's in use.
void SetSleepStatus(SleepStatus newStatus)
Used to set the asleep status of an encoder.
ProgramInfo * GetRecording(void)
Returns TVRec's current recording.
SleepStatus GetSleepStatus(void) const
Returns the current Sleep Status of the encoder.
void FinishRecording(void)
Tells TVRec to stop recording, but only after "overrecord" seconds. This only works on local recorder...
long long GetFramesWritten(void)
Returns number of frames written to disk by TVRec's RecorderBase instance. This only works on local r...
int LockTuner(void)
Lock the tuner for exclusive use.
void StopRecording(bool killFile=false)
Tells TVRec to stop recording immediately. This only works on local recorders.
bool MatchesRecording(const ProgramInfo *rec)
Returns true if rec is actually being recorded by TVRec.
void SetLiveRecording(int recording)
Tells TVRec to keep a LiveTV recording if 'recording' is 1. and to not keep a LiveTV recording if 're...
bool HasSockAndDecrRef()
Atomicly checks if sock is not null and decreases its refcount.
SleepStatus m_sleepStatus
QDateTime GetLastWakeTime(void) const
Get the last time the encoder was awakened.
bool CanSleep(void) const
Returns true if the encoder can sleep.
bool IsBusyRecording(void)
Returns true if the TVRec state is in a recording state.
Keeps track of recordings in a current LiveTV instance.