danikula / danikula/AndroidVideoCache
Seek issue,use too much time.
- Lenguaje dominante
- Java
- Estrellas
- 5.5k
- Forks
- 1.2k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
```
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- android, java
- Área
- mobile-dev, performance
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 50/100