diff --git a/app/src/main/java/com/yinuo/safetywatcher/watcher/utils/RecordHelper.kt b/app/src/main/java/com/yinuo/safetywatcher/watcher/utils/RecordHelper.kt index 4f41285..3385b27 100644 --- a/app/src/main/java/com/yinuo/safetywatcher/watcher/utils/RecordHelper.kt +++ b/app/src/main/java/com/yinuo/safetywatcher/watcher/utils/RecordHelper.kt @@ -10,6 +10,7 @@ object RecordHelper { private val codecManager: MediaCodecManager = MediaCodecManager.getInstance() private const val width = 1920 private const val height = 1080 + private const val overlayOffset = 20 private var recording = false; init { @@ -24,7 +25,7 @@ object RecordHelper { overLayBitmap?.let { val yuv = TxtOverlay.getOverlayYuv() yuv?.let { - for ((j, i) in (100 until overLayBitmap.height + 100).withIndex()) { + for ((j, i) in (overlayOffset until overLayBitmap.height + overlayOffset).withIndex()) { for (c in 0 until overLayBitmap.width) { //去掉PNG水印的黑边 if (yuv[j * overLayBitmap.width + c] @@ -35,7 +36,7 @@ object RecordHelper { yuv, j * overLayBitmap.width + c, nv12Data, - 100 + i * 1920 + c, + overlayOffset + i * width + c, 1 ) }