void KarisanStreamerConfig::addStream(StreamConfig *stream)
{
	int idx = getNumStreams() ;

	_allstreams->insert(pair<int, StreamConfig *>(idx, stream)) ;
	saveStream(stream) ;
}
Пример #2
0
void
Container::pushCoders() {
  int32_t n = getNumStreams();
  for(int32_t i = 0; i < n; i++) {
    Container::Stream* stream = mStreams[i];
    stream->pushCoder();
  }
}
Пример #3
0
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
void NWStreamGroupRead::disableRead(bool _disable)
{
    LOG("NWStreamGroupRead::disable (0x%x) (%d)",this,_disable?1:0);
    int streams = getNumStreams();
    for ( int i = 0 ; i < streams ; ++i )
    {
        INWStreamReader* itStream = getStream(i);
        itStream->disableRead(_disable);
    }
}
Пример #4
0
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
INWStreamWriter* NWStreamGroupWrite::getStreamByType(ENWStreamType _type, ENWStreamSubType _subType)
{
    INWStreamWriter* stream = 0;

    int streams = getNumStreams();
    for ( int i = 0 ; stream == 0 && i < streams ; ++i )
    {
        INWStreamWriter* itStream = getStream(i);
        if ( itStream->getType() == _type && itStream->getSubType() == _subType )
            stream = itStream;
    }

    return stream;
}
Пример #5
0
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
void NWStreamGroupRead::done()
{
    if (isOk())
    {
        int streams = getNumStreams();
        for ( int i = 0 ; i < streams ; ++i )
        {
            INWStreamReader* itStream = getStream(i);
            DISPOSE(itStream);
        }
        mStreams.clear();

        NWCriticalSection::destroy(mCSStartTimeAbs);
        mInit = false;
    }
}
Пример #6
0
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
INWStreamWriter* NWStreamGroupWrite::getStreamByMediaType(ENWStreamMediaType _mediaType)
{
    INWStreamWriter* stream = 0;

    int streams = getNumStreams();
    for ( int i = 0 ; stream == 0 && i < streams ; ++i )
    {
        INWStreamWriter* itStream = getStream(i);
        if ( itStream->getType() == NWSTREAM_TYPE_MEDIA )
        {
            NWStreamMedia* streamMedia = (NWStreamMedia*)itStream;
            if ( streamMedia->getMediaType() == _mediaType )
                stream = itStream;
        }
    }

    return stream;
}
Пример #7
0
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
INWStreamWriter* NWStreamGroupWrite::getStream(int _index)
{
    ASSERT(_index >= 0 && _index < getNumStreams());
    return mStreams[_index];
}
Пример #8
0
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
INWStreamReader* NWStreamGroupRead::getStream(int _index)
{
    ASSERT(_index >= 0 && _index < getNumStreams());
    return mStreams[_index];
}