#include <livetvchain.h>
Definition at line 27 of file livetvchain.h.
Public Member Functions | |
| LiveTVChain () | |
| ~LiveTVChain () | |
| QString | InitializeNewChain (const QString &seed) |
| void | LoadFromExistingChain (const QString &id) |
| void | SetHostPrefix (const QString &prefix) |
| void | SetCardType (const QString &type) |
| void | DestroyChain (void) |
| void | AppendNewProgram (ProgramInfo *pginfo, QString channum, QString inputname, bool discont) |
| void | FinishedRecording (ProgramInfo *pginfo) |
| void | DeleteProgram (ProgramInfo *pginfo) |
| void | ReloadAll () |
| QString | GetID (void) const |
| int | GetCurPos (void) const |
| int | ProgramIsAt (const QString &chanid, const QDateTime &starttime) const |
| int | ProgramIsAt (const ProgramInfo *pginfo) const |
| int | GetLengthAtCurPos (void) |
| int | TotalSize (void) const |
| bool | HasNext (void) const |
| bool | HasPrev (void) const |
| ProgramInfo * | GetProgramAt (int at) const |
| Returns program at the desired location. | |
| bool | NeedsToSwitch (void) const |
| Returns true iff a switch is required but no jump is required. | |
| bool | NeedsToJump (void) const |
| Returns true iff a switch and jump are required. | |
| QString | GetChannelName (int pos=-1) const |
| QString | GetInputName (int pos=-1) const |
| QString | GetCardType (int pos=-1) const |
| void | SetProgram (ProgramInfo *pginfo) |
| void | SwitchTo (int num) |
| Sets the recording to switch to. | |
| void | SwitchToNext (bool up) |
| Sets the recording to switch to. | |
| void | ClearSwitch (void) |
| ProgramInfo * | GetSwitchProgram (bool &discont, bool &newtype, int &newid) |
| Returns the recording we should switch to. | |
| void | JumpTo (int num, int pos) |
| void | JumpToNext (bool up, int pos) |
| int | GetJumpPos (void) |
| Returns the jump position and clears it. | |
| void | SetHostSocket (MythSocket *sock) |
| bool | IsHostSocket (MythSocket *sock) |
| int | HostSocketCount (void) |
| void | DelHostSocket (MythSocket *sock) |
Private Member Functions | |
| void | BroadcastUpdate () |
| void | GetEntryAt (int at, LiveTVChainEntry &entry) const |
Static Private Member Functions | |
| static ProgramInfo * | EntryToProgram (const LiveTVChainEntry &entry) |
Private Attributes | |
| QString | m_id |
| QValueList< LiveTVChainEntry > | m_chain |
| int | m_maxpos |
| QMutex | m_lock |
| QString | m_hostprefix |
| QString | m_cardtype |
| int | m_curpos |
| QString | m_cur_chanid |
| QDateTime | m_cur_startts |
| int | m_switchid |
| LiveTVChainEntry | m_switchentry |
| int | m_jumppos |
| QMutex | m_sockLock |
| QPtrList< MythSocket > | m_inUseSocks |
| LiveTVChain::LiveTVChain | ( | ) |
Definition at line 12 of file livetvchain.cpp.
| LiveTVChain::~LiveTVChain | ( | ) |
Definition at line 18 of file livetvchain.cpp.
| QString LiveTVChain::InitializeNewChain | ( | const QString & | seed | ) |
| void LiveTVChain::LoadFromExistingChain | ( | const QString & | id | ) |
| void LiveTVChain::SetHostPrefix | ( | const QString & | prefix | ) |
| void LiveTVChain::SetCardType | ( | const QString & | type | ) |
Definition at line 34 of file livetvchain.cpp.
Referenced by TVRec::SpawnLiveTV(), and TVRec::TuningFrequency().
| void LiveTVChain::DestroyChain | ( | void | ) |
Definition at line 176 of file livetvchain.cpp.
Referenced by TV::LiveTV(), TV::TeardownPipPlayer(), TV::TeardownPlayer(), TV::TogglePIPView(), and TV::~TV().
| void LiveTVChain::AppendNewProgram | ( | ProgramInfo * | pginfo, | |
| QString | channum, | |||
| QString | inputname, | |||
| bool | discont | |||
| ) |
Definition at line 45 of file livetvchain.cpp.
Referenced by TVRec::CreateLiveTVRingBuffer(), and TVRec::SwitchLiveTVRingBuffer().
| void LiveTVChain::FinishedRecording | ( | ProgramInfo * | pginfo | ) |
| void LiveTVChain::DeleteProgram | ( | ProgramInfo * | pginfo | ) |
| void LiveTVChain::ReloadAll | ( | void | ) |
Definition at line 189 of file livetvchain.cpp.
Referenced by TV::HandleStateChange(), LoadFromExistingChain(), RingBuffer::ReadFromBuf(), TV::RunTV(), TVRec::SpawnLiveTV(), TV::SwapPIP(), TV::SwitchCards(), TV::TogglePIPView(), and TV::UnpauseLiveTV().
| QString LiveTVChain::GetID | ( | void | ) | const [inline] |
Definition at line 49 of file livetvchain.h.
Referenced by MainServer::connectionClosed(), TVRec::GetChainID(), MainServer::GetExistingChain(), TV::HandleStateChange(), TV::RunTV(), TVRec::StartRecording(), TV::SwitchCards(), and TV::TogglePIPView().
| int LiveTVChain::GetCurPos | ( | void | ) | const [inline] |
| int LiveTVChain::ProgramIsAt | ( | const QString & | chanid, | |
| const QDateTime & | starttime | |||
| ) | const |
Definition at line 290 of file livetvchain.cpp.
Referenced by MainServer::GetChainWithRecording(), ProgramIsAt(), ReloadAll(), and SetProgram().
| int LiveTVChain::ProgramIsAt | ( | const ProgramInfo * | pginfo | ) | const |
| int LiveTVChain::GetLengthAtCurPos | ( | void | ) |
Definition at line 320 of file livetvchain.cpp.
Referenced by NuppelVideoPlayer::calcSliderPos().
| int LiveTVChain::TotalSize | ( | void | ) | const |
| bool LiveTVChain::HasNext | ( | void | ) | const |
Definition at line 351 of file livetvchain.cpp.
Referenced by NuppelVideoPlayer::CalcMaxFFTime(), NuppelVideoPlayer::calcSliderPos(), NuppelVideoPlayer::CheckTVChain(), TV::customEvent(), NuppelVideoPlayer::IsNearEnd(), DecoderBase::PosMapFromEnc(), RingBuffer::ReadAheadThread(), NuppelVideoPlayer::StartPlaying(), and SwitchToNext().
| bool LiveTVChain::HasPrev | ( | void | ) | const [inline] |
Definition at line 56 of file livetvchain.h.
Referenced by NuppelVideoPlayer::CalcRWTime(), NuppelVideoPlayer::calcSliderPos(), and SwitchToNext().
| ProgramInfo * LiveTVChain::GetProgramAt | ( | int | at | ) | const |
Returns program at the desired location.
NOTE: The caller must delete the returned program.
| at | ProgramInfo to return [0..TotalSize()-1] or -1 for last program |
Definition at line 279 of file livetvchain.cpp.
Referenced by TV::HandleStateChange(), TV::SwapPIP(), TV::SwitchCards(), TVRec::SwitchLiveTVRingBuffer(), TV::ToggleActiveWindow(), TV::TogglePIPView(), TVRec::TuningNewRecorder(), TVRec::TuningRestartRecorder(), and TV::UnpauseLiveTV().
| bool LiveTVChain::NeedsToSwitch | ( | void | ) | const [inline] |
Returns true iff a switch is required but no jump is required.
Definition at line 59 of file livetvchain.h.
Referenced by RingBuffer::ReadFromBuf(), and NuppelVideoPlayer::StartPlaying().
| bool LiveTVChain::NeedsToJump | ( | void | ) | const [inline] |
Returns true iff a switch and jump are required.
Definition at line 62 of file livetvchain.h.
Referenced by RingBuffer::ReadFromBuf(), and NuppelVideoPlayer::StartPlaying().
| QString LiveTVChain::GetChannelName | ( | int | pos = -1 |
) | const |
Definition at line 509 of file livetvchain.cpp.
Referenced by TV::AddPreviousChannel(), and TV::SetPreviousChannel().
| QString LiveTVChain::GetInputName | ( | int | pos = -1 |
) | const |
| QString LiveTVChain::GetCardType | ( | int | pos = -1 |
) | const |
Definition at line 525 of file livetvchain.cpp.
Referenced by TV::HandleStateChange(), NuppelVideoPlayer::JumpToProgram(), NuppelVideoPlayer::OpenFile(), and NuppelVideoPlayer::SwitchToProgram().
| void LiveTVChain::SetProgram | ( | ProgramInfo * | pginfo | ) |
Definition at line 337 of file livetvchain.cpp.
Referenced by NuppelVideoPlayer::FileChangedCallback(), TV::HandleStateChange(), NuppelVideoPlayer::JumpToProgram(), TV::SwitchCards(), NuppelVideoPlayer::SwitchToProgram(), and TV::TogglePIPView().
| void LiveTVChain::SwitchTo | ( | int | num | ) |
Sets the recording to switch to.
| num | Index of recording to switch to, -1 for last recording. |
Definition at line 445 of file livetvchain.cpp.
Referenced by JumpTo(), and SwitchToNext().
| void LiveTVChain::SwitchToNext | ( | bool | up | ) |
Sets the recording to switch to.
| up | Set to true to switch to the next recording, false to switch to the previous recording. |
Definition at line 478 of file livetvchain.cpp.
Referenced by JumpToNext(), and RingBuffer::ReadAheadThread().
| void LiveTVChain::ClearSwitch | ( | void | ) |
| ProgramInfo * LiveTVChain::GetSwitchProgram | ( | bool & | discont, | |
| bool & | newtype, | |||
| int & | newid | |||
| ) |
Returns the recording we should switch to.
This returns a ProgramInfo* and tells us if this is a discontiuous switch and whether the recording type is changing.
This also clears the NeedsToSwitch()/NeedsToJump() state.
NOTE: The caller is resposible for deleting the ProgramInfo
Definition at line 374 of file livetvchain.cpp.
Referenced by NuppelVideoPlayer::JumpToProgram(), and NuppelVideoPlayer::SwitchToProgram().
| void LiveTVChain::JumpTo | ( | int | num, | |
| int | pos | |||
| ) |
| void LiveTVChain::JumpToNext | ( | bool | up, | |
| int | pos | |||
| ) |
Definition at line 493 of file livetvchain.cpp.
Referenced by NuppelVideoPlayer::CalcMaxFFTime(), NuppelVideoPlayer::CalcRWTime(), and NuppelVideoPlayer::StartPlaying().
| int LiveTVChain::GetJumpPos | ( | void | ) |
Returns the jump position and clears it.
Definition at line 502 of file livetvchain.cpp.
Referenced by NuppelVideoPlayer::JumpToProgram().
| void LiveTVChain::SetHostSocket | ( | MythSocket * | sock | ) |
| bool LiveTVChain::IsHostSocket | ( | MythSocket * | sock | ) |
| int LiveTVChain::HostSocketCount | ( | void | ) |
Definition at line 547 of file livetvchain.cpp.
Referenced by MainServer::connectionClosed(), and MainServer::HandleRecorderQuery().
| void LiveTVChain::DelHostSocket | ( | MythSocket * | sock | ) |
Definition at line 552 of file livetvchain.cpp.
Referenced by MainServer::connectionClosed(), and MainServer::HandleRecorderQuery().
| void LiveTVChain::BroadcastUpdate | ( | void | ) | [private] |
Definition at line 169 of file livetvchain.cpp.
Referenced by AppendNewProgram(), DeleteProgram(), and FinishedRecording().
| void LiveTVChain::GetEntryAt | ( | int | at, | |
| LiveTVChainEntry & | entry | |||
| ) | const [private] |
Definition at line 238 of file livetvchain.cpp.
Referenced by GetCardType(), GetChannelName(), GetInputName(), GetProgramAt(), GetSwitchProgram(), and SwitchTo().
| ProgramInfo * LiveTVChain::EntryToProgram | ( | const LiveTVChainEntry & | entry | ) | [static, private] |
Definition at line 255 of file livetvchain.cpp.
Referenced by GetProgramAt(), and GetSwitchProgram().
QString LiveTVChain::m_id [private] |
Definition at line 91 of file livetvchain.h.
Referenced by AppendNewProgram(), BroadcastUpdate(), DeleteProgram(), DestroyChain(), InitializeNewChain(), LoadFromExistingChain(), and ReloadAll().
QValueList<LiveTVChainEntry> LiveTVChain::m_chain [private] |
Definition at line 92 of file livetvchain.h.
Referenced by AppendNewProgram(), DeleteProgram(), DestroyChain(), FinishedRecording(), GetEntryAt(), GetLengthAtCurPos(), GetSwitchProgram(), HasNext(), ProgramIsAt(), ReloadAll(), SwitchTo(), and TotalSize().
int LiveTVChain::m_maxpos [private] |
QMutex LiveTVChain::m_lock [mutable, private] |
Definition at line 94 of file livetvchain.h.
Referenced by AppendNewProgram(), ClearSwitch(), DeleteProgram(), DestroyChain(), FinishedRecording(), GetEntryAt(), GetLengthAtCurPos(), GetSwitchProgram(), ProgramIsAt(), ReloadAll(), SetProgram(), and SwitchTo().
QString LiveTVChain::m_hostprefix [private] |
QString LiveTVChain::m_cardtype [private] |
int LiveTVChain::m_curpos [private] |
Definition at line 99 of file livetvchain.h.
Referenced by GetLengthAtCurPos(), GetSwitchProgram(), HasNext(), ReloadAll(), SetProgram(), SwitchTo(), and SwitchToNext().
QString LiveTVChain::m_cur_chanid [private] |
QDateTime LiveTVChain::m_cur_startts [private] |
int LiveTVChain::m_switchid [private] |
Definition at line 103 of file livetvchain.h.
Referenced by ClearSwitch(), GetSwitchProgram(), ReloadAll(), SetProgram(), and SwitchTo().
LiveTVChainEntry LiveTVChain::m_switchentry [private] |
int LiveTVChain::m_jumppos [private] |
Definition at line 106 of file livetvchain.h.
Referenced by ClearSwitch(), GetJumpPos(), JumpTo(), and JumpToNext().
QMutex LiveTVChain::m_sockLock [private] |
Definition at line 108 of file livetvchain.h.
Referenced by DelHostSocket(), IsHostSocket(), and SetHostSocket().
QPtrList<MythSocket> LiveTVChain::m_inUseSocks [private] |
Definition at line 109 of file livetvchain.h.
Referenced by DelHostSocket(), HostSocketCount(), IsHostSocket(), and SetHostSocket().
1.5.5