1 Star 0 Fork 149

惊天 / FFmpegCommand

forked from AnJoiner / FFmpegCommand 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
KFFmppegFormatActivity.kt 1.69 KB
一键复制 编辑 原始数据 按行查看 历史
AnJoiner 提交于 2020-11-14 23:36 . 1. 新增获取支持的编解码
package com.coder.ffmpegtest.ui
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.text.method.ScrollingMovementMethod
import android.view.View
import android.widget.Button
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.coder.ffmpeg.annotation.FormatAttribute
import com.coder.ffmpeg.jni.FFmpegCommand
import com.coder.ffmpegtest.R
/**
*
* @author: AnJoiner
* @datetime: 20-11-14
*/
class KFFmppegFormatActivity : AppCompatActivity() {
private var btnInputFormat: Button?=null
private var btnOutputFormat: Button?=null
private var tvContent: TextView? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_ffmpeg_format)
init()
}
private fun init(){
initView()
initListener()
}
private fun initView() {
btnInputFormat = findViewById(R.id.btn_input_format)
btnOutputFormat = findViewById(R.id.btn_output_format)
tvContent = findViewById(R.id.tv_content)
tvContent?.movementMethod = ScrollingMovementMethod.getInstance();
}
private fun initListener(){
btnInputFormat?.setOnClickListener {
tvContent?.text=FFmpegCommand.getSupportFormat(FormatAttribute.INPUT_FORMAT)
}
btnOutputFormat?.setOnClickListener {
tvContent?.text=FFmpegCommand.getSupportFormat(FormatAttribute.OUTPUT_FORMAT)
}
}
companion object{
fun start(context: Context){
val intent = Intent(context,KFFmppegFormatActivity::class.java)
context.startActivity(intent)
}
}
}
Android
1
https://gitee.com/andios/FFmpegCommand.git
git@gitee.com:andios/FFmpegCommand.git
andios
FFmpegCommand
FFmpegCommand
master

搜索帮助