#include <tv_rec.h>
TVRec is used by EncoderLink, which in turn is used by RemoteEncoder which allows the TV class on the frontend to communicate with TVRec and is used by MainServer to implement portions of the Myth Network Protocol on the backend.
TVRec contains an instance of RecorderBase, which actually handles the recording of a program. It also contains an instance of RingBuffer, which in this case is used to either stream an existing recording to the frontend, or to save a stream from the RecorderBase to disk. Finally, if there is a tuner on the hardware RecorderBase is implementing then TVRec contains a channel instance for that hardware, and possibly a SignalMonitor instance which monitors the signal quality on a tuners current input.
Definition at line 152 of file tv_rec.h.
Public Slots | |
| void | SignalMonitorAllGood () |
| void | deleteLater (void) |
Public Member Functions | |
| TVRec (int capturecardnum) | |
| Performs instance initialiation not requiring access to database. | |
| ~TVRec (void) | |
| Stops the event and scanning threads and deletes any ChannelBase, RingBuffer, and RecorderBase instances. | |
| bool | Init (void) |
| Performs instance initialization, returns true on success. | |
| void | RecordPending (const ProgramInfo *rcinfo, int secsleft, bool hasLater) |
| Tells TVRec "rcinfo" is the next pending recording. | |
| RecStatusType | StartRecording (const ProgramInfo *rcinfo) |
| Tells TVRec to Start recording the program "rcinfo" as soon as possible. | |
| void | StopRecording (void) |
| Changes from a recording state to kState_None. | |
| void | FinishRecording (void) |
| Tells TVRec to finish the current recording as soon as possible. | |
| void | FrontendReady (void) |
| Tells TVRec that the frontend's TV class is ready for messages. | |
| void | CancelNextRecording (bool cancel) |
| Tells TVRec to cancel the upcoming recording. | |
| ProgramInfo * | GetRecording (void) |
| Allocates and returns a ProgramInfo for the current recording. | |
| bool | IsRunning (void) const |
| Returns true if event loop has not been told to shut down. | |
| void | Stop (void) |
| Tells TVRec to stop event loop. | |
| TVState | GetState (void) const |
| Returns the TVState of the recorder. | |
| bool | IsPlaying (void) |
| Returns "state == kState_RecordingPreRecorded". | |
| bool | IsRecording (void) |
| Returns "state == kState_RecordingRecordedOnly". | |
| bool | SetVideoFiltersForChannel (uint sourceid, const QString &channum) |
| bool | IsBusy (TunedInputInfo *busy_input=NULL, int time_buffer=5) const |
| Returns true if the recorder is busy, or will be within the next time_buffer seconds. | |
| bool | IsReallyRecording (void) |
| Returns true if frontend can consider the recorder started. | |
| float | GetFramerate (void) |
| Returns recordering frame rate from the recorder. | |
| long long | GetFramesWritten (void) |
| Returns number of frames written to disk by recorder. | |
| long long | GetFilePosition (void) |
| Returns total number of bytes written by RingBuffer. | |
| long long | GetMaxBitrate () |
| Returns the maximum bits per second this recorder can produce. | |
| long long | GetKeyframePosition (long long desired) |
| Returns byte position in RingBuffer of a keyframe according to recorder. | |
| void | SpawnLiveTV (LiveTVChain *newchain, bool pip, QString startchan) |
| Tells TVRec to spawn a "Live TV" recorder. | |
| QString | GetChainID (void) |
| Get the chainid of the livetv instance. | |
| void | StopLiveTV (void) |
| Tells TVRec to stop a "Live TV" recorder. | |
| void | PauseRecorder (void) |
| Tells "recorder" to pause, used for channel and input changes. | |
| void | ToggleChannelFavorite (void) |
| Toggles whether the current channel should be on our favorites list. | |
| void | SetLiveRecording (int recording) |
| Tells the Scheduler about changes to the recording status of the LiveTV recording. | |
| vector< InputInfo > | GetFreeInputs (const vector< uint > &excluded_cards) const |
| Returns the recorder's available inputs. | |
| QString | GetInput (void) const |
| Returns current input. | |
| QString | SetInput (QString input, uint requestType=kFlagDetect) |
| Changes to the specified input. | |
| void | ChangeChannel (ChannelChangeDirection dir) |
| Changes to a channel in the 'dir' channel change direction. | |
| void | SetChannel (QString name, uint requestType=kFlagDetect) |
| Changes to a named channel on the current tuner. | |
| int | SetSignalMonitoringRate (int msec, int notifyFrontend=1) |
| Sets the signal monitoring rate. | |
| int | GetPictureAttribute (PictureAttribute attr) |
| int | ChangePictureAttribute (PictureAdjustType type, PictureAttribute attr, bool direction) |
| Returns current value [0,100] if it succeeds, -1 otherwise. | |
| bool | CheckChannel (QString name) const |
| Checks if named channel exists on current tuner. | |
| bool | ShouldSwitchToAnotherCard (QString chanid) |
| Checks if named channel exists on current tuner, or another tuner. | |
| bool | CheckChannelPrefix (const QString &, uint &, bool &, QString &) |
| Checks a prefix against the channels in the DB. | |
| void | GetNextProgram (int direction, QString &title, QString &subtitle, QString &desc, QString &category, QString &starttime, QString &endtime, QString &callsign, QString &iconpath, QString &channelname, QString &chanid, QString &seriesid, QString &programid) |
| Returns information about the program that would be seen if we changed the channel using ChangeChannel(int) with "direction". | |
| bool | GetChannelInfo (uint &chanid, uint &sourceid, QString &callsign, QString &channum, QString &channame, QString &xmltvid) const |
| bool | SetChannelInfo (uint chanid, uint sourceid, QString oldchannum, QString callsign, QString channum, QString channame, QString xmltvid) |
| int | GetCaptureCardNum (void) |
| Returns the caputure card number. | |
| bool | IsErrored (void) const |
| Returns true is "errored" is true, false otherwise. | |
| void | RingBufferChanged (RingBuffer *rb, ProgramInfo *pginfo) |
| void | RecorderPaused (void) |
| This is a callback, called by the "recorder" instance when it has actually paused. | |
| void | SetNextLiveTVDir (QString dir) |
| uint | GetFlags (void) const |
Static Public Member Functions | |
| static TVRec * | GetTVRec (uint cardid) |
Static Public Attributes | |
| static const uint | kSignalMonitoringRate = 50 |
| How many milliseconds the signal monitor should wait between checks. | |
| static const uint | kFlagFrontendReady = 0x00000001 |
| static const uint | kFlagRunMainLoop = 0x00000002 |
| static const uint | kFlagExitPlayer = 0x00000004 |
| static const uint | kFlagFinishRecording = 0x00000008 |
| static const uint | kFlagErrored = 0x00000010 |
| static const uint | kFlagCancelNextRecording = 0x00000020 |
| static const uint | kFlagLiveTV = 0x00000100 |
| final result desired is LiveTV recording | |
| static const uint | kFlagRecording = 0x00000200 |
| final result desired is a timed recording | |
| static const uint | kFlagAntennaAdjust = 0x00000400 |
| antenna adjusting mode (LiveTV without recording). | |
| static const uint | kFlagRec = 0x00000F00 |
| static const uint | kFlagEITScan = 0x00001000 |
| final result desired is an EIT Scan | |
| static const uint | kFlagCloseRec = 0x00002000 |
| close recorder, keep recording | |
| static const uint | kFlagKillRec = 0x00004000 |
| close recorder, discard recording | |
| static const uint | kFlagNoRec = 0x0000F000 |
| static const uint | kFlagKillRingBuffer = 0x00010000 |
| static const uint | kFlagWaitingForRecPause = 0x00100000 |
| static const uint | kFlagWaitingForSignal = 0x00200000 |
| static const uint | kFlagNeedToStartRecorder = 0x00800000 |
| static const uint | kFlagPendingActions = 0x00F00000 |
| static const uint | kFlagSignalMonitorRunning = 0x01000000 |
| static const uint | kFlagEITScannerRunning = 0x04000000 |
| static const uint | kFlagDummyRecorderRunning = 0x10000000 |
| static const uint | kFlagRecorderRunning = 0x20000000 |
| static const uint | kFlagAnyRecRunning = 0x30000000 |
| static const uint | kFlagAnyRunning = 0x3F000000 |
| static const uint | kFlagRingBufferReady = 0x40000000 |
| static const uint | kFlagDetect = 0x80000000 |
Protected Member Functions | |
| void | RunTV (void) |
| Event handling method, contains event loop. | |
| bool | WaitForEventThreadSleep (bool wake=true, ulong time=ULONG_MAX) |
Static Protected Member Functions | |
| static void * | EventThread (void *param) |
| Thunk that allows event pthread to call RunTV(). | |
| static void * | RecorderThread (void *param) |
| Thunk that allows recorder pthread to call RecorderBase::StartRecording(). | |
Private Member Functions | |
| void | SetRingBuffer (RingBuffer *) |
| Sets "ringBuffer", deleting any existing RingBuffer. | |
| void | SetPseudoLiveTVRecording (ProgramInfo *) |
| Sets the pseudo LiveTV ProgramInfo. | |
| void | TeardownAll (void) |
| bool | SetupRecorder (RecordingProfile &profile) |
| Allocates and initializes the RecorderBase instance. | |
| void | TeardownRecorder (bool killFile=false) |
| Tears down the recorder. | |
| DTVRecorder * | GetDTVRecorder (void) |
| HDHRRecorder * | GetHDHRRecorder (void) |
| DVBRecorder * | GetDVBRecorder (void) |
| bool | CreateChannel (const QString &startChanNum) |
| void | InitChannel (const QString &inputname, const QString &startchannel) |
| Performs ChannelBase instance init from database and tuner hardware (requires that channel be open). | |
| void | CloseChannel (void) |
| DBox2Channel * | GetDBox2Channel (void) |
| DTVChannel * | GetDTVChannel (void) |
| HDHRChannel * | GetHDHRChannel (void) |
| DVBChannel * | GetDVBChannel (void) |
| FirewireChannel * | GetFirewireChannel (void) |
| Channel * | GetV4LChannel (void) |
| bool | SetupSignalMonitor (bool enable_table_monitoring, bool notify) |
| This creates a SignalMonitor instance if one is needed and begins signal monitoring. | |
| bool | SetupDTVSignalMonitor (void) |
| Tells DTVSignalMonitor what channel to look for. | |
| void | TeardownSignalMonitor (void) |
| If a SignalMonitor instance exists, the monitoring thread is stopped and the instance is deleted. | |
| DTVSignalMonitor * | GetDTVSignalMonitor (void) |
| bool | HasFlags (uint f) const |
| void | SetFlags (uint f) |
| void | ClearFlags (uint f) |
| void | HandleTuning (void) |
| Handles all tuning events. | |
| void | TuningShutdowns (const TuningRequest &) |
| This shuts down anything that needs to be shut down before handling the passed in tuning request. | |
| void | TuningFrequency (const TuningRequest &) |
| Performs initial tuning required for any tuning event. | |
| MPEGStreamData * | TuningSignalCheck (void) |
| This checks if we have a channel lock. | |
| void | TuningNewRecorder (MPEGStreamData *) |
| Creates a recorder instance. | |
| void | TuningRestartRecorder (void) |
| Restarts a stopped recorder or unpauses a paused recorder. | |
| QString | TuningGetChanNum (const TuningRequest &, QString &input) const |
| uint | TuningCheckForHWChange (const TuningRequest &, QString &channum, QString &inputname) |
| Returns cardid for device info row in capturecard if it changes. | |
| bool | TuningOnSameMultiplex (TuningRequest &request) |
| void | HandleStateChange (void) |
| Changes the internalState to the desiredNextState if possible. | |
| void | ChangeState (TVState nextState) |
| Puts a state change on the nextState queue. | |
| bool | StateIsRecording (TVState state) |
| Returns true if "state" is kState_RecordingOnly, or kState_WatchingLiveTV. | |
| bool | StateIsPlaying (TVState state) |
| Returns true if we are in any state associated with a player. | |
| TVState | RemovePlaying (TVState state) |
| Returns TVState that would remove the playing, but potentially keep recording if we are watching an in progress recording. | |
| TVState | RemoveRecording (TVState state) |
| If "state" is kState_RecordingOnly or kState_WatchingLiveTV, returns a kState_None, otherwise returns kState_Error. | |
| void | HandlePendingRecordings (void) |
| bool | WaitForNextLiveTVDir (void) |
| bool | GetProgramRingBufferForLiveTV (ProgramInfo **pginfo, RingBuffer **rb) |
| bool | CreateLiveTVRingBuffer (void) |
| bool | SwitchLiveTVRingBuffer (bool discont=false, bool set_rec=true) |
| void | StartedRecording (ProgramInfo *) |
| Inserts a "curRec" into the database, and issues a "RECORDING_LIST_CHANGE" event. | |
| void | FinishedRecording (ProgramInfo *) |
| If not a premature stop, adds program to history of recorded programs. | |
| QDateTime | GetRecordEndTime (const ProgramInfo *) const |
| Returns recording end time with proper post-roll. | |
| void | CheckForRecGroupChange (void) |
| Check if frontend changed the recording group. | |
| void | NotifySchedulerOfRecording (ProgramInfo *) |
| Tell scheduler about the recording. | |
Static Private Member Functions | |
| static bool | GetDevices (int cardid, GeneralDBOptions &general_opts, DVBDBOptions &dvb_opts, FireWireDBOptions &firewire_opts, DBox2DBOptions &dbox2_opts) |
| static QString | GetStartChannel (int cardid, const QString &defaultinput) |
| static QString | FlagToString (uint) |
Private Attributes | |
| RecorderBase * | recorder |
| ChannelBase * | channel |
| SignalMonitor * | signalMonitor |
| EITScanner * | scanner |
| pthread_t | event_thread |
| Event processing thread, runs RunTV(). | |
| pthread_t | recorder_thread |
| Recorder thread, runs RecorderBase::StartRecording(). | |
| bool | eitIgnoresSource |
| bool | transcodeFirst |
| bool | earlyCommFlag |
| bool | runJobOnHostOnly |
| int | eitCrawlIdleStart |
| int | eitTransportTimeout |
| int | audioSampleRateDB |
| int | overRecordSecNrml |
| int | overRecordSecCat |
| QString | overRecordCategory |
| InputGroupMap | igrp |
| int | cardid |
| bool | ispip |
| GeneralDBOptions | genOpt |
| DVBDBOptions | dvbOpt |
| FireWireDBOptions | fwOpt |
| DBox2DBOptions | dboxOpt |
| QMutex | stateChangeLock |
| TVState | internalState |
| TVState | desiredNextState |
| bool | changeState |
| bool | pauseNotify |
| uint | stateFlags |
| TuningQueue | tuningRequests |
| TuningRequest | lastTuningRequest |
| QDateTime | eitScanStartTime |
| QWaitCondition | triggerEventLoop |
| QWaitCondition | triggerEventSleep |
| bool | m_switchingBuffer |
| ProgramInfo * | curRecording |
| QDateTime | recordEndTime |
| int | autoRunJobs |
| int | overrecordseconds |
| PendingMap | pendingRecordings |
| ProgramInfo * | pseudoLiveTVRecording |
| QString | nextLiveTVDir |
| QMutex | nextLiveTVDirLock |
| QString | LiveTVStartChannel |
| LiveTVChain * | tvchain |
| RingBuffer * | ringBuffer |
| QString | rbFileExt |
Static Private Attributes | |
| static QMutex | cardsLock |
| static QMap< uint, TVRec * > | cards |
Friends | |
| class | TuningRequest |
| TVRec::TVRec | ( | int | capturecardnum | ) |
Performs instance initialiation not requiring access to database.
| capturecardnum | Capture card number |
Definition at line 105 of file tv_rec.cpp.
| TVRec::~TVRec | ( | void | ) |
Stops the event and scanning threads and deletes any ChannelBase, RingBuffer, and RecorderBase instances.
Definition at line 273 of file tv_rec.cpp.
| bool TVRec::Init | ( | void | ) |
Performs instance initialization, returns true on success.
Definition at line 238 of file tv_rec.cpp.
Referenced by setupTVs().
| void TVRec::RecordPending | ( | const ProgramInfo * | rcinfo, | |
| int | secsleft, | |||
| bool | hasLater | |||
| ) |
Tells TVRec "rcinfo" is the next pending recording.
When there is a pending recording and the frontend is in "Live TV" mode the TVRec event loop will send a "ASK_RECORDING" message to it. Depending on what that query returns, the recording will be started or not started.
| rcinfo | ProgramInfo on pending program. | |
| secsleft | Seconds left until pending recording begins. Set to -1 to revoke the current pending recording. | |
| hasLater | If true, a later non-conflicting showing is available. |
Definition at line 365 of file tv_rec.cpp.
Referenced by CancelNextRecording(), EncoderLink::RecordPending(), and RemoteRecordPending().
| RecStatusType TVRec::StartRecording | ( | const ProgramInfo * | rcinfo | ) |
Tells TVRec to Start recording the program "rcinfo" as soon as possible.
Definition at line 482 of file tv_rec.cpp.
Referenced by EncoderLink::StartRecording().
| void TVRec::StopRecording | ( | void | ) |
Changes from a recording state to kState_None.
Definition at line 714 of file tv_rec.cpp.
Referenced by RemoteStopRecording(), StartRecording(), and EncoderLink::StopRecording().
| void TVRec::FinishRecording | ( | void | ) | [inline] |
Tells TVRec to finish the current recording as soon as possible.
Definition at line 167 of file tv_rec.h.
Referenced by EncoderLink::FinishRecording().
| void TVRec::FrontendReady | ( | void | ) | [inline] |
Tells TVRec that the frontend's TV class is ready for messages.
Definition at line 169 of file tv_rec.h.
Referenced by EncoderLink::FrontendReady().
| void TVRec::CancelNextRecording | ( | bool | cancel | ) |
Tells TVRec to cancel the upcoming recording.
Definition at line 438 of file tv_rec.cpp.
Referenced by EncoderLink::CancelNextRecording(), and StartRecording().
| ProgramInfo * TVRec::GetRecording | ( | void | ) |
Allocates and returns a ProgramInfo for the current recording.
Note: The user of this function must free the ProgramInfo this returns.
Definition at line 333 of file tv_rec.cpp.
Referenced by EncoderLink::GetRecording(), and EncoderLink::MatchesRecording().
| bool TVRec::IsRunning | ( | void | ) | const [inline] |
| void TVRec::Stop | ( | void | ) | [inline] |
| TVState TVRec::GetState | ( | void | ) | const |
Returns the TVState of the recorder.
If there is a pending state change kState_ChangingState is returned.
Definition at line 319 of file tv_rec.cpp.
Referenced by EncoderLink::GetState(), HandlePendingRecordings(), IsBusy(), RemoteGetState(), RunTV(), SetSignalMonitoringRate(), StartRecording(), and StopRecording().
| bool TVRec::IsPlaying | ( | void | ) | [inline] |
| bool TVRec::IsRecording | ( | void | ) | [inline] |
Definition at line 2379 of file tv_rec.cpp.
Referenced by Channel::SetChannelByString(), and TuningNewRecorder().
| bool TVRec::IsBusy | ( | TunedInputInfo * | busy_input = NULL, |
|
| int | time_buffer = 5 | |||
| ) | const |
Returns true if the recorder is busy, or will be within the next time_buffer seconds.
Definition at line 2410 of file tv_rec.cpp.
Referenced by ChannelBase::GetFreeInputs(), EncoderLink::IsBusy(), ChannelBase::IsInputAvailable(), and RemoteIsBusy().
| bool TVRec::IsReallyRecording | ( | void | ) |
Returns true if frontend can consider the recorder started.
Definition at line 2399 of file tv_rec.cpp.
Referenced by EncoderLink::IsReallyRecording().
| float TVRec::GetFramerate | ( | void | ) |
Returns recordering frame rate from the recorder.
Definition at line 2471 of file tv_rec.cpp.
Referenced by EncoderLink::GetFramerate().
| long long TVRec::GetFramesWritten | ( | void | ) |
Returns number of frames written to disk by recorder.
Definition at line 2486 of file tv_rec.cpp.
Referenced by EncoderLink::GetFramesWritten(), and TeardownRecorder().
| long long TVRec::GetFilePosition | ( | void | ) |
Returns total number of bytes written by RingBuffer.
Definition at line 2501 of file tv_rec.cpp.
Referenced by EncoderLink::GetFilePosition().
| long long TVRec::GetMaxBitrate | ( | void | ) |
Returns the maximum bits per second this recorder can produce.
EncoderLink::GetMaxBitrate(void), RemoteEncoder::GetMaxBitrate(void)
Definition at line 2531 of file tv_rec.cpp.
Referenced by EncoderLink::GetMaxBitrate().
| long long TVRec::GetKeyframePosition | ( | long long | desired | ) |
Returns byte position in RingBuffer of a keyframe according to recorder.
Definition at line 2517 of file tv_rec.cpp.
Referenced by EncoderLink::GetKeyframePosition().
| void TVRec::SpawnLiveTV | ( | LiveTVChain * | newchain, | |
| bool | pip, | |||
| QString | startchan | |||
| ) |
Tells TVRec to spawn a "Live TV" recorder.
Definition at line 2551 of file tv_rec.cpp.
Referenced by EncoderLink::SpawnLiveTV().
| QString TVRec::GetChainID | ( | void | ) |
Get the chainid of the livetv instance.
Definition at line 2580 of file tv_rec.cpp.
Referenced by EncoderLink::GetChainID().
| void TVRec::StopLiveTV | ( | void | ) |
Tells TVRec to stop a "Live TV" recorder.
Definition at line 2760 of file tv_rec.cpp.
Referenced by RemoteStopLiveTV(), and EncoderLink::StopLiveTV().
| void TVRec::PauseRecorder | ( | void | ) |
Tells "recorder" to pause, used for channel and input changes.
When the RecorderBase instance has paused it calls RecorderPaused(void)
Definition at line 2801 of file tv_rec.cpp.
Referenced by EncoderLink::PauseRecorder().
| void TVRec::ToggleChannelFavorite | ( | void | ) |
Toggles whether the current channel should be on our favorites list.
Definition at line 2832 of file tv_rec.cpp.
Referenced by EncoderLink::ToggleChannelFavorite().
| void TVRec::SetLiveRecording | ( | int | recording | ) |
Tells the Scheduler about changes to the recording status of the LiveTV recording.
NOTE: Currently the 'recording' parameter is ignored and decisions are based on the recording group alone.
| recording | Set to 1 to mark as rsRecording, set to 0 to mark as rsCancelled, and set to -1 to base the decision of the recording group. |
Definition at line 2715 of file tv_rec.cpp.
Referenced by EncoderLink::SetLiveRecording().
Returns the recorder's available inputs.
This filters out the connected inputs that belong to an input group which is busy. Recorders in the excluded cardids will not be considered busy for the sake of determining free inputs.
Definition at line 2932 of file tv_rec.cpp.
Referenced by EncoderLink::GetFreeInputs().
| QString TVRec::GetInput | ( | void | ) | const |
Returns current input.
Definition at line 2944 of file tv_rec.cpp.
Referenced by EncoderLink::GetInput(), and SetInput().
| QString TVRec::SetInput | ( | QString | input, | |
| uint | requestType = kFlagDetect | |||
| ) |
Changes to the specified input.
You must call PauseRecorder(void) before calling this.
| input | Input to switch to, or "SwitchToNextInput". |
Definition at line 2959 of file tv_rec.cpp.
Referenced by EncoderLink::SetInput().
| void TVRec::ChangeChannel | ( | ChannelChangeDirection | dir | ) | [inline] |
Changes to a channel in the 'dir' channel change direction.
Definition at line 208 of file tv_rec.h.
Referenced by EncoderLink::ChangeChannel().
| void TVRec::SetChannel | ( | QString | name, | |
| uint | requestType = kFlagDetect | |||
| ) |
Changes to a named channel on the current tuner.
You must call PauseRecorder() before calling this.
| name | channum of channel to change to | |
| requestType | tells us what kind of request to actually send to the tuning thread, kFlagDetect is usually sufficient |
Definition at line 3017 of file tv_rec.cpp.
Referenced by EITScanner::RunEventLoop(), and EncoderLink::SetChannel().
| int TVRec::SetSignalMonitoringRate | ( | int | msec, | |
| int | notifyFrontend = 1 | |||
| ) |
Sets the signal monitoring rate.
| rate | The update rate to use in milliseconds, use 0 to disable signal monitoring. | |
| notifyFrontend | If 1, SIGNAL messages will be sent to the frontend using this recorder. |
Definition at line 2056 of file tv_rec.cpp.
Referenced by EncoderLink::SetSignalMonitoringRate().
| int TVRec::GetPictureAttribute | ( | PictureAttribute | attr | ) |
| int TVRec::ChangePictureAttribute | ( | PictureAdjustType | type, | |
| PictureAttribute | attr, | |||
| bool | direction | |||
| ) |
Returns current value [0,100] if it succeeds, -1 otherwise.
Changes brightness/contrast/colour/hue of a recording.
Note: In practice this only works with frame grabbing recorders.
Note: In practice this only works with frame grabbing recorders.
Definition at line 2911 of file tv_rec.cpp.
Referenced by EncoderLink::ChangePictureAttribute().
| bool TVRec::CheckChannel | ( | QString | name | ) | const |
Checks if named channel exists on current tuner.
| name | channel to verify against current tuner. |
Definition at line 2197 of file tv_rec.cpp.
Referenced by EncoderLink::CheckChannel().
| bool TVRec::ShouldSwitchToAnotherCard | ( | QString | chanid | ) |
Checks if named channel exists on current tuner, or another tuner.
| chanid | channel to verify against tuners. |
Definition at line 2108 of file tv_rec.cpp.
Referenced by EncoderLink::ShouldSwitchToAnotherCard().
| bool TVRec::CheckChannelPrefix | ( | const QString & | prefix, | |
| uint & | is_complete_valid_channel_on_rec, | |||
| bool & | is_extra_char_useful, | |||
| QString & | needed_spacer | |||
| ) |
Checks a prefix against the channels in the DB.
If the prefix matches a channel on any recorder this function returns true, otherwise it returns false.
If the prefix matches any channel entirely (i.e. prefix == channum), then the cardid of the recorder it matches is returned in 'is_complete_valid_channel_on_rec'; if it matches multiple recorders, and one of them is this recorder, this recorder is returned in 'is_complete_valid_channel_on_rec'; if it isn't complete for any channel on any recorder 'is_complete_valid_channel_on_rec' is set to zero.
If adding another character could reduce the number of channels the prefix matches 'is_extra_char_useful' is set to true, otherwise it is set to false.
Finally, if in order for the prefix to match a channel, a spacer needs to be added, the first matching spacer is returned in needed_spacer. If there is more than one spacer that might be employed and one of them is used for the current recorder, and others are used for other recorders, then the one for the current recorder is returned. The spacer must be inserted before the last character of the prefix for anything else returned from the function to be valid.
Definition at line 2244 of file tv_rec.cpp.
Referenced by EncoderLink::CheckChannelPrefix().
| void TVRec::GetNextProgram | ( | int | direction, | |
| QString & | title, | |||
| QString & | subtitle, | |||
| QString & | desc, | |||
| QString & | category, | |||
| QString & | starttime, | |||
| QString & | endtime, | |||
| QString & | callsign, | |||
| QString & | iconpath, | |||
| QString & | channelname, | |||
| QString & | chanid, | |||
| QString & | seriesid, | |||
| QString & | programid | |||
| ) |
Returns information about the program that would be seen if we changed the channel using ChangeChannel(int) with "direction".
Definition at line 3052 of file tv_rec.cpp.
Referenced by EncoderLink::GetNextProgram().
| int TVRec::GetCaptureCardNum | ( | void | ) | [inline] |
Returns the caputure card number.
Definition at line 234 of file tv_rec.h.
Referenced by ChannelBase::GetCardID(), RunTV(), HDHRRecorder::SetOptionsFromProfile(), EITScanner::StartActiveScan(), and TuningSignalCheck().
| bool TVRec::IsErrored | ( | void | ) | const [inline] |
| void TVRec::RingBufferChanged | ( | RingBuffer * | rb, | |
| ProgramInfo * | pginfo | |||
| ) |
| void TVRec::RecorderPaused | ( | void | ) |
This is a callback, called by the "recorder" instance when it has actually paused.
Definition at line 2820 of file tv_rec.cpp.
Referenced by NuppelVideoRecorder::doAudioThread(), NuppelVideoRecorder::DoMJPEG(), NuppelVideoRecorder::DoV4L2(), NuppelVideoRecorder::doWriteThread(), RecorderBase::PauseAndWait(), MpegRecorder::PauseAndWait(), FirewireRecorder::PauseAndWait(), DVBRecorder::PauseAndWait(), and NuppelVideoRecorder::StartRecording().
| void TVRec::SetNextLiveTVDir | ( | QString | dir | ) |
| uint TVRec::GetFlags | ( | void | ) | const [inline] |
Definition at line 243 of file tv_rec.h.
Referenced by EncoderLink::GetFlags(), and RemoteGetFlags().
Definition at line 4414 of file tv_rec.cpp.
Referenced by RemoteGetFlags(), RemoteGetState(), RemoteIsBusy(), RemoteRecordPending(), RemoteStopLiveTV(), RemoteStopRecording(), and setupTVs().
| void TVRec::SignalMonitorAllGood | ( | ) | [inline, slot] |
| void TVRec::deleteLater | ( | void | ) | [slot] |
| void TVRec::RunTV | ( | void | ) | [protected] |
Event handling method, contains event loop.
Definition at line 1303 of file tv_rec.cpp.
Referenced by EventThread().
Definition at line 1489 of file tv_rec.cpp.
Referenced by Init(), SetChannel(), SetInput(), SetSignalMonitoringRate(), SpawnLiveTV(), StartRecording(), StopLiveTV(), and StopRecording().
| void * TVRec::EventThread | ( | void * | param | ) | [static, protected] |
Thunk that allows event pthread to call RunTV().
Definition at line 1242 of file tv_rec.cpp.
Referenced by Init().
| void * TVRec::RecorderThread | ( | void * | param | ) | [static, protected] |
Thunk that allows recorder pthread to call RecorderBase::StartRecording().
Definition at line 1253 of file tv_rec.cpp.
Referenced by TuningNewRecorder().
| void TVRec::SetRingBuffer | ( | RingBuffer * | rb | ) | [private] |
Sets "ringBuffer", deleting any existing RingBuffer.
Definition at line 3256 of file tv_rec.cpp.
Referenced by CreateLiveTVRingBuffer(), RingBufferChanged(), SwitchLiveTVRingBuffer(), TeardownAll(), TuningNewRecorder(), and TuningShutdowns().
| void TVRec::SetPseudoLiveTVRecording | ( | ProgramInfo * | pi | ) | [private] |
Sets the pseudo LiveTV ProgramInfo.
Definition at line 415 of file tv_rec.cpp.
Referenced by CheckForRecGroupChange(), HandleStateChange(), RunTV(), and StartRecording().
| void TVRec::TeardownAll | ( | void | ) | [private] |
| bool TVRec::GetDevices | ( | int | cardid, | |
| GeneralDBOptions & | general_opts, | |||
| DVBDBOptions & | dvb_opts, | |||
| FireWireDBOptions & | firewire_opts, | |||
| DBox2DBOptions & | dbox2_opts | |||
| ) | [static, private] |
| QString TVRec::GetStartChannel | ( | int | cardid, | |
| const QString & | defaultinput | |||
| ) | [static, private] |
Definition at line 1679 of file tv_rec.cpp.
Referenced by Init(), TuningCheckForHWChange(), and TuningGetChanNum().
| bool TVRec::SetupRecorder | ( | RecordingProfile & | profile | ) | [private] |
Allocates and initializes the RecorderBase instance.
Based on the card type, one of the possible recorders are started. If the card type is "MPEG" a MpegRecorder is started, if the card type is "HDHOMERUN" a HDHRRecorder is started, if the card type is "FIREWIRE" a FirewireRecorder is started, if the card type is "DVB" a DVBRecorder is started, otherwise a NuppelVideoRecorder is started.
If there is any this will return false.
Definition at line 970 of file tv_rec.cpp.
Referenced by TuningNewRecorder().
| void TVRec::TeardownRecorder | ( | bool | killFile = false |
) | [private] |
Tears down the recorder.
If a "recorder" exists, RecorderBase::StopRecording() is called. We then wait for "recorder_thread" to exit, and finally we delete "recorder".
If a RingBuffer instance exists, RingBuffer::StopReads() is called, and then we delete the RingBuffer instance.
If killfile is true, the recording is deleted.
A "RECORDING_LIST_CHANGE" message is dispatched.
Finally, if there was a recording and it was not deleted, schedule any post-processing jobs.
| killFile | if true the recorded file is deleted. |
Definition at line 1073 of file tv_rec.cpp.
Referenced by TeardownAll(), TuningNewRecorder(), and TuningShutdowns().
| DTVRecorder * TVRec::GetDTVRecorder | ( | void | ) | [private] |
Definition at line 1158 of file tv_rec.cpp.
Referenced by SetupDTVSignalMonitor(), TuningFrequency(), TuningNewRecorder(), TuningOnSameMultiplex(), and TuningShutdowns().
| HDHRRecorder * TVRec::GetHDHRRecorder | ( | void | ) | [private] |
Definition at line 1149 of file tv_rec.cpp.
Referenced by HandleTuning(), and TuningRestartRecorder().
| DVBRecorder * TVRec::GetDVBRecorder | ( | void | ) | [private] |
Definition at line 1140 of file tv_rec.cpp.
| bool TVRec::CreateChannel | ( | const QString & | startChanNum | ) | [private] |
| void TVRec::InitChannel | ( | const QString & | inputname, | |
| const QString & | startchannel | |||
| ) | [private] |
Performs ChannelBase instance init from database and tuner hardware (requires that channel be open).
Definition at line 1167 of file tv_rec.cpp.
Referenced by CreateChannel().
| void TVRec::CloseChannel | ( | void | ) | [private] |
Definition at line 1178 of file tv_rec.cpp.
Referenced by CreateChannel(), TuningNewRecorder(), and TuningShutdowns().
| DBox2Channel * TVRec::GetDBox2Channel | ( | void | ) | [private] |
| DTVChannel * TVRec::GetDTVChannel | ( | void | ) | [private] |
Definition at line 1198 of file tv_rec.cpp.
Referenced by CreateChannel(), SetupDTVSignalMonitor(), TeardownRecorder(), TeardownSignalMonitor(), and TuningFrequency().
| HDHRChannel * TVRec::GetHDHRChannel | ( | void | ) | [private] |
| DVBChannel * TVRec::GetDVBChannel | ( | void | ) | [private] |
Definition at line 1212 of file tv_rec.cpp.
Referenced by CloseChannel(), CreateChannel(), RunTV(), SetupDTVSignalMonitor(), and SetupRecorder().
| FirewireChannel * TVRec::GetFirewireChannel | ( | void | ) | [private] |
| Channel * TVRec::GetV4LChannel | ( | void | ) | [private] |
Definition at line 1230 of file tv_rec.cpp.
Referenced by TeardownRecorder(), and TuningNewRecorder().
This creates a SignalMonitor instance if one is needed and begins signal monitoring.
If the channel exists and the cardtype is "DVB" or "HDHomeRun" a SignalMonitor instance is created and SignalMonitor::Start() is called to start the signal monitoring thread.
| tablemon | If set we enable table monitoring | |
| notify | If set we notify the frontend of the signal values |
Definition at line 1970 of file tv_rec.cpp.
Referenced by TuningFrequency().
| bool TVRec::SetupDTVSignalMonitor | ( | void | ) | [private] |
Tells DTVSignalMonitor what channel to look for.
If the major and minor channels are set we tell the signal monitor to look for those in the VCT.
Otherwise, we tell the signal monitor to look for the MPEG program number in the PAT.
This method also grabs the ATSCStreamData() from the recorder if possible, or creates one if needed.
Definition at line 1815 of file tv_rec.cpp.
Referenced by SetupSignalMonitor().
| void TVRec::TeardownSignalMonitor | ( | void | ) | [private] |
If a SignalMonitor instance exists, the monitoring thread is stopped and the instance is deleted.
Definition at line 2018 of file tv_rec.cpp.
Referenced by TeardownAll(), TuningShutdowns(), and TuningSignalCheck().
| DTVSignalMonitor * TVRec::GetDTVSignalMonitor | ( | void | ) | [private] |
Definition at line 2092 of file tv_rec.cpp.
Referenced by SetupDTVSignalMonitor(), SetupSignalMonitor(), TeardownSignalMonitor(), TuningFrequency(), TuningShutdowns(), and TuningSignalCheck().
Definition at line 291 of file tv_rec.h.
Referenced by HandleStateChange(), HandleTuning(), IsReallyRecording(), RunTV(), SetChannel(), SetInput(), SetRingBuffer(), SetSignalMonitoringRate(), TeardownAll(), TeardownRecorder(), TuningFrequency(), TuningNewRecorder(), TuningRestartRecorder(), TuningShutdowns(), and TuningSignalCheck().
| void TVRec::SetFlags | ( | uint | f | ) | [private] |
Definition at line 4124 of file tv_rec.cpp.
Referenced by CreateChannel(), HandleTuning(), RunTV(), SetLiveRecording(), SpawnLiveTV(), SwitchLiveTVRingBuffer(), TuningFrequency(), and TuningNewRecorder().
| void TVRec::ClearFlags | ( | uint | f | ) | [private] |
Definition at line 4133 of file tv_rec.cpp.
Referenced by CreateLiveTVRingBuffer(), HandleStateChange(), HandleTuning(), NotifySchedulerOfRecording(), RunTV(), SetChannel(), SetInput(), SetRingBuffer(), SetSignalMonitoringRate(), StartRecording(), StopRecording(), TeardownAll(), TeardownRecorder(), TuningFrequency(), TuningNewRecorder(), TuningRestartRecorder(), TuningShutdowns(), and TuningSignalCheck().
| QString TVRec::FlagToString | ( | uint | f | ) | [static, private] |
Definition at line 4142 of file tv_rec.cpp.
Referenced by ClearFlags(), SetFlags(), and TuningRequest::toString().
| void TVRec::HandleTuning | ( | void | ) | [private] |
Handles all tuning events.
This method pops tuning events off the tuningState queue and does what needs to be done, mostly by calling one of the Tuning... methods.
Definition at line 3384 of file tv_rec.cpp.
Referenced by RunTV().
| void TVRec::TuningShutdowns | ( | const TuningRequest & | request | ) | [private] |
This shuts down anything that needs to be shut down before handling the passed in tuning request.
Definition at line 3502 of file tv_rec.cpp.
Referenced by HandleTuning().
| void TVRec::TuningFrequency | ( | const TuningRequest & | request | ) | [private] |
Performs initial tuning required for any tuning event.
This figures out the channel name, and possibly the input name we need to pass to "channel" and then calls channel appropriately.
Then it adds any filters and sets any video capture attributes that need to be set.
The signal monitoring is started if possible. If it is started the kFlagWaitForSignal flag is set.
The kFlagNeedToStartRecorder flag is ald set if this isn't an EIT scan so that the recorder is started or restarted a appropriate.
Definition at line 3604 of file tv_rec.cpp.
Referenced by HandleTuning().
| MPEGStreamData * TVRec::TuningSignalCheck | ( | void | ) | [private] |
This checks if we have a channel lock.
If we have a channel lock this shuts down the signal monitoring.
Definition at line 3789 of file tv_rec.cpp.
Referenced by HandleTuning().
| void TVRec::TuningNewRecorder | ( | MPEGStreamData * | streamData | ) | [private] |
Creates a recorder instance.
Definition at line 3893 of file tv_rec.cpp.
Referenced by HandleTuning().
| void TVRec::TuningRestartRecorder | ( | void | ) | [private] |
Restarts a stopped recorder or unpauses a paused recorder.
Definition at line 4034 of file tv_rec.cpp.
Referenced by HandleTuning().
| QString TVRec::TuningGetChanNum | ( | const TuningRequest & | request, | |
| QString & | input | |||
| ) | const [private] |
| uint TVRec::TuningCheckForHWChange | ( | const TuningRequest & | request, | |
| QString & | channum, | |||
| QString & | inputname | |||
| ) | [private] |
Returns cardid for device info row in capturecard if it changes.
Definition at line 3462 of file tv_rec.cpp.
Referenced by TuningShutdowns().
| bool TVRec::TuningOnSameMultiplex | ( | TuningRequest & | request | ) | [private] |
| void TVRec::HandleStateChange | ( | void | ) | [private] |
Changes the internalState to the desiredNextState if possible.
Note: There must exist a state transition from any state we can enter to the kState_None state, as this is used to shutdown TV in RunTV.
Definition at line 871 of file tv_rec.cpp.
Referenced by RunTV().
| void TVRec::ChangeState | ( | TVState | nextState | ) | [private] |
Puts a state change on the nextState queue.
Definition at line 948 of file tv_rec.cpp.
Referenced by CreateLiveTVRingBuffer(), RunTV(), SpawnLiveTV(), StartRecording(), StopLiveTV(), StopRecording(), SwitchLiveTVRingBuffer(), TuningFrequency(), and TuningNewRecorder().
Returns true if "state" is kState_RecordingOnly, or kState_WatchingLiveTV.
| state | TVState to check. |
Definition at line 731 of file tv_rec.cpp.
Referenced by RemoveRecording(), and StopRecording().
Returns true if we are in any state associated with a player.
| state | TVState to check. |
Definition at line 741 of file tv_rec.cpp.
Referenced by RemovePlaying(), and RunTV().
Returns TVState that would remove the playing, but potentially keep recording if we are watching an in progress recording.
| state | TVState to check. |
Definition at line 767 of file tv_rec.cpp.
Referenced by RunTV().
If "state" is kState_RecordingOnly or kState_WatchingLiveTV, returns a kState_None, otherwise returns kState_Error.
| state | TVState to check. |
Definition at line 751 of file tv_rec.cpp.
Referenced by StopRecording().
| void TVRec::HandlePendingRecordings | ( | void | ) | [private] |
| bool TVRec::WaitForNextLiveTVDir | ( | void | ) | [private] |
| bool TVRec::GetProgramRingBufferForLiveTV | ( | ProgramInfo ** | pginfo, | |
| RingBuffer ** | rb | |||
| ) | [private] |
Definition at line 4247 of file tv_rec.cpp.
Referenced by CreateLiveTVRingBuffer(), and SwitchLiveTVRingBuffer().
| bool TVRec::CreateLiveTVRingBuffer | ( | void | ) | [private] |
Definition at line 4333 of file tv_rec.cpp.
Referenced by TuningFrequency(), and TuningNewRecorder().
Definition at line 4368 of file tv_rec.cpp.
Referenced by RunTV(), TuningFrequency(), TuningNewRecorder(), and TuningRestartRecorder().
| void TVRec::StartedRecording | ( | ProgramInfo * | curRec | ) | [private] |
Inserts a "curRec" into the database, and issues a "RECORDING_LIST_CHANGE" event.
| curRec | Recording to add to database. |
Definition at line 788 of file tv_rec.cpp.
Referenced by GetProgramRingBufferForLiveTV(), and StartRecording().
| void TVRec::FinishedRecording | ( | ProgramInfo * | curRec | ) | [private] |
If not a premature stop, adds program to history of recorded programs.
If the recording type is kFindOneRecord this find is removed.
| curRec | ProgramInfo or recording to mark as done |
Definition at line 811 of file tv_rec.cpp.
Referenced by RingBufferChanged(), SwitchLiveTVRingBuffer(), TeardownRecorder(), TuningNewRecorder(), TuningRestartRecorder(), and TuningShutdowns().
| QDateTime TVRec::GetRecordEndTime | ( | const ProgramInfo * | pi | ) | const [private] |
Returns recording end time with proper post-roll.
Definition at line 426 of file tv_rec.cpp.
Referenced by SetLiveRecording(), StartRecording(), and StopLiveTV().
| void TVRec::CheckForRecGroupChange | ( | void | ) | [private] |
Check if frontend changed the recording group.
This is needed because the frontend may toggle whether something should be kept as a recording in the frontend, but this class may not find out about it in time unless we check the DB when this information is important.
Definition at line 2595 of file tv_rec.cpp.
Referenced by HandlePendingRecordings(), SetLiveRecording(), and StopLiveTV().
| void TVRec::NotifySchedulerOfRecording | ( | ProgramInfo * | rec | ) | [private] |
Tell scheduler about the recording.
This is needed if the frontend has marked the LiveTV buffer for recording after we exit LiveTV. In this case the scheduler needs to know about the recording so it can properly take overrecord into account, and to properly reschedule other recordings around to avoid this recording.
Definition at line 2656 of file tv_rec.cpp.
Referenced by SetLiveRecording(), and StopLiveTV().
friend class TuningRequest [friend] |
Definition at line 154 of file tv_rec.h.
Referenced by HandleStateChange(), SetChannel(), SetInput(), SetSignalMonitoringRate(), and TuningFrequency().
RecorderBase* TVRec::recorder [private] |
Definition at line 330 of file tv_rec.h.
Referenced by GetDTVRecorder(), GetDVBRecorder(), GetFramerate(), GetFramesWritten(), GetHDHRRecorder(), GetKeyframePosition(), HandleTuning(), IsReallyRecording(), PauseRecorder(), RecorderThread(), RunTV(), SetupRecorder(), SetVideoFiltersForChannel(), SwitchLiveTVRingBuffer(), TeardownRecorder(), TuningFrequency(), TuningNewRecorder(), and TuningRestartRecorder().
ChannelBase* TVRec::channel [private] |
Definition at line 331 of file tv_rec.h.
Referenced by ChangePictureAttribute(), CheckChannel(), CloseChannel(), CreateChannel(), CreateLiveTVRingBuffer(), GetChannelInfo(), GetDBox2Channel(), GetDTVChannel(), GetDVBChannel(), GetFirewireChannel(), GetFreeInputs(), GetHDHRChannel(), GetInput(), GetNextProgram(), GetPictureAttribute(), GetProgramRingBufferForLiveTV(), GetV4LChannel(), HandleTuning(), InitChannel(), IsBusy(), NotifySchedulerOfRecording(), RunTV(), SetChannelInfo(), SetInput(), SetSignalMonitoringRate(), SetupRecorder(), SetupSignalMonitor(), SwitchLiveTVRingBuffer(), TeardownAll(), TeardownRecorder(), ToggleChannelFavorite(), TuningCheckForHWChange(), TuningFrequency(), TuningGetChanNum(), TuningNewRecorder(), TuningOnSameMultiplex(), TuningRestartRecorder(), TuningShutdowns(), and TuningSignalCheck().
SignalMonitor* TVRec::signalMonitor [private] |
Definition at line 332 of file tv_rec.h.
Referenced by GetDTVSignalMonitor(), SetupSignalMonitor(), TeardownSignalMonitor(), TuningFrequency(), TuningOnSameMultiplex(), and TuningSignalCheck().
EITScanner* TVRec::scanner [private] |
Definition at line 333 of file tv_rec.h.
Referenced by HandleStateChange(), RunTV(), TeardownAll(), TuningShutdowns(), and TuningSignalCheck().
pthread_t TVRec::event_thread [private] |
pthread_t TVRec::recorder_thread [private] |
Recorder thread, runs RecorderBase::StartRecording().
Definition at line 339 of file tv_rec.h.
Referenced by TeardownRecorder(), and TuningNewRecorder().
bool TVRec::eitIgnoresSource [private] |
bool TVRec::transcodeFirst [private] |
Definition at line 343 of file tv_rec.h.
Referenced by Init(), TuningNewRecorder(), and TuningRestartRecorder().
bool TVRec::earlyCommFlag [private] |
Definition at line 344 of file tv_rec.h.
Referenced by Init(), TuningNewRecorder(), and TuningRestartRecorder().
bool TVRec::runJobOnHostOnly [private] |
Definition at line 345 of file tv_rec.h.
Referenced by Init(), TuningNewRecorder(), and TuningRestartRecorder().
int TVRec::eitCrawlIdleStart [private] |
int TVRec::eitTransportTimeout [private] |
int TVRec::audioSampleRateDB [private] |
int TVRec::overRecordSecNrml [private] |
int TVRec::overRecordSecCat [private] |
QString TVRec::overRecordCategory [private] |
InputGroupMap TVRec::igrp [private] |
int TVRec::cardid [private] |
Definition at line 355 of file tv_rec.h.
Referenced by CancelNextRecording(), CheckChannelPrefix(), CreateChannel(), GetProgramRingBufferForLiveTV(), GetRecording(), HandlePendingRecordings(), Init(), IsBusy(), NotifySchedulerOfRecording(), RecordPending(), RunTV(), SetupSignalMonitor(), ShouldSwitchToAnotherCard(), StartRecording(), TeardownRecorder(), TuningFrequency(), TuningGetChanNum(), TuningNewRecorder(), TuningSignalCheck(), TVRec(), and ~TVRec().
bool TVRec::ispip [private] |
GeneralDBOptions TVRec::genOpt [private] |
Definition at line 359 of file tv_rec.h.
Referenced by CreateChannel(), GetMaxBitrate(), Init(), RunTV(), SetSignalMonitoringRate(), SetupDTVSignalMonitor(), SetupRecorder(), SetupSignalMonitor(), SpawnLiveTV(), TuningFrequency(), TuningGetChanNum(), TuningNewRecorder(), TuningRestartRecorder(), and TuningShutdowns().
DVBDBOptions TVRec::dvbOpt [private] |
Definition at line 360 of file tv_rec.h.
Referenced by CloseChannel(), CreateChannel(), Init(), RunTV(), SetupRecorder(), and TuningShutdowns().
FireWireDBOptions TVRec::fwOpt [private] |
Definition at line 361 of file tv_rec.h.
Referenced by CreateChannel(), Init(), and TuningShutdowns().
DBox2DBOptions TVRec::dboxOpt [private] |
Definition at line 362 of file tv_rec.h.
Referenced by CreateChannel(), Init(), SetupRecorder(), and TuningShutdowns().
QMutex TVRec::stateChangeLock [mutable, private] |
Definition at line 365 of file tv_rec.h.
Referenced by ChangePictureAttribute(), ChangeState(), CheckForRecGroupChange(), ClearFlags(), GetFilePosition(), GetFramerate(), GetFramesWritten(), GetKeyframePosition(), GetPictureAttribute(), GetRecording(), Init(), IsBusy(), PauseRecorder(), RecorderPaused(), RecordPending(), RunTV(), SetChannel(), SetFlags(), SetInput(), SetLiveRecording(), SetRingBuffer(), SetSignalMonitoringRate(), SpawnLiveTV(), StartRecording(), StopLiveTV(), StopRecording(), ToggleChannelFavorite(), TuningNewRecorder(), TuningShutdowns(), and WaitForEventThreadSleep().
TVState TVRec::internalState [private] |
Definition at line 366 of file tv_rec.h.
Referenced by CheckForRecGroupChange(), GetState(), HandleStateChange(), RunTV(), StartRecording(), StopLiveTV(), and TuningFrequency().
TVState TVRec::desiredNextState [private] |
bool TVRec::changeState [private] |
Definition at line 368 of file tv_rec.h.
Referenced by ChangeState(), GetRecording(), GetState(), HandleStateChange(), RunTV(), and WaitForEventThreadSleep().
bool TVRec::pauseNotify [private] |
Definition at line 369 of file tv_rec.h.
Referenced by RecorderPaused(), TeardownRecorder(), and TuningRestartRecorder().
uint TVRec::stateFlags [private] |
TuningQueue TVRec::tuningRequests [private] |
Definition at line 371 of file tv_rec.h.
Referenced by HandleStateChange(), HandleTuning(), RunTV(), SetChannel(), SetInput(), SetSignalMonitoringRate(), TuningFrequency(), and WaitForEventThreadSleep().
TuningRequest TVRec::lastTuningRequest [private] |
Definition at line 372 of file tv_rec.h.
Referenced by HandleTuning(), SetChannel(), SetInput(), SetupDTVSignalMonitor(), TuningNewRecorder(), and TuningShutdowns().
QDateTime TVRec::eitScanStartTime [private] |
QWaitCondition TVRec::triggerEventLoop [private] |
Definition at line 374 of file tv_rec.h.
Referenced by ChangeState(), ClearFlags(), RecorderPaused(), RunTV(), SetFlags(), and WaitForEventThreadSleep().
QWaitCondition TVRec::triggerEventSleep [private] |
bool TVRec::m_switchingBuffer [private] |
ProgramInfo* TVRec::curRecording [private] |
Definition at line 379 of file tv_rec.h.
Referenced by CheckForRecGroupChange(), CreateLiveTVRingBuffer(), GetRecording(), HandleStateChange(), RingBufferChanged(), RunTV(), SetLiveRecording(), StartRecording(), StopLiveTV(), SwitchLiveTVRingBuffer(), TeardownRecorder(), TuningFrequency(), TuningNewRecorder(), TuningRestartRecorder(), and TuningShutdowns().
QDateTime TVRec::recordEndTime [private] |
Definition at line 380 of file tv_rec.h.
Referenced by RunTV(), SetLiveRecording(), StartRecording(), and StopLiveTV().
int TVRec::autoRunJobs [private] |
Definition at line 381 of file tv_rec.h.
Referenced by RunTV(), TeardownRecorder(), TuningNewRecorder(), and TuningRestartRecorder().
int TVRec::overrecordseconds [private] |
PendingMap TVRec::pendingRecordings [private] |
Definition at line 385 of file tv_rec.h.
Referenced by CancelNextRecording(), HandlePendingRecordings(), IsBusy(), RecordPending(), RunTV(), and StartRecording().
ProgramInfo* TVRec::pseudoLiveTVRecording [private] |
Definition at line 388 of file tv_rec.h.
Referenced by CheckForRecGroupChange(), GetProgramRingBufferForLiveTV(), HandlePendingRecordings(), RunTV(), SetLiveRecording(), SetPseudoLiveTVRecording(), StopLiveTV(), TuningFrequency(), and TuningRestartRecorder().
QString TVRec::nextLiveTVDir [private] |
Definition at line 389 of file tv_rec.h.
Referenced by GetProgramRingBufferForLiveTV(), SetNextLiveTVDir(), and WaitForNextLiveTVDir().
QMutex TVRec::nextLiveTVDirLock [private] |
Definition at line 390 of file tv_rec.h.
Referenced by GetProgramRingBufferForLiveTV(), SetNextLiveTVDir(), and WaitForNextLiveTVDir().
QString TVRec::LiveTVStartChannel [private] |
LiveTVChain* TVRec::tvchain [private] |
Definition at line 394 of file tv_rec.h.
Referenced by CreateLiveTVRingBuffer(), FinishedRecording(), GetChainID(), GetProgramRingBufferForLiveTV(), SetupDTVSignalMonitor(), SpawnLiveTV(), StartRecording(), StopLiveTV(), SwitchLiveTVRingBuffer(), TeardownRecorder(), TuningFrequency(), TuningNewRecorder(), and TuningRestartRecorder().
RingBuffer* TVRec::ringBuffer [private] |
Definition at line 397 of file tv_rec.h.
Referenced by GetFilePosition(), SetRingBuffer(), SetupRecorder(), TeardownRecorder(), TuningFrequency(), TuningNewRecorder(), TuningRestartRecorder(), and TuningShutdowns().
QString TVRec::rbFileExt [private] |
QMutex TVRec::cardsLock [static, private] |
QMap< uint, TVRec * > TVRec::cards [static, private] |
const uint TVRec::kSignalMonitoringRate = 50 [static] |
How many milliseconds the signal monitor should wait between checks.
Definition at line 404 of file tv_rec.h.
Referenced by SetupSignalMonitor().
const uint TVRec::kFlagFrontendReady = 0x00000001 [static] |
const uint TVRec::kFlagRunMainLoop = 0x00000002 [static] |
const uint TVRec::kFlagExitPlayer = 0x00000004 [static] |
const uint TVRec::kFlagFinishRecording = 0x00000008 [static] |
const uint TVRec::kFlagErrored = 0x00000010 [static] |
const uint TVRec::kFlagCancelNextRecording = 0x00000020 [static] |
Definition at line 412 of file tv_rec.h.
Referenced by FlagToString(), NotifySchedulerOfRecording(), RunTV(), SetLiveRecording(), SpawnLiveTV(), StartRecording(), and StopRecording().
const uint TVRec::kFlagLiveTV = 0x00000100 [static] |
final result desired is LiveTV recording
Definition at line 416 of file tv_rec.h.
Referenced by FlagToString(), HandleStateChange(), HandleTuning(), SetSignalMonitoringRate(), TuningFrequency(), TuningGetChanNum(), and TuningNewRecorder().
const uint TVRec::kFlagRecording = 0x00000200 [static] |
final result desired is a timed recording
Definition at line 418 of file tv_rec.h.
Referenced by FlagToString(), HandleStateChange(), HandleTuning(), and TuningNewRecorder().
const uint TVRec::kFlagAntennaAdjust = 0x00000400 [static] |
antenna adjusting mode (LiveTV without recording).
Definition at line 420 of file tv_rec.h.
Referenced by FlagToString(), HandleTuning(), SetSignalMonitoringRate(), TuningFrequency(), and TuningOnSameMultiplex().
const uint TVRec::kFlagRec = 0x00000F00 [static] |
Definition at line 421 of file tv_rec.h.
Referenced by FlagToString(), SetChannel(), SetInput(), and TuningFrequency().
const uint TVRec::kFlagEITScan = 0x00001000 [static] |
final result desired is an EIT Scan
Definition at line 425 of file tv_rec.h.
Referenced by FlagToString(), HandleTuning(), EITScanner::RunEventLoop(), TuningFrequency(), and TuningShutdowns().
const uint TVRec::kFlagCloseRec = 0x00002000 [static] |
close recorder, keep recording
Definition at line 427 of file tv_rec.h.
Referenced by FlagToString(), HandleStateChange(), and TuningShutdowns().
const uint TVRec::kFlagKillRec = 0x00004000 [static] |
close recorder, discard recording
Definition at line 429 of file tv_rec.h.
Referenced by FlagToString(), HandleStateChange(), TuningFrequency(), and TuningShutdowns().
const uint TVRec::kFlagNoRec = 0x0000F000 [static] |
Definition at line 431 of file tv_rec.h.
Referenced by FlagToString(), SetChannel(), SetInput(), and TuningShutdowns().
const uint TVRec::kFlagKillRingBuffer = 0x00010000 [static] |
Definition at line 432 of file tv_rec.h.
Referenced by FlagToString(), HandleStateChange(), and TuningShutdowns().
const uint TVRec::kFlagWaitingForRecPause = 0x00100000 [static] |
const uint TVRec::kFlagWaitingForSignal = 0x00200000 [static] |
Definition at line 436 of file tv_rec.h.
Referenced by FlagToString(), HandleTuning(), TuningFrequency(), TuningShutdowns(), and TuningSignalCheck().
const uint TVRec::kFlagNeedToStartRecorder = 0x00800000 [static] |
Definition at line 437 of file tv_rec.h.
Referenced by FlagToString(), HandleTuning(), TuningFrequency(), TuningNewRecorder(), and TuningRestartRecorder().
const uint TVRec::kFlagPendingActions = 0x00F00000 [static] |
Definition at line 438 of file tv_rec.h.
Referenced by CreateLiveTVRingBuffer(), FlagToString(), TuningNewRecorder(), and TuningShutdowns().
const uint TVRec::kFlagSignalMonitorRunning = 0x01000000 [static] |
Definition at line 441 of file tv_rec.h.
Referenced by FlagToString(), TuningFrequency(), TuningShutdowns(), and TuningSignalCheck().
const uint TVRec::kFlagEITScannerRunning = 0x04000000 [static] |
Definition at line 442 of file tv_rec.h.
Referenced by FlagToString(), HandleStateChange(), RunTV(), TuningFrequency(), TuningShutdowns(), and TuningSignalCheck().
const uint TVRec::kFlagDummyRecorderRunning = 0x10000000 [static] |
Definition at line 444 of file tv_rec.h.
Referenced by FlagToString(), IsReallyRecording(), SetRingBuffer(), TuningFrequency(), TuningNewRecorder(), TuningRestartRecorder(), and TuningShutdowns().
const uint TVRec::kFlagRecorderRunning = 0x20000000 [static] |
Definition at line 445 of file tv_rec.h.
Referenced by FlagToString(), TeardownRecorder(), TuningNewRecorder(), and TuningShutdowns().
const uint TVRec::kFlagAnyRecRunning = 0x30000000 [static] |
const uint TVRec::kFlagAnyRunning = 0x3F000000 [static] |
const uint TVRec::kFlagRingBufferReady = 0x40000000 [static] |
Definition at line 450 of file tv_rec.h.
Referenced by FlagToString(), SetChannel(), SetInput(), SetSignalMonitoringRate(), SwitchLiveTVRingBuffer(), TuningFrequency(), and TuningNewRecorder().
const uint TVRec::kFlagDetect = 0x80000000 [static] |
1.5.5