Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

uint TagLib::ByteVector::ToUInt ( bool  mostSignificantByteFirst  )  [inline, inherited]

Converts an first four bytes of the current instance to a uint value.

Parameters:
mostSignificantByteFirst if the most significant byte appears first (big endian format), or if the least significant byte appears first (little endian format).
Returns:
A uint value containing the value read from the current instance.

Definition at line 1161 of file ByteVector.cs.

References TagLib::ByteVector::Count.

Referenced by TagLib::Mpeg4::AppleElementaryStreamDescriptor::AppleElementaryStreamDescriptor(), TagLib::Mpeg::AudioHeader::AudioHeader(), TagLib::Riff::AviHeader::AviHeader(), TagLib::Riff::AviStreamHeader::AviStreamHeader(), TagLib::Riff::BitmapInfoHeader::BitmapInfoHeader(), TagLib::Flac::BlockHeader::BlockHeader(), TagLib::Mpeg4::BoxHeader::BoxHeader(), TagLib::Png::File::CheckCRC(), TagLib::IFD::IFDReader::CreateIFDEntry(), TagLib::Ape::Footer::Footer(), TagLib::Id3v2::FrameHeader::FrameHeader(), TagLib::Mpeg4::FullBox::FullBox(), TagLib::Mpeg4::IsoChunkLargeOffsetBox::IsoChunkLargeOffsetBox(), TagLib::Mpeg4::IsoChunkOffsetBox::IsoChunkOffsetBox(), TagLib::Mpeg4::IsoMovieHeaderBox::IsoMovieHeaderBox(), TagLib::Ogg::PageHeader::PageHeader(), TagLib::Riff::List< TagLib::ICodec >::Parse(), TagLib::Ogg::XiphComment::Parse(), TagLib::Ape::Item::Parse(), TagLib::Id3v2::SynchronisedLyricsFrame::ParseFields(), TagLib::Riff::AviStream::ParseStreamList(), TagLib::Flac::Picture::Picture(), TagLib::Asf::Tag::PictureFromData(), TagLib::Riff::File::Read(), TagLib::Aiff::File::Read(), TagLib::Tiff::Cr2::File::ReadAdditionalCR2Header(), TagLib::Jpeg::File::ReadAPP1Segment(), TagLib::Png::File::ReadChunkLength(), TagLib::Asf::File::ReadDWord(), TagLib::Tiff::BaseTiffFile::ReadHeader(), TagLib::IFD::IFDReader::ReadIFD(), TagLib::Png::File::ReadIHDRChunk(), TagLib::IFD::IFDRenderer::RenderEntryData(), TagLib::WavPack::StreamHeader::StreamHeader(), TagLib::MusePack::StreamHeader::StreamHeader(), TagLib::Flac::StreamHeader::StreamHeader(), TagLib::Ape::StreamHeader::StreamHeader(), TagLib::Mpeg::VBRIHeader::VBRIHeader(), TagLib::Mpeg::VideoHeader::VideoHeader(), TagLib::Riff::WaveFormatEx::WaveFormatEx(), and TagLib::Mpeg::XingHeader::XingHeader().

            {
                  uint sum = 0;
                  int last = Count > 4 ? 3 : Count - 1;
                  
                  for (int i = 0; i <= last; i++) {
                        int offset = mostSignificantByteFirst ? last-i : i;
                        sum |= (uint) this[i] << (offset * 8);
                  }
                  
                  return sum;
            }


Generated by  Doxygen 1.6.0   Back to index