Commit d25de213 authored by linfeng's avatar linfeng

提交代码

parent b083d53a
...@@ -8,8 +8,8 @@ android { ...@@ -8,8 +8,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
flavorDimensions "default" flavorDimensions "default"
versionCode 154 versionCode 155
versionName "1.5.4" versionName "1.5.5"
multiDexEnabled true multiDexEnabled true
...@@ -25,9 +25,9 @@ android { ...@@ -25,9 +25,9 @@ android {
manifestPlaceholders = [ manifestPlaceholders = [
JPUSH_PKGNAME : appId, JPUSH_PKGNAME: appId,
JPUSH_APPKEY : "530b223034b92715e0295047", //JPush 上注册的包名对应的 Appkey. JPUSH_APPKEY : "530b223034b92715e0295047", //JPush 上注册的包名对应的 Appkey.
JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可. JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
] ]
// javaCompileOptions { // javaCompileOptions {
...@@ -79,7 +79,7 @@ android { ...@@ -79,7 +79,7 @@ android {
if (variant.buildType.name == 'release') { if (variant.buildType.name == 'release') {
def productVersion = "Rv" + releaseTime() + "V" + defaultConfig.versionName + "_Release_" + productFlavors[0].name + ".apk"; def productVersion = "Rv" + releaseTime() + "V" + defaultConfig.versionName + "_Release_" + productFlavors[0].name + ".apk";
outputFileName = productVersion outputFileName = productVersion
} else if(variant.buildType.name == 'debug'){ } else if (variant.buildType.name == 'debug') {
def productVersion = "Rv" + releaseTime() + "V" + defaultConfig.versionName + "_Debug_" + productFlavors[0].name + ".apk"; def productVersion = "Rv" + releaseTime() + "V" + defaultConfig.versionName + "_Debug_" + productFlavors[0].name + ".apk";
outputFileName = productVersion outputFileName = productVersion
} }
......
...@@ -159,15 +159,19 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -159,15 +159,19 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
// TODO: 2019/11/14 // TODO: 2019/11/14
break; break;
case RecorderUtils.SPEED_SUCCESS: // 变速成功 case RecorderUtils.SPEED_SUCCESS: // 变速成功
mSpeedBar.isEnabled(false);
case RecorderUtils.VOLUME_SUCCESS: // 修改音量成功 case RecorderUtils.VOLUME_SUCCESS: // 修改音量成功
mVolumeBar.isEnabled(false);
case RecorderUtils.MUSIC_SUCCESS: // 修改音乐成功 case RecorderUtils.MUSIC_SUCCESS: // 修改音乐成功
mVideoView.play(mCurrPath); mVideoView.play(mCurrPath);
break; break;
case RecorderUtils.SPEED_FAILURE: // 变速失败 case RecorderUtils.SPEED_FAILURE: // 变速失败
showToast(getString(R.string.edit_failed)); showToast(getString(R.string.edit_failed));
mSpeedBar.isEnabled(false);
break; break;
case RecorderUtils.VOLUME_FAILURE: // 修改音量失败 case RecorderUtils.VOLUME_FAILURE: // 修改音量失败
showToast(getString(R.string.edit_failed)); showToast(getString(R.string.edit_failed));
mVolumeBar.isEnabled(false);
break; break;
default: default:
mTvLoding.setText(mHitText + " " + msg.what + "%"); mTvLoding.setText(mHitText + " " + msg.what + "%");
...@@ -176,6 +180,8 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -176,6 +180,8 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
if (msg.what > 100) { if (msg.what > 100) {
showWaitDialog(false, ""); showWaitDialog(false, "");
mSpeedBar.isEnabled(false);
mVolumeBar.isEnabled(false);
} }
return false; return false;
} }
...@@ -409,7 +415,7 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -409,7 +415,7 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
private void loadCover(String inPath, long time) { private void loadCover(String inPath, long time) {
final int coverCount = 8; final int coverCount = 6;
loadCover = RecorderUtils.COVER_LOADING; loadCover = RecorderUtils.COVER_LOADING;
// 帧提取器 // 帧提取器
String thumb = RecorderUtils.getThumb(inPath); String thumb = RecorderUtils.getThumb(inPath);
...@@ -476,6 +482,8 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -476,6 +482,8 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
return; return;
} }
mSpeedBar.isEnabled(true);
showWaitDialog(true, getString(R.string.modified)); showWaitDialog(true, getString(R.string.modified));
EpEditor.changePTS(mVideoPath, file.getAbsolutePath(), speed, EpEditor.PTS.ALL, new OnEditorListener() { EpEditor.changePTS(mVideoPath, file.getAbsolutePath(), speed, EpEditor.PTS.ALL, new OnEditorListener() {
@Override @Override
...@@ -502,6 +510,7 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -502,6 +510,7 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
private void changeVolume(int volume) { private void changeVolume(int volume) {
showWaitDialog(true, getString(R.string.modified)); showWaitDialog(true, getString(R.string.modified));
mVolumeBar.isEnabled(true);
mVideoView.stop(); mVideoView.stop();
final String out = RecorderUtils.changeFileName(mVideoPath, "vol"); final String out = RecorderUtils.changeFileName(mVideoPath, "vol");
......
...@@ -8,6 +8,8 @@ import android.view.MotionEvent; ...@@ -8,6 +8,8 @@ import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast;
import com.xxrv.video.R; import com.xxrv.video.R;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -25,6 +27,7 @@ public class Xspeedbar extends FrameLayout { ...@@ -25,6 +27,7 @@ public class Xspeedbar extends FrameLayout {
private int mWidth; private int mWidth;
private int mRectWidth; private int mRectWidth;
private OnChangeListener mListener; private OnChangeListener mListener;
private boolean type;
public Xspeedbar(Context context) { public Xspeedbar(Context context) {
this(context, null); this(context, null);
...@@ -100,6 +103,10 @@ public class Xspeedbar extends FrameLayout { ...@@ -100,6 +103,10 @@ public class Xspeedbar extends FrameLayout {
return; return;
} }
if (type){
return;
}
views.get(mCurrt).setTextColor(getResources().getColor(R.color.white)); views.get(mCurrt).setTextColor(getResources().getColor(R.color.white));
views.get(select).setTextColor(getResources().getColor(R.color.colorMain)); views.get(select).setTextColor(getResources().getColor(R.color.colorMain));
views.get(mCurrt).setBackgroundResource(R.color.transparent); views.get(mCurrt).setBackgroundResource(R.color.transparent);
...@@ -118,6 +125,10 @@ public class Xspeedbar extends FrameLayout { ...@@ -118,6 +125,10 @@ public class Xspeedbar extends FrameLayout {
mRectWidth = mWidth / 5; mRectWidth = mWidth / 5;
} }
public void isEnabled(boolean type) {
this.type = type;
}
public interface OnChangeListener { public interface OnChangeListener {
......
...@@ -30,6 +30,7 @@ public class Xvolumebar extends View { ...@@ -30,6 +30,7 @@ public class Xvolumebar extends View {
private OnChangeListener mListener; private OnChangeListener mListener;
private Paint mProPaint; private Paint mProPaint;
private Paint mBgPaint; private Paint mBgPaint;
private boolean type;
public Xvolumebar(Context context) { public Xvolumebar(Context context) {
this(context, null); this(context, null);
...@@ -62,7 +63,9 @@ public class Xvolumebar extends View { ...@@ -62,7 +63,9 @@ public class Xvolumebar extends View {
@Override @Override
public boolean onTouchEvent(MotionEvent event) { public boolean onTouchEvent(MotionEvent event) {
if (type) {
return true;
}
switch (event.getAction()) { switch (event.getAction()) {
case MotionEvent.ACTION_MOVE: case MotionEvent.ACTION_MOVE:
curr = Math.round(event.getX() / mRectWidth * max); curr = Math.round(event.getX() / mRectWidth * max);
...@@ -123,6 +126,10 @@ public class Xvolumebar extends View { ...@@ -123,6 +126,10 @@ public class Xvolumebar extends View {
canvas.drawCircle(movex, centerY, radius, mBgPaint); canvas.drawCircle(movex, centerY, radius, mBgPaint);
} }
public void isEnabled(boolean type) {
this.type = type;
}
public interface OnChangeListener { public interface OnChangeListener {
void change(int curr); void change(int curr);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment