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