예제 #1
0
void Downloader::checkBuffer()
{
    if (stream_.buf_fill > BUFFER_SIZE && !ready_)
    {
        ready_  = true;
        qDebug("Downloader: ready");
        emit readyRead();
    }
    else if (!ready_)
    {
        emit bufferingProgress(100 * stream_.buf_fill / BUFFER_SIZE);
        qApp->processEvents();
    }
}
예제 #2
0
int Player::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: hideWindow(); break;
        case 1: open(); break;
        case 2: durationChanged((*reinterpret_cast< qint64(*)>(_a[1]))); break;
        case 3: positionChanged((*reinterpret_cast< qint64(*)>(_a[1]))); break;
        case 4: metaDataChanged(); break;
        case 5: previousClicked(); break;
        case 6: seek((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 7: jump((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break;
        case 8: playlistPositionChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 9: statusChanged((*reinterpret_cast< QMediaPlayer::MediaStatus(*)>(_a[1]))); break;
        case 10: bufferingProgress((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 11: displayErrorMessage(); break;
        case 12: handleAspectRatio((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 13: handleStateChange((*reinterpret_cast< QMediaPlayer::State(*)>(_a[1]))); break;
        case 14: showPlayList(); break;
        case 15: hideOrShowCoverArt(); break;
        case 16: launchYoutubeDialog(); break;
        case 17: youtubeHttpRequestFinished((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break;
        case 18: youtubeReadResponseHeader((*reinterpret_cast< const QHttpResponseHeader(*)>(_a[1]))); break;
        case 19: searchYoutubeVideo(); break;
        case 20: addYoutubeVideo(); break;
        case 21: handleAudioOutputDefault(); break;
        case 22: handleAudioOutputAll(); break;
        case 23: handleAudioOutputNone(); break;
        case 24: handleAudioOutputEarphone(); break;
        case 25: handleAudioOutputSpeaker(); break;
        case 26: handleAudioOutputChangedSignal((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 27;
    }
    return _id;
}