Exemple #1
0
int     DASHReceiver::IORead                    (uint8_t *buf, int buf_size)
{
    /* FFMpeg callback that consumes data from the buffer for decoding */
    MediaObject *media = this->buffer->Front();

    if(media == NULL)
        return 0;

    int ret = media->Read(buf, buf_size);

    if(ret == 0)
        this->buffer->Pop();
    else
        return ret;

    return this->IORead(buf, buf_size);
}
Exemple #2
0
int         DASHManager::Read                           (uint8_t *buf, int buf_size)
{
    /* FFMpeg callback that consumes data from the buffer for decoding */
    MediaObject *media = this->buffer->Front();

    if(media == NULL)
        return 0;

    int ret = media->Read(buf, buf_size);

    if(ret == 0)
        this->buffer->PopFront();
    else
        return ret;

    this->readSegmentCount++;
    this->NotifySegmentDecodingStarted();
    return this->Read(buf, buf_size);
}