react-native-rectangle-doc-scanner 10.10.0 → 10.11.0
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.
|
@@ -123,18 +123,16 @@ class CameraController(
|
|
|
123
123
|
request.resolution.height
|
|
124
124
|
)
|
|
125
125
|
val surface = Surface(surfaceTexture)
|
|
126
|
-
request.provideSurface(surface, ContextCompat.getMainExecutor(context)) { result ->
|
|
127
|
-
Log.d(TAG, "[CAMERAX] Surface provided - result: ${result.resultCode}")
|
|
128
126
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
)
|
|
135
|
-
}
|
|
127
|
+
// Apply transform BEFORE providing surface
|
|
128
|
+
updateTextureViewTransform(
|
|
129
|
+
request.resolution.width,
|
|
130
|
+
request.resolution.height
|
|
131
|
+
)
|
|
136
132
|
|
|
137
|
-
|
|
133
|
+
request.provideSurface(surface, ContextCompat.getMainExecutor(context)) { result ->
|
|
134
|
+
Log.d(TAG, "[CAMERAX] Surface provided - result: ${result.resultCode}")
|
|
135
|
+
// Don't release surface - let CameraX manage it
|
|
138
136
|
}
|
|
139
137
|
} else {
|
|
140
138
|
Log.e(TAG, "[CAMERAX] SurfaceTexture is null! Waiting for TextureView to be ready...")
|
|
@@ -144,18 +142,16 @@ class CameraController(
|
|
|
144
142
|
Log.d(TAG, "[CAMERAX] SurfaceTexture now available ($width x $height)")
|
|
145
143
|
st.setDefaultBufferSize(request.resolution.width, request.resolution.height)
|
|
146
144
|
val surface = Surface(st)
|
|
147
|
-
request.provideSurface(surface, ContextCompat.getMainExecutor(context)) { result ->
|
|
148
|
-
Log.d(TAG, "[CAMERAX] Surface provided (delayed) - result: ${result.resultCode}")
|
|
149
145
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
)
|
|
156
|
-
}
|
|
146
|
+
// Apply transform BEFORE providing surface
|
|
147
|
+
updateTextureViewTransform(
|
|
148
|
+
request.resolution.width,
|
|
149
|
+
request.resolution.height
|
|
150
|
+
)
|
|
157
151
|
|
|
158
|
-
|
|
152
|
+
request.provideSurface(surface, ContextCompat.getMainExecutor(context)) { result ->
|
|
153
|
+
Log.d(TAG, "[CAMERAX] Surface provided (delayed) - result: ${result.resultCode}")
|
|
154
|
+
// Don't release surface - let CameraX manage it
|
|
159
155
|
}
|
|
160
156
|
}
|
|
161
157
|
|
package/package.json
CHANGED