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

Method checkCanBeCached

framework/cacheModule/CacheModule.cpp:59–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59CacheRet CacheModule::checkCanBeCached(const string &acturalPlayURL)
60{
61 AF_LOGD("---> prepare()");
62 {
63 unique_lock<mutex> lock(mStatusMutex);
64
65 if (mStatus != Stopped) {
66 return CACHE_ERROR_STATUS;
67 }
68
69 if (AfString::isLocalURL(acturalPlayURL)) {
70 mStatus = Status::Stopped;
71 AF_LOGE("url is local source");
72 return CACHE_ERROR_LOCAL_SOURCE;
73 }
74
75 const CacheRet &cacheRet = mCacheChecker.checkConfig();
76 mStatus = (cacheRet.mCode == CACHE_SUCCESS.mCode ? Status::Prepared : Status::Stopped);
77 return cacheRet;
78 }
79}
80
81void CacheModule::setMediaInfo(int64_t fileSize, int64_t duration)
82{

Callers 1

initMethod · 0.80

Calls 1

checkConfigMethod · 0.80

Tested by

no test coverage detected