From 464b4ad79615e177866c74ed35dfdb28e82550b1 Mon Sep 17 00:00:00 2001 From: xufulong <839789740@qq.com> Date: Wed, 8 Jan 2020 00:20:54 +0800 Subject: [PATCH] show the result of ffprobe show the result of ffprobe --- .../java/com/frank/ffmpeg/activity/ProbeFormatActivity.java | 6 +++++- .../main/java/com/frank/ffmpeg/handler/FFmpegHandler.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/frank/ffmpeg/activity/ProbeFormatActivity.java b/app/src/main/java/com/frank/ffmpeg/activity/ProbeFormatActivity.java index 9349493..1e4bc93 100644 --- a/app/src/main/java/com/frank/ffmpeg/activity/ProbeFormatActivity.java +++ b/app/src/main/java/com/frank/ffmpeg/activity/ProbeFormatActivity.java @@ -4,6 +4,7 @@ import android.annotation.SuppressLint; import android.os.Bundle; import android.os.Handler; import android.os.Message; +import android.text.TextUtils; import android.view.View; import android.widget.ProgressBar; import android.widget.RelativeLayout; @@ -43,6 +44,10 @@ public class ProbeFormatActivity extends BaseActivity { case MSG_FINISH: progressProbe.setVisibility(View.GONE); layoutProbe.setVisibility(View.VISIBLE); + String result = (String) msg.obj; + if (!TextUtils.isEmpty(result) && txtProbeFormat != null) { + txtProbeFormat.setText(result); + } break; default: break; @@ -59,7 +64,6 @@ public class ProbeFormatActivity extends BaseActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - hideActionBar(); initView(); ffmpegHandler = new FFmpegHandler(mHandler); } 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 38ba020..ab7f383 100644 --- a/app/src/main/java/com/frank/ffmpeg/handler/FFmpegHandler.java +++ b/app/src/main/java/com/frank/ffmpeg/handler/FFmpegHandler.java @@ -82,7 +82,7 @@ public class FFmpegHandler { if(isContinue) { mHandler.obtainMessage(MSG_CONTINUE).sendToTarget(); }else { - mHandler.obtainMessage(MSG_FINISH).sendToTarget(); + mHandler.obtainMessage(MSG_FINISH, resultMsg).sendToTarget(); } } });