FilterRef FilterRegistry::GetNewFilter(int rtpPayloadType) { for(std::list<FilterRef>::iterator it = m_Filters.begin(); it!=m_Filters.end(); it++) { FilterRef Filter = *it; if(Filter->SupportsInputRtpPayloadType(rtpPayloadType) == true) { return Filter->Instanciate(); } } return FilterRef(); // No filter found }
FilterRef FilterRegistry::GetNewFilter(CStdString& filterName) { for(std::list<FilterRef>::iterator it = m_Filters.begin(); it!=m_Filters.end(); it++) { FilterRef Filter = *it; if( Filter->GetName().CompareNoCase(filterName) == 0 ) { return Filter->Instanciate(); } } return FilterRef(); // No filter found }
FilterRef FilterRegistry::GetNewFilter(AudioEncodingEnum inputEncoding, AudioEncodingEnum outputEncoding) { for(std::list<FilterRef>::iterator it = m_Filters.begin(); it!=m_Filters.end(); it++) { FilterRef Filter = *it; if( Filter->GetInputAudioEncoding() == inputEncoding && Filter->GetOutputAudioEncoding() == outputEncoding ) { return Filter->Instanciate(); } } return FilterRef(); // No filter found }
FilterRef LetterFilter::create(char letter) { return FilterRef( new LetterFilter( letter ) ); }