diff --git a/app/src/main/java/com/frank/ffmpeg/activity/VideoHandleActivity.kt b/app/src/main/java/com/frank/ffmpeg/activity/VideoHandleActivity.kt index 44e9919..0c06e72 100644 --- a/app/src/main/java/com/frank/ffmpeg/activity/VideoHandleActivity.kt +++ b/app/src/main/java/com/frank/ffmpeg/activity/VideoHandleActivity.kt @@ -17,7 +17,7 @@ import androidx.recyclerview.widget.StaggeredGridLayoutManager import com.frank.ffmpeg.FFmpegCmd import com.frank.ffmpeg.R import com.frank.ffmpeg.adapter.WaterfallAdapter -import com.frank.ffmpeg.format.VideoLayout +import com.frank.ffmpeg.model.VideoLayout import com.frank.ffmpeg.gif.HighQualityGif import com.frank.ffmpeg.handler.FFmpegHandler import com.frank.ffmpeg.tool.JsonParseTool diff --git a/app/src/main/java/com/frank/ffmpeg/format/VideoLayout.kt b/app/src/main/java/com/frank/ffmpeg/model/VideoLayout.kt similarity index 86% rename from app/src/main/java/com/frank/ffmpeg/format/VideoLayout.kt rename to app/src/main/java/com/frank/ffmpeg/model/VideoLayout.kt index 916c26b..5713f59 100644 --- a/app/src/main/java/com/frank/ffmpeg/format/VideoLayout.kt +++ b/app/src/main/java/com/frank/ffmpeg/model/VideoLayout.kt @@ -1,4 +1,4 @@ -package com.frank.ffmpeg.format +package com.frank.ffmpeg.model /** * layout of video diff --git a/app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java b/app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java index 765a9ab..7994ef8 100644 --- a/app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java +++ b/app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java @@ -1,7 +1,7 @@ package com.frank.ffmpeg.util; import com.frank.ffmpeg.FFmpegApplication; -import com.frank.ffmpeg.format.VideoLayout; +import com.frank.ffmpeg.model.VideoLayout; import java.util.List; import java.util.Locale; diff --git a/app/src/main/java/com/frank/ffmpeg/view/VisualizerView.kt b/app/src/main/java/com/frank/ffmpeg/view/VisualizerView.kt index 73f76a0..19dfb1f 100644 --- a/app/src/main/java/com/frank/ffmpeg/view/VisualizerView.kt +++ b/app/src/main/java/com/frank/ffmpeg/view/VisualizerView.kt @@ -81,11 +81,11 @@ class VisualizerView : View { } } - private fun drawWave(canvas: Canvas, i: Int, reversal: Boolean) { + private fun drawWave(canvas: Canvas, i: Int, reverse: Boolean) { if (pointList == null || pointList!!.size < 2) { return } - val ratio = SCALE * if (reversal) -1 else 1 + val ratio = SCALE * if (reverse) -1 else 1 if (i < pointList!!.size - 2) { val point = pointList!![i] val nextPoint = pointList!![i + 1] @@ -101,8 +101,8 @@ class VisualizerView : View { } } - private fun drawLump(canvas: Canvas, i: Int, reversal: Boolean) { - val minus = if (reversal) -1 else 1 + private fun drawLump(canvas: Canvas, i: Int, reverse: Boolean) { + val minus = if (reverse) -1 else 1 val top = LUMP_MAX_HEIGHT - (LUMP_MIN_HEIGHT + waveData!![i] * SCALE) * minus canvas.drawRect((LUMP_SIZE * i).toFloat(), @@ -137,8 +137,7 @@ class VisualizerView : View { enum class ShowStyle { STYLE_HOLLOW_LUMP, - STYLE_WAVE, - STYLE_NOTHING + STYLE_WAVE } companion object { @@ -149,7 +148,7 @@ class VisualizerView : View { private const val LUMP_MIN_HEIGHT = LUMP_WIDTH private const val LUMP_MAX_HEIGHT = 200 private const val LUMP_SIZE = LUMP_WIDTH + LUMP_SPACE - private val LUMP_COLOR = Color.parseColor("#6de6f6") + private val LUMP_COLOR = Color.parseColor("#00eeee") private const val WAVE_SAMPLING_INTERVAL = 3 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index dac50fe..54aa92a 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -9,5 +9,4 @@ #00DDFF #BEBEBE #FF9800 - #32FFFFFF