From 199d141e1cf931443186fa0384eb633a12346ace Mon Sep 17 00:00:00 2001 From: xufulong <839789740@qq.com> Date: Wed, 8 Apr 2020 00:17:44 +0800 Subject: [PATCH] translate the note FFmpegHandler into English translate the note FFmpegHandler into English --- .../com/frank/ffmpeg/format/VideoLayout.java | 6 +++--- .../frank/ffmpeg/handler/FFmpegHandler.java | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/frank/ffmpeg/format/VideoLayout.java b/app/src/main/java/com/frank/ffmpeg/format/VideoLayout.java index f4449a9..a5c688b 100644 --- a/app/src/main/java/com/frank/ffmpeg/format/VideoLayout.java +++ b/app/src/main/java/com/frank/ffmpeg/format/VideoLayout.java @@ -1,15 +1,15 @@ package com.frank.ffmpeg.format; /** - * 视频布局 + * layout of video * Created by frank on 2018/6/18. */ public class VideoLayout { - //水平拼接 + //horizontal join public final static int LAYOUT_HORIZONTAL = 1; - //垂直拼接 + //vertical join public final static int LAYOUT_VERTICAL = 2; } diff --git a/app/src/main/java/com/frank/ffmpeg/handler/FFmpegHandler.java b/app/src/main/java/com/frank/ffmpeg/handler/FFmpegHandler.java index a4086da..3d55560 100644 --- a/app/src/main/java/com/frank/ffmpeg/handler/FFmpegHandler.java +++ b/app/src/main/java/com/frank/ffmpeg/handler/FFmpegHandler.java @@ -9,7 +9,7 @@ import com.frank.ffmpeg.model.MediaBean; import com.frank.ffmpeg.tool.JsonParseTool; /** - * Handler消息处理器 + * Handler of FFmpeg and FFprobe * Created by frank on 2019/11/11. */ public class FFmpegHandler { @@ -37,11 +37,12 @@ public class FFmpegHandler { } /** - * 执行ffmpeg命令行 + * execute the command of FFmpeg + * * @param commandLine commandLine */ public void executeFFmpegCmd(final String[] commandLine) { - if(commandLine == null) { + if (commandLine == null) { return; } FFmpegCmd.execute(commandLine, new OnHandleListener() { @@ -54,9 +55,9 @@ public class FFmpegHandler { @Override public void onEnd(int resultCode, String resultMsg) { Log.i(TAG, "handle onEnd..."); - if(isContinue) { + if (isContinue) { mHandler.obtainMessage(MSG_CONTINUE).sendToTarget(); - }else { + } else { mHandler.obtainMessage(MSG_FINISH).sendToTarget(); } } @@ -64,11 +65,12 @@ public class FFmpegHandler { } /** - * execute probe cmd + * execute the command of FFprobe + * * @param commandLine commandLine */ public void executeFFprobeCmd(final String[] commandLine) { - if(commandLine == null) { + if (commandLine == null) { return; } FFmpegCmd.executeProbe(commandLine, new OnHandleListener() { @@ -82,7 +84,7 @@ public class FFmpegHandler { public void onEnd(int resultCode, String resultMsg) { Log.i(TAG, "handle ffprobe onEnd result=" + resultMsg); MediaBean mediaBean = null; - if(resultMsg != null && !resultMsg.isEmpty()) { + if (resultMsg != null && !resultMsg.isEmpty()) { mediaBean = JsonParseTool.parseMediaFormat(resultMsg); } mHandler.obtainMessage(MSG_FINISH, mediaBean).sendToTarget();