theta-client-react-native 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -1
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +282 -7
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +113 -85
- package/ios/ThetaClientReactNative.mm +552 -48
- package/ios/ThetaClientReactNative.xcodeproj/project.pbxproj +2 -2
- package/lib/commonjs/capture/time-shift-capture.js +44 -0
- package/lib/commonjs/capture/time-shift-capture.js.map +1 -1
- package/lib/commonjs/theta-repository/options/index.js +96 -8
- package/lib/commonjs/theta-repository/options/index.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-ai-auto-thumbnail.js +17 -0
- package/lib/commonjs/theta-repository/options/option-ai-auto-thumbnail.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-bitrate.js +64 -0
- package/lib/commonjs/theta-repository/options/option-bitrate.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-burst-mode.js +23 -0
- package/lib/commonjs/theta-repository/options/option-burst-mode.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-burst-option.js +140 -0
- package/lib/commonjs/theta-repository/options/option-burst-option.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-capture-mode.js +30 -0
- package/lib/commonjs/theta-repository/options/option-capture-mode.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-continuous-number.js +71 -0
- package/lib/commonjs/theta-repository/options/option-continuous-number.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-filter.js +32 -0
- package/lib/commonjs/theta-repository/options/option-filter.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-preset.js +26 -0
- package/lib/commonjs/theta-repository/options/option-preset.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-preview-format.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-shooting-method.js +1 -1
- package/lib/commonjs/theta-repository/options/option-shooting-method.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-time-shift.js.map +1 -1
- package/lib/commonjs/theta-repository/options/options.js +22 -24
- package/lib/commonjs/theta-repository/options/options.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-files.js +21 -1
- package/lib/commonjs/theta-repository/theta-files.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-info.js +29 -0
- package/lib/commonjs/theta-repository/theta-info.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-repository.js +17 -0
- package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
- package/lib/module/capture/time-shift-capture.js +44 -0
- package/lib/module/capture/time-shift-capture.js.map +1 -1
- package/lib/module/theta-repository/options/index.js +9 -1
- package/lib/module/theta-repository/options/index.js.map +1 -1
- package/lib/module/theta-repository/options/option-ai-auto-thumbnail.js +10 -0
- package/lib/module/theta-repository/options/option-ai-auto-thumbnail.js.map +1 -0
- package/lib/module/theta-repository/options/option-bitrate.js +57 -0
- package/lib/module/theta-repository/options/option-bitrate.js.map +1 -0
- package/lib/module/theta-repository/options/option-burst-mode.js +16 -0
- package/lib/module/theta-repository/options/option-burst-mode.js.map +1 -0
- package/lib/module/theta-repository/options/option-burst-option.js +133 -0
- package/lib/module/theta-repository/options/option-burst-option.js.map +1 -0
- package/lib/module/theta-repository/options/option-capture-mode.js +23 -0
- package/lib/module/theta-repository/options/option-capture-mode.js.map +1 -0
- package/lib/module/theta-repository/options/option-continuous-number.js +64 -0
- package/lib/module/theta-repository/options/option-continuous-number.js.map +1 -0
- package/lib/module/theta-repository/options/option-filter.js +25 -0
- package/lib/module/theta-repository/options/option-filter.js.map +1 -0
- package/lib/module/theta-repository/options/option-preset.js +19 -0
- package/lib/module/theta-repository/options/option-preset.js.map +1 -0
- package/lib/module/theta-repository/options/option-preview-format.js.map +1 -1
- package/lib/module/theta-repository/options/option-shooting-method.js +1 -1
- package/lib/module/theta-repository/options/option-shooting-method.js.map +1 -1
- package/lib/module/theta-repository/options/option-time-shift.js.map +1 -1
- package/lib/module/theta-repository/options/options.js +20 -22
- package/lib/module/theta-repository/options/options.js.map +1 -1
- package/lib/module/theta-repository/theta-files.js +20 -0
- package/lib/module/theta-repository/theta-files.js.map +1 -1
- package/lib/module/theta-repository/theta-info.js +22 -0
- package/lib/module/theta-repository/theta-info.js.map +1 -1
- package/lib/module/theta-repository/theta-repository.js +16 -0
- package/lib/module/theta-repository/theta-repository.js.map +1 -1
- package/lib/typescript/capture/capture.d.ts +1 -1
- package/lib/typescript/capture/capture.d.ts.map +1 -1
- package/lib/typescript/capture/time-shift-capture.d.ts +20 -0
- package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/index.d.ts +9 -1
- package/lib/typescript/theta-repository/options/index.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-ai-auto-thumbnail.d.ts +10 -0
- package/lib/typescript/theta-repository/options/option-ai-auto-thumbnail.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-bitrate.d.ts +57 -0
- package/lib/typescript/theta-repository/options/option-bitrate.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-burst-mode.d.ts +16 -0
- package/lib/typescript/theta-repository/options/option-burst-mode.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-burst-option.d.ts +153 -0
- package/lib/typescript/theta-repository/options/option-burst-option.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-capture-mode.d.ts +23 -0
- package/lib/typescript/theta-repository/options/option-capture-mode.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-continuous-number.d.ts +64 -0
- package/lib/typescript/theta-repository/options/option-continuous-number.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-filter.d.ts +25 -0
- package/lib/typescript/theta-repository/options/option-filter.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-power-saving.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-preset.d.ts +18 -0
- package/lib/typescript/theta-repository/options/option-preset.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-preview-format.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-shooting-method.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-time-shift.d.ts +1 -1
- package/lib/typescript/theta-repository/options/option-time-shift.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/options.d.ts +114 -35
- package/lib/typescript/theta-repository/options/options.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-files.d.ts +54 -2
- package/lib/typescript/theta-repository/theta-files.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-info.d.ts +21 -0
- package/lib/typescript/theta-repository/theta-info.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts +8 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-state.d.ts +5 -5
- package/lib/typescript/theta-repository/theta-state.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/capture/capture.ts +1 -1
- package/src/capture/time-shift-capture.ts +46 -0
- package/src/theta-repository/options/index.ts +9 -2
- package/src/theta-repository/options/option-ai-auto-thumbnail.ts +11 -0
- package/src/theta-repository/options/option-bitrate.ts +59 -0
- package/src/theta-repository/options/option-burst-mode.ts +16 -0
- package/src/theta-repository/options/option-burst-option.ts +175 -0
- package/src/theta-repository/options/option-capture-mode.ts +24 -0
- package/src/theta-repository/options/option-continuous-number.ts +65 -0
- package/src/theta-repository/options/option-filter.ts +25 -0
- package/src/theta-repository/options/option-power-saving.ts +1 -1
- package/src/theta-repository/options/option-preset.ts +19 -0
- package/src/theta-repository/options/option-preview-format.ts +22 -23
- package/src/theta-repository/options/option-shooting-method.ts +24 -25
- package/src/theta-repository/options/option-time-shift.ts +47 -47
- package/src/theta-repository/options/options.ts +115 -41
- package/src/theta-repository/theta-files.ts +60 -3
- package/src/theta-repository/theta-info.ts +23 -0
- package/src/theta-repository/theta-repository.ts +19 -1
- package/src/theta-repository/theta-state.ts +5 -5
- package/theta-client-react-native.podspec +1 -1
|
@@ -278,10 +278,225 @@ typedef struct _convert_t {
|
|
|
278
278
|
SetToTheta setToTheta; ///< option setter react to theta
|
|
279
279
|
SetFromTheta setFromTheta; ///< option setter theta to react
|
|
280
280
|
SetPhotoOption setPhotoOption; ///< photo option setter
|
|
281
|
-
SetTimeShiftOption setTimeShiftOption; ///<
|
|
281
|
+
SetTimeShiftOption setTimeShiftOption; ///< time-shift option setter
|
|
282
282
|
SetVideoOption setVideoOption; ///< video option setter
|
|
283
283
|
} convert_t;
|
|
284
284
|
|
|
285
|
+
/**
|
|
286
|
+
* BitrateEnum converter
|
|
287
|
+
*/
|
|
288
|
+
static convert_t BitrateEnum = {
|
|
289
|
+
.toTheta = nil,
|
|
290
|
+
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
291
|
+
if (!BitrateEnum.toTheta) {
|
|
292
|
+
NSMutableDictionary* dictionary = [NSMutableDictionary dictionary];
|
|
293
|
+
THETACKotlinArray* array = THETACThetaRepositoryBitrateEnum.values;
|
|
294
|
+
for (int i = 0; i < array.size; i++) {
|
|
295
|
+
THETACThetaRepositoryBitrateEnum* item = [array getIndex:i];
|
|
296
|
+
[dictionary setObject:item forKey:item.name];
|
|
297
|
+
}
|
|
298
|
+
BitrateEnum.toTheta = dictionary;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
id rv = [rct objectForKey:@"bitrate"];
|
|
302
|
+
if (rv) {
|
|
303
|
+
if ([rv isKindOfClass:NSString.class]) {
|
|
304
|
+
opt.bitrate = [BitrateEnum.toTheta objectForKey:rv];
|
|
305
|
+
} else if ([rv isKindOfClass:NSNumber.class]) {
|
|
306
|
+
id val = [[THETACThetaRepositoryBitrateNumber alloc] initWithValue:[rv intValue]];
|
|
307
|
+
opt.bitrate = val;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
.setFromTheta = ^(NSMutableDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
312
|
+
if ([((id)opt.bitrate) isKindOfClass:THETACThetaRepositoryBitrateEnum.class]) {
|
|
313
|
+
THETACThetaRepositoryBitrateEnum* bitrateEnum = (THETACThetaRepositoryBitrateEnum*)opt.bitrate;
|
|
314
|
+
[rct setObject:bitrateEnum.name forKey:@"bitrate"];
|
|
315
|
+
} else if ([((id)opt.bitrate) isKindOfClass:THETACThetaRepositoryBitrateNumber.class]) {
|
|
316
|
+
THETACThetaRepositoryBitrateNumber* bitrateNumber = (THETACThetaRepositoryBitrateNumber*)opt.bitrate;
|
|
317
|
+
[rct setObject:[NSNumber numberWithInt:bitrateNumber.value] forKey:@"bitrate"];
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* BurstModeEnum converter
|
|
324
|
+
*/
|
|
325
|
+
static convert_t BurstModeEnum = {
|
|
326
|
+
.toTheta = @{
|
|
327
|
+
@"ON": THETACThetaRepositoryBurstModeEnum.on,
|
|
328
|
+
@"OFF": THETACThetaRepositoryBurstModeEnum.off
|
|
329
|
+
},
|
|
330
|
+
.fromTheta = @{
|
|
331
|
+
THETACThetaRepositoryBurstModeEnum.on: @"ON",
|
|
332
|
+
THETACThetaRepositoryBurstModeEnum.off: @"OFF"
|
|
333
|
+
},
|
|
334
|
+
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
335
|
+
id val = [BurstModeEnum.toTheta objectForKey:[rct objectForKey:@"burstMode"]];
|
|
336
|
+
if (val) {
|
|
337
|
+
opt.burstMode = val;
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
.setFromTheta = ^(NSMutableDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
341
|
+
id val = [BurstModeEnum.fromTheta objectForKey:opt.burstMode];
|
|
342
|
+
if (val) {
|
|
343
|
+
[rct setObject:val forKey:@"burstMode"];
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
static convert_t BurstCaptureNumEnum = {
|
|
349
|
+
.toTheta = @{
|
|
350
|
+
@"BURST_CAPTURE_NUM_1": THETACThetaRepositoryBurstCaptureNumEnum.burstCaptureNum1,
|
|
351
|
+
@"BURST_CAPTURE_NUM_3": THETACThetaRepositoryBurstCaptureNumEnum.burstCaptureNum3,
|
|
352
|
+
@"BURST_CAPTURE_NUM_5": THETACThetaRepositoryBurstCaptureNumEnum.burstCaptureNum5,
|
|
353
|
+
@"BURST_CAPTURE_NUM_7": THETACThetaRepositoryBurstCaptureNumEnum.burstCaptureNum7,
|
|
354
|
+
@"BURST_CAPTURE_NUM_9": THETACThetaRepositoryBurstCaptureNumEnum.burstCaptureNum9
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
static convert_t BurstBracketStepEnum = {
|
|
359
|
+
.toTheta = @{
|
|
360
|
+
@"BRACKET_STEP_0_0": THETACThetaRepositoryBurstBracketStepEnum.bracketStep00,
|
|
361
|
+
@"BRACKET_STEP_0_3": THETACThetaRepositoryBurstBracketStepEnum.bracketStep03,
|
|
362
|
+
@"BRACKET_STEP_0_7": THETACThetaRepositoryBurstBracketStepEnum.bracketStep07,
|
|
363
|
+
@"BRACKET_STEP_1_0": THETACThetaRepositoryBurstBracketStepEnum.bracketStep10,
|
|
364
|
+
@"BRACKET_STEP_1_3": THETACThetaRepositoryBurstBracketStepEnum.bracketStep13,
|
|
365
|
+
@"BRACKET_STEP_1_7": THETACThetaRepositoryBurstBracketStepEnum.bracketStep17,
|
|
366
|
+
@"BRACKET_STEP_2_0": THETACThetaRepositoryBurstBracketStepEnum.bracketStep20,
|
|
367
|
+
@"BRACKET_STEP_2_3": THETACThetaRepositoryBurstBracketStepEnum.bracketStep23,
|
|
368
|
+
@"BRACKET_STEP_2_7": THETACThetaRepositoryBurstBracketStepEnum.bracketStep27,
|
|
369
|
+
@"BRACKET_STEP_3_0": THETACThetaRepositoryBurstBracketStepEnum.bracketStep30
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
static convert_t BurstCompensationEnum = {
|
|
374
|
+
.toTheta = @{
|
|
375
|
+
@"BURST_COMPENSATION_DOWN_5_0": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown50,
|
|
376
|
+
@"BURST_COMPENSATION_DOWN_4_7": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown47,
|
|
377
|
+
@"BURST_COMPENSATION_DOWN_4_3": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown43,
|
|
378
|
+
@"BURST_COMPENSATION_DOWN_4_0": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown40,
|
|
379
|
+
@"BURST_COMPENSATION_DOWN_3_7": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown37,
|
|
380
|
+
@"BURST_COMPENSATION_DOWN_3_3": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown33,
|
|
381
|
+
@"BURST_COMPENSATION_DOWN_3_0": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown30,
|
|
382
|
+
@"BURST_COMPENSATION_DOWN_2_7": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown27,
|
|
383
|
+
@"BURST_COMPENSATION_DOWN_2_3": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown23,
|
|
384
|
+
@"BURST_COMPENSATION_DOWN_2_0": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown20,
|
|
385
|
+
@"BURST_COMPENSATION_DOWN_1_7": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown17,
|
|
386
|
+
@"BURST_COMPENSATION_DOWN_1_3": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown13,
|
|
387
|
+
@"BURST_COMPENSATION_DOWN_1_0": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown10,
|
|
388
|
+
@"BURST_COMPENSATION_DOWN_0_7": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown07,
|
|
389
|
+
@"BURST_COMPENSATION_DOWN_0_3": THETACThetaRepositoryBurstCompensationEnum.burstCompensationDown03,
|
|
390
|
+
@"BURST_COMPENSATION_0_0": THETACThetaRepositoryBurstCompensationEnum.burstCompensation00,
|
|
391
|
+
@"BURST_COMPENSATION_UP_0_3": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp03,
|
|
392
|
+
@"BURST_COMPENSATION_UP_0_7": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp07,
|
|
393
|
+
@"BURST_COMPENSATION_UP_1_0": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp10,
|
|
394
|
+
@"BURST_COMPENSATION_UP_1_3": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp13,
|
|
395
|
+
@"BURST_COMPENSATION_UP_1_7": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp17,
|
|
396
|
+
@"BURST_COMPENSATION_UP_2_0": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp20,
|
|
397
|
+
@"BURST_COMPENSATION_UP_2_3": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp23,
|
|
398
|
+
@"BURST_COMPENSATION_UP_2_7": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp27,
|
|
399
|
+
@"BURST_COMPENSATION_UP_3_0": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp30,
|
|
400
|
+
@"BURST_COMPENSATION_UP_3_3": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp33,
|
|
401
|
+
@"BURST_COMPENSATION_UP_3_7": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp37,
|
|
402
|
+
@"BURST_COMPENSATION_UP_4_0": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp40,
|
|
403
|
+
@"BURST_COMPENSATION_UP_4_3": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp43,
|
|
404
|
+
@"BURST_COMPENSATION_UP_4_7": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp47,
|
|
405
|
+
@"BURST_COMPENSATION_UP_5_0": THETACThetaRepositoryBurstCompensationEnum.burstCompensationUp50
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
static convert_t BurstMaxExposureTimeEnum = {
|
|
410
|
+
.toTheta = @{
|
|
411
|
+
@"MAX_EXPOSURE_TIME_0_5": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime05,
|
|
412
|
+
@"MAX_EXPOSURE_TIME_0_625": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime0625,
|
|
413
|
+
@"MAX_EXPOSURE_TIME_0_76923076": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime076923076,
|
|
414
|
+
@"MAX_EXPOSURE_TIME_1": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime1,
|
|
415
|
+
@"MAX_EXPOSURE_TIME_1_3": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime13,
|
|
416
|
+
@"MAX_EXPOSURE_TIME_1_6": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime16,
|
|
417
|
+
@"MAX_EXPOSURE_TIME_2": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime2,
|
|
418
|
+
@"MAX_EXPOSURE_TIME_2_5": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime25,
|
|
419
|
+
@"MAX_EXPOSURE_TIME_3_2": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime32,
|
|
420
|
+
@"MAX_EXPOSURE_TIME_4": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime4,
|
|
421
|
+
@"MAX_EXPOSURE_TIME_5": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime5,
|
|
422
|
+
@"MAX_EXPOSURE_TIME_6": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime6,
|
|
423
|
+
@"MAX_EXPOSURE_TIME_8": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime8,
|
|
424
|
+
@"MAX_EXPOSURE_TIME_10": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime10,
|
|
425
|
+
@"MAX_EXPOSURE_TIME_13": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime13_,
|
|
426
|
+
@"MAX_EXPOSURE_TIME_15": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime15,
|
|
427
|
+
@"MAX_EXPOSURE_TIME_20": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime20,
|
|
428
|
+
@"MAX_EXPOSURE_TIME_25": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime25_,
|
|
429
|
+
@"MAX_EXPOSURE_TIME_30": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime30,
|
|
430
|
+
@"MAX_EXPOSURE_TIME_40": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime40,
|
|
431
|
+
@"MAX_EXPOSURE_TIME_50": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime50,
|
|
432
|
+
@"MAX_EXPOSURE_TIME_60": THETACThetaRepositoryBurstMaxExposureTimeEnum.maxExposureTime60
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
static convert_t BurstEnableIsoControlEnum = {
|
|
437
|
+
.toTheta = @{
|
|
438
|
+
@"OFF": THETACThetaRepositoryBurstEnableIsoControlEnum.off,
|
|
439
|
+
@"ON": THETACThetaRepositoryBurstEnableIsoControlEnum.on
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
static convert_t BurstOrderEnum = {
|
|
444
|
+
.toTheta = @{
|
|
445
|
+
@"BURST_BRACKET_ORDER_0": THETACThetaRepositoryBurstOrderEnum.burstBracketOrder0,
|
|
446
|
+
@"BURST_BRACKET_ORDER_1": THETACThetaRepositoryBurstOrderEnum.burstBracketOrder1
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* BurstOption converter
|
|
452
|
+
*/
|
|
453
|
+
static convert_t BurstOptionCvt = {
|
|
454
|
+
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
455
|
+
NSDictionary *dic = [rct objectForKey:@"burstOption"];
|
|
456
|
+
if (dic) {
|
|
457
|
+
opt.burstOption = [[THETACThetaRepositoryBurstOption alloc]
|
|
458
|
+
initWithBurstCaptureNum:!isNull([dic objectForKey:@"burstCaptureNum"]) ? [BurstCaptureNumEnum.toTheta objectForKey:[dic objectForKey:@"burstCaptureNum"]] : nil
|
|
459
|
+
burstBracketStep:!isNull([dic objectForKey:@"burstBracketStep"]) ? [BurstBracketStepEnum.toTheta objectForKey:[dic objectForKey:@"burstBracketStep"]] : nil
|
|
460
|
+
burstCompensation:!isNull([dic objectForKey:@"burstCompensation"]) ? [BurstCompensationEnum.toTheta objectForKey:[dic objectForKey:@"burstCompensation"]] : nil
|
|
461
|
+
burstMaxExposureTime:!isNull([dic objectForKey:@"burstMaxExposureTime"]) ? [BurstMaxExposureTimeEnum.toTheta objectForKey:[dic objectForKey:@"burstMaxExposureTime"]] : nil
|
|
462
|
+
burstEnableIsoControl:!isNull([dic objectForKey:@"burstEnableIsoControl"]) ? [BurstEnableIsoControlEnum.toTheta objectForKey:[dic objectForKey:@"burstEnableIsoControl"]] : nil
|
|
463
|
+
burstOrder:!isNull([dic objectForKey:@"burstOrder"]) ? [BurstOrderEnum.toTheta objectForKey:[dic objectForKey:@"burstOrder"]] : nil];
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
|
|
467
|
+
.setFromTheta = ^(NSMutableDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
468
|
+
if (opt.burstOption) {
|
|
469
|
+
NSMutableDictionary *burstOption = [NSMutableDictionary dictionary];
|
|
470
|
+
|
|
471
|
+
if (opt.burstOption.burstCaptureNum) {
|
|
472
|
+
[burstOption setObject:opt.burstOption.burstCaptureNum.name forKey:@"burstCaptureNum"];
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
if (opt.burstOption.burstBracketStep) {
|
|
476
|
+
[burstOption setObject:opt.burstOption.burstBracketStep.name forKey:@"burstBracketStep"];
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
if (opt.burstOption.burstCompensation) {
|
|
480
|
+
[burstOption setObject:opt.burstOption.burstCompensation.name forKey:@"burstCompensation"];
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
if (opt.burstOption.burstMaxExposureTime) {
|
|
484
|
+
[burstOption setObject:opt.burstOption.burstMaxExposureTime.name forKey:@"burstMaxExposureTime"];
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
if (opt.burstOption.burstEnableIsoControl) {
|
|
488
|
+
[burstOption setObject:opt.burstOption.burstEnableIsoControl.name forKey:@"burstEnableIsoControl"];
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
if (opt.burstOption.burstOrder) {
|
|
492
|
+
[burstOption setObject:opt.burstOption.burstOrder.name forKey:@"burstOrder"];
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
[rct setObject:burstOption forKey:@"burstOption"];
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
|
|
285
500
|
/**
|
|
286
501
|
* ChargingStateEnum converter
|
|
287
502
|
*/
|
|
@@ -387,6 +602,32 @@ static convert_t AuthModeEnum = {
|
|
|
387
602
|
}
|
|
388
603
|
};
|
|
389
604
|
|
|
605
|
+
/**
|
|
606
|
+
* AiAutoThumbnailEnum converter
|
|
607
|
+
*/
|
|
608
|
+
static convert_t AiAutoThumbnailEnum = {
|
|
609
|
+
.toTheta = @{
|
|
610
|
+
@"ON": THETACThetaRepositoryAiAutoThumbnailEnum.on,
|
|
611
|
+
@"OFF": THETACThetaRepositoryAiAutoThumbnailEnum.off
|
|
612
|
+
},
|
|
613
|
+
.fromTheta = @{
|
|
614
|
+
THETACThetaRepositoryAiAutoThumbnailEnum.on: @"ON",
|
|
615
|
+
THETACThetaRepositoryAiAutoThumbnailEnum.off: @"OFF"
|
|
616
|
+
},
|
|
617
|
+
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
618
|
+
id val = [AiAutoThumbnailEnum.toTheta objectForKey:[rct objectForKey:@"aiAutoThumbnail"]];
|
|
619
|
+
if (val) {
|
|
620
|
+
opt.aiAutoThumbnail = val;
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
.setFromTheta = ^(NSMutableDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
624
|
+
id val = [AiAutoThumbnailEnum.fromTheta objectForKey:opt.aiAutoThumbnail];
|
|
625
|
+
if (val) {
|
|
626
|
+
[rct setObject:val forKey:@"aiAutoThumbnail"];
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
|
|
390
631
|
/**
|
|
391
632
|
* ApertureEnum converter
|
|
392
633
|
*/
|
|
@@ -521,17 +762,40 @@ static convert_t CameraModeEnum = {
|
|
|
521
762
|
}
|
|
522
763
|
};
|
|
523
764
|
|
|
765
|
+
/**
|
|
766
|
+
* CaptureInterval converter
|
|
767
|
+
*/
|
|
768
|
+
static convert_t CaptureIntervalConverter = {
|
|
769
|
+
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
770
|
+
NSNumber* val = [rct objectForKey:@"captureInterval"];
|
|
771
|
+
if (val) {
|
|
772
|
+
opt.captureInterval = [THETACInt numberWithInt:[val intValue]];
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
.setFromTheta = ^(NSMutableDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
776
|
+
if (opt.captureInterval) {
|
|
777
|
+
[rct setObject:opt.captureInterval forKey:@"captureInterval"];
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
};
|
|
781
|
+
|
|
524
782
|
/**
|
|
525
783
|
* CaptureModeEnum converter
|
|
526
784
|
*/
|
|
527
785
|
static convert_t CaptureModeEnum = {
|
|
528
786
|
.toTheta = @{
|
|
529
787
|
@"IMAGE": THETACThetaRepositoryCaptureModeEnum.image,
|
|
530
|
-
@"VIDEO": THETACThetaRepositoryCaptureModeEnum.video
|
|
788
|
+
@"VIDEO": THETACThetaRepositoryCaptureModeEnum.video,
|
|
789
|
+
@"LIVE_STREAMING": THETACThetaRepositoryCaptureModeEnum.liveStreaming,
|
|
790
|
+
@"INTERVAL": THETACThetaRepositoryCaptureModeEnum.interval,
|
|
791
|
+
@"PRESET": THETACThetaRepositoryCaptureModeEnum.preset
|
|
531
792
|
},
|
|
532
793
|
.fromTheta = @{
|
|
533
794
|
THETACThetaRepositoryCaptureModeEnum.image: @"IMAGE",
|
|
534
|
-
THETACThetaRepositoryCaptureModeEnum.video: @"VIDEO"
|
|
795
|
+
THETACThetaRepositoryCaptureModeEnum.video: @"VIDEO",
|
|
796
|
+
THETACThetaRepositoryCaptureModeEnum.liveStreaming: @"LIVE_STREAMING",
|
|
797
|
+
THETACThetaRepositoryCaptureModeEnum.interval: @"INTERVAL",
|
|
798
|
+
THETACThetaRepositoryCaptureModeEnum.preset: @"PRESET"
|
|
535
799
|
},
|
|
536
800
|
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
537
801
|
id val = [CaptureModeEnum.toTheta objectForKey:[rct objectForKey:@"captureMode"]];
|
|
@@ -547,6 +811,61 @@ static convert_t CaptureModeEnum = {
|
|
|
547
811
|
}
|
|
548
812
|
};
|
|
549
813
|
|
|
814
|
+
/**
|
|
815
|
+
* CaptureNumber converter
|
|
816
|
+
*/
|
|
817
|
+
static convert_t CaptureNumberConverter = {
|
|
818
|
+
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
819
|
+
NSNumber* val = [rct objectForKey:@"captureNumber"];
|
|
820
|
+
if (val) {
|
|
821
|
+
opt.captureNumber = [THETACInt numberWithInt:[val intValue]];
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
.setFromTheta = ^(NSMutableDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
825
|
+
if (opt.captureNumber) {
|
|
826
|
+
[rct setObject:opt.captureNumber forKey:@"captureNumber"];
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
};
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* ContinuousNumberEnum converter
|
|
833
|
+
*/
|
|
834
|
+
static convert_t ContinuousNumberEnum = {
|
|
835
|
+
.toTheta = nil,
|
|
836
|
+
.fromTheta = nil,
|
|
837
|
+
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
838
|
+
if (!ContinuousNumberEnum.toTheta) {
|
|
839
|
+
NSMutableDictionary* dictionary = [[NSMutableDictionary alloc] init];
|
|
840
|
+
THETACKotlinArray* array = THETACThetaRepositoryContinuousNumberEnum.values;
|
|
841
|
+
for (int i = 0; i < array.size; i++) {
|
|
842
|
+
THETACThetaRepositoryContinuousNumberEnum* item = [array getIndex:i];
|
|
843
|
+
[dictionary setObject:item forKey:item.name];
|
|
844
|
+
}
|
|
845
|
+
ContinuousNumberEnum.toTheta = dictionary;
|
|
846
|
+
}
|
|
847
|
+
id val = [ContinuousNumberEnum.toTheta objectForKey:[rct objectForKey:@"continuousNumber"]];
|
|
848
|
+
if (val) {
|
|
849
|
+
opt.continuousNumber = val;
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
.setFromTheta = ^(NSMutableDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
853
|
+
if (!ContinuousNumberEnum.fromTheta) {
|
|
854
|
+
NSMutableDictionary* dictionary = [[NSMutableDictionary alloc] init];
|
|
855
|
+
THETACKotlinArray* array = THETACThetaRepositoryContinuousNumberEnum.values;
|
|
856
|
+
for (int i = 0; i < array.size; i++) {
|
|
857
|
+
THETACThetaRepositoryContinuousNumberEnum* item = [array getIndex:i];
|
|
858
|
+
[dictionary setObject:item.name forKey:item];
|
|
859
|
+
}
|
|
860
|
+
ContinuousNumberEnum.fromTheta = dictionary;
|
|
861
|
+
}
|
|
862
|
+
id val = [ContinuousNumberEnum.fromTheta objectForKey:opt.continuousNumber];
|
|
863
|
+
if (val) {
|
|
864
|
+
[rct setObject:val forKey:@"continuousNumber"];
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
};
|
|
868
|
+
|
|
550
869
|
/**
|
|
551
870
|
* ExposureCompensationEnum converter
|
|
552
871
|
*/
|
|
@@ -851,13 +1170,17 @@ static convert_t FileFormatEnum = {
|
|
|
851
1170
|
static convert_t FilterEnum = {
|
|
852
1171
|
.toTheta = @{
|
|
853
1172
|
@"OFF": THETACThetaRepositoryFilterEnum.off,
|
|
1173
|
+
@"DR_COMP": THETACThetaRepositoryFilterEnum.drComp,
|
|
854
1174
|
@"NOISE_REDUCTION": THETACThetaRepositoryFilterEnum.noiseReduction,
|
|
855
|
-
@"HDR": THETACThetaRepositoryFilterEnum.hdr
|
|
1175
|
+
@"HDR": THETACThetaRepositoryFilterEnum.hdr,
|
|
1176
|
+
@"HH_HDR": THETACThetaRepositoryFilterEnum.hhHdr
|
|
856
1177
|
},
|
|
857
1178
|
.fromTheta = @{
|
|
858
1179
|
THETACThetaRepositoryFilterEnum.off: @"OFF",
|
|
1180
|
+
THETACThetaRepositoryFilterEnum.drComp: @"DR_COMP",
|
|
859
1181
|
THETACThetaRepositoryFilterEnum.noiseReduction: @"NOISE_REDUCTION",
|
|
860
|
-
THETACThetaRepositoryFilterEnum.hdr: @"HDR"
|
|
1182
|
+
THETACThetaRepositoryFilterEnum.hdr: @"HDR",
|
|
1183
|
+
THETACThetaRepositoryFilterEnum.hhHdr: @"HH_HDR"
|
|
861
1184
|
},
|
|
862
1185
|
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
863
1186
|
id val = [FilterEnum.toTheta objectForKey:[rct objectForKey:@"filter"]];
|
|
@@ -1383,6 +1706,40 @@ static convert_t ColorTemperatureCvt = {
|
|
|
1383
1706
|
}
|
|
1384
1707
|
};
|
|
1385
1708
|
|
|
1709
|
+
/**
|
|
1710
|
+
* CompositeShootingOutputInterval converter
|
|
1711
|
+
*/
|
|
1712
|
+
static convert_t CompositeShootingOutputIntervalCvt = {
|
|
1713
|
+
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
1714
|
+
NSNumber* val = [rct objectForKey:@"compositeShootingOutputInterval"];
|
|
1715
|
+
if (val) {
|
|
1716
|
+
opt.compositeShootingOutputInterval = [THETACInt numberWithInt:[val intValue]];
|
|
1717
|
+
}
|
|
1718
|
+
},
|
|
1719
|
+
.setFromTheta = ^(NSMutableDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
1720
|
+
if (opt.compositeShootingOutputInterval) {
|
|
1721
|
+
[rct setObject:opt.compositeShootingOutputInterval forKey:@"compositeShootingOutputInterval"];
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
};
|
|
1725
|
+
|
|
1726
|
+
/**
|
|
1727
|
+
* CompositeShootingTime converter
|
|
1728
|
+
*/
|
|
1729
|
+
static convert_t CompositeShootingTimeCvt = {
|
|
1730
|
+
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
1731
|
+
NSNumber* val = [rct objectForKey:@"compositeShootingTime"];
|
|
1732
|
+
if (val) {
|
|
1733
|
+
opt.compositeShootingTime = [THETACInt numberWithInt:[val intValue]];
|
|
1734
|
+
}
|
|
1735
|
+
},
|
|
1736
|
+
.setFromTheta = ^(NSMutableDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
1737
|
+
if (opt.compositeShootingTime) {
|
|
1738
|
+
[rct setObject:opt.compositeShootingTime forKey:@"compositeShootingTime"];
|
|
1739
|
+
}
|
|
1740
|
+
},
|
|
1741
|
+
};
|
|
1742
|
+
|
|
1386
1743
|
/**
|
|
1387
1744
|
* DateTimeZone converter
|
|
1388
1745
|
*/
|
|
@@ -1651,7 +2008,7 @@ static convert_t WlanFrequencyEnum = {
|
|
|
1651
2008
|
},
|
|
1652
2009
|
.fromTheta = @{
|
|
1653
2010
|
THETACThetaRepositoryWlanFrequencyEnum.ghz24: @"GHZ_2_4",
|
|
1654
|
-
THETACThetaRepositoryWlanFrequencyEnum.ghz5: @"GHZ_5"
|
|
2011
|
+
THETACThetaRepositoryWlanFrequencyEnum.ghz5: @"GHZ_5"
|
|
1655
2012
|
},
|
|
1656
2013
|
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
1657
2014
|
id val = [WlanFrequencyEnum.toTheta objectForKey:[rct objectForKey:@"wlanFrequency"]];
|
|
@@ -1684,6 +2041,37 @@ static convert_t PasswordCvt = {
|
|
|
1684
2041
|
}
|
|
1685
2042
|
};
|
|
1686
2043
|
|
|
2044
|
+
/**
|
|
2045
|
+
* Preset convertor
|
|
2046
|
+
*/
|
|
2047
|
+
static convert_t PresetEnum = {
|
|
2048
|
+
.toTheta = @{
|
|
2049
|
+
@"FACE": THETACThetaRepositoryPresetEnum.face,
|
|
2050
|
+
@"NIGHT_VIEW": THETACThetaRepositoryPresetEnum.nightView,
|
|
2051
|
+
@"LENS_BY_LENS_EXPOSURE": THETACThetaRepositoryPresetEnum.lensByLensExposure,
|
|
2052
|
+
@"ROOM": THETACThetaRepositoryPresetEnum.room
|
|
2053
|
+
},
|
|
2054
|
+
.fromTheta = @{
|
|
2055
|
+
THETACThetaRepositoryPresetEnum.face: @"FACE",
|
|
2056
|
+
THETACThetaRepositoryPresetEnum.nightView: @"NIGHT_VIEW",
|
|
2057
|
+
THETACThetaRepositoryPresetEnum.lensByLensExposure: @"LENS_BY_LENS_EXPOSURE",
|
|
2058
|
+
THETACThetaRepositoryPresetEnum.room: @"ROOM"
|
|
2059
|
+
},
|
|
2060
|
+
.setToTheta = ^(NSDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
2061
|
+
id val = [PresetEnum.toTheta objectForKey:[rct objectForKey:@"preset"]];
|
|
2062
|
+
if (val) {
|
|
2063
|
+
opt.preset = val;
|
|
2064
|
+
}
|
|
2065
|
+
},
|
|
2066
|
+
.setFromTheta = ^(NSMutableDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
2067
|
+
id val = [PresetEnum.fromTheta objectForKey:opt.preset];
|
|
2068
|
+
if (val) {
|
|
2069
|
+
[rct setObject:val forKey:@"preset"];
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
};
|
|
2073
|
+
|
|
2074
|
+
|
|
1687
2075
|
/**
|
|
1688
2076
|
* Proxy converter
|
|
1689
2077
|
*/
|
|
@@ -1699,7 +2087,7 @@ static convert_t ProxyCvt = {
|
|
|
1699
2087
|
password:!isNull([proxyDic objectForKey:@"password"]) ? [proxyDic objectForKey:@"password"] : nil];
|
|
1700
2088
|
}
|
|
1701
2089
|
},
|
|
1702
|
-
|
|
2090
|
+
|
|
1703
2091
|
.setFromTheta = ^(NSMutableDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
1704
2092
|
if (opt.proxy) {
|
|
1705
2093
|
NSMutableDictionary *proxy = [NSMutableDictionary dictionary];
|
|
@@ -1709,19 +2097,19 @@ static convert_t ProxyCvt = {
|
|
|
1709
2097
|
if (opt.proxy.url) {
|
|
1710
2098
|
[proxy setObject:opt.proxy.url forKey:@"url"];
|
|
1711
2099
|
}
|
|
1712
|
-
|
|
2100
|
+
|
|
1713
2101
|
if (opt.proxy.port) {
|
|
1714
2102
|
[proxy setObject:@(opt.proxy.port.intValue) forKey:@"port"];
|
|
1715
2103
|
}
|
|
1716
|
-
|
|
2104
|
+
|
|
1717
2105
|
if (opt.proxy.userid) {
|
|
1718
2106
|
[proxy setObject:opt.proxy.userid forKey:@"userid"];
|
|
1719
2107
|
}
|
|
1720
|
-
|
|
2108
|
+
|
|
1721
2109
|
if (opt.proxy.password) {
|
|
1722
2110
|
[proxy setObject:opt.proxy.password forKey:@"password"];
|
|
1723
2111
|
}
|
|
1724
|
-
|
|
2112
|
+
|
|
1725
2113
|
[rct setObject:proxy forKey:@"proxy"];
|
|
1726
2114
|
}
|
|
1727
2115
|
}
|
|
@@ -1769,22 +2157,30 @@ static convert_t TimeShiftCvt = {
|
|
|
1769
2157
|
.setFromTheta = ^(NSMutableDictionary* rct, THETACThetaRepositoryOptions *opt) {
|
|
1770
2158
|
if (opt.timeShift) {
|
|
1771
2159
|
NSMutableDictionary *timeshift = [NSMutableDictionary dictionary];
|
|
1772
|
-
|
|
2160
|
+
|
|
1773
2161
|
if (opt.timeShift.isFrontFirst) {
|
|
1774
2162
|
[timeshift setObject:@(((NSNumber *) opt.timeShift.isFrontFirst).boolValue) forKey:@"isFrontFirst"];
|
|
1775
2163
|
}
|
|
1776
|
-
|
|
2164
|
+
|
|
1777
2165
|
if (opt.timeShift.firstInterval) {
|
|
1778
2166
|
[timeshift setObject:[TimeShiftCvt.fromTheta objectForKey:opt.timeShift.firstInterval] forKey:@"firstInterval"];
|
|
1779
2167
|
}
|
|
1780
|
-
|
|
2168
|
+
|
|
1781
2169
|
if (opt.timeShift.secondInterval) {
|
|
1782
2170
|
[timeshift setObject:[TimeShiftCvt.fromTheta objectForKey:opt.timeShift.secondInterval] forKey:@"secondInterval"];
|
|
1783
2171
|
}
|
|
1784
|
-
|
|
2172
|
+
|
|
1785
2173
|
[rct setObject:timeshift forKey:@"timeShift"];
|
|
1786
2174
|
}
|
|
1787
|
-
}
|
|
2175
|
+
},
|
|
2176
|
+
.setTimeShiftOption = ^(NSDictionary* rct, THETACTimeShiftCaptureBuilder *builder) {
|
|
2177
|
+
NSDictionary *timeshiftDic = [rct objectForKey:@"timeShift"];
|
|
2178
|
+
if (timeshiftDic) {
|
|
2179
|
+
[builder setIsFrontFirstIsFrontFirst:!isNull([timeshiftDic objectForKey:@"isFrontFirst"]) ? [THETACBoolean numberWithBool:((NSNumber*) [timeshiftDic objectForKey:@"isFrontFirst"]).boolValue] : nil];
|
|
2180
|
+
[builder setFirstIntervalInterval:!isNull([timeshiftDic objectForKey:@"firstInterval"]) ? [TimeShiftCvt.toTheta objectForKey:[timeshiftDic objectForKey:@"firstInterval"]] : nil];
|
|
2181
|
+
[builder setSecondIntervalInterval:!isNull([timeshiftDic objectForKey:@"secondInterval"]) ? [TimeShiftCvt.toTheta objectForKey:[timeshiftDic objectForKey:@"secondInterval"]] : nil];
|
|
2182
|
+
}
|
|
2183
|
+
},
|
|
1788
2184
|
};
|
|
1789
2185
|
|
|
1790
2186
|
/**
|
|
@@ -1854,12 +2250,21 @@ static convert_t UsernameCvt = {
|
|
|
1854
2250
|
* OptionNames converter
|
|
1855
2251
|
*/
|
|
1856
2252
|
static NSDictionary *NameToOptionEnum = @{
|
|
2253
|
+
@"AiAutoThumbnail": THETACThetaRepositoryOptionNameEnum.aiautothumbnail,
|
|
1857
2254
|
@"Aperture": THETACThetaRepositoryOptionNameEnum.aperture,
|
|
2255
|
+
@"Bitrate": THETACThetaRepositoryOptionNameEnum.bitrate,
|
|
1858
2256
|
@"BluetoothPower": THETACThetaRepositoryOptionNameEnum.bluetoothpower,
|
|
2257
|
+
@"BurstMode": THETACThetaRepositoryOptionNameEnum.burstmode,
|
|
2258
|
+
@"BurstOption": THETACThetaRepositoryOptionNameEnum.burstoption,
|
|
1859
2259
|
@"CameraControlSource": THETACThetaRepositoryOptionNameEnum.cameracontrolsource,
|
|
1860
2260
|
@"CameraMode": THETACThetaRepositoryOptionNameEnum.cameramode,
|
|
2261
|
+
@"CaptureInterval": THETACThetaRepositoryOptionNameEnum.captureinterval,
|
|
1861
2262
|
@"CaptureMode": THETACThetaRepositoryOptionNameEnum.capturemode,
|
|
2263
|
+
@"CaptureNumber": THETACThetaRepositoryOptionNameEnum.capturenumber,
|
|
1862
2264
|
@"ColorTemperature": THETACThetaRepositoryOptionNameEnum.colortemperature,
|
|
2265
|
+
@"CompositeShootingOutputInterval": THETACThetaRepositoryOptionNameEnum.compositeshootingoutputinterval,
|
|
2266
|
+
@"CompositeShootingTime": THETACThetaRepositoryOptionNameEnum.compositeshootingtime,
|
|
2267
|
+
@"ContinuousNumber": THETACThetaRepositoryOptionNameEnum.continuousnumber,
|
|
1863
2268
|
@"DateTimeZone": THETACThetaRepositoryOptionNameEnum.datetimezone,
|
|
1864
2269
|
@"ExposureCompensation": THETACThetaRepositoryOptionNameEnum.exposurecompensation,
|
|
1865
2270
|
@"ExposureDelay": THETACThetaRepositoryOptionNameEnum.exposuredelay,
|
|
@@ -1876,6 +2281,7 @@ static NSDictionary *NameToOptionEnum = @{
|
|
|
1876
2281
|
@"OffDelay": THETACThetaRepositoryOptionNameEnum.offdelay,
|
|
1877
2282
|
@"Password": THETACThetaRepositoryOptionNameEnum.password,
|
|
1878
2283
|
@"PowerSaving": THETACThetaRepositoryOptionNameEnum.powersaving,
|
|
2284
|
+
@"Preset": THETACThetaRepositoryOptionNameEnum.preset,
|
|
1879
2285
|
@"PreviewFormat": THETACThetaRepositoryOptionNameEnum.previewformat,
|
|
1880
2286
|
@"Proxy": THETACThetaRepositoryOptionNameEnum.proxy,
|
|
1881
2287
|
@"ShootingMethod": THETACThetaRepositoryOptionNameEnum.shootingmethod,
|
|
@@ -1897,12 +2303,21 @@ static NSDictionary *NameToOptionEnum = @{
|
|
|
1897
2303
|
* OptionNameEnum to OptionName
|
|
1898
2304
|
*/
|
|
1899
2305
|
static NSDictionary *OptionEnumToOption = @{
|
|
2306
|
+
@"AiAutoThumbnail": @"aiAutoThumbnail",
|
|
1900
2307
|
@"Aperture": @"aperture",
|
|
2308
|
+
@"Bitrate": @"bitrate",
|
|
1901
2309
|
@"BluetoothPower": @"bluetoothPower",
|
|
2310
|
+
@"BurstMode": @"burstMode",
|
|
2311
|
+
@"BurstOption": @"burstOption",
|
|
1902
2312
|
@"CameraControlSource": @"cameraControlSource",
|
|
1903
2313
|
@"CameraMode": @"cameraMode",
|
|
2314
|
+
@"CaptureInterval": @"captureInterval",
|
|
1904
2315
|
@"CaptureMode": @"captureMode",
|
|
2316
|
+
@"CaptureNumber": @"captureNumber",
|
|
1905
2317
|
@"ColorTemperature": @"colorTemperature",
|
|
2318
|
+
@"CompositeShootingOutputInterval": @"compositeShootingOutputInterval",
|
|
2319
|
+
@"CompositeShootingTime": @"compositeShootingTime",
|
|
2320
|
+
@"ContinuousNumber": @"continuousNumber",
|
|
1906
2321
|
@"DateTimeZone": @"dateTimeZone",
|
|
1907
2322
|
@"ExposureCompensation": @"exposureCompensation",
|
|
1908
2323
|
@"ExposureDelay": @"exposureDelay",
|
|
@@ -1919,6 +2334,7 @@ static NSDictionary *OptionEnumToOption = @{
|
|
|
1919
2334
|
@"OffDelay": @"offDelay",
|
|
1920
2335
|
@"Password": @"password",
|
|
1921
2336
|
@"PowerSaving": @"powerSaving",
|
|
2337
|
+
@"Preset": @"preset",
|
|
1922
2338
|
@"PreviewFormat": @"previewFormat",
|
|
1923
2339
|
@"Proxy": @"proxy",
|
|
1924
2340
|
@"ShootingMethod": @"shootingMethod",
|
|
@@ -1943,12 +2359,21 @@ typedef convert_t * (^OptionConverter)();
|
|
|
1943
2359
|
* option converter tables
|
|
1944
2360
|
*/
|
|
1945
2361
|
static NSDictionary<NSString*, OptionConverter> *NameToConverter = @{
|
|
2362
|
+
@"aiAutoThumbnail": ^{return &AiAutoThumbnailEnum;},
|
|
1946
2363
|
@"aperture": ^{return &ApertureEnum;},
|
|
2364
|
+
@"bitrate": ^{return &BitrateEnum;},
|
|
1947
2365
|
@"bluetoothPower": ^{return &BluetoothPowerEnum;},
|
|
2366
|
+
@"burstMode": ^{return &BurstModeEnum;},
|
|
2367
|
+
@"burstOption": ^{return &BurstOptionCvt;},
|
|
1948
2368
|
@"cameraControlSource": ^{return &CameraControlSourceEnum;},
|
|
1949
2369
|
@"cameraMode": ^{return &CameraModeEnum;},
|
|
2370
|
+
@"captureInterval": ^{return &CaptureIntervalConverter;},
|
|
1950
2371
|
@"captureMode": ^{return &CaptureModeEnum;},
|
|
2372
|
+
@"captureNumber": ^{return &CaptureNumberConverter;},
|
|
1951
2373
|
@"colorTemperature": ^{return &ColorTemperatureCvt;},
|
|
2374
|
+
@"compositeShootingOutputInterval": ^{return &CompositeShootingOutputIntervalCvt;},
|
|
2375
|
+
@"compositeShootingTime": ^{return &CompositeShootingTimeCvt;},
|
|
2376
|
+
@"continuousNumber": ^{return &ContinuousNumberEnum;},
|
|
1952
2377
|
@"dateTimeZone": ^{return &DateTimeZoneCvt;},
|
|
1953
2378
|
@"exposureCompensation": ^{return &ExposureCompensationEnum;},
|
|
1954
2379
|
@"exposureDelay": ^{return &ExposureDelayEnum;},
|
|
@@ -1965,6 +2390,7 @@ static NSDictionary<NSString*, OptionConverter> *NameToConverter = @{
|
|
|
1965
2390
|
@"offDelay": ^{return &OffDelayEnum;},
|
|
1966
2391
|
@"password": ^{return &PasswordCvt;},
|
|
1967
2392
|
@"powerSaving": ^{return &PowerSavingEnum;},
|
|
2393
|
+
@"preset": ^{return &PresetEnum;},
|
|
1968
2394
|
@"previewFormat": ^{return &PreviewFormatEnum;},
|
|
1969
2395
|
@"proxy": ^{return &ProxyCvt;},
|
|
1970
2396
|
@"shootingMethod": ^{return &ShootingMethodEnum;},
|
|
@@ -2050,6 +2476,72 @@ THETACThetaRepositoryTimeout* timeoutToTheta(NSDictionary* objects)
|
|
|
2050
2476
|
return timeout;
|
|
2051
2477
|
}
|
|
2052
2478
|
|
|
2479
|
+
NSDictionary* fileInfoFromTheta(THETACThetaRepositoryFileInfo* fileInfo) {
|
|
2480
|
+
NSMutableDictionary *fileInfoObject = [NSMutableDictionary dictionaryWithDictionary:@{
|
|
2481
|
+
@"name":fileInfo.name,
|
|
2482
|
+
@"fileUrl":fileInfo.fileUrl,
|
|
2483
|
+
@"size":@(fileInfo.size),
|
|
2484
|
+
@"dateTime":fileInfo.dateTime,
|
|
2485
|
+
@"thumbnailUrl":fileInfo.thumbnailUrl
|
|
2486
|
+
}];
|
|
2487
|
+
if (fileInfo.dateTimeZone) {
|
|
2488
|
+
[fileInfoObject setObject:fileInfo.dateTimeZone forKey:@"dateTimeZone"];
|
|
2489
|
+
}
|
|
2490
|
+
if (fileInfo.lat) {
|
|
2491
|
+
[fileInfoObject setObject:@(fileInfo.lat.floatValue) forKey:@"lat"];
|
|
2492
|
+
}
|
|
2493
|
+
if (fileInfo.lng) {
|
|
2494
|
+
[fileInfoObject setObject:@(fileInfo.lng.floatValue) forKey:@"lng"];
|
|
2495
|
+
}
|
|
2496
|
+
if (fileInfo.width) {
|
|
2497
|
+
[fileInfoObject setObject:@(fileInfo.width.intValue) forKey:@"width"];
|
|
2498
|
+
}
|
|
2499
|
+
if (fileInfo.height) {
|
|
2500
|
+
[fileInfoObject setObject:@(fileInfo.height.intValue) forKey:@"height"];
|
|
2501
|
+
}
|
|
2502
|
+
if (fileInfo.intervalCaptureGroupId) {
|
|
2503
|
+
[fileInfoObject setObject:fileInfo.intervalCaptureGroupId forKey:@"intervalCaptureGroupId"];
|
|
2504
|
+
}
|
|
2505
|
+
if (fileInfo.compositeShootingGroupId) {
|
|
2506
|
+
[fileInfoObject setObject:fileInfo.compositeShootingGroupId forKey:@"compositeShootingGroupId"];
|
|
2507
|
+
}
|
|
2508
|
+
if (fileInfo.autoBracketGroupId) {
|
|
2509
|
+
[fileInfoObject setObject:fileInfo.autoBracketGroupId forKey:@"autoBracketGroupId"];
|
|
2510
|
+
}
|
|
2511
|
+
if (fileInfo.recordTime) {
|
|
2512
|
+
[fileInfoObject setObject:@(fileInfo.recordTime.intValue) forKey:@"recordTime"];
|
|
2513
|
+
}
|
|
2514
|
+
if (fileInfo.isProcessed) {
|
|
2515
|
+
[fileInfoObject setObject:@(fileInfo.isProcessed.boolValue) forKey:@"isProcessed"];
|
|
2516
|
+
}
|
|
2517
|
+
if (fileInfo.previewUrl) {
|
|
2518
|
+
[fileInfoObject setObject:fileInfo.previewUrl forKey:@"previewUrl"];
|
|
2519
|
+
}
|
|
2520
|
+
if (fileInfo.codec) {
|
|
2521
|
+
[fileInfoObject setObject:fileInfo.codec.name forKey:@"codec"];
|
|
2522
|
+
}
|
|
2523
|
+
if (fileInfo.projectionType) {
|
|
2524
|
+
[fileInfoObject setObject:fileInfo.projectionType.name forKey:@"projectionType"];
|
|
2525
|
+
}
|
|
2526
|
+
if (fileInfo.continuousShootingGroupId) {
|
|
2527
|
+
[fileInfoObject setObject:fileInfo.continuousShootingGroupId forKey:@"continuousShootingGroupId"];
|
|
2528
|
+
}
|
|
2529
|
+
if (fileInfo.frameRate) {
|
|
2530
|
+
[fileInfoObject setObject:@(fileInfo.frameRate.intValue) forKey:@"frameRate"];
|
|
2531
|
+
}
|
|
2532
|
+
if (fileInfo.favorite) {
|
|
2533
|
+
[fileInfoObject setObject:@(fileInfo.favorite.boolValue) forKey:@"favorite"];
|
|
2534
|
+
}
|
|
2535
|
+
if (fileInfo.imageDescription) {
|
|
2536
|
+
[fileInfoObject setObject:fileInfo.imageDescription forKey:@"imageDescription"];
|
|
2537
|
+
}
|
|
2538
|
+
if (fileInfo.storageID) {
|
|
2539
|
+
[fileInfoObject setObject:fileInfo.storageID forKey:@"storageID"];
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
return fileInfoObject;
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2053
2545
|
/**
|
|
2054
2546
|
* ThetaClientReactNative implementation
|
|
2055
2547
|
*/
|
|
@@ -2164,6 +2656,22 @@ RCT_REMAP_METHOD(isInitialized,
|
|
|
2164
2656
|
resolve(_theta != nil ? @(YES) : @(NO));
|
|
2165
2657
|
}
|
|
2166
2658
|
|
|
2659
|
+
/**
|
|
2660
|
+
* getThetaModel - Returns the connected THETA model.
|
|
2661
|
+
* @param resolve for getThetaModel
|
|
2662
|
+
* @param rejecter
|
|
2663
|
+
*/
|
|
2664
|
+
RCT_REMAP_METHOD(getThetaModel,
|
|
2665
|
+
getThetaModelWithResolver:(RCTPromiseResolveBlock)resolve
|
|
2666
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
2667
|
+
{
|
|
2668
|
+
if (!_theta) {
|
|
2669
|
+
reject(ERROR_CODE_ERROR, MESSAGE_NOT_INIT, nil);
|
|
2670
|
+
return;
|
|
2671
|
+
}
|
|
2672
|
+
resolve(self.theta.cameraModel ? self.theta.cameraModel.name : nil);
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2167
2675
|
/**
|
|
2168
2676
|
* getThetaInfo - retrieve ThetaInfo from THETA via repository
|
|
2169
2677
|
* @param resolve resolver for getThetaInfo
|
|
@@ -2186,22 +2694,28 @@ RCT_REMAP_METHOD(getThetaInfo,
|
|
|
2186
2694
|
for (THETACInt *element in info.apiLevel) {
|
|
2187
2695
|
[apiLevelList addObject:@([element intValue])];
|
|
2188
2696
|
}
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2697
|
+
NSMutableDictionary *thetaInfoObject = [NSMutableDictionary dictionaryWithDictionary:@{
|
|
2698
|
+
@"manufacturer": info.manufacturer,
|
|
2699
|
+
@"model": info.model,
|
|
2700
|
+
@"serialNumber": info.serialNumber,
|
|
2701
|
+
@"wlanMacAddress": info.wlanMacAddress != nil ? info.wlanMacAddress : [NSNull null],
|
|
2702
|
+
@"bluetoothMacAddress": info.bluetoothMacAddress != nil ? info.bluetoothMacAddress : [NSNull null],
|
|
2703
|
+
@"firmwareVersion": info.firmwareVersion,
|
|
2704
|
+
@"supportUrl": info.supportUrl,
|
|
2705
|
+
@"hasGps": @(info.hasGps),
|
|
2706
|
+
@"hasGyro": @(info.hasGyro),
|
|
2707
|
+
@"uptime": @(info.uptime),
|
|
2708
|
+
@"api": info.api,
|
|
2709
|
+
@"endpoints": @{
|
|
2710
|
+
@"httpPort": @(info.endpoints.httpPort),
|
|
2711
|
+
@"httpUpdatesPort": @(info.endpoints.httpUpdatesPort),
|
|
2712
|
+
},
|
|
2713
|
+
@"apiLevel": apiLevelList
|
|
2714
|
+
}];
|
|
2715
|
+
if (self.theta.cameraModel) {
|
|
2716
|
+
[thetaInfoObject setObject:self.theta.cameraModel.name forKey:@"thetaModel"];
|
|
2717
|
+
}
|
|
2718
|
+
resolve(thetaInfoObject);
|
|
2205
2719
|
} else {
|
|
2206
2720
|
reject(ERROR_CODE_ERROR, @"no info", nil);
|
|
2207
2721
|
}
|
|
@@ -2291,17 +2805,7 @@ RCT_REMAP_METHOD(listFiles,
|
|
|
2291
2805
|
NSMutableArray *ary = [[NSMutableArray alloc] init];
|
|
2292
2806
|
for (int i = 0; i < items.fileList.count; i++) {
|
|
2293
2807
|
THETACThetaRepositoryFileInfo *finfo = items.fileList[i];
|
|
2294
|
-
|
|
2295
|
-
@"name":finfo.name,
|
|
2296
|
-
@"size":@(finfo.size),
|
|
2297
|
-
@"dateTime":finfo.dateTime,
|
|
2298
|
-
@"thumbnailUrl":finfo.thumbnailUrl,
|
|
2299
|
-
@"fileUrl":finfo.fileUrl
|
|
2300
|
-
}];
|
|
2301
|
-
if (finfo.storageID) {
|
|
2302
|
-
[fileInfoObject setObject:finfo.storageID forKey:@"storageID"];
|
|
2303
|
-
}
|
|
2304
|
-
[ary addObject:fileInfoObject];
|
|
2808
|
+
[ary addObject:fileInfoFromTheta(finfo)];
|
|
2305
2809
|
}
|
|
2306
2810
|
resolve(@{@"fileList":ary,
|
|
2307
2811
|
@"totalEntries": @(items.totalEntries)});
|
|
@@ -2648,7 +3152,7 @@ RCT_REMAP_METHOD(buildTimeShiftCapture,
|
|
|
2648
3152
|
reject(@"error", @"no time-shift capture pbuilder", nil);
|
|
2649
3153
|
return;
|
|
2650
3154
|
}
|
|
2651
|
-
|
|
3155
|
+
|
|
2652
3156
|
for (id option in [options allKeys]) {
|
|
2653
3157
|
convert_t *convert = [NameToConverter objectForKey:option]();
|
|
2654
3158
|
if (convert && convert->setTimeShiftOption) {
|
|
@@ -2692,7 +3196,7 @@ RCT_REMAP_METHOD(startTimeShiftCapture,
|
|
|
2692
3196
|
reject(@"error", @"no timeShiftCapture", nil);
|
|
2693
3197
|
return;
|
|
2694
3198
|
}
|
|
2695
|
-
|
|
3199
|
+
|
|
2696
3200
|
TimeShiftStartCallback *callback = [[TimeShiftStartCallback alloc] initWith:self
|
|
2697
3201
|
withProgress:^(float completion) {
|
|
2698
3202
|
[self sendEventWithName:EVENT_NOTIFY
|
|
@@ -3439,7 +3943,7 @@ RCT_REMAP_METHOD(startPlugin,
|
|
|
3439
3943
|
completionHandler:^(NSError *error) {
|
|
3440
3944
|
if (error) {
|
|
3441
3945
|
reject(ERROR_CODE_ERROR, [error localizedDescription], error);
|
|
3442
|
-
|
|
3946
|
+
|
|
3443
3947
|
} else {
|
|
3444
3948
|
resolve(@(YES));
|
|
3445
3949
|
}
|
|
@@ -3462,7 +3966,7 @@ RCT_REMAP_METHOD(stopPlugin,
|
|
|
3462
3966
|
[_theta stopPluginWithCompletionHandler:^(NSError *error) {
|
|
3463
3967
|
if (error) {
|
|
3464
3968
|
reject(ERROR_CODE_ERROR, [error localizedDescription], error);
|
|
3465
|
-
|
|
3969
|
+
|
|
3466
3970
|
} else {
|
|
3467
3971
|
resolve(@(YES));
|
|
3468
3972
|
}
|
|
@@ -3488,7 +3992,7 @@ RCT_REMAP_METHOD(getPluginLicense,
|
|
|
3488
3992
|
completionHandler:^(NSString *pluginLicense, NSError *error) {
|
|
3489
3993
|
if (error) {
|
|
3490
3994
|
reject(ERROR_CODE_ERROR, [error localizedDescription], error);
|
|
3491
|
-
|
|
3995
|
+
|
|
3492
3996
|
} else if (pluginLicense) {
|
|
3493
3997
|
resolve(pluginLicense);
|
|
3494
3998
|
} else {
|