8#include <QCoreApplication>
15#include "libmythbase/mythversion.h"
29 QString(
"Only locally accessible files are supported (%1).")
31 std::cerr << qPrintable(msg) << std::endl;
37 std::cerr << qPrintable(
38 QString(
"Could not open input file (%1).").arg(
filename)) << std::endl;
45 std::cerr << qPrintable(QString(
"Unable to create RingBuffer for %1")
52 std::cout <<
"Program will end @ "
64 ctx->SetPlayingInfo(&program_info);
65 ctx->SetRingBuffer(tmprbuf);
67 if (ccp->OpenFile() < 0)
69 std::cerr <<
"Failed to open " << qPrintable(
filename) << std::endl;
74 std::cerr <<
"Failed to decode " << qPrintable(
filename) << std::endl;
83int main(
int argc,
char *argv[])
85 QCoreApplication a(argc, argv);
113 if (infile.isEmpty())
115 std::cerr <<
"The input file --infile is required" << std::endl;
128 std::cerr <<
"Failed to init MythContext, exiting." << std::endl;
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
QString toString(const QString &key) const
Returns stored QVariant as a QString, falling to default if not provided.
static void PrintVersion(void)
Print application version information.
void PrintHelp(void) const
Print command line option help.
Startup context for MythTV.
Holds information on recordings and videos.
QString GetPathname(void) const
QString GetPlaybackURL(bool checkMaster=false, bool forceCheckLocal=false)
Returns filename or URL to be used to play back this recording.
QDateTime GetRecordingEndTime(void) const
Approximate time the recording should have ended, did end, or is intended to end.
@ GENERIC_EXIT_PERMISSIONS_ERROR
File permissions error.
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
@ GENERIC_EXIT_OK
Exited with no error.
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
@ GENERIC_EXIT_NOT_OK
Exited with error.
static constexpr const char * MYTH_APPNAME_MYTHCCEXTRACTOR
MythCommFlagCommandLineParser cmdline
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
const QString kCCExtractorInUseID