Skip to content

Commit

Permalink
Player: some debugs
Browse files Browse the repository at this point in the history
  • Loading branch information
courville committed May 11, 2024
1 parent 6a48d4b commit ca1464a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/com/archos/mediacenter/video/player/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ public void onPrepared() {
mMediaPlayer.setAvDelay(mAvDelay);
if (mAvSpeed != 1.0f)
mMediaPlayer.setAvSpeed(mAvSpeed);
log.trace("onPrepared: audioTrack=" + mAudioTrack);
if (mAudioTrack != -1)
mMediaPlayer.setAudioTrack(mAudioTrack);
reset();
Expand All @@ -292,6 +293,7 @@ public void setSubtitleDelay(int subtitleDelay) {
mSubtitleDelay = subtitleDelay;
}
public void setAudioTrack(int audioTrack) {
log.debug("setAudioTrack: " + audioTrack);
mAudioTrack = audioTrack;
}
public void setSubtitleRatio(int n, int d) {
Expand Down Expand Up @@ -513,10 +515,12 @@ public void openVideo() {
else
mMediaPlayer.setDataSource(mContext, mUri);
if (mSurfaceHolder != null) {
log.debug("openVideo: setDisplay based on SurfaceHolder");
mMediaPlayer.setDisplay(mSurfaceHolder);
hasBeenSet=true;
}
else if (mVideoTexture != null) {
log.debug("openVideo: setSurface based on SurfaceTexture");
Surface surface = new Surface(mVideoTexture);
mMediaPlayer.setSurface(surface);
surface.release();
Expand Down Expand Up @@ -927,6 +931,7 @@ public void setAvSpeed(float speed) {
};

public boolean setAudioTrack(int stream) {
log.debug("setAudioTrack: select stream " + stream);
if (isInPlaybackState()) {
return mMediaPlayer.setAudioTrack(stream);
} else {
Expand Down

0 comments on commit ca1464a

Please sign in to comment.