Created
November 25, 2021 09:40
-
-
Save ravisorathiya/f016e6190d159a44529a9568f8650ab3 to your computer and use it in GitHub Desktop.
FFmpeg Congiration checking compatabilty of device
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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