Exemplo n.º 1
0
DecoderIOFactoryUrl::DecoderIOFactoryUrl(DecoderHandler *parent) : DecoderIOFactory(parent)
{
    m_accessManager = new QNetworkAccessManager(this);
    m_input = new MusicIODevice();
    connect(m_input, SIGNAL(freeSpaceAvailable()), SLOT(readyRead()));

    m_input->open(QIODevice::ReadWrite);

    m_bytesWritten = 0;
    m_redirectCount = 0;
}
Exemplo n.º 2
0
DecoderIOFactoryUrl::DecoderIOFactoryUrl(DecoderHandler *parent)
    : DecoderIOFactory(parent), m_started(false),
    m_accessManager(new QNetworkAccessManager(this)),
    m_reply(NULL), m_input(new MusicIODevice()),
    m_redirectCount(0), m_bytesWritten(0)

{
    connect(m_input, SIGNAL(freeSpaceAvailable()), SLOT(readyRead()));

    m_input->open(QIODevice::ReadWrite);
}
Exemplo n.º 3
0
qint64 MusicIODevice::readData(char *data, qint64 maxlen)
{
    qint64 res = m_buffer->read(data, maxlen);
    emit freeSpaceAvailable();
    return res;
}