录像设置(Recording settings)

视频录像存放在SD卡中,录像设置可以处理 SD卡设置录像参数 。(The video recording is stored in the SD card, and the recording settings can handle SD card and Set recording parameters.)

创建 KHJDeviceManager 对象(Create KHJDeviceManager object)

KHJDeviceManager *manager = [[KHJDeviceManager alloc] init];
[manager createKHJCameraBase:Uid];

格式化SD卡(Format SD card)

if (manager) {
  [manager formatSdcard:^(int success) {
    // success = 0, 格式化成功(Formatted successfully)
  }];
}

获取SD卡信息(Get SD card information)

if (manager) {
  [manager queryDeviceInfo:self.uuidStr reternBlock:^(int allCapacity,
                                                      int leftCapacity,
                                                      int version,
                                                      NSString *model,
                                                      NSString *vendor,
                                                      NSString *ffs) {
    // allCapacity - 总容量(total capacity)
    // leftCapacity - 剩余容量(The remaining capacity)
    // ffs - ffs 不等于 @"" && 不等于@"exfat",则强制格式化SD卡。否则,不强制格式化(ffs is not equal to @"" && is not equal to @"exfat", the SD card is forced to be formatted. Otherwise, do not force the format)
  }];
}

查询录像模式(Query recording mode)

if (manager) {
  [manager getVideoRecordType:^(int type) {
    // type = 0 关闭录像(Close recording)
    // type = 1 连续录像(Continuous recording)
    // type = 2 定时计划(Timed plan)
    // type = 3 报警录像(Alarm recording)
  }];
}

设置录像模式(Set recording mode)

if (manager) {
  // type = 0 关闭录像(Close recording)
  // type = 1 连续录像(Continuous recording)
  // type = 2 定时计划(Timed plan)
  // type = 3 报警录像(Alarm recording)
  [manager setVideoRecordType:type returnBlock:^(BOOL success) {

  }];
}

设置录像质量(Set recording quality)

if (manager) {
  // index 1-流畅,2-标清,3-高清(1-LD, 2-SD, 3-HD)
  [manager setRecordVideoQuality:index returnBlock:^(BOOL success) {

  }];
}

获取录像质量(Get video quality)

if (manager) {
    [manager getRecordVideoQuality:^(int level) {
      // index 1-流畅,2-标清,3-高清(1-LD, 2-SD, 3-HD)
    }];
}