danikula / danikula/AndroidVideoCache
Seek issue,use too much time.
- Ngôn ngữ chính
- Java
- Star
- 5.5k
- Fork
- 1.2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
```
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- android, java
- Lĩnh vực
- mobile-dev, performance
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 50/100