MythTV
master
|
#include <unistd.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <iostream>
#include <string>
#include <QCoreApplication>
#include <QDir>
#include <QEvent>
#include <QString>
#include <QtGlobal>
#include "libmyth/mythcontext.h"
#include "libmythbase/cleanupguard.h"
#include "libmythbase/exitcodes.h"
#include "libmythbase/mythdate.h"
#include "libmythbase/mythdb.h"
#include "libmythbase/mythmiscutil.h"
#include "libmythbase/mythtranslation.h"
#include "libmythbase/mythversion.h"
#include "libmythbase/programinfo.h"
#include "libmythbase/remotefile.h"
#include "libmythbase/remoteutil.h"
#include "libmythbase/signalhandling.h"
#include "libmythtv/io/mythmediabuffer.h"
#include "libmythtv/jobqueue.h"
#include "libmythtv/mythcommflagplayer.h"
#include "libmythtv/remoteencoder.h"
#include "libmythtv/tvremoteutil.h"
#include "mythcommflag_commandlineparser.h"
#include "CommDetectorBase.h"
#include "CommDetectorFactory.h"
#include "CustomEventRelayer.h"
#include "SlotRelayer.h"
Go to the source code of this file.
Namespaces | |
anonymous_namespace{mythcommflag.cpp} | |
Macros | |
#define | LOC QString("MythCommFlag: ") |
#define | LOC_WARN QString("MythCommFlag, Warning: ") |
#define | LOC_ERR QString("MythCommFlag, Error: ") |
Enumerations | |
enum | OutputMethod : std::uint8_t { kOutputMethodEssentials = 1, kOutputMethodFull } |
Functions | |
void | anonymous_namespace{mythcommflag.cpp}::cleanup () |
static QMap< QString, SkipType > * | init_skip_types () |
static QMap< QString, OutputMethod > * | init_output_types () |
static QString | get_filename (ProgramInfo *program_info) |
static int | QueueCommFlagJob (uint chanid, const QDateTime &starttime, bool rebuild) |
static void | streamOutCommercialBreakList (std::ostream &output, const frm_dir_map_t &commercialBreakList) |
static void | print_comm_flag_output (const ProgramInfo *program_info, const frm_dir_map_t &commBreakList, uint64_t frame_count, const CommDetectorBase *commDetect, const QString &output_filename) |
static void | commDetectorBreathe () |
static void | commDetectorStatusUpdate (const QString &status) |
static void | commDetectorGotNewCommercialBreakList (void) |
static void | incomingCustomEvent (QEvent *e) |
static int | DoFlagCommercials (ProgramInfo *program_info, bool showPercentage, bool fullSpeed, int jobid, MythCommFlagPlayer *cfp, SkipType commDetectMethod, const QString &outputfilename, bool useDB) |
static qint64 | GetFileSize (ProgramInfo *program_info) |
static bool | DoesFileExist (ProgramInfo *program_info) |
static void | UpdateFileSize (ProgramInfo *program_info) |
static bool | IsMarked (uint chanid, const QDateTime &starttime) |
static int | FlagCommercials (ProgramInfo *program_info, int jobid, const QString &outputfilename, bool useDB, bool fullSpeed) |
static int | FlagCommercials (uint chanid, const QDateTime &starttime, int jobid, const QString &outputfilename, bool fullSpeed) |
static int | FlagCommercials (const QString &filename, int jobid, const QString &outputfilename, bool useDB, bool fullSpeed) |
static int | RebuildSeekTable (ProgramInfo *pginfo, int jobid, bool writefile=false) |
static int | RebuildSeekTable (const QString &filename, int jobid, bool writefile=false) |
static int | RebuildSeekTable (uint chanid, const QDateTime &starttime, int jobid, bool writefile=false) |
int | main (int argc, char *argv[]) |
Variables | |
int | quiet = 0 |
bool | progress = true |
bool | force = false |
MythCommFlagCommandLineParser | cmdline |
bool | watchingRecording = false |
CommDetectorBase * | commDetector = nullptr |
RemoteEncoder * | recorder = nullptr |
ProgramInfo * | global_program_info = nullptr |
int | recorderNum = -1 |
int | jobID = -1 |
int | lastCmd = -1 |
QMap< QString, SkipType > * | skipTypes = init_skip_types() |
OutputMethod | outputMethod = kOutputMethodEssentials |
QMap< QString, OutputMethod > * | outputTypes = init_output_types() |
#define LOC QString("MythCommFlag: ") |
Definition at line 54 of file mythcommflag.cpp.
#define LOC_WARN QString("MythCommFlag, Warning: ") |
Definition at line 55 of file mythcommflag.cpp.
#define LOC_ERR QString("MythCommFlag, Error: ") |
Definition at line 56 of file mythcommflag.cpp.
enum OutputMethod : std::uint8_t |
Enumerator | |
---|---|
kOutputMethodEssentials | |
kOutputMethodFull |
Definition at line 107 of file mythcommflag.cpp.
|
static |
Definition at line 86 of file mythcommflag.cpp.
|
static |
Definition at line 117 of file mythcommflag.cpp.
|
static |
Definition at line 125 of file mythcommflag.cpp.
Referenced by DoesFileExist(), FlagCommercials(), GetFileSize(), and RebuildSeekTable().
Definition at line 133 of file mythcommflag.cpp.
Referenced by main().
|
static |
Definition at line 182 of file mythcommflag.cpp.
Referenced by print_comm_flag_output().
|
static |
Definition at line 207 of file mythcommflag.cpp.
Referenced by DoFlagCommercials().
|
static |
Definition at line 256 of file mythcommflag.cpp.
Referenced by DoFlagCommercials().
|
static |
Definition at line 295 of file mythcommflag.cpp.
Referenced by DoFlagCommercials().
|
static |
Definition at line 304 of file mythcommflag.cpp.
Referenced by DoFlagCommercials().
|
static |
Definition at line 329 of file mythcommflag.cpp.
Referenced by DoFlagCommercials().
|
static |
Definition at line 385 of file mythcommflag.cpp.
Referenced by FlagCommercials().
|
static |
Definition at line 469 of file mythcommflag.cpp.
Referenced by DoesFileExist(), and UpdateFileSize().
|
static |
Definition at line 491 of file mythcommflag.cpp.
Referenced by FlagCommercials(), and RebuildSeekTable().
|
static |
Definition at line 513 of file mythcommflag.cpp.
Referenced by RebuildSeekTable().
Definition at line 521 of file mythcommflag.cpp.
Referenced by main().
|
static |
Definition at line 576 of file mythcommflag.cpp.
Referenced by FlagCommercials(), and main().
|
static |
Definition at line 803 of file mythcommflag.cpp.
|
static |
Definition at line 844 of file mythcommflag.cpp.
|
static |
Definition at line 859 of file mythcommflag.cpp.
Referenced by main(), and RebuildSeekTable().
Definition at line 924 of file mythcommflag.cpp.
|
static |
Definition at line 935 of file mythcommflag.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 950 of file mythcommflag.cpp.
int quiet = 0 |
Definition at line 68 of file mythcommflag.cpp.
Referenced by HLSReader::Cancel(), HLSReader::Close(), MythCommandLineParser::ConfigureLogging(), logStart(), and main().
Definition at line 69 of file mythcommflag.cpp.
Referenced by ImageScanThread< ImageDbSg >::Broadcast(), MythCommandLineParser::ConfigureLogging(), GalleryThumbView::Copy(), FlagCommercials(), TV::HandleLCDTimerEvent(), handleMedia(), logStart(), main(), GalleryThumbView::Move(), print_comm_flag_output(), MythUDPListener::Process(), QueueCommFlagJob(), RebuildSeekTable(), ChannelScanSM::ScanTransport(), SendMessage(), GameScannerThread::SendProgressEvent(), VideoScannerThread::SendProgressEvent(), LCDServer::setChannelProgress(), LCDServer::setGenericProgress(), LCDServer::setMusicProgress(), MythPlaybackNotification::SetProgress(), LCDServer::setVolumeLevel(), ProgramInfo::SetWatchedPercent(), ShowNotification(), WebPage::slotLoadProgress(), MythBrowser::slotLoadProgress(), MythUIWebBrowser::slotLoadProgress(), streamOutCommercialBreakList(), and MythNotificationScreen::UpdatePlayback().
Definition at line 70 of file mythcommflag.cpp.
Referenced by MythScreenStack::CheckDeletes(), MythDisplay::ConfigureQtGUI(), MainServer::customEvent(), FlagCommercials(), CommandLineArg::GetHelpString(), MythUIText::Layout(), main(), MusicFileScanner::MusicFileScanner(), MainServer::ProcessRequestWork(), LanguageSelection::prompt(), SubtitleScreen::RenderAssTrack(), MythContext::SaveDatabaseParams(), MythContextPrivate::SaveDatabaseParams(), RecorderBase::SavePositionMap(), ServerPool::SelectDefaultListen(), HLSStream::Size(), MythSystemLegacyWindows::Term(), MythSystemLegacyUnix::Term(), MythSystemLegacy::Term(), and ProgramInfo::UpdateInUseMark().
MythCommFlagCommandLineParser cmdline |
Definition at line 72 of file mythcommflag.cpp.
Referenced by CalcTrackLength(), CheckRecordings(), ClearBookmarks(), ClearCutList(), ClearEIT(), ClearSeekTable(), ClearSkipList(), CopyFile(), CopySkipListToCutList(), DownloadFile(), ExtractImage(), FindLyrics(), FlagCommercials(), GetCutList(), GetMarkup(), GetMarkupList(), GetProgramInfo(), GetSkipList(), handle_command(), main(), main_local(), ParseVideoFilename(), pid_counter(), pid_filter(), pid_printer(), print_warnings(), QueueCommFlagJob(), QueueJob(), run_backend(), ScanMusic(), SendEvent(), SendMessage(), SendSystemEvent(), SetCutList(), SetMarkup(), SetMarkupList(), SetSkipList(), and UpdateMeta().
Definition at line 74 of file mythcommflag.cpp.
Referenced by FlagCommercials(), and incomingCustomEvent().
CommDetectorBase* commDetector = nullptr |
Definition at line 75 of file mythcommflag.cpp.
Referenced by commDetectorBreathe(), commDetectorGotNewCommercialBreakList(), DoFlagCommercials(), and incomingCustomEvent().
RemoteEncoder* recorder = nullptr |
Definition at line 76 of file mythcommflag.cpp.
Referenced by RecorderBase::CreateRecorder(), FlagCommercials(), main(), and RemoteRequestFreeRecorderFromList().
ProgramInfo* global_program_info = nullptr |
Definition at line 77 of file mythcommflag.cpp.
Referenced by commDetectorGotNewCommercialBreakList(), FlagCommercials(), and incomingCustomEvent().
int recorderNum = -1 |
Definition at line 78 of file mythcommflag.cpp.
Referenced by FlagCommercials(), and incomingCustomEvent().
int jobID = -1 |
Definition at line 80 of file mythcommflag.cpp.
Referenced by BuildKeyframeIndex(), JobQueue::ChangeJobArgs(), JobQueue::ChangeJobCmds(), JobQueue::ChangeJobComment(), JobQueue::ChangeJobFlags(), JobQueue::ChangeJobHost(), JobQueue::ChangeJobStatus(), commDetectorBreathe(), commDetectorStatusUpdate(), CompleteJob(), StatusBox::customEvent(), JobQueue::customEvent(), JobQueue::DeleteJob(), JobQueue::DoFlagCommercialsThread(), JobQueue::DoMetadataLookupThread(), JobQueue::DoTranscodeThread(), JobQueue::DoUserJobThread(), JobQueue::GetJobArgs(), JobQueue::GetJobCmd(), JobQueue::GetJobFlags(), JobQueue::GetJobInfoFromID(), JobQueue::GetJobStatus(), main(), JobQueue::PauseJob(), JobQueue::ProcessJob(), JobQueue::ProcessQueue(), JobQueue::QueueJob(), JobQueue::RestartJob(), JobQueue::ResumeJob(), JobQueue::SafeDeleteJob(), JobQueue::StartChildJob(), JobQueue::StopJob(), and Transcode::TranscodeFile().
int lastCmd = -1 |
Definition at line 81 of file mythcommflag.cpp.
Referenced by commDetectorBreathe().
QMap<QString,SkipType>* skipTypes = init_skip_types() |
Definition at line 84 of file mythcommflag.cpp.
Referenced by FlagCommercials().
OutputMethod outputMethod = kOutputMethodEssentials |
Definition at line 112 of file mythcommflag.cpp.
Referenced by DoFlagCommercials(), and main().
QMap<QString,OutputMethod>* outputTypes = init_output_types() |
Definition at line 115 of file mythcommflag.cpp.
Referenced by main().