1. Cliff Biffle
  2. kinect-viewer

Source

kinect-viewer / KVDepthRecorder.m

/*
 * Copyright 2010 Cliff L. Biffle.  All Rights Reserved.
 * Use of this source code is governed by the Apache License 2.0,
 * which can be found in the LICENSE file.
 */

#import "KVDepthRecorder.h"

@interface KVDepthRecorder ()

@property NSFileHandle *fileHandle;

@end


@implementation KVDepthRecorder
@synthesize fileHandle;

- (void) open: (NSString *) path {
  fileHandle = [NSFileHandle fileHandleForWritingAtPath: path];
}

- (void) close {
  NSFileHandle *h = fileHandle;
  fileHandle = nil;
  [h closeFile];
}

- (void) setLatestDepthSamples: (NSData *) data {
  [fileHandle writeData: data];
  [fileHandle synchronizeFile];
}

- (NSData *) latestDepthSamples {
  return nil;
}

@end