示例#1
0
 internal unsafe bool TryLoadBufferFromDisk(FileInfo target, VideoSlice buffer)
 {
     return(buffer.TryReset() &&
            UnbufferedFileTools.TryRead(
                target,
                (int)buffer.BufferSize,
                buffer.AsBytePtr
                ));
 }
示例#2
0
 internal unsafe bool TryWriteBufferToDisk(FileInfo target, VideoSlice buffer)
 {
     Log.Trace("Attempting to write a frame buffer to '" + target.Name + "'");
     if (!UnbufferedFileTools.TryWrite(
             target,
             (int)buffer.BufferSize,
             buffer.AsBytePtr)
         )
     {
         Log.Error("UnbufferedFileTools.TryWrite(" + target.Name + ") failed.");
         return(false);
     }
     // Now that the buffer contents have been written to disk, clear the buffer frames for the
     // next set of contents.
     buffer.TryReset();
     buffer.Unlock();
     return(true);
 }