Exemplo n.º 1
0
QgsReaderFeatures::QgsReaderFeatures( QgsVectorLayer *layer, bool useSelection )
{
  mLayer = layer;

  initReader( useSelection );

} // QgsReaderFeatures::QgsReaderFeatures(QgsVectorLayer *layer, bool useSelection)
Exemplo n.º 2
0
SourceFileRef SourceFileMediaFoundation::cloneWithSampleRate( size_t sampleRate ) const
{
	auto result = make_shared<SourceFileMediaFoundation>( mDataSource, sampleRate );
	result->initReader();
	result->setupSampleRateConversion();

	return result;
}
Exemplo n.º 3
0
bool ossimPngReader::open( std::istream* str, std::streamoff restartPosition, bool youOwnIt )
{
   bool result = false;
   if (isOpen())
   {
      close();
   }

   if ( str )
   {
      str->seekg( m_restartPosition, std::ios_base::beg );

      if ( checkSignature( str ) )
      {
         // Store the pointer:
         m_str = str;
         m_restartPosition = restartPosition;
         m_ownsStream = youOwnIt;
         
         result = readPngInit();
         if ( result )
         {
            result = initReader();
            if ( result )
            {
               completeOpen();
            }
         }
         else
         {
            destroy();
         }
      }
      else
      {
         if ( youOwnIt )
         {
            delete str;
            str = 0;
         }         
         
         if (traceDebug())
         {
            ossimNotify(ossimNotifyLevel_DEBUG)
               << "ossimPngReader::open NOTICE:\n"
               << "Could not open:  " << theImageFile.c_str()
               << endl;
         }
      }
   }
   
   return result;
}
		/**
		 * @return true if can read message with id
		 */
		bool canRead(unsigned id) {
			initReader(id);
			bool cont=false;
			std::vector<Entry> ::iterator &itr = subscriber_map_[id].read_itr_;
			do {
				cont=false;

				if (itr == queue_.end()) {
					itr = queue_.begin(); 
				}
				if (itr->empty_ == true)
					return false;
				if ((itr->has_read_mask_&id) == id) {
					itr++;
					cont = true;
				}
			} while (cont);
			return true;
		}
Exemplo n.º 5
0
	// SetUp
	ReaderTests() {
		// initialize ybscheme
		initGlobals();
		initReader();
		flushReaderInputStream();
	}
Exemplo n.º 6
0
SourceFileMediaFoundation::SourceFileMediaFoundation( const DataSourceRef &dataSource, size_t sampleRate )
	: SourceFile( sampleRate ), mDataSource( dataSource ), mCanSeek( false ), mSeconds( 0 ), mReadBufferPos( 0 ), mFramesRemainingInReadBuffer( 0 )
{
	MediaFoundationInitializer::initMediaFoundation();
	initReader();
}
		void subscribe(SubscriberMask_t id) {
			initReader(id);
		}