Lines Matching refs:MediaResource

29     static MediaResource createSecureVideoCodecResource(int amount = 1) {  in createSecureVideoCodecResource()
30 return MediaResource(MediaResource::Type::kSecureCodec, in createSecureVideoCodecResource()
31 MediaResource::SubType::kHwVideoCodec, amount); in createSecureVideoCodecResource()
34 static MediaResource createNonSecureVideoCodecResource(int amount = 1) { in createNonSecureVideoCodecResource()
35 return MediaResource(MediaResource::Type::kNonSecureCodec, in createNonSecureVideoCodecResource()
36 MediaResource::SubType::kHwVideoCodec, amount); in createNonSecureVideoCodecResource()
39 static MediaResource createSecureAudioCodecResource(int amount = 1) { in createSecureAudioCodecResource()
40 return MediaResource(MediaResource::Type::kSecureCodec, in createSecureAudioCodecResource()
41 MediaResource::SubType::kHwAudioCodec, amount); in createSecureAudioCodecResource()
44 static MediaResource createNonSecureAudioCodecResource(int amount = 1) { in createNonSecureAudioCodecResource()
45 return MediaResource(MediaResource::Type::kNonSecureCodec, in createNonSecureAudioCodecResource()
46 MediaResource::SubType::kHwAudioCodec, amount); in createNonSecureAudioCodecResource()
49 static MediaResource createSecureImageCodecResource(int amount = 1) { in createSecureImageCodecResource()
50 return MediaResource(MediaResource::Type::kSecureCodec, in createSecureImageCodecResource()
51 MediaResource::SubType::kHwImageCodec, amount); in createSecureImageCodecResource()
54 static MediaResource createNonSecureImageCodecResource(int amount = 1) { in createNonSecureImageCodecResource()
55 return MediaResource(MediaResource::Type::kNonSecureCodec, in createNonSecureImageCodecResource()
56 MediaResource::SubType::kHwImageCodec, amount); in createNonSecureImageCodecResource()
59 static MediaResource createGraphicMemoryResource(int amount = 1) { in createGraphicMemoryResource()
60 return MediaResource(MediaResource::Type::kGraphicMemory, in createGraphicMemoryResource()
61 MediaResource::SubType::kUnspecifiedSubType, amount); in createGraphicMemoryResource()
64 static MediaResource createDrmSessionResource(int amount = 1) { in createDrmSessionResource()
65 return MediaResource(MediaResource::Type::kDrmSession, in createDrmSessionResource()
66 MediaResource::SubType::kUnspecifiedSubType, amount); in createDrmSessionResource()
69 static MediaResource createBatteryResource() { in createBatteryResource()
70 return MediaResource(MediaResource::Type::kBattery, in createBatteryResource()
71 MediaResource::SubType::kUnspecifiedSubType, 1); in createBatteryResource()
74 static MediaResource createCpuBoostResource() { in createCpuBoostResource()
75 return MediaResource(MediaResource::Type::kCpuBoost, in createCpuBoostResource()
76 MediaResource::SubType::kUnspecifiedSubType, 1); in createCpuBoostResource()
112 resources1.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in addResource()
118 resources1.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 200)); in addResource()
120 resources11.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 200)); in addResource()
125 resources2.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, 1)); in addResource()
126 resources2.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 300)); in addResource()
140 resources3.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in addResource()
141 resources3.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 100)); in addResource()
163 resources1.push_back(MediaResource(MediaResource::Type::kDrmSession, -100)); in testCombineResourceWithNegativeValues()
164 resources1.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, -100)); in testCombineResourceWithNegativeValues()
184 resources1.push_back(MediaResource(MediaResource::Type::kDrmSession, INT64_MAX)); in testCombineResourceWithNegativeValues()
185 resources1.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, INT64_MAX)); in testCombineResourceWithNegativeValues()
188 resources1.push_back(MediaResource(MediaResource::Type::kDrmSession, 10)); in testCombineResourceWithNegativeValues()
189 resources1.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, 10)); in testCombineResourceWithNegativeValues()
194 expected.push_back(MediaResource(MediaResource::Type::kDrmSession, INT64_MAX)); in testCombineResourceWithNegativeValues()
195 expected.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, INT64_MAX)); in testCombineResourceWithNegativeValues()
199 resources1.push_back(MediaResource(MediaResource::Type::kDrmSession, -10)); in testCombineResourceWithNegativeValues()
200 resources1.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, -10)); in testCombineResourceWithNegativeValues()
206 expected.push_back(MediaResource(MediaResource::Type::kDrmSession, INT64_MAX - 10)); in testCombineResourceWithNegativeValues()
207 expected.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, INT64_MAX)); in testCombineResourceWithNegativeValues()
211 resources1.push_back(MediaResource(MediaResource::Type::kDrmSession, INT64_MIN)); in testCombineResourceWithNegativeValues()
218 expected.push_back(MediaResource(MediaResource::Type::kDrmSession, 0)); in testCombineResourceWithNegativeValues()
219 expected.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, INT64_MAX)); in testCombineResourceWithNegativeValues()
239 resources1.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in testCombineResource()
247 resources11.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 200)); in testCombineResource()
258 resources1.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 100)); in testCombineResource()
262 expected.push_back(MediaResource(MediaResource::Type::kSecureCodec, 2)); in testCombineResource()
263 expected.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 300)); in testCombineResource()
267 resources11.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, 1)); in testCombineResource()
268 resources11.push_back(MediaResource(MediaResource::Type::kSecureCodec, in testCombineResource()
269 MediaResource::SubType::kHwVideoCodec, 1)); in testCombineResource()
273 expected.push_back(MediaResource(MediaResource::Type::kSecureCodec, 2)); in testCombineResource()
274 expected.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, 1)); in testCombineResource()
275 expected.push_back(MediaResource(MediaResource::Type::kSecureCodec, in testCombineResource()
276 MediaResource::SubType::kHwVideoCodec, 1)); in testCombineResource()
277 expected.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 500)); in testCombineResource()
284 resources1.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in testRemoveResource()
292 resources11.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 200)); in testRemoveResource()
307 expected.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in testRemoveResource()
308 expected.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 100)); in testRemoveResource()
322 expected.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in testRemoveResource()
329 resources.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in testOverridePid()
330 resources.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 150)); in testOverridePid()
372 resources.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, 1)); in testMarkClientForPendingRemoval()
400 resources.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, 1)); in testMarkClientForPendingRemoval()
475 MediaResource resource(MediaResource::Type::kSecureCodec, in testGetAllClients()
476 MediaResource::SubType::kUnspecifiedSubType, in testGetAllClients()
515 resources.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in testSelfReclaimResourceSecure()
516 resources.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 150)); in testSelfReclaimResourceSecure()
543 resources1.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in testSelfReclaimResourceSecure()
571 resources.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in testReclaimResourceSecure()
572 resources.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 150)); in testReclaimResourceSecure()
698 resources.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in testReclaimResourceSecure()
722 resources.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, 1)); in testReclaimResourceNonSecure()
723 resources.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 150)); in testReclaimResourceNonSecure()
800 resources.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, 1)); in testReclaimResourceNonSecure()
825 MediaResource resource(MediaResource::Type::kGraphicMemory, in testGetLowestPriorityBiggestClient()
826 MediaResource::SubType::kUnspecifiedSubType, in testGetLowestPriorityBiggestClient()
847 MediaResource::Type type = MediaResource::Type::kGraphicMemory; in testGetLowestPriorityPid()
848 MediaResource::SubType subType = MediaResource::SubType::kUnspecifiedSubType; in testGetLowestPriorityPid()
859 type = MediaResource::Type::kNonSecureCodec; in testGetLowestPriorityPid()
880 resources1.push_back(MediaResource(MediaResource::Type::kBattery, in testBatteryStats()
881 MediaResource::SubType::kHwVideoCodec, 1)); in testBatteryStats()
896 resources2.push_back(MediaResource(MediaResource::Type::kBattery, in testBatteryStats()
897 MediaResource::SubType::kHwVideoCodec, 2)); in testBatteryStats()
929 resources1.push_back(MediaResource(MediaResource::Type::kCpuBoost, 1)); in testCpusetBoost()
944 resources2.push_back(MediaResource(MediaResource::Type::kCpuBoost, 2)); in testCpusetBoost()
1443 clientConfig.codecType = hw? MediaResource::SubType::kHwVideoCodec : in initClientConfigParcel()
1444 MediaResource::SubType::kSwVideoCodec; in initClientConfigParcel()