本文整理汇总了C++中Video::disconnect方法的典型用法代码示例。如果您正苦于以下问题:C++ Video::disconnect方法的具体用法?C++ Video::disconnect怎么用?C++ Video::disconnect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video
的用法示例。
在下文中一共展示了Video::disconnect方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gotStreamUrl
void DownloadItem::gotStreamUrl(QUrl /*streamUrl*/) {
Video *video = static_cast<Video *>(sender());
if (!video) {
qDebug() << "Cannot get sender";
return;
}
video->disconnect(this);
m_url = video->getStreamUrl();
start();
}
示例2: gotStreamUrl
void MediaView::gotStreamUrl(const QString &streamUrl, const QString &audioUrl) {
if (stopped) return;
if (streamUrl.isEmpty()) {
qWarning() << "Empty stream url";
skip();
return;
}
Video *video = static_cast<Video *>(sender());
if (!video) {
qDebug() << "Cannot get sender in" << __PRETTY_FUNCTION__;
return;
}
video->disconnect(this);
currentVideoId = video->getId();
if (audioUrl.isEmpty()) {
qDebug() << "Playing" << streamUrl;
media->play(streamUrl);
} else {
qDebug() << "Playing" << streamUrl << audioUrl;
media->playSeparateAudioAndVideo(streamUrl, audioUrl);
}
// ensure we always have videos ahead
playlistModel->searchNeeded();
// ensure active item is visible
int row = playlistModel->activeRow();
if (row != -1) {
QModelIndex index = playlistModel->index(row, 0, QModelIndex());
playlistView->scrollTo(index, QAbstractItemView::EnsureVisible);
}
#ifdef APP_ACTIVATION
if (!Activation::instance().isActivated() && !demoTimer->isActive()) {
int ms = (60000 * 5) + (qrand() % (60000 * 5));
demoTimer->start(ms);
}
#endif
#ifdef APP_EXTRA
Extra::notify(video->getTitle(), video->getChannelTitle(), video->getFormattedDuration());
#endif
ChannelAggregator::instance()->videoWatched(video);
}
示例3: resumeWithNewStreamUrl
void MediaView::resumeWithNewStreamUrl(const QString &streamUrl, const QString &audioUrl) {
pauseTime = media->position();
if (audioUrl.isEmpty()) {
qDebug() << "Playing" << streamUrl;
media->play(streamUrl);
} else {
qDebug() << "Playing" << streamUrl << audioUrl;
media->playSeparateAudioAndVideo(streamUrl, audioUrl);
}
Video *video = static_cast<Video *>(sender());
if (!video) {
qDebug() << "Cannot get sender in" << __PRETTY_FUNCTION__;
return;
}
video->disconnect(this);
}
示例4: gotStreamUrl
void MediaView::gotStreamUrl(QUrl streamUrl) {
if (stopped) return;
if (!streamUrl.isValid()) {
skip();
return;
}
Video *video = static_cast<Video *>(sender());
if (!video) {
qDebug() << "Cannot get sender in" << __PRETTY_FUNCTION__;
return;
}
video->disconnect(this);
currentVideoId = video->id();
#ifdef APP_PHONON_SEEK
mediaObject->setCurrentSource(streamUrl);
mediaObject->play();
#else
startDownloading();
#endif
// ensure we always have videos ahead
playlistModel->searchNeeded();
// ensure active item is visible
int row = playlistModel->activeRow();
if (row != -1) {
QModelIndex index = playlistModel->index(row, 0, QModelIndex());
playlistView->scrollTo(index, QAbstractItemView::EnsureVisible);
}
#ifdef APP_ACTIVATION
if (!Activation::instance().isActivated())
demoTimer->start(180000);
#endif
#ifdef APP_EXTRA
Extra::notify(video->title(), video->channelTitle(), video->formattedDuration());
#endif
ChannelAggregator::instance()->videoWatched(video);
}