videoAreaWidget = new VideoAreaWidget(this);
videoAreaWidget->setMinimumSize(320,240);
+
+#ifdef Q_WS_MAC
+ // mouse autohide does not work on the Mac (no mouseMoveEvent)
+ videoWidget = new Phonon::VideoWidget(this);
+#else
videoWidget = new VideoWidget(this);
+#endif
+
videoAreaWidget->setVideoWidget(videoWidget);
videoAreaWidget->setListModel(listModel);
errorTimer->setInterval(3000);
connect(errorTimer, SIGNAL(timeout()), SLOT(skipVideo()));
+ workaroundTimer = new QTimer(this);
+ workaroundTimer->setSingleShot(true);
+ workaroundTimer->setInterval(1000);
+ connect(workaroundTimer, SIGNAL(timeout()), SLOT(timerPlay()));
+
}
MediaView::~MediaView() {
// Workaround for Mac playback start problem
if (!timerPlayFlag) {
- QTimer::singleShot(1000, this, SLOT(timerPlay()));
+ workaroundTimer->start();
}
break;
listModel->abortSearch();
reallyStopped = true;
mediaObject->stop();
- // mediaObject->clear();
+ workaroundTimer->stop();
+ errorTimer->stop();
}
void MediaView::activeRowChanged(int row) {
+ if (reallyStopped) return;
+
Video *video = listModel->videoAt(row);
if (!video) return;
}
void MediaView::gotStreamUrl(QUrl streamUrl) {
+ if (reallyStopped) return;
// go!
mediaObject->setCurrentSource(streamUrl);
}
void MediaView::currentSourceChanged(const Phonon::MediaSource source) {
- qDebug() << "Source changed:" << source.url();
+ qDebug() << source.url().toString();
}