22 QString(
"/samples/video/?sample=HD");
24 QString(
"/samples/video/?sample=SD");
26 QString(
"mythtv_video_test_HD_19000Kbps_H264.mkv");
28 QString(
"mythtv_video_test_SD_6000Kbps_H264.mkv");
34 m_generalScreen(general), m_audioScreen(audio)
60 LOG(VB_GENERAL, LOG_ERR,
"Theme is missing critical theme elements.");
65 "preconfigured playback profiles. When "
66 "satisfied, you can test Standard Definition "
67 "and High Definition playback with the selected "
68 "profile before moving on.") );
70 "Definition content. (480p)") );
72 "Definition content (1080p).") );
74 "next configuration step.") );
97 for (
const auto & prof : std::as_const(profiles))
104 if (!currentpbp.isEmpty())
148 bool handled =
false;
163 QString desc = tr(
"A short test of your system's playback of "
164 "Standard Definition content with the %1 profile.")
166 QString title = tr(
"Standard Definition Playback Test");
172 "https://services.mythtv.org");
188 QString desc = tr(
"A short test of your system's playback of "
189 "High Definition content with the %1 profile.")
191 QString title = tr(
"High Definition Playback Test");
197 "https://services.mythtv.org");
225 QString message = tr(
"Downloading Video Sample...");
248 QStringList tokens = me->
Message().split(
" ", Qt::SkipEmptyParts);
249 if (tokens.isEmpty())
252 if (tokens[0] ==
"DOWNLOAD_FILE")
254 QStringList
args = me->ExtraDataList();
255 if ((tokens.size() != 2) ||
259 if (tokens[1] ==
"UPDATE")
261 QString message = tr(
"Downloading Video Sample...\n"
263 .arg(QString::number(
args[2].toInt() / 1024.0 / 1024.0,
'f', 2),
264 QString::number(
args[3].toInt() / 1024.0 / 1024.0,
'f', 2));
269 else if (tokens[1] ==
"FINISHED")
271 int fileSize =
args[2].toInt();
272 int errorCode =
args[4].toInt();
279 if ((errorCode == 0) &&
289 ShowOkPopup(tr(
"Error downloading sample to backend."));
QString GetHostName(void)
QString GetSetting(const QString &key, const QString &defaultval="")
QString GetMasterHostName(void)
This class is used as a container for messages.
const QString & Message() const
static const Type kMythEventMessage
MythScreenStack * GetStack(const QString &Stackname)
bool HandleMedia(const QString &Handler, const QString &Mrl, const QString &Plot="", const QString &Title="", const QString &Subtitle="", const QString &Director="", int Season=0, int Episode=0, const QString &Inetref="", std::chrono::minutes LenMins=2h, const QString &Year="1895", const QString &Id="", bool UseBookmarks=false)
void addListener(QObject *listener)
Add a listener to the observable.
void removeListener(QObject *listener)
Remove a listener to the observable.
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Screen in which all other widgets are contained and rendered.
void BuildFocusList(void)
MythUIType * GetFocusWidget(void) const
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
bool Create(void) override
void SetProgress(uint count)
void SetMessage(const QString &message)
void SetTotal(uint total)
void SetHelpText(const QString &text)
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
static QString GetDefaultProfileName(const QString &HostName)
static void SetDefaultProfileName(const QString &ProfileName, const QString &HostName)
static QStringList GetProfiles(const QString &HostName)
static bool Exists(const QString &url, struct stat *fileinfo)
static QString generate_file_url(const QString &storage_group, const QString &host, const QString &path)
bool Create(void) override
MythUIProgressDialog * m_progressDialog
void playVideoTest(const QString &desc, const QString &title, const QString &file)
MythScreenType * m_audioScreen
MythScreenType * m_generalScreen
MythUIButtonList * m_playbackProfileButtonList
void customEvent(QEvent *e) override
MythUIButton * m_testHDButton
~VideoSetupWizard() override
MythUIButton * m_nextButton
MythUIButton * m_testSDButton
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
void DownloadSample(const QString &url, const QString &dest)
void initProgressDialog()
MythScreenStack * m_popupStack
MythUIButton * m_prevButton
VideoSetupWizard(MythScreenStack *parent, MythScreenType *general, MythScreenType *audio, const char *name=nullptr)
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythMainWindow * GetMythMainWindow(void)
QString RemoteDownloadFile(const QString &url, const QString &storageGroup, const QString &filename)
const QString VIDEO_SAMPLE_HD_LOCATION
const QString VIDEO_SAMPLE_SD_LOCATION
const QString VIDEO_SAMPLE_HD_FILENAME
const QString VIDEO_SAMPLE_SD_FILENAME