| 16 | } |
| 17 | |
| 18 | Cicada::IDecoder *codecPrototype::create(const Stream_meta &meta, uint64_t flags, int maxSize, |
| 19 | const Cicada::DrmInfo *drmInfo) |
| 20 | { |
| 21 | bool bHW = static_cast<bool>(flags & DECFLAG_HW); |
| 22 | |
| 23 | if (bHW) { |
| 24 | uint64_t decFlags = flags; |
| 25 | decFlags &= ~DECFLAG_SW; |
| 26 | |
| 27 | for (int i = 0; i < _nextSlot; ++i) { |
| 28 | if (codecQueue[i]->is_supported(meta, decFlags, maxSize) && |
| 29 | (drmInfo == nullptr || codecQueue[i]->is_drmSupport(drmInfo))) { |
| 30 | return codecQueue[i]->clone(); |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | for (int i = 0; i < _nextSlot; ++i) { |
| 36 | if (codecQueue[i]->is_supported(meta, flags, maxSize) && |
| 37 | (drmInfo == nullptr || codecQueue[i]->is_drmSupport(drmInfo))) { |
| 38 | return codecQueue[i]->clone(); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | return nullptr; |
| 43 | } |
nothing calls this directly
no test coverage detected