1 /* 2 * Copyright 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.media.cujcommon.cts; 18 19 import com.google.auto.value.AutoValue; 20 21 import java.time.Duration; 22 import java.util.List; 23 24 /** 25 * An AutoValue class to create cuj test params. 26 */ 27 @AutoValue 28 public abstract class CujTestParam { 29 30 31 /** 32 * Returns a builder for {@link CujTestParam}. 33 */ builder()34 public static Builder builder() { 35 return new AutoValue_CujTestParam.Builder(); 36 } 37 38 /** 39 * Return test mediaUrls. 40 */ getMediaUrls()41 public abstract List<String> getMediaUrls(); 42 43 /** 44 * Return test duration. 45 */ getDuration()46 public abstract Duration getDuration(); 47 48 /** 49 * Return test overhead. 50 */ getOverhead()51 public abstract Duration getOverhead(); 52 53 /** 54 * Return test playerListener. 55 */ getPlayerListener()56 public abstract PlayerListener getPlayerListener(); 57 58 /** 59 * A builder for {@link CujTestParam}. 60 */ 61 @AutoValue.Builder 62 public abstract static class Builder { 63 64 /** 65 * Sets test mediaUrls. 66 */ setMediaUrls(List<String> mediaUrls)67 public abstract Builder setMediaUrls(List<String> mediaUrls); 68 69 /** 70 * Sets test duration. 71 */ setDuration(Duration duration)72 public abstract Builder setDuration(Duration duration); 73 74 /** 75 * Sets test overhead. 76 */ setOverhead(Duration overhead)77 public abstract Builder setOverhead(Duration overhead); 78 79 /** 80 * Sets test playerListener. 81 */ setPlayerListener(PlayerListener playerListener)82 public abstract Builder setPlayerListener(PlayerListener playerListener); 83 84 /** 85 * Returns a newly-constructed {@link CujTestParam}. 86 */ build()87 public abstract CujTestParam build(); 88 } 89 } 90