Revert "Use ffmpeg library (#528)" (#532)

This reverts commit 32e243ce94.
This commit is contained in:
Osten 2023-08-02 17:13:50 +02:00 committed by GitHub
parent 32e243ce94
commit 87d85429f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

@ -165,7 +165,7 @@ dependencies {
// implementation("androidx.leanback:leanback-paging:1.1.0-alpha09") // implementation("androidx.leanback:leanback-paging:1.1.0-alpha09")
// Media 3 // Exoplayer
implementation("androidx.media3:media3-common:1.1.0") implementation("androidx.media3:media3-common:1.1.0")
implementation("androidx.media3:media3-exoplayer:1.1.0") implementation("androidx.media3:media3-exoplayer:1.1.0")
implementation("androidx.media3:media3-datasource-okhttp:1.1.0") implementation("androidx.media3:media3-datasource-okhttp:1.1.0")
@ -174,8 +174,10 @@ dependencies {
implementation("androidx.media3:media3-cast:1.1.0") implementation("androidx.media3:media3-cast:1.1.0")
implementation("androidx.media3:media3-exoplayer-hls:1.1.0") implementation("androidx.media3:media3-exoplayer-hls:1.1.0")
implementation("androidx.media3:media3-exoplayer-dash:1.1.0") implementation("androidx.media3:media3-exoplayer-dash:1.1.0")
// Custom ffmpeg extension for audio codecs
implementation("com.github.recloudstream:media-ffmpeg:1.1.0")
// Use the Jellyfin ffmpeg extension for easy ffmpeg audio decoding in exoplayer. Thank you Jellyfin <3
// implementation("org.jellyfin.exoplayer:exoplayer-ffmpeg-extension:2.18.2+1")
//implementation("com.google.android.exoplayer:extension-leanback:2.14.0") //implementation("com.google.android.exoplayer:extension-leanback:2.14.0")

View file

@ -30,7 +30,6 @@ import androidx.media3.datasource.cache.SimpleCache
import androidx.media3.datasource.okhttp.OkHttpDataSource import androidx.media3.datasource.okhttp.OkHttpDataSource
import androidx.media3.exoplayer.DefaultLoadControl import androidx.media3.exoplayer.DefaultLoadControl
import androidx.media3.exoplayer.DefaultRenderersFactory import androidx.media3.exoplayer.DefaultRenderersFactory
import androidx.media3.exoplayer.DefaultRenderersFactory.EXTENSION_RENDERER_MODE_PREFER
import androidx.media3.exoplayer.ExoPlayer import androidx.media3.exoplayer.ExoPlayer
import androidx.media3.exoplayer.SeekParameters import androidx.media3.exoplayer.SeekParameters
import androidx.media3.exoplayer.source.ClippingMediaSource import androidx.media3.exoplayer.source.ClippingMediaSource
@ -702,9 +701,9 @@ class CS3IPlayer : IPlayer {
ExoPlayer.Builder(context) ExoPlayer.Builder(context)
.setRenderersFactory { eventHandler, videoRendererEventListener, audioRendererEventListener, textRendererOutput, metadataRendererOutput -> .setRenderersFactory { eventHandler, videoRendererEventListener, audioRendererEventListener, textRendererOutput, metadataRendererOutput ->
DefaultRenderersFactory(context).apply { DefaultRenderersFactory(context).apply {
setEnableDecoderFallback(true) // setEnableDecoderFallback(true)
// Enable Ffmpeg extension // Enable Ffmpeg extension
setExtensionRendererMode(EXTENSION_RENDERER_MODE_PREFER) // setExtensionRendererMode(EXTENSION_RENDERER_MODE_ON)
}.createRenderers( }.createRenderers(
eventHandler, eventHandler,
videoRendererEventListener, videoRendererEventListener,