MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / create

Method create

framework/codec/codecPrototype.cpp:18–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18Cicada::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}

Callers

nothing calls this directly

Calls 3

is_drmSupportMethod · 0.80
is_supportedMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected