Go to the documentation of this file.
21 QString(
"http://services.mythtv.org/samples/video/?sample=HD");
23 QString(
"http://services.mythtv.org/samples/video/?sample=SD");
25 QString(
"mythtv_video_test_HD_19000Kbps_H264.mkv");
27 QString(
"mythtv_video_test_SD_6000Kbps_H264.mkv");
33 m_generalScreen(general), m_audioScreen(audio)
59 LOG(VB_GENERAL, LOG_ERR,
"Theme is missing critical theme elements.");
64 "preconfigured playback profiles. When "
65 "satisfied, you can test Standard Definition "
66 "and High Definition playback with the selected "
67 "profile before moving on.") );
69 "Definition content. (480p)") );
71 "Definition content (1080p).") );
73 "next configuration step.") );
96 for (
const auto & prof : std::as_const(profiles))
103 if (!currentpbp.isEmpty())
147 bool handled =
false;
162 QString desc = tr(
"A short test of your system's playback of "
163 "Standard Definition content with the %1 profile.")
165 QString title = tr(
"Standard Definition Playback Test");
185 QString desc = tr(
"A short test of your system's playback of "
186 "High Definition content with the %1 profile.")
188 QString title = tr(
"High Definition Playback Test");
220 QString message = tr(
"Downloading Video Sample...");
243 QStringList tokens = me->
Message().split(
" ", Qt::SkipEmptyParts);
244 if (tokens.isEmpty())
247 if (tokens[0] ==
"DOWNLOAD_FILE")
249 QStringList
args = me->ExtraDataList();
250 if ((tokens.size() != 2) ||
254 if (tokens[1] ==
"UPDATE")
256 QString message = tr(
"Downloading Video Sample...\n"
258 .arg(QString::number(
args[2].toInt() / 1024.0 / 1024.0,
'f', 2),
259 QString::number(
args[3].toInt() / 1024.0 / 1024.0,
'f', 2));
264 else if (tokens[1] ==
"FINISHED")
266 int fileSize =
args[2].toInt();
267 int errorCode =
args[4].toInt();
274 if ((errorCode == 0) &&
284 ShowOkPopup(tr(
"Error downloading sample to backend."));
MythScreenType * m_generalScreen
~VideoSetupWizard() override
bool Create(void) override
QString generate_file_url(const QString &storage_group, const QString &host, const QString &path)
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