예제 #1
0
bool ReceiveBuffer::addSource( const size_t sourceIndex )
{
    assert( !_sourceBuffers.count( sourceIndex ));

    // TODO: This function must return false if the stream was already started!
    // This requires an full adaptation of the Stream library (DISCL-241)
    if ( _sourceBuffers.count( sourceIndex ))
        return false;

    _sourceBuffers[sourceIndex] = SourceBuffer();
    _sourceBuffers[sourceIndex].segments.push( Segments( ));
    return true;
}
예제 #2
0
bool PixelStreamBuffer::addSource(const size_t sourceIndex)
{
    assert(!sourceBuffers_.count(sourceIndex));

    // TODO: This function must return false if the stream was already started!
    // This requires an full adaptation of the dc::Stream library (DISCL-241)
    if (sourceBuffers_.count(sourceIndex))
        return false;

    sourceBuffers_[sourceIndex] = SourceBuffer();
    sourceBuffers_[sourceIndex].segments.push(PixelStreamSegments());
    return true;
}