Go to the documentation of this file.
23 QString(
"http://services.mythtv.org/samples/video/?sample=HD");
25 QString(
"http://services.mythtv.org/samples/video/?sample=SD");
27 QString(
"mythtv_video_test_HD_19000Kbps_H264.mkv");
29 QString(
"mythtv_video_test_SD_6000Kbps_H264.mkv");
35 m_generalScreen(general), m_audioScreen(audio)
61 LOG(VB_GENERAL, LOG_ERR,
"Theme is missing critical theme elements.");
66 "preconfigured playback profiles. When "
67 "satisfied, you can test Standard Definition "
68 "and High Definition playback with the selected "
69 "profile before moving on.") );
71 "Definition content. (480p)") );
73 "Definition content (1080p).") );
75 "next configuration step.") );
98 for (
const auto & prof : std::as_const(profiles))
105 if (!currentpbp.isEmpty())
149 bool handled =
false;
164 QString desc = tr(
"A short test of your system's playback of "
165 "Standard Definition content with the %1 profile.")
167 QString title = tr(
"Standard Definition Playback Test");
187 QString desc = tr(
"A short test of your system's playback of "
188 "High Definition content with the %1 profile.")
190 QString title = tr(
"High Definition Playback Test");
222 QString message = tr(
"Downloading Video Sample...");
245 QStringList tokens = me->
Message().split(
" ", Qt::SkipEmptyParts);
246 if (tokens.isEmpty())
249 if (tokens[0] ==
"DOWNLOAD_FILE")
251 QStringList
args = me->ExtraDataList();
252 if ((tokens.size() != 2) ||
256 if (tokens[1] ==
"UPDATE")
258 QString message = tr(
"Downloading Video Sample...\n"
260 .arg(QString::number(
args[2].toInt() / 1024.0 / 1024.0,
'f', 2),
261 QString::number(
args[3].toInt() / 1024.0 / 1024.0,
'f', 2));
266 else if (tokens[1] ==
"FINISHED")
268 int fileSize =
args[2].toInt();
269 int errorCode =
args[4].toInt();
276 if ((errorCode == 0) &&
286 ShowOkPopup(tr(
"Error downloading sample to backend."));
static QString generate_file_url(const QString &storage_group, const QString &host, const QString &path)
MythScreenType * m_generalScreen
~VideoSetupWizard() override
bool Create(void) override
const QString VIDEO_SAMPLE_HD_LOCATION
QString GetMasterHostName(void)
void playVideoTest(const QString &desc, const QString &title, const QString &file)
static const Type kMythEventMessage
static bool Exists(const QString &url, struct stat *fileinfo)
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
void initProgressDialog()
const QString VIDEO_SAMPLE_HD_FILENAME
const QString VIDEO_SAMPLE_SD_FILENAME
This class is used as a container for messages.
bool Create(void) override
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Screen in which all other widgets are contained and rendered.
void SetMessage(const QString &message)
const QString & Message() const
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 customEvent(QEvent *e) override
const QString VIDEO_SAMPLE_SD_LOCATION
MythUIType * GetFocusWidget(void) const
void addListener(QObject *listener)
Add a listener to the observable.
static QStringList GetProfiles(const QString &HostName)
MythUIButtonList * m_playbackProfileButtonList
void SetProgress(uint count)
void SetHelpText(const QString &text)
void BuildFocusList(void)
MythUIProgressDialog * m_progressDialog
VideoSetupWizard(MythScreenStack *parent, MythScreenType *general, MythScreenType *audio, const char *name=nullptr)
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
static void SetDefaultProfileName(const QString &ProfileName, const QString &HostName)
MythUIButton * m_nextButton
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
MythUIButton * m_prevButton
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
void SetTotal(uint total)
static QString GetDefaultProfileName(const QString &HostName)
MythMainWindow * GetMythMainWindow(void)
MythScreenStack * GetStack(const QString &Stackname)
QString RemoteDownloadFile(const QString &url, const QString &storageGroup, const QString &filename)
QString GetHostName(void)
MythUIButton * m_testSDButton
void DownloadSample(const QString &url, const QString &dest)
MythUIButton * m_testHDButton
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
MythScreenType * m_audioScreen
void removeListener(QObject *listener)
Remove a listener to the observable.
MythScreenStack * m_popupStack