bool TrackerThread::init()
{
    try {
        m_pImagingContext = GLContext::create(
            GLConfig(false, false, true, 1, GLConfig::AUTO, false));
        createBandpassFilter();
        AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO,
                "Using fragment shaders for imaging operations.");
    } catch (Exception& e) {
        AVG_LOG_WARNING(e.getStr());
        AVG_TRACE(Logger::category::CONFIG, Logger::severity::WARNING,
                "Using CPU for imaging operations (slow and inaccurate).");
        m_pImagingContext = 0;
        m_pBandpassFilter = FilterPtr(new FilterFastBandpass());
    }
    try {
        m_StartTime = TimeSource::get()->getCurrentMillisecs(); 
        m_HistoryDelay = m_pConfig->getIntParam("/tracker/historydelay/@value");
    } catch (Exception& e) {
        AVG_LOG_WARNING(e.getStr());
    }
    
    // Done in TrackerInputDevice::ctor to work around Leopard/libdc1394 threading issue.
    //    m_pCamera->open();
    return true;
}
AsioSessionState::AsioSessionState(
    AsioServerTransport & transport,
    AsioIoService & ioService) :
    mIoService(ioService),
    mState(Ready),
    mIssueZeroByteRead(false),
    mReadBufferRemaining(),
    mWriteBufferRemaining(),
    mTransport(transport),
    mFilterAdapterPtr(new FilterAdapter(*this)),
    mCloseAfterWrite(),
    mReflecting()
{
    if (transport.mWireProtocol == Wp_Http || transport.mWireProtocol == Wp_Https)
    {
        mWireFilters.clear();
        mWireFilters.push_back( FilterPtr(new HttpFrameFilter()) );
    }

    if (transport.mWireProtocol == Wp_Https)
    {
        FilterPtr sslFilterPtr;

#if defined(BOOST_WINDOWS) && defined(RCF_USE_OPENSSL)

        if (transport.mpServer->getPreferSchannel())
        {
            sslFilterPtr = transport.mpServer->createFilter(RcfFilter_SspiSchannel);
        }
        else
        {
            sslFilterPtr = transport.mpServer->createFilter(RcfFilter_OpenSsl);
        }

#elif defined(BOOST_WINDOWS)

        sslFilterPtr = transport.mpServer->createFilter(RcfFilter_SspiSchannel);

#elif defined(RCF_USE_OPENSSL)

        sslFilterPtr = transport.mpServer->createFilter(RcfFilter_OpenSsl);

#endif

        if (!sslFilterPtr)
        {
            RCF_THROW( Exception(_RcfError_SslNotSupported()) );
        }

        mWireFilters.push_back( sslFilterPtr );
    }

    if (mWireFilters.size() > 0)
    {
        setTransportFilters( std::vector<FilterPtr>() );
    }
}
void TrackerThread::createBandpassFilter()
{
    if (m_TouchThreshold != 0) {
        float bandpassMin = m_pConfig->getFloatParam("/tracker/touch/bandpass/@min");
        float bandpassMax = m_pConfig->getFloatParam("/tracker/touch/bandpass/@max");
        float bandpassPostMult = 
            m_pConfig->getFloatParam("/tracker/touch/bandpasspostmult/@value");
        if (m_pImagingContext) {
            m_pBandpassFilter = FilterPtr(new GPUBandpassFilter(m_ROI.size(), I8,
                        bandpassMin, bandpassMax, bandpassPostMult, m_bTrackBrighter));
        }
    }
}
Beispiel #4
0
void FiltersWidget::appendFiltersThatAreNotServices(VisServicesPtr services)
{
    this->appendFilterIfWanted(FilterPtr(new BinaryThresholdImageFilter(services)));
    this->appendFilterIfWanted(FilterPtr(new BinaryThinningImageFilter3DFilter(services)));
    this->appendFilterIfWanted(FilterPtr(new ContourFilter(services)));
    this->appendFilterIfWanted(FilterPtr(new SmoothingImageFilter(services)));
    this->appendFilterIfWanted(FilterPtr(new ResampleImageFilter(services)));
    this->appendFilterIfWanted(FilterPtr(new DilationFilter(services)));
}
 FilterPtr ZlibStatefulCompressionFilterFactory::createFilter()
 {
     return FilterPtr( new ZlibStatefulCompressionFilter( 
         (ServerSide *) NULL));
 }
Beispiel #6
0
void FiltersWidget::onServiceAdded(Filter* service)
{
    this->appendFilterIfWanted(FilterPtr(service, null_deleter()));
}
 FilterPtr IdentityFilterFactory::createFilter()
 {
     return FilterPtr( new IdentityFilter() );
 }