コード例 #1
0
ファイル: DASHReceiver.cpp プロジェクト: praveenster/libdash
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);
}
コード例 #2
0
ファイル: DASHManager.cpp プロジェクト: praveenster/libdash
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);
}