| 42 | } |
| 43 | |
| 44 | InputStreamPtr |
| 45 | DecoderBridge::OpenLocal(Path path_fs, const char *uri_utf8) |
| 46 | { |
| 47 | if (dc.input_cache != nullptr) { |
| 48 | auto lease = dc.input_cache->Get(uri_utf8, true); |
| 49 | if (lease) { |
| 50 | auto is = std::make_unique<CacheInputStream>(std::move(lease), |
| 51 | dc.mutex); |
| 52 | is->SetHandler(&dc); |
| 53 | return is; |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | auto is = OpenLocalInputStream(path_fs, dc.mutex); |
| 58 | is->SetHandler(&dc); |
| 59 | return is; |
| 60 | } |
| 61 | |
| 62 | bool |
| 63 | DecoderBridge::CheckCancelRead() const noexcept |
no test coverage detected