src/app/http-streamer/inthread.cpp
void InThreadContainer::addInfo(const InputInfoPtr& info)
{
    Locker lock(&m_lock);

    InThreadList::iterator found =
        std::find_if(m_list.begin(), m_list.end(),
                     boost::bind<bool>(IsRouteMatch(), info, _1));
    if (found != m_list.end())
    {
        (*found)->updateInfo(info);
    }
    else
    {
        // path should be unique
        InThreadList::iterator find_path = std::find_if(
            m_list.begin(), m_list.end(),
            boost::bind<bool>(IsRouteMatch(),
                              info->getPath(), _1));
        BOOST_ASSERT(find_path == m_list.end());

        if (m_stop.isStopped())
            return;

        // start the thread
        InThreadPtr thread = getFactory()->getInThread(info);
        getFactory()->getScheduler()->startThread(thread);
        m_list.push_back(thread);
    }
}
// Will add info to be processed
Will add info to be processed
Will add info to be processed
void InThreadContainer::addInfo(const InputInfoPtr& info)
{
    Locker lock(&m_lock);
    InThreadList::iterator found =
        std::find_if(m_list.begin(), m_list.end(),
                     boost::bind<bool>(IsRouteMatch(), info, _1));
    if (found != m_list.end())
    {
        (*found)->updateInfo(info);
    }
    else
    {
        InThreadList::iterator find_path = std::find_if(
            m_list.begin(), m_list.end(),
            boost::bind<bool>(IsRouteMatch(),
                              info->getPath(), _1));
        BOOST_ASSERT(find_path == m_list.end());
        if (m_stop.isStopped())
            return;
        InThreadPtr thread = getFactory()->getInThread(info);
        getFactory()->getScheduler()->startThread(thread);
        m_list.push_back(thread);
    }
}
void InThreadContainer :: addInfo ( const InputInfoPtr & info ) { Locker lock ( & m_lock ) ; InThreadList :: iterator found = std :: find_if ( m_list . begin ( ) , m_list . end ( ) , boost :: bind < bool > ( IsRouteMatch ( ) , info , _1 ) ) ; if ( found != m_list . end ( ) ) { ( * found ) -> updateInfo ( info ) ; } else { InThreadList :: iterator find_path = std :: find_if ( m_list . begin ( ) , m_list . end ( ) , boost :: bind < bool > ( IsRouteMatch ( ) , info -> getPath ( ) , _1 ) ) ; BOOST_ASSERT ( find_path == m_list . end ( ) ) ; if ( m_stop . isStopped ( ) ) return ; InThreadPtr thread = getFactory ( ) -> getInThread ( info ) ; getFactory ( ) -> getScheduler ( ) -> startThread ( thread ) ; m_list . push_back ( thread ) ; } }
Will add info to be processed
Will add info to be processed
// path should be unique // start the thread