|
MythTV
0.27pre
|
#include <jobqueue.h>

Classes | |
| struct | jobthreadstruct |
Public Member Functions | |
| JobQueue (bool master) | |
| ~JobQueue (void) | |
| void | customEvent (QEvent *e) |
| int | GetRunningJobID (uint chanid, const QDateTime &recstartts) |
Static Public Member Functions | |
| static bool | QueueRecordingJobs (const RecordingInfo &, int jobTypes=JOB_NONE) |
| static bool | QueueJob (int jobType, uint chanid, const QDateTime &recstartts, QString args="", QString comment="", QString host="", int flags=0, int status=JOB_QUEUED, QDateTime schedruntime=QDateTime()) |
| static bool | QueueJobs (int jobTypes, uint chanid, const QDateTime &recstartts, QString args="", QString comment="", QString host="") |
| static int | GetJobID (int jobType, uint chanid, const QDateTime &recstartts) |
| static bool | GetJobInfoFromID (int jobID, int &jobType, uint &chanid, QDateTime &recstartts) |
| static bool | GetJobInfoFromID (int jobID, int &jobType, uint &chanid, QString &recstartts) |
| static bool | ChangeJobCmds (int jobID, int newCmds) |
| static bool | ChangeJobCmds (int jobType, uint chanid, const QDateTime &recstartts, int newCmds) |
| static bool | ChangeJobFlags (int jobID, int newFlags) |
| static bool | ChangeJobStatus (int jobID, int newStatus, QString comment="") |
| static bool | ChangeJobHost (int jobID, QString newHostname) |
| static bool | ChangeJobComment (int jobID, QString comment="") |
| static bool | ChangeJobArgs (int jobID, QString args="") |
| static bool | IsJobQueuedOrRunning (int jobType, uint chanid, const QDateTime &recstartts) |
| static bool | IsJobRunning (int jobType, uint chanid, const QDateTime &recstartts) |
| static bool | IsJobRunning (int jobType, const ProgramInfo &pginfo) |
| static bool | IsJobQueued (int jobType, uint chanid, const QDateTime &recstartts) |
| static bool | PauseJob (int jobID) |
| static bool | ResumeJob (int jobID) |
| static bool | RestartJob (int jobID) |
| static bool | StopJob (int jobID) |
| static bool | DeleteJob (int jobID) |
| static enum JobCmds | GetJobCmd (int jobID) |
| static enum JobFlags | GetJobFlags (int jobID) |
| static enum JobStatus | GetJobStatus (int jobID) |
| static enum JobStatus | GetJobStatus (int jobType, uint chanid, const QDateTime &recstartts) |
| static QString | GetJobArgs (int jobID) |
| static int | UserJobTypeToIndex (int JobType) |
| static bool | DeleteAllJobs (uint chanid, const QDateTime &recstartts) |
| static void | ClearJobMask (int &mask) |
| static bool | JobIsInMask (int job, int mask) |
| static bool | JobIsNotInMask (int job, int mask) |
| static void | AddJobsToMask (int jobs, int &mask) |
| static void | RemoveJobsFromMask (int jobs, int &mask) |
| static QString | JobText (int jobType) |
| static QString | StatusText (int status) |
| static bool | HasRunningOrPendingJobs (int startingWithinMins=0) |
| static int | GetJobsInQueue (QMap< int, JobQueueEntry > &jobs, int findJobs=JOB_LIST_NOT_DONE) |
| static void | RecoverQueue (bool justOld=false) |
| static void | RecoverOldJobsInQueue () |
| static void | CleanupOldJobsInQueue () |
Private Types | |
| typedef struct JobQueue::jobthreadstruct | JobThreadStruct |
Private Member Functions | |
| void | run (void) |
| void | ProcessQueue (void) |
| void | ProcessJob (JobQueueEntry job) |
| bool | AllowedToRun (JobQueueEntry job) |
| void | StartChildJob (void *(*start_routine)(void *), int jobID) |
| QString | GetJobDescription (int jobType) |
| QString | GetJobCommand (int id, int jobType, ProgramInfo *tmpInfo) |
| void | RemoveRunningJob (int id) |
| void | DoTranscodeThread (int jobID) |
| void | DoMetadataLookupThread (int jobID) |
| void | DoFlagCommercialsThread (int jobID) |
| void | DoUserJobThread (int jobID) |
Static Private Member Functions | |
| static bool | InJobRunWindow (int orStartingWithinMins=0) |
| static QString | PrettyPrint (off_t bytes) |
| static void * | TranscodeThread (void *param) |
| static void * | MetadataLookupThread (void *param) |
| static void * | FlagCommercialsThread (void *param) |
| static void * | UserJobThread (void *param) |
Private Attributes | |
| QString | m_hostname |
| int | jobsRunning |
| int | jobQueueCPU |
| ProgramInfo * | m_pginfo |
| QMutex | controlFlagsLock |
| QMap< QString, int * > | jobControlFlags |
| QMutex * | runningJobsLock |
| QMap< int, RunningJobInfo > | runningJobs |
| bool | isMaster |
| MThread * | queueThread |
| QWaitCondition | queueThreadCond |
| QMutex | queueThreadCondLock |
| bool | processQueue |
Friends | |
| class | QueueProcessorThread |
Definition at line 116 of file jobqueue.h.
|
private |
| JobQueue::JobQueue | ( | bool | master | ) |
Definition at line 46 of file jobqueue.cpp.
| JobQueue::~JobQueue | ( | void | ) |
Definition at line 71 of file jobqueue.cpp.
| void JobQueue::customEvent | ( | QEvent * | e | ) |
Definition at line 87 of file jobqueue.cpp.
|
static |
Definition at line 503 of file jobqueue.cpp.
Referenced by TVRec::FinishedRecording().
|
static |
Definition at line 528 of file jobqueue.cpp.
Referenced by TV::DoQueueTranscode(), init_jobs(), QueueJob(), QueueJobs(), and QueueTranscodeJob().
|
static |
Definition at line 615 of file jobqueue.cpp.
Referenced by QueueRecordingJobs().
Definition at line 661 of file jobqueue.cpp.
Referenced by customEvent().
|
static |
Definition at line 686 of file jobqueue.cpp.
Referenced by GetJobInfoFromID(), and main().
|
static |
Definition at line 715 of file jobqueue.cpp.
Definition at line 906 of file jobqueue.cpp.
Referenced by PlaybackBox::doJobQueueJob(), TV::DoQueueTranscode(), PauseJob(), ProcessQueue(), RecoverQueue(), RestartJob(), ResumeJob(), StopJob(), and PlaybackBox::stopPlaylistJobQueueJob().
|
static |
Definition at line 927 of file jobqueue.cpp.
Definition at line 949 of file jobqueue.cpp.
Definition at line 970 of file jobqueue.cpp.
Referenced by commDetectorBreathe(), commDetectorStatusUpdate(), CompleteJob(), StatusBox::customEvent(), DoFlagCommercialsThread(), DoMetadataLookupThread(), DoTranscodeThread(), DoUserJobThread(), main(), ProcessJob(), ProcessQueue(), and RecoverQueue().
Definition at line 1386 of file jobqueue.cpp.
Referenced by ProcessQueue(), and RecoverQueue().
Definition at line 997 of file jobqueue.cpp.
Referenced by BuildKeyframeIndex(), commDetectorStatusUpdate(), DoTranscodeThread(), Transcode::TranscodeFile(), and UpdateJobQueue().
Definition at line 1022 of file jobqueue.cpp.
Referenced by main().
|
static |
Definition at line 1083 of file jobqueue.cpp.
Referenced by PlaybackBox::createJobMenu(), PlaybackBox::createPlaylistJobMenu(), PlaybackBox::doJobQueueJob(), PlaybackBox::doPlaylistJobQueueJob(), TV::DoQueueTranscode(), extract_job_state(), TV::PlaybackMenuInit(), and PlaybackBox::stopPlaylistJobQueueJob().
Definition at line 1044 of file jobqueue.cpp.
Referenced by ProcessQueue().
Definition at line 1065 of file jobqueue.cpp.
Referenced by extract_commflag_state(), FlagCommercials(), IsJobRunning(), and Transcode::TranscodeFile().
|
static |
Definition at line 1077 of file jobqueue.cpp.
Definition at line 1094 of file jobqueue.cpp.
Referenced by extract_commflag_state().
Definition at line 729 of file jobqueue.cpp.
Referenced by StatusBox::customEvent().
Definition at line 738 of file jobqueue.cpp.
Referenced by StatusBox::customEvent().
Definition at line 747 of file jobqueue.cpp.
Definition at line 756 of file jobqueue.cpp.
Referenced by StatusBox::customEvent().
Definition at line 886 of file jobqueue.cpp.
Referenced by StatusBox::customEvent(), and QueueJob().
Definition at line 1454 of file jobqueue.cpp.
Referenced by BuildKeyframeIndex(), CheckJobQueue(), commDetectorBreathe(), and Transcode::TranscodeFile().
Definition at line 1496 of file jobqueue.cpp.
Referenced by DoTranscodeThread(), and main().
Definition at line 1517 of file jobqueue.cpp.
Referenced by StatusBox::clicked(), CompleteJob(), StatusBox::customEvent(), DoFlagCommercialsThread(), DoMetadataLookupThread(), DoTranscodeThread(), IsJobQueued(), IsJobQueuedOrRunning(), and IsJobRunning().
|
static |
Definition at line 1537 of file jobqueue.cpp.
|
static |
Definition at line 1475 of file jobqueue.cpp.
Referenced by CompleteJob().
Definition at line 2472 of file jobqueue.cpp.
Referenced by AllowedToRun(), GetJobCommand(), GetJobDescription(), GetJobsInQueue(), and JobText().
Definition at line 765 of file jobqueue.cpp.
Referenced by MainServer::DoDeleteThread().
Definition at line 180 of file jobqueue.h.
Definition at line 181 of file jobqueue.h.
Referenced by init_jobs().
Definition at line 182 of file jobqueue.h.
Referenced by init_jobs().
Definition at line 184 of file jobqueue.h.
Referenced by init_jobs().
Definition at line 185 of file jobqueue.h.
Referenced by TVRec::FinishedRecording(), and init_jobs().
|
static |
Definition at line 1105 of file jobqueue.cpp.
Referenced by DeleteAllJobs(), StatusBox::doJobQueueStatus(), GetJobsInQueue(), HttpStatus::PrintJobQueue(), ProcessQueue(), and RecoverQueue().
|
static |
Definition at line 1124 of file jobqueue.cpp.
Referenced by ChangeJobStatus(), DeleteAllJobs(), DoFlagCommercialsThread(), StatusBox::doJobQueueStatus(), DoMetadataLookupThread(), DoTranscodeThread(), GetJobsInQueue(), HttpStatus::PrintJobQueue(), ProcessQueue(), and RecoverQueue().
Definition at line 1214 of file jobqueue.cpp.
Referenced by getStatus().
|
static |
Definition at line 1267 of file jobqueue.cpp.
Referenced by StatusBox::doJobQueueStatus(), HttpStatus::FillStatusXML(), HasRunningOrPendingJobs(), ProcessQueue(), and RecoverQueue().
Definition at line 1561 of file jobqueue.cpp.
Referenced by run().
|
inlinestatic |
Definition at line 196 of file jobqueue.h.
Referenced by HouseKeeper::RunHouseKeeping().
|
static |
Definition at line 1626 of file jobqueue.cpp.
Referenced by HouseKeeper::RunHouseKeeping().
Definition at line 151 of file jobqueue.cpp.
Definition at line 166 of file jobqueue.cpp.
Referenced by run().
|
private |
Definition at line 1651 of file jobqueue.cpp.
Referenced by ProcessQueue().
|
private |
Definition at line 1421 of file jobqueue.cpp.
Referenced by ProcessQueue().
Definition at line 1135 of file jobqueue.cpp.
Referenced by HasRunningOrPendingJobs(), and ProcessQueue().
Definition at line 1740 of file jobqueue.cpp.
Referenced by ProcessJob().
|
private |
Definition at line 1754 of file jobqueue.cpp.
Referenced by ProcessJob().
|
private |
Definition at line 1769 of file jobqueue.cpp.
Referenced by ProcessJob().
Definition at line 1819 of file jobqueue.cpp.
Referenced by DoFlagCommercialsThread(), DoMetadataLookupThread(), DoTranscodeThread(), DoUserJobThread(), and ProcessJob().
|
staticprivate |
Definition at line 1838 of file jobqueue.cpp.
Referenced by DoTranscodeThread().
Definition at line 1871 of file jobqueue.cpp.
Referenced by ProcessJob().
Definition at line 1885 of file jobqueue.cpp.
Referenced by TranscodeThread().
Definition at line 2101 of file jobqueue.cpp.
Referenced by ProcessJob().
Definition at line 2115 of file jobqueue.cpp.
Referenced by MetadataLookupThread().
Definition at line 2226 of file jobqueue.cpp.
Referenced by ProcessJob().
Definition at line 2240 of file jobqueue.cpp.
Referenced by FlagCommercialsThread().
Definition at line 2373 of file jobqueue.cpp.
Referenced by ProcessJob().
Definition at line 2387 of file jobqueue.cpp.
Referenced by UserJobThread().
|
friend |
Definition at line 120 of file jobqueue.h.
|
private |
Definition at line 236 of file jobqueue.h.
Referenced by AllowedToRun(), and ProcessQueue().
|
private |
Definition at line 238 of file jobqueue.h.
Referenced by ProcessQueue().
|
private |
Definition at line 239 of file jobqueue.h.
Referenced by DoTranscodeThread(), DoUserJobThread(), and JobQueue().
|
private |
Definition at line 241 of file jobqueue.h.
|
private |
Definition at line 243 of file jobqueue.h.
|
private |
Definition at line 244 of file jobqueue.h.
|
private |
Definition at line 246 of file jobqueue.h.
Referenced by customEvent(), DoFlagCommercialsThread(), DoMetadataLookupThread(), DoTranscodeThread(), DoUserJobThread(), GetRunningJobID(), ProcessJob(), ProcessQueue(), RemoveRunningJob(), and ~JobQueue().
|
private |
Definition at line 247 of file jobqueue.h.
Referenced by customEvent(), DoFlagCommercialsThread(), DoMetadataLookupThread(), DoTranscodeThread(), DoUserJobThread(), GetRunningJobID(), ProcessJob(), ProcessQueue(), and RemoveRunningJob().
|
private |
Definition at line 249 of file jobqueue.h.
|
private |
Definition at line 251 of file jobqueue.h.
Referenced by JobQueue(), and ~JobQueue().
|
private |
Definition at line 252 of file jobqueue.h.
Referenced by ProcessQueue(), run(), and ~JobQueue().
|
private |
Definition at line 253 of file jobqueue.h.
Referenced by JobQueue(), ProcessQueue(), run(), and ~JobQueue().
|
private |
Definition at line 254 of file jobqueue.h.
Referenced by JobQueue(), ProcessQueue(), and ~JobQueue().
1.8.1.2