danikula / danikula/AndroidVideoCache
Seek issue,use too much time.
- Lingua principale
- Java
- Stelle
- 5.5k
- Fork
- 1.2k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
```
private boolean isUseCache(GetRequest request) throws ProxyCacheException {
long sourceLength = source.length();
boolean sourceLengthKnown = sourceLength > 0;
long cacheAvailable = cache.available();
// do not use cache for partial requests which too far from available cache. It seems user seek video.
// return !sourceLengthKnown || !request.partial || request.rangeOffset <= cacheAvailable + sourceLength * NO_CACHE_BARRIER;
return !sourceLengthKnown || !request.partial || request.rangeOffset <= cacheAvailable;// + sourceLength * NO_CACHE_BARRIER;
}
```
HTTP MP4 file, if the duration too long, "sourceLength * NO_CACHE_BARRIER" well be a **BIG number**, fetch cache from network will coast too much time, seek blocked.
Remove the added number, seek works normally.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Search the repository for isUseCache(GetRequest request) and inspect how rangeOffset, cache.available(), and source.length() affect partial requests. Reproduce or review the HTTP MP4 seek scenario, then verify that seeking a long video does not wait for an unnecessarily large cache range.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, java
- Ambito
- mobile-dev, performance
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 50/100