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