--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="deploymentTargetDropDown">
+ <runningDeviceTargetSelectedWithDropDown>
+ <Target>
+ <type value="RUNNING_DEVICE_TARGET" />
+ <deviceKey>
+ <Key>
+ <type value="SERIAL_NUMBER" />
+ <value value="3e50111c1220" />
+ </Key>
+ </deviceKey>
+ </Target>
+ </runningDeviceTargetSelectedWithDropDown>
+ <timeTargetWasSelectedWithDropDown value="2022-03-09T13:41:39.682012500Z" />
+ </component>
+</project>
\ No newline at end of file
import jp.osdn.gokigen.gokigenassets.scene.IVibrator
import java.io.InputStream
-class ExamplePictureControl(private val context: AppCompatActivity, private val vibrator : IVibrator, informationNotify: IInformationReceiver, private val preference: ICameraPreferenceProvider, private val number : Int = 0) : IDisplayInjector, ILiveViewController, ICameraControl, View.OnClickListener, View.OnLongClickListener, ICaptureModeReceiver, ICameraShutter, IKeyDown, ICameraStatus
+class ExamplePictureControl(private val context: AppCompatActivity, private val vibrator : IVibrator, informationNotify: IInformationReceiver, private val preference: ICameraPreferenceProvider, private val number : Int = 0, private val liveViewListener :CameraLiveViewListenerImpl = CameraLiveViewListenerImpl(context, informationNotify, isDisableCache = true)) : IDisplayInjector, ILiveViewController, ICameraControl, View.OnClickListener, View.OnLongClickListener, ICaptureModeReceiver, ICameraShutter, IKeyDown, ICameraStatus
{
- private val liveViewListener = CameraLiveViewListenerImpl(context, informationNotify, isDisableCache = true)
private lateinit var refresher : ILiveViewRefresher
private var startForResult : ActivityResultLauncher<Intent> = context.registerForActivityResult(StartActivityForResult()) { result : ActivityResult ->
val uri = result.data?.data
if (uri != null)
{
+ context.contentResolver.takePersistableUriPermission(uri, Intent.FLAG_GRANT_READ_URI_PERMISSION)
applyPictureFile(uri, isStoreUri = true)
}
}
//val intent = Intent(Intent.ACTION_PICK)
//val intent = Intent(Intent.ACTION_GET_CONTENT)
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT)
+ intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
+ intent.addCategory(Intent.CATEGORY_OPENABLE)
intent.type = "image/*"
startForResult.launch(intent)
}
{
try
{
+ Log.v(TAG, "setRefresher() : ${preference.getCameraOption1()}")
this.refresher = refresher
liveViewListener.setRefresher(refresher)
imageView.setImageProvider(liveViewListener)
val option1 = preference.getCameraOption1()
if ((option1.isNotEmpty())&&(option1.contains("content://")))
{
+ Log.v(TAG, " setRefresher() : $option1 ")
applyPictureFile(Uri.parse(option1))
}
}
{
preference.getUpdater()?.setCameraOption1(uri.toString())
vibrator.vibrate(IVibrator.VibratePattern.SIMPLE_LONG)
+ Log.v(TAG, " ----- STORE PREFERENCE : ${uri.toString()}")
}
liveViewListener.onUpdateLiveView(fis.readBytes(), null, degrees)
if (::refresher.isInitialized)
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
-class CameraControl(private val activity : AppCompatActivity, private val preference: ICameraPreferenceProvider, private val vibrator : IVibrator, private val informationReceiver : IInformationReceiver, private val statusReceiver : ICameraStatusReceiver, private val number : Int = 0) : ICameraControl, ICameraShutter
+class CameraControl(private val activity : AppCompatActivity, private val preference: ICameraPreferenceProvider, private val vibrator : IVibrator, private val informationReceiver : IInformationReceiver, private val statusReceiver : ICameraStatusReceiver, private val number : Int = 0, private val liveViewListener:CameraLiveViewListenerImpl = CameraLiveViewListenerImpl(activity, informationReceiver)) : ICameraControl, ICameraShutter
{
private lateinit var cameraExecutor: ExecutorService
- private lateinit var liveViewListener : CameraLiveViewListenerImpl
private lateinit var fileControl : FileControl
private lateinit var storeImage : StoreImage
private lateinit var cameraXCamera : Camera
override fun initialize()
{
Log.v(TAG, " initialize()")
- liveViewListener = CameraLiveViewListenerImpl(activity, informationReceiver)
cameraExecutor = Executors.newSingleThreadExecutor()
storeImage = StoreImage(activity, liveViewListener)
clickKeyDownListeners.clear()
return (number)
}
- override fun getCameraShutter(id: Int): ICameraShutter? { return (this) }
+ override fun getCameraShutter(id: Int): ICameraShutter { return (this) }
private fun getClickKeyDownListener(id : Int) : CameraClickKeyDownListener
{
import jp.osdn.gokigen.gokigenassets.scene.IInformationReceiver
import jp.osdn.gokigen.gokigenassets.scene.IVibrator
-class OmdsCameraControl(private val context: AppCompatActivity, private val vibrator: IVibrator, informationNotify : IInformationReceiver, private val preference: ICameraPreferenceProvider, provider: ICameraStatusReceiver, private val number : Int = 0) : ICameraControl, View.OnClickListener, View.OnLongClickListener, ICameraShutter, IKeyDown, IDisplayInjector, IOmdsProtocolNotify
+class OmdsCameraControl(private val context: AppCompatActivity, private val vibrator: IVibrator, informationNotify : IInformationReceiver, private val preference: ICameraPreferenceProvider, provider: ICameraStatusReceiver, private val number : Int = 0, private val liveViewListener: CameraLiveViewListenerImpl = CameraLiveViewListenerImpl(context, informationNotify)) : ICameraControl, View.OnClickListener, View.OnLongClickListener, ICameraShutter, IKeyDown, IDisplayInjector, IOmdsProtocolNotify
{
- private val liveViewListener = CameraLiveViewListenerImpl(context, informationNotify)
private val statusChecker = OmdsCameraStatusWatcher()
private val runModeControl = OmdsRunModeControl()
private val zoomLensControl = OmdsZoomLensControl(statusChecker)
import jp.osdn.gokigen.gokigenassets.scene.IVibrator
import jp.osdn.gokigen.gokigenassets.utils.communication.SimpleHttpClient
-class PanasonicCameraControl(private val context: AppCompatActivity, private val vibrator : IVibrator, private val informationNotify: IInformationReceiver, private val preference: ICameraPreferenceProvider, provider: ICameraStatusReceiver, private val cameraCoordinator: ICameraControlCoordinator, private val number: Int) : IPanasonicCameraHolder, IDisplayInjector,ILiveViewController, ICameraControl, View.OnClickListener, View.OnLongClickListener, ICameraShutter, IKeyDown
+class PanasonicCameraControl(private val context: AppCompatActivity, private val vibrator : IVibrator, private val informationNotify: IInformationReceiver, private val preference: ICameraPreferenceProvider, provider: ICameraStatusReceiver, private val cameraCoordinator: ICameraControlCoordinator, private val number: Int = 0, private val liveViewListener: CameraLiveViewListenerImpl = CameraLiveViewListenerImpl(context, informationNotify)) : IPanasonicCameraHolder, IDisplayInjector,ILiveViewController, ICameraControl, View.OnClickListener, View.OnLongClickListener, ICameraShutter, IKeyDown
{
private val cardSlotSelector = PanasonicCardSlotSelector()
- private val liveViewListener = CameraLiveViewListenerImpl(context, informationNotify)
private val cameraConnection: PanasonicCameraConnection = PanasonicCameraConnection(context, provider, this, this, cardSlotSelector, cameraCoordinator, number)
private val storeImage = StoreImage(context, liveViewListener)
import jp.osdn.gokigen.gokigenassets.scene.IInformationReceiver
import jp.osdn.gokigen.gokigenassets.scene.IVibrator
-class PixproCameraControl(private val context: AppCompatActivity, private val vibrator: IVibrator, private val informationNotify : IInformationReceiver, private val preference: ICameraPreferenceProvider, provider: ICameraStatusReceiver, private val number : Int = 0) : ICameraControl, View.OnClickListener, View.OnLongClickListener, ICameraShutter, IKeyDown, IPixproInternalInterfaces, IPixproCommunicationNotify, IDisplayInjector
+class PixproCameraControl(private val context: AppCompatActivity, private val vibrator: IVibrator, private val informationNotify : IInformationReceiver, private val preference: ICameraPreferenceProvider, provider: ICameraStatusReceiver, private val number : Int = 0, private val liveViewListener: CameraLiveViewListenerImpl = CameraLiveViewListenerImpl(context, informationNotify)) : ICameraControl, View.OnClickListener, View.OnLongClickListener, ICameraShutter, IKeyDown, IPixproInternalInterfaces, IPixproCommunicationNotify, IDisplayInjector
{
private val statusChecker = PixproStatusChecker()
- private val liveViewListener = CameraLiveViewListenerImpl(context, informationNotify)
private val cameraConnection = PixproCameraConnection(context, provider, this, statusChecker)
private val pixproCameraParameter = PixproCamera()
private val commandCommunicator = PixproCommandCommunicator(pixproCameraParameter, this, statusChecker)
import jp.osdn.gokigen.gokigenassets.scene.IInformationReceiver
import jp.osdn.gokigen.gokigenassets.scene.IVibrator
-class RicohPentaxCameraControl(private val context: AppCompatActivity, private val vibrator : IVibrator, informationNotify: IInformationReceiver, private val preference: ICameraPreferenceProvider, statusReceiver : ICameraStatusReceiver, private val number : Int = 0) : ILiveViewController, ICameraControl, View.OnClickListener, View.OnLongClickListener, ICaptureModeReceiver, ICameraShutter, IDisplayInjector, IUseGR2CommandNotify, IKeyDown
+class RicohPentaxCameraControl(private val context: AppCompatActivity, private val vibrator : IVibrator, informationNotify: IInformationReceiver, private val preference: ICameraPreferenceProvider, statusReceiver : ICameraStatusReceiver, private val number : Int = 0, private val liveViewListener : CameraLiveViewListenerImpl = CameraLiveViewListenerImpl(context, informationNotify)) : ILiveViewController, ICameraControl, View.OnClickListener, View.OnLongClickListener, ICaptureModeReceiver, ICameraShutter, IDisplayInjector, IUseGR2CommandNotify, IKeyDown
{
-
//private final Activity activity;
//private final ICameraStatusReceiver provider;
- private var liveViewListener = CameraLiveViewListenerImpl(context, informationNotify)
private val gr2Connection = RicohGr2Connection(context, statusReceiver, this, this)
private val buttonControl = RicohGr2CameraButtonControl()
private val statusChecker = RicohGr2StatusChecker(500)
import kotlin.collections.ArrayList
-class SonyCameraControl(private val context: AppCompatActivity, private val vibrator : IVibrator, private val informationNotify : IInformationReceiver, private val preference: ICameraPreferenceProvider, provider: ICameraStatusReceiver, private val cameraCoordinator: ICameraControlCoordinator, private val number : Int = 0) : ISonyCameraHolder,
+class SonyCameraControl(private val context: AppCompatActivity, private val vibrator : IVibrator, private val informationNotify : IInformationReceiver, private val preference: ICameraPreferenceProvider, provider: ICameraStatusReceiver, private val cameraCoordinator: ICameraControlCoordinator, private val number : Int = 0, private val liveViewListener :CameraLiveViewListenerImpl = CameraLiveViewListenerImpl(context, informationNotify)) : ISonyCameraHolder,
IDisplayInjector, ICameraControl, View.OnClickListener, View.OnLongClickListener, ICameraShutter, IKeyDown
{
private val sonyCameraStatus = SonyStatus(JSONObject())
- private val liveViewListener = CameraLiveViewListenerImpl(context, informationNotify)
private val cameraConnection = SonyCameraConnection(context, provider, this, cameraCoordinator, number)
private val storeImage = StoreImage(context, liveViewListener)
import jp.osdn.gokigen.gokigenassets.scene.IInformationReceiver
import jp.osdn.gokigen.gokigenassets.scene.IVibrator
-class ThetaCameraControl(private val context: AppCompatActivity, private val vibrator : IVibrator, informationNotify: IInformationReceiver, private val preference: ICameraPreferenceProvider, statusReceiver : ICameraStatusReceiver, private val number : Int = 0) : ILiveViewController,
+class ThetaCameraControl(private val context: AppCompatActivity, private val vibrator : IVibrator, informationNotify: IInformationReceiver, private val preference: ICameraPreferenceProvider, statusReceiver : ICameraStatusReceiver, private val number : Int = 0, private val liveViewListener : CameraLiveViewListenerImpl = CameraLiveViewListenerImpl(context, informationNotify)) : ILiveViewController,
ICameraControl, View.OnClickListener, View.OnLongClickListener, ICaptureModeReceiver, ICameraShutter, IKeyDown
{
private val sessionIdHolder = ThetaSessionHolder()
private val cameraConnection = ThetaCameraConnection(context, statusReceiver, sessionIdHolder, sessionIdHolder, this)
- private var liveViewListener = CameraLiveViewListenerImpl(context, informationNotify)
private val liveViewControl = ThetaLiveViewControl(liveViewListener)
private var indicator : IMessageDrawer? = null
import jp.osdn.gokigen.gokigenassets.camera.interfaces.ICameraStatusReceiver
import jp.osdn.gokigen.gokigenassets.scene.IInformationReceiver
import jp.osdn.gokigen.gokigenassets.scene.IVibrator
-import jp.osdn.gokigen.mangle.scene.CameraProvider
import net.osdn.gokigen.objectdetection.a01f.R
import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor
import net.osdn.gokigen.objectdetection.a01f.tflite.ObjectDetectionModelReader
-package jp.osdn.gokigen.mangle.scene
+package net.osdn.gokigen.objectdetection.a01f.liaison
import androidx.appcompat.app.AppCompatActivity
import jp.osdn.gokigen.gokigenassets.camera.preference.CameraPreference
import jp.osdn.gokigen.gokigenassets.camera.console.ConsolePanelControl
import jp.osdn.gokigen.gokigenassets.camera.example.ExamplePictureControl
import jp.osdn.gokigen.gokigenassets.camera.interfaces.*
+import jp.osdn.gokigen.gokigenassets.camera.preference.CameraPreferenceKeySet
import jp.osdn.gokigen.gokigenassets.camera.vendor.omds.OmdsCameraControl
import jp.osdn.gokigen.gokigenassets.camera.vendor.CameraControlCoordinator
import jp.osdn.gokigen.gokigenassets.camera.vendor.panasonic.wrapper.PanasonicCameraControl
import jp.osdn.gokigen.gokigenassets.constants.ICameraConnectionMethods.Companion.PREFERENCE_CAMERA_METHOD_PIXPRO
import jp.osdn.gokigen.gokigenassets.constants.ICameraConnectionMethods.Companion.PREFERENCE_CAMERA_METHOD_SONY
import jp.osdn.gokigen.gokigenassets.constants.ICameraConnectionMethods.Companion.PREFERENCE_CAMERA_METHOD_THETA
+import jp.osdn.gokigen.gokigenassets.liveview.image.CameraLiveViewListenerImpl
import jp.osdn.gokigen.gokigenassets.preference.PreferenceAccessWrapper
import jp.osdn.gokigen.gokigenassets.scene.IInformationReceiver
import jp.osdn.gokigen.gokigenassets.scene.IVibrator
-import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.USE_ONLY_SINGLE_CAMERA_X
-import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.USE_ONLY_SINGLE_CAMERA_X_DEFAULT_VALUE
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_METHOD_1
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_METHOD_1_DEFAULT_VALUE
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_OPTION1_1
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_OPTION1_1_DEFAULT_VALUE
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_OPTION2_1
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_OPTION2_1_DEFAULT_VALUE
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_OPTION3_1
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_OPTION3_1_DEFAULT_VALUE
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_OPTION4_1
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_OPTION4_1_DEFAULT_VALUE
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_OPTION5_1
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_OPTION5_1_DEFAULT_VALUE
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_SEQUENCE_1
+import net.osdn.gokigen.objectdetection.a01f.preference.IPreferencePropertyAccessor.Companion.PREFERENCE_CAMERA_SEQUENCE_1_DEFAULT_VALUE
class CameraProvider(private val activity: AppCompatActivity, private val informationNotify: IInformationReceiver, private val vibrator : IVibrator, private val statusReceiver : ICameraStatusReceiver)
{
+ private val liveViewListener = CameraLiveViewListenerImpl(activity, informationNotify)
private val cameraCoordinator = CameraControlCoordinator(informationNotify)
private var cameraXisCreated = false
private lateinit var cameraXControl0: ICameraControl
return (when (connectionMethod) {
PREFERENCE_CAMERA_METHOD_NONE -> DummyCameraControl(number)
PREFERENCE_CAMERA_METHOD_CONSOLE -> prepareConsolePanelControl(cameraPreference, number)
- PREFERENCE_CAMERA_METHOD_EXAMPLE -> prepareExamplePictureControl(cameraPreference, number)
- PREFERENCE_CAMERA_METHOD_CAMERAX -> prepareCameraXControl(cameraPreference, number)
- PREFERENCE_CAMERA_METHOD_THETA -> prepareThetaCameraControl(cameraPreference, number)
- PREFERENCE_CAMERA_METHOD_PENTAX -> preparePentaxCameraControl(cameraPreference, number)
- PREFERENCE_CAMERA_METHOD_PANASONIC -> preparePanasonicCameraControl(cameraPreference, number)
- PREFERENCE_CAMERA_METHOD_SONY -> prepareSonyCameraControl(cameraPreference, number)
- PREFERENCE_CAMERA_METHOD_PIXPRO -> preparePixproCameraControl(cameraPreference, number)
- PREFERENCE_CAMERA_METHOD_OMDS -> prepareOmdsCameraControl(cameraPreference, number)
+ PREFERENCE_CAMERA_METHOD_EXAMPLE -> prepareExamplePictureControl(cameraPreference, number, liveViewListener)
+ PREFERENCE_CAMERA_METHOD_CAMERAX -> prepareCameraXControl(cameraPreference, number, liveViewListener)
+ PREFERENCE_CAMERA_METHOD_THETA -> prepareThetaCameraControl(cameraPreference, number, liveViewListener)
+ PREFERENCE_CAMERA_METHOD_PENTAX -> preparePentaxCameraControl(cameraPreference, number, liveViewListener)
+ PREFERENCE_CAMERA_METHOD_PANASONIC -> preparePanasonicCameraControl(cameraPreference, number, liveViewListener)
+ PREFERENCE_CAMERA_METHOD_SONY -> prepareSonyCameraControl(cameraPreference, number, liveViewListener)
+ PREFERENCE_CAMERA_METHOD_PIXPRO -> preparePixproCameraControl(cameraPreference, number, liveViewListener)
+ PREFERENCE_CAMERA_METHOD_OMDS -> prepareOmdsCameraControl(cameraPreference, number, liveViewListener)
else -> DummyCameraControl(number)
})
}
{
try
{
- return (prepareCameraXControl(setupCameraPreference0(PreferenceAccessWrapper(activity)), number))
+ return (prepareCameraXControl(setupCameraPreference0(PreferenceAccessWrapper(activity)), number, liveViewListener))
}
catch (e : Exception)
{
return (cameraSequence)
}
+
private fun setupCameraPreference0(wrapper : PreferenceAccessWrapper) : ICameraPreferenceProvider
{
- return (CameraPreference(0, wrapper, PREFERENCE_CAMERA_METHOD_NONE))
+ val method = wrapper.getString(PREFERENCE_CAMERA_METHOD_1, PREFERENCE_CAMERA_METHOD_1_DEFAULT_VALUE)
+ val sequence = wrapper.getString(PREFERENCE_CAMERA_SEQUENCE_1, PREFERENCE_CAMERA_SEQUENCE_1_DEFAULT_VALUE)
+ val option1 = wrapper.getString(PREFERENCE_CAMERA_OPTION1_1, PREFERENCE_CAMERA_OPTION1_1_DEFAULT_VALUE)
+ val option2 = wrapper.getString(PREFERENCE_CAMERA_OPTION2_1, PREFERENCE_CAMERA_OPTION2_1_DEFAULT_VALUE)
+ val option3 = wrapper.getString(PREFERENCE_CAMERA_OPTION3_1, PREFERENCE_CAMERA_OPTION3_1_DEFAULT_VALUE)
+ val option4 = wrapper.getString(PREFERENCE_CAMERA_OPTION4_1, PREFERENCE_CAMERA_OPTION4_1_DEFAULT_VALUE)
+ val option5 = wrapper.getString(PREFERENCE_CAMERA_OPTION5_1, PREFERENCE_CAMERA_OPTION5_1_DEFAULT_VALUE)
+
+ return (CameraPreference(0, wrapper, method, false, sequence, option1, option2, option3, option4, option5, CameraPreferenceKeySet(PREFERENCE_CAMERA_OPTION1_1, PREFERENCE_CAMERA_OPTION2_1, PREFERENCE_CAMERA_OPTION3_1, PREFERENCE_CAMERA_OPTION4_1, PREFERENCE_CAMERA_OPTION5_1)))
}
- private fun prepareThetaCameraControl(cameraPreference : ICameraPreferenceProvider, number : Int) : ICameraControl
+ private fun prepareThetaCameraControl(cameraPreference : ICameraPreferenceProvider, number : Int, liveViewListener: CameraLiveViewListenerImpl) : ICameraControl
{
- return (ThetaCameraControl(activity, vibrator, informationNotify, cameraPreference, statusReceiver, number))
+ return (ThetaCameraControl(activity, vibrator, informationNotify, cameraPreference, statusReceiver, number, liveViewListener))
}
- private fun preparePentaxCameraControl(cameraPreference : ICameraPreferenceProvider, number : Int) : ICameraControl
+ private fun preparePentaxCameraControl(cameraPreference : ICameraPreferenceProvider, number : Int, liveViewListener: CameraLiveViewListenerImpl) : ICameraControl
{
- return (RicohPentaxCameraControl(activity, vibrator, informationNotify, cameraPreference, statusReceiver, number))
+ return (RicohPentaxCameraControl(activity, vibrator, informationNotify, cameraPreference, statusReceiver, number, liveViewListener))
}
- private fun preparePanasonicCameraControl(cameraPreference : ICameraPreferenceProvider, number : Int) : ICameraControl
+ private fun preparePanasonicCameraControl(cameraPreference : ICameraPreferenceProvider, number : Int, liveViewListener: CameraLiveViewListenerImpl) : ICameraControl
{
- return (PanasonicCameraControl(activity, vibrator, informationNotify, cameraPreference, statusReceiver, cameraCoordinator, number))
+ return (PanasonicCameraControl(activity, vibrator, informationNotify, cameraPreference, statusReceiver, cameraCoordinator, number, liveViewListener))
}
- private fun prepareSonyCameraControl(cameraPreference : ICameraPreferenceProvider, number : Int) : ICameraControl
+ private fun prepareSonyCameraControl(cameraPreference : ICameraPreferenceProvider, number : Int, liveViewListener: CameraLiveViewListenerImpl) : ICameraControl
{
- return (SonyCameraControl(activity, vibrator, informationNotify, cameraPreference, statusReceiver, cameraCoordinator, number))
+ return (SonyCameraControl(activity, vibrator, informationNotify, cameraPreference, statusReceiver, cameraCoordinator, number, liveViewListener))
}
- private fun preparePixproCameraControl(cameraPreference : ICameraPreferenceProvider, number : Int) : ICameraControl
+ private fun preparePixproCameraControl(cameraPreference : ICameraPreferenceProvider, number : Int, liveViewListener: CameraLiveViewListenerImpl) : ICameraControl
{
- return (PixproCameraControl(activity, vibrator, informationNotify, cameraPreference, statusReceiver, number))
+ return (PixproCameraControl(activity, vibrator, informationNotify, cameraPreference, statusReceiver, number, liveViewListener))
}
- private fun prepareOmdsCameraControl(cameraPreference : ICameraPreferenceProvider, number : Int) : ICameraControl
+ private fun prepareOmdsCameraControl(cameraPreference : ICameraPreferenceProvider, number : Int, liveViewListener: CameraLiveViewListenerImpl) : ICameraControl
{
- return (OmdsCameraControl(activity, vibrator, informationNotify, cameraPreference, statusReceiver, number))
+ return (OmdsCameraControl(activity, vibrator, informationNotify, cameraPreference, statusReceiver, number, liveViewListener))
}
private fun prepareConsolePanelControl(cameraPreference : ICameraPreferenceProvider, number : Int) : ICameraControl
return (ConsolePanelControl(activity, vibrator, informationNotify, cameraPreference, number))
}
- private fun prepareExamplePictureControl(cameraPreference : ICameraPreferenceProvider, number : Int) : ICameraControl
+ private fun prepareExamplePictureControl(cameraPreference : ICameraPreferenceProvider, number : Int, liveViewListener: CameraLiveViewListenerImpl) : ICameraControl
{
- return (ExamplePictureControl(activity, vibrator, informationNotify, cameraPreference, number))
+ return (ExamplePictureControl(activity, vibrator, informationNotify, cameraPreference, number, liveViewListener))
}
- private fun prepareCameraXControl(cameraPreference : ICameraPreferenceProvider, number : Int): ICameraControl
+ private fun prepareCameraXControl(cameraPreference : ICameraPreferenceProvider, number : Int, liveViewListener: CameraLiveViewListenerImpl): ICameraControl
{
if ((cameraXisCreated)&&(::cameraXControl0.isInitialized))
{
return (cameraXControl0)
}
- cameraXControl0 = CameraControl(activity, cameraPreference, vibrator, informationNotify, statusReceiver, number)
+ cameraXControl0 = CameraControl(activity, cameraPreference, vibrator, informationNotify, statusReceiver, number, liveViewListener)
cameraXisCreated = true
return (cameraXControl0)
}
objectDetector = ObjectDetector.createFromBufferAndOptions(byteBuffer, options)
//objectDetector = ObjectDetector.createFromBufferAndOptions(ByteBuffer.wrap(data), options)
}
- Log.v(TAG, " ObjectDetector is Ready!")
+ Log.v(TAG, " ----- ObjectDetector is Ready! -----")
return (true)
}
catch (e: Exception)
import android.graphics.Color
import android.util.Log
+import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
+import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.input.pointer.pointerInteropFilter
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.viewinterop.AndroidView
onTouchListener.onTouch(liveView0, it)
}
}
+ .pointerInput(Unit) {
+ detectTapGestures(
+ onLongPress = { cameraControl.onLongClickReceiver(0).onLongClick(null) /* Called on Long Press */ },
+ //onPress = { /* Called when the gesture starts */ },
+ //onDoubleTap = { /* Called on Double Tap */ },
+ //onTap = { /* Called on Tap */ }
+ )
+ }
)
}
}