Merge pull request #3482 from ByteHamster/exoplayer-log-source

Added logging to ExoPlayer
This commit is contained in:
H. Lehmann 2019-10-02 15:58:04 +02:00 committed by GitHub
commit 2db5c00d66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package de.danoeh.antennapod.core.service.playback;
import android.content.Context; import android.content.Context;
import android.net.Uri; import android.net.Uri;
import android.util.Log;
import android.view.SurfaceHolder; import android.view.SurfaceHolder;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
@ -36,6 +37,7 @@ import de.danoeh.antennapod.core.util.playback.IPlayer;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
public class ExoPlayerWrapper implements IPlayer { public class ExoPlayerWrapper implements IPlayer {
private static final String TAG = "ExoPlayerWrapper";
private final Context mContext; private final Context mContext;
private final Disposable bufferingUpdateDisposable; private final Disposable bufferingUpdateDisposable;
private SimpleExoPlayer mExoPlayer; private SimpleExoPlayer mExoPlayer;
@ -205,6 +207,7 @@ public class ExoPlayerWrapper implements IPlayer {
@Override @Override
public void setDataSource(String s) throws IllegalArgumentException, IllegalStateException { public void setDataSource(String s) throws IllegalArgumentException, IllegalStateException {
Log.d(TAG, "setDataSource: " + s);
DefaultHttpDataSourceFactory httpDataSourceFactory = new DefaultHttpDataSourceFactory( DefaultHttpDataSourceFactory httpDataSourceFactory = new DefaultHttpDataSourceFactory(
Util.getUserAgent(mContext, mContext.getPackageName()), null, Util.getUserAgent(mContext, mContext.getPackageName()), null,
DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS, DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS,