Home | History | Annotate | Download | only in mediaresourcemanager

Lines Matching refs:resources

72 static bool hasResourceType(MediaResource::Type type, const Vector<MediaResource>& resources) {
73 for (size_t i = 0; i < resources.size(); ++i) {
74 if (resources[i].mType == type) {
83 if (hasResourceType(type, infos[i].resources)) {
120 static void notifyResourceGranted(int pid, const Vector<MediaResource> &resources) {
125 for (size_t i = 0; i < resources.size(); ++i) {
126 if (resources[i].mSubType == MediaResource::kAudioCodec) {
128 } else if (resources[i].mSubType == MediaResource::kVideoCodec) {
184 Vector<MediaResource> resources = infos[j].resources;
185 result.append(" Resources:\n");
186 for (size_t k = 0; k < resources.size(); ++k) {
187 snprintf(buffer, SIZE, " %s\n", resources[k].toString().string());
231 const Vector<MediaResource> &resources) {
232 String8 log = String8::format("addResource(pid %d, clientId %lld, resources %s)",
233 pid, (long long) clientId, getString(resources).string());
244 info.resources.appendVector(resources);
246 for (size_t i = 0; i < resources.size(); ++i) {
247 if (resources[i].mType == MediaResource::kCpuBoost && !info.cpuBoost) {
262 notifyResourceGranted(pid, resources);
317 int callingPid, const Vector<MediaResource> &resources) {
318 String8 log = String8::format("reclaimResource(callingPid %d, resources %s)",
319 callingPid, getString(resources).string());
332 for (size_t i = 0; i < resources.size(); ++i) {
333 MediaResource::Type type = resources[i].mType;
334 if (resources[i].mType == MediaResource::kSecureCodec) {
335 secureCodec = &resources[i];
337 nonSecureCodec = &resources[i];
339 graphicMemory = &resources[i];
365 // if no secure/non-secure codec conflict, run second pass to handle other resources.
437 if (hasResourceType(type, infos[j].resources)) {
541 Vector<MediaResource> resources = infos[i].resources;
542 for (size_t j = 0; j < resources.size(); ++j) {
543 if (resources[j].mType == type) {
544 if (resources[j].mValue > largestValue) {
545 largestValue = resources[j].mValue;