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

Marker TagLib::Mpeg::File::GetMarker ( long  position ) [inline, protected]

Gets the marker at a specified position.

Parameters:
positionA long value specifying the postion in the file represented by the current instance at which to read.
Returns:
A Marker value containing the type of marker found at the specified position.
Exceptions:
CorruptFileExceptionA valid marker does not exist at the specified position.

Definition at line 393 of file File.cs.

References TagLib::ByteVector::Count, TagLib::File::ReadBlock(), TagLib::File::Seek(), and TagLib::ByteVector::StartsWith().

            {
                  Seek (position);
                  ByteVector identifier = ReadBlock (4);
                  
                  if (identifier.Count == 4 && identifier.StartsWith (
                        MarkerStart))
                        return (Marker) identifier [3];
                  
                  throw new CorruptFileException (
                        "Invalid marker at position " + position);
            }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index