|
|
|
@ -2,10 +2,13 @@ package com.github.xch168.ffmpeg.invoker.demo; |
|
|
|
|
|
|
|
|
|
import android.os.Build; |
|
|
|
|
import android.os.Bundle; |
|
|
|
|
import android.text.method.ScrollingMovementMethod; |
|
|
|
|
import android.widget.TextView; |
|
|
|
|
|
|
|
|
|
import androidx.appcompat.app.AppCompatActivity; |
|
|
|
|
|
|
|
|
|
import com.github.xch168.ffmpeg.invoker.FFmpegInvoker; |
|
|
|
|
|
|
|
|
|
public class MainActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -16,6 +19,10 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
|
|
TextView tv = findViewById(R.id.tv_cpu_abi); |
|
|
|
|
tv.setText("CPU_ABI: " + getCpuAbi()); |
|
|
|
|
|
|
|
|
|
TextView configView = findViewById(R.id.tv_config_info); |
|
|
|
|
configView.setMovementMethod(ScrollingMovementMethod.getInstance()); |
|
|
|
|
configView.setText(getConfigInfo()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private String getCpuAbi() { |
|
|
|
@ -26,4 +33,14 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private String getConfigInfo() { |
|
|
|
|
String configInfo = FFmpegInvoker.getConfigInfo(); |
|
|
|
|
String[] configItems = configInfo.split(" "); |
|
|
|
|
StringBuilder configInfoBuilder = new StringBuilder(); |
|
|
|
|
for (String config : configItems) { |
|
|
|
|
configInfoBuilder.append(config).append('\n'); |
|
|
|
|
} |
|
|
|
|
return configInfoBuilder.toString(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|