Go to the documentation of this file.
8 #include <QCoreApplication>
15 #include "libmythbase/mythversion.h"
39 QString(
"Only locally accessible files are supported (%1).")
41 std::cerr << qPrintable(msg) << std::endl;
47 std::cerr << qPrintable(
48 QString(
"Could not open input file (%1).").arg(
filename)) << std::endl;
55 std::cerr << qPrintable(QString(
"Unable to create RingBuffer for %1")
62 std::cout <<
"Program will end @ "
74 ctx->SetPlayingInfo(&program_info);
75 ctx->SetRingBuffer(tmprbuf);
77 if (ccp->OpenFile() < 0)
79 std::cerr <<
"Failed to open " << qPrintable(
filename) << std::endl;
84 std::cerr <<
"Failed to decode " << qPrintable(
filename) << std::endl;
93 int main(
int argc,
char *argv[])
95 QCoreApplication a(argc, argv);
123 if (infile.isEmpty())
125 std::cerr <<
"The input file --infile is required" << std::endl;
144 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.
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_INVALID_CMDLINE
Command line parse error.
@ GENERIC_EXIT_OK
Exited with no error.
static void PrintVersion(void)
Print application version information.
void PrintHelp(void) const
Print command line option help.
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.
@ GENERIC_EXIT_NOT_OK
Exited with error.
@ GENERIC_EXIT_PERMISSIONS_ERROR
File permissions error.
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
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)
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
const QString kCCExtractorInUseID