Skip to content

Instantly share code, notes, and snippets.

@ravisorathiya
Created November 25, 2021 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ravisorathiya/f016e6190d159a44529a9568f8650ab3 to your computer and use it in GitHub Desktop.
Save ravisorathiya/f016e6190d159a44529a9568f8650ab3 to your computer and use it in GitHub Desktop.
FFmpeg Congiration checking compatabilty of device
package com.example.fastsaveapp.ffmpeg
import android.content.Context
import com.example.fastsaveapp.logger
import com.github.hiteshsondhi88.libffmpeg.FFmpeg
import com.github.hiteshsondhi88.libffmpeg.LoadBinaryResponseHandler
import com.github.hiteshsondhi88.libffmpeg.exceptions.FFmpegNotSupportedException
object FFMpegConfig {
fun configFFmpeg(context: Context) {
val ffmpeg = FFmpeg.getInstance(context);
try {
ffmpeg.loadBinary(object : LoadBinaryResponseHandler() {
override fun onStart() {
logger("starting...")
}
override fun onFailure() {
logger("ffmpeg not supported on this device...")
}
override fun onFinish() {
logger("FFMpeg Supported on this device...")
}
});
} catch (e: FFmpegNotSupportedException) {
logger(e.message)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment