|
|
@ -69,6 +69,7 @@ public class VideoHandleActivity extends AppCompatActivity implements View.OnCli |
|
|
|
findViewById(R.id.btn_combine_video).setOnClickListener(this); |
|
|
|
findViewById(R.id.btn_combine_video).setOnClickListener(this); |
|
|
|
findViewById(R.id.btn_play_video).setOnClickListener(this); |
|
|
|
findViewById(R.id.btn_play_video).setOnClickListener(this); |
|
|
|
findViewById(R.id.btn_multi_video).setOnClickListener(this); |
|
|
|
findViewById(R.id.btn_multi_video).setOnClickListener(this); |
|
|
|
|
|
|
|
findViewById(R.id.btn_reverse_video).setOnClickListener(this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void setVisible() { |
|
|
|
private void setVisible() { |
|
|
@ -82,6 +83,7 @@ public class VideoHandleActivity extends AppCompatActivity implements View.OnCli |
|
|
|
findViewById(R.id.btn_combine_video).setVisibility(View.VISIBLE); |
|
|
|
findViewById(R.id.btn_combine_video).setVisibility(View.VISIBLE); |
|
|
|
findViewById(R.id.btn_play_video).setVisibility(View.VISIBLE); |
|
|
|
findViewById(R.id.btn_play_video).setVisibility(View.VISIBLE); |
|
|
|
findViewById(R.id.btn_multi_video).setVisibility(View.VISIBLE); |
|
|
|
findViewById(R.id.btn_multi_video).setVisibility(View.VISIBLE); |
|
|
|
|
|
|
|
findViewById(R.id.btn_reverse_video).setVisibility(View.VISIBLE); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void setGone() { |
|
|
|
private void setGone() { |
|
|
@ -95,6 +97,7 @@ public class VideoHandleActivity extends AppCompatActivity implements View.OnCli |
|
|
|
findViewById(R.id.btn_combine_video).setVisibility(View.GONE); |
|
|
|
findViewById(R.id.btn_combine_video).setVisibility(View.GONE); |
|
|
|
findViewById(R.id.btn_play_video).setVisibility(View.GONE); |
|
|
|
findViewById(R.id.btn_play_video).setVisibility(View.GONE); |
|
|
|
findViewById(R.id.btn_multi_video).setVisibility(View.GONE); |
|
|
|
findViewById(R.id.btn_multi_video).setVisibility(View.GONE); |
|
|
|
|
|
|
|
findViewById(R.id.btn_reverse_video).setVisibility(View.GONE); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -131,6 +134,9 @@ public class VideoHandleActivity extends AppCompatActivity implements View.OnCli |
|
|
|
case R.id.btn_multi_video: |
|
|
|
case R.id.btn_multi_video: |
|
|
|
handleType = 9; |
|
|
|
handleType = 9; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case R.id.btn_reverse_video: |
|
|
|
|
|
|
|
handleType = 10; |
|
|
|
|
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
handleType = 0; |
|
|
|
handleType = 0; |
|
|
|
break; |
|
|
|
break; |
|
|
@ -219,6 +225,11 @@ public class VideoHandleActivity extends AppCompatActivity implements View.OnCli |
|
|
|
String outputFile = PATH + File.separator + "multi.mp4"; |
|
|
|
String outputFile = PATH + File.separator + "multi.mp4"; |
|
|
|
commandLine = FFmpegUtil.multiVideo(input1, input2, outputFile, VideoLayout.LAYOUT_HORIZONTAL); |
|
|
|
commandLine = FFmpegUtil.multiVideo(input1, input2, outputFile, VideoLayout.LAYOUT_HORIZONTAL); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case 10://视频反序倒播
|
|
|
|
|
|
|
|
String input = PATH + File.separator + "beyond.mp4"; |
|
|
|
|
|
|
|
String output = PATH + File.separator + "reverse.mp4"; |
|
|
|
|
|
|
|
commandLine = FFmpegUtil.reverseVideo(input, output); |
|
|
|
|
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|