OSDN Git Service

THETA S/SCでは、Video撮影モード時にライブビューができないのに対応。
authorMRSa <mrsa@myad.jp>
Mon, 11 Jan 2021 14:14:33 +0000 (23:14 +0900)
committerMRSa <mrsa@myad.jp>
Mon, 11 Jan 2021 14:14:33 +0000 (23:14 +0900)
wear/src/main/java/jp/sfjp/gokigen/a01c/thetacamerawrapper/ThetaCameraController.kt
wear/src/main/java/jp/sfjp/gokigen/a01c/thetacamerawrapper/operation/ThetaMovieRecordingControl.kt

index 10fc220..af038af 100644 (file)
@@ -26,7 +26,6 @@ import jp.sfjp.gokigen.a01c.thetacamerawrapper.operation.ThetaDummyOperation
 import jp.sfjp.gokigen.a01c.thetacamerawrapper.operation.ThetaMovieRecordingControl
 import jp.sfjp.gokigen.a01c.thetacamerawrapper.operation.ThetaOptionUpdateControl
 import jp.sfjp.gokigen.a01c.thetacamerawrapper.operation.ThetaSingleShotControl
-import java.util.*
 
 class ThetaCameraController(val context: AppCompatActivity, private val focusFrameDisplay: IAutoFocusFrameDisplay, private val showInformation: IShowInformation, private val receiver: ICameraStatusReceiver, private val preferences: PreferenceAccessWrapper) : ICameraController, IIndicatorControl
 {
@@ -105,6 +104,8 @@ class ThetaCameraController(val context: AppCompatActivity, private val focusFra
         try
         {
             optionSet.setOptions("\"captureMode\" : \"image\"", apiV21)
+            waitMs(200);
+            startLiveView()
         }
         catch (e : Exception)
         {
@@ -123,6 +124,10 @@ class ThetaCameraController(val context: AppCompatActivity, private val focusFra
             else
             {
                 optionSet.setOptions("\"captureMode\" : \"_video\"", apiV21)
+
+                // API Level 1 の対応機種では、Videoモードでライブビューが動かないので止める
+                waitMs(200);
+                stopLiveView()
             }
         }
         catch (e : Exception)
index 8306be0..08125ea 100644 (file)
@@ -57,15 +57,6 @@ class ThetaMovieRecordingControl(val context: Context, private val sessionIdProv
                     {
                         Log.v(TAG, " startCapture() : $result")
                         indicator.onShootingStatusUpdate(IIndicatorControl.shootingStatus.Starting)
-
-                        // 画像処理が終わるまで待つ
-                        //waitChangeStatus()
-
-                        // ライブビューのの再実行を指示する
-                        //indicator.onShootingStatusUpdate(IIndicatorControl.shootingStatus.Stopping)
-                        //liveViewControl.stopLiveView()
-                        //waitMs(300) // ちょっと待つ...
-                        //liveViewControl.startLiveView()
                     }
                     else
                     {
@@ -109,9 +100,13 @@ class ThetaMovieRecordingControl(val context: Context, private val sessionIdProv
 
                         // ライブビューのの再実行を指示する
                         indicator.onShootingStatusUpdate(IIndicatorControl.shootingStatus.Stopping)
-                        liveViewControl.stopLiveView()
-                        waitMs(300) // ちょっと待つ...
-                        liveViewControl.startLiveView()
+                        if (useOSCv2)
+                        {
+                            // THETA V / THETA Z1 は、videoモードでライブビューができるので...
+                            liveViewControl.stopLiveView()
+                            waitMs(300) // ちょっと待つ...
+                            liveViewControl.startLiveView()
+                        }
                     }
                     else
                     {