Ricoh THETA のビュー・撮影
Révision | 4f2d3f5830fd5ae4553947935a9872bdee63910b (tree) |
---|---|
l'heure | 2021-03-06 23:39:32 |
Auteur | MRSa <mrsa@myad...> |
Commiter | MRSa |
スプラッシュスクリーンは、保存しないように対応。
@@ -222,12 +222,16 @@ class ThetaControl(private val context: AppCompatActivity, private val showInfor | ||
222 | 222 | IPreferencePropertyAccessor.CAPTURE_BOTH_CAMERA_AND_LIVE_VIEW, |
223 | 223 | IPreferencePropertyAccessor.CAPTURE_BOTH_CAMERA_AND_LIVE_VIEW_DEFAULT_VALUE |
224 | 224 | ) |
225 | - if (captureBothCamera) { | |
225 | + if ((captureBothCamera)&&(liveViewListener.isImageReceived())) | |
226 | + { | |
226 | 227 | // ライブビュー画像を保管する場合... |
227 | 228 | val thread = Thread { storeImage.doStore() } |
228 | - try { | |
229 | + try | |
230 | + { | |
229 | 231 | thread.start() |
230 | - } catch (e: Exception) { | |
232 | + } | |
233 | + catch (e: Exception) | |
234 | + { | |
231 | 235 | e.printStackTrace() |
232 | 236 | } |
233 | 237 | } |
@@ -23,6 +23,7 @@ class CameraLiveViewListenerImpl(private val context: Context) : IImageDataRecei | ||
23 | 23 | private var cachePics = ArrayList<ByteArray>() |
24 | 24 | private var maxCachePics : Int = 0 |
25 | 25 | private lateinit var imageBitmap : Bitmap |
26 | + private var imageReceived = false | |
26 | 27 | //private var bitmapConverter : IPreviewImageConverter = ImageConvertFactory().getImageConverter(0) |
27 | 28 | private lateinit var refresher : ILiveViewRefresher |
28 | 29 |
@@ -38,12 +39,18 @@ class CameraLiveViewListenerImpl(private val context: Context) : IImageDataRecei | ||
38 | 39 | setupLiveviewCache() |
39 | 40 | } |
40 | 41 | |
42 | + fun isImageReceived() : Boolean | |
43 | + { | |
44 | + return (imageReceived) | |
45 | + } | |
46 | + | |
41 | 47 | override fun onUpdateLiveView(data: ByteArray, metadata: Map<String, Any>?) |
42 | 48 | { |
43 | 49 | //Log.v(TAG, " onUpdateLiveView() : ${data.size} bytes.") |
44 | 50 | try |
45 | 51 | { |
46 | 52 | imageBitmap = BitmapFactory.decodeByteArray(data, 0, data.size) |
53 | + imageReceived = true | |
47 | 54 | refresh() |
48 | 55 | } |
49 | 56 | catch (e : Exception) |