// Copyright (C) 2024 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto2"; // Changes to this file require manaul update of the AOSP Go code. // update the go code with: // aprotoc --go_out=paths=source_relative:. \ // cts/tests/mediapc/requirements/mpc.proto \ // cts/tests/mediapc/requirements/requirements.proto package android.media.performanceclass.requirements; import "cts/tests/mediapc/requirements/mpc.proto"; option java_multiple_files = true; option go_package = "cts/test/mediapc/requirements/requirements_go_proto"; // A list of requirements. message RequirementList { repeated Requirement requirements = 1; // All valid MPC levels repeated int64 all_mpcs = 2 [packed = true]; } // A Media Performance Class Requirement with required measurements and // specifications including required values for each relevant MPC level. message Requirement { // ID exactly as shown in the CDD optional string id = 1; // Short human readable name. Must be unique. optional string name = 2; optional string description = 3; optional Group group = 4; map specs = 5; // measurement_id to RequiredMeasurements // The measurement_id is a field name safe string. map measurements = 6; // Whether this requirement is a non-CTS test. Cts tests require fields in the // test cases proto to be repeated fields. Non-Cts tests need optional fields. optional bool is_non_cts_test = 7 [default = false]; // variant_id to Variant // // The variant_id is a field name safe string. map variants = 57; } message RequirementSpec { optional android.media.performanceclass.MediaPerformanceClass mpc = 1; // The specification of the requirement at the given MPC level exactly as // described in the CDD. optional string specification = 3; // measurement_id to RequiredMeasurements // // The measurement_id is a field name safe string. // The measurement_id must match the id of a RequiredMeasurement in the parent // Requirement. map required_values = 4; // variant_id to VariantSpec // The variant_id is a field name safe string. map variant_specs = 5; } enum Group { GROUP_UNSPECIFIED = 0; GROUP_MEDIA = 1; GROUP_CAMERA = 2; GROUP_HARDWARE = 3; GROUP_PERFORMANCE = 4; } // A required measurement needed verifiy a MPC requirement. message RequiredMeasurement { // The id is a field name safe string. optional string id = 1; optional string description = 2; optional MeasurementType measurement_type = 3; optional Comparison comparison = 4; // Whether this measurement is used to differentiate between tests. Some // requirements have multiple tests that test for different performance // classes. ex: 5.1/H-1-2. optional bool is_test_differentiator = 5 [default = false]; } // A required value for a RequiredMeasurement at a given MPC level. message RequiredValue { // The id is a field name safe string. optional string id = 1; reserved 2; // comparison oneof value { string string_value = 3; int64 int_value = 4; double double_value = 5; bool bool_value = 6; int64 long_value = 7; } } // Variants are used when an alternative set of required values should apply message Variant { // When the variant should be used. optional string description = 1; } // The set values required for a variant message VariantSpec { // measurement_id to RequiredMeasurements // // The measurement_id is a field name safe string. // The measurement_id must match the id of a RequiredMeasurement in the parent // Requirement. map required_values = 4; } enum Comparison { COMPARISON_UNSPECIFIED = 0; COMPARISON_EQUAL = 1; COMPARISON_LESS_THAN = 2; COMPARISON_LESS_THAN_OR_EQUAL = 3; COMPARISON_GREATER_THAN = 4; COMPARISON_GREATER_THAN_OR_EQUAL = 5; COMPARISON_INFO_ONLY = 6; } enum MeasurementType { MEASUREMENT_TYPE_UNSPECIFIED = 0; MEASUREMENT_TYPE_BOOL = 1; MEASUREMENT_TYPE_DOUBLE = 2; MEASUREMENT_TYPE_INT = 3; MEASUREMENT_TYPE_STRING = 4; MEASUREMENT_TYPE_LONG = 5; }