|
|
|
|
@ -162,7 +162,7 @@ class HandHistoryActivity : BaseActivity() { |
|
|
|
|
TableDrawer.configurePaints(this, animator) |
|
|
|
|
|
|
|
|
|
val muxer = MMediaMuxer() |
|
|
|
|
muxer.Init(this, width.toInt(), height.toInt(), "hhVideo", "YES!") |
|
|
|
|
muxer.Init(null, width.toInt(), height.toInt(), "hhVideo", "YES!") |
|
|
|
|
|
|
|
|
|
animator.frames(this) { bitmap, count -> |
|
|
|
|
|
|
|
|
|
@ -179,50 +179,6 @@ class HandHistoryActivity : BaseActivity() { |
|
|
|
|
val path = muxer.GetPath() |
|
|
|
|
Timber.d("**** Video path = $path") |
|
|
|
|
|
|
|
|
|
// Timber.d("**** Start video test") |
|
|
|
|
// |
|
|
|
|
// val width = 480 |
|
|
|
|
// val height = 480 |
|
|
|
|
// |
|
|
|
|
// val bitmap = Bitmap.createBitmap(480, 480, Bitmap.Config.ARGB_8888) |
|
|
|
|
// val canvas = Canvas(bitmap) |
|
|
|
|
// |
|
|
|
|
// val paint = Paint() |
|
|
|
|
// paint.isAntiAlias = true |
|
|
|
|
// paint.style = Paint.Style.STROKE |
|
|
|
|
// paint.strokeWidth = 20.0.toFloat() |
|
|
|
|
// paint.color = requireContext().getColor(R.color.blue) |
|
|
|
|
// |
|
|
|
|
// canvas.drawRect(Rect(0,0, width, height), paint) |
|
|
|
|
// |
|
|
|
|
// bitmap.let { |
|
|
|
|
// |
|
|
|
|
// val muxer = MMediaMuxer() |
|
|
|
|
// |
|
|
|
|
// Timber.d("width = ${it.width}, height = ${it.height}") |
|
|
|
|
// |
|
|
|
|
// val width = (it.width / 2) * 2 |
|
|
|
|
// val height= (it.height / 2) * 2 |
|
|
|
|
// |
|
|
|
|
// muxer.Init(requireActivity(), width, height, "hhVideo", "YES!") |
|
|
|
|
// |
|
|
|
|
// Timber.d("**** Adds frames") |
|
|
|
|
// for (i in 0..50) { |
|
|
|
|
// |
|
|
|
|
// try { |
|
|
|
|
// val byteArray = it.toByteArray() |
|
|
|
|
// muxer.AddFrame(byteArray) |
|
|
|
|
// } catch (e: Exception) { |
|
|
|
|
// Timber.e("error = ${e.message}") |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// Timber.d("**** Create video") |
|
|
|
|
// muxer.CreateVideo() |
|
|
|
|
// |
|
|
|
|
// val path = muxer.GetPath() |
|
|
|
|
// Timber.d("**** Video path = $path") |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private fun gifExport() { |
|
|
|
|
|