void KarisanStreamerConfig::addStream(StreamConfig *stream) { int idx = getNumStreams() ; _allstreams->insert(pair<int, StreamConfig *>(idx, stream)) ; saveStream(stream) ; }
void Container::pushCoders() { int32_t n = getNumStreams(); for(int32_t i = 0; i < n; i++) { Container::Stream* stream = mStreams[i]; stream->pushCoder(); } }
//-------------------------------------------------------------------- // //-------------------------------------------------------------------- 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); } }
//-------------------------------------------------------------------- // //-------------------------------------------------------------------- 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; }
//-------------------------------------------------------------------- // //-------------------------------------------------------------------- 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; } }
//-------------------------------------------------------------------- // //-------------------------------------------------------------------- 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; }
//-------------------------------------------------------------------- // //-------------------------------------------------------------------- INWStreamWriter* NWStreamGroupWrite::getStream(int _index) { ASSERT(_index >= 0 && _index < getNumStreams()); return mStreams[_index]; }
//-------------------------------------------------------------------- // //-------------------------------------------------------------------- INWStreamReader* NWStreamGroupRead::getStream(int _index) { ASSERT(_index >= 0 && _index < getNumStreams()); return mStreams[_index]; }