Lines Matching refs:resources
74 static bool hasResourceType(MediaResource::Type type, const ResourceList& resources) { in hasResourceType() argument
75 for (auto it = resources.begin(); it != resources.end(); it++) { in hasResourceType()
85 if (hasResourceType(type, infos[i].resources)) { in hasResourceType()
124 static void notifyResourceGranted(int pid, const Vector<MediaResource> &resources) { in notifyResourceGranted() argument
129 for (size_t i = 0; i < resources.size(); ++i) { in notifyResourceGranted()
130 if (resources[i].mSubType == MediaResource::kAudioCodec) { in notifyResourceGranted()
132 } else if (resources[i].mSubType == MediaResource::kVideoCodec) { in notifyResourceGranted()
188 const ResourceList &resources = infos[j].resources; in dump() local
190 for (auto it = resources.begin(); it != resources.end(); it++) { in dump()
310 const Vector<MediaResource> &resources) { in addResource() argument
312 pid, (long long) clientId, getString(resources).string()); in addResource()
323 for (size_t i = 0; i < resources.size(); ++i) { in addResource()
324 const auto &res = resources[i]; in addResource()
326 if (info.resources.find(resType) == info.resources.end()) { in addResource()
328 info.resources[resType] = res; in addResource()
330 mergeResources(info.resources[resType], res); in addResource()
337 notifyResourceGranted(pid, resources); in addResource()
341 const Vector<MediaResource> &resources) { in removeResource() argument
343 pid, (long long) clientId, getString(resources).string()); in removeResource()
366 for (size_t i = 0; i < resources.size(); ++i) { in removeResource()
367 const auto &res = resources[i]; in removeResource()
370 if (info.resources.find(resType) != info.resources.end()) { in removeResource()
371 MediaResource &resource = info.resources[resType]; in removeResource()
378 info.resources.erase(resType); in removeResource()
413 for (auto it = info.resources.begin(); it != info.resources.end(); it++) { in removeResource()
434 int callingPid, const Vector<MediaResource> &resources) { in reclaimResource() argument
436 callingPid, getString(resources).string()); in reclaimResource()
450 for (size_t i = 0; i < resources.size(); ++i) { in reclaimResource()
451 MediaResource::Type type = resources[i].mType; in reclaimResource()
452 if (resources[i].mType == MediaResource::kSecureCodec) { in reclaimResource()
453 secureCodec = &resources[i]; in reclaimResource()
455 nonSecureCodec = &resources[i]; in reclaimResource()
457 graphicMemory = &resources[i]; in reclaimResource()
459 drmSession = &resources[i]; in reclaimResource()
563 if (hasResourceType(type, infos[j].resources)) { in getAllClients_l()
667 const ResourceList &resources = infos[i].resources; in getBiggestClient_l() local
668 for (auto it = resources.begin(); it != resources.end(); it++) { in getBiggestClient_l()