Skip to content

Commit

Permalink
Reduced raw file buffer limit for single display layer and added a (c…
Browse files Browse the repository at this point in the history
…urrently unused) function to reset url.
  • Loading branch information
mindstorm38 committed Apr 15, 2022
1 parent 740ada8 commit a8a66a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public class DisplayLayerResources {
/** 8 Mio buffer for pre-storing whole TransportStream file. */
private static final int RAW_FILE_BUFFER_SIZE = 1 << 23;
/** Limit to 256 Mio of raw file buffers. */
private static final int RAW_FILE_BUFFER_LIMIT = 32;
private static final int RAW_FILE_BUFFER_LIMIT = 16;
/** 8 Kio buffer for converting (16 or 8 bits) stereo to mono 16 bits audio stream. */
private static final int AUDIO_BUFFER_SIZE = 8192;
/** Limit to 512 Kio of audio buffers. */
private static final int AUDIO_BUFFER_LIMIT = 64;
private static final int AUDIO_BUFFER_LIMIT = 32;

private final ExecutorService executor = Executors.newFixedThreadPool(2, new ThreadFactory() {
private final AtomicInteger counter = new AtomicInteger();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ public DisplayUrl getUrl() {
return this.url;
}

// TODO: Call this when too many IO timeout happens with the current URL.
public void resetUrl() {
this.lastSource = null;
this.url = null;
}

public float getWidthOffset() {
float width = this.display.getWidth();
if (width != this.lastWidth) {
Expand Down

0 comments on commit a8a66a4

Please sign in to comment.