Go to the documentation of this file.
8 #include <QCoreApplication>
17 #include "libmythbase/mythversion.h"
41 QString(
"Only locally accessible files are supported (%1).")
43 std::cerr << qPrintable(msg) << std::endl;
49 std::cerr << qPrintable(
50 QString(
"Could not open input file (%1).").arg(
filename)) << std::endl;
57 std::cerr << qPrintable(QString(
"Unable to create RingBuffer for %1")
64 std::cout <<
"Program will end @ "
76 ctx->SetPlayingInfo(&program_info);
77 ctx->SetRingBuffer(tmprbuf);
79 if (ccp->OpenFile() < 0)
81 std::cerr <<
"Failed to open " << qPrintable(
filename) << std::endl;
86 std::cerr <<
"Failed to decode " << qPrintable(
filename) << std::endl;
95 int main(
int argc,
char *argv[])
97 QCoreApplication a(argc, argv);
125 if (infile.isEmpty())
127 std::cerr <<
"The input file --infile is required" << std::endl;
133 bool useDB = !QFile::exists(infile);
146 std::cerr <<
"Failed to init MythContext, exiting." << std::endl;
MythCommFlagCommandLineParser cmdline
Startup context for MythTV.
QDateTime GetRecordingEndTime(void) const
Approximate time the recording should have ended, did end, or is intended to end.
@ GENERIC_EXIT_OK
Exited with no error.
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
QString GetPathname(void) const
static constexpr const char * MYTH_APPNAME_MYTHCCEXTRACTOR
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
static void PrintVersion(void)
Print application version information.
void PrintHelp(void) const
Print command line option help.
@ GENERIC_EXIT_NOT_OK
Exited with error.
@ GENERIC_EXIT_PERMISSIONS_ERROR
File permissions error.
static QString cleanup(const QString &str)
static void Init(QObject *parent=nullptr)
Holds information on recordings and videos.
QString toString(const QString &key) const
Returns stored QVariant as a QString, falling to default if not provided.
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
QString GetPlaybackURL(bool checkMaster=false, bool forceCheckLocal=false)
Returns filename or URL to be used to play back this recording.
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
MythContext * gContext
This global variable contains the MythContext instance for the application.
bool Init(bool gui=true, bool promptForBackend=false, bool disableAutoDiscovery=false, bool ignoreDB=false)
const QString kCCExtractorInUseID