Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1f8fd7b authored by Hangyu Kuang's avatar Hangyu Kuang Committed by Android (Google) Code Review
Browse files

Merge "transcoding: Add TranscodingTestConfig for testing."

parents c92e3e07 22d6ae85
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ aidl_interface {
        "aidl/android/media/TranscodingJobParcel.aidl",
        "aidl/android/media/TranscodingRequestParcel.aidl",
        "aidl/android/media/TranscodingResultParcel.aidl",
        "aidl/android/media/TranscodingTestConfig.aidl",
    ],
    backend:
    {
+12 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.media;

import android.media.TranscodingJobPriority;
import android.media.TranscodingTestConfig;
import android.media.TranscodingType;
import android.media.TranscodingVideoTrackFormat;

@@ -59,4 +60,15 @@ parcelable TranscodingRequestParcel {
     * Whether to receive update on progress and change of awaitNumJobs.
     */
    boolean requestUpdate;

    /**
     * Whether this request is for testing.
     */
    boolean isForTesting = false;

    /**
     * Test configuration. This is only valid when isForTesting is set to true.
     */

    TranscodingTestConfig testConfig;
}
+37 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 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.
 */

 package android.media;

 /**
  * TranscodingTestConfig contains the test configureation used in testing.
  *
  * {@hide}
  */
parcelable TranscodingTestConfig {
    /**
     * Passthrough mode used for testing. The transcoding service will assume the destination
     * path already contains the transcoding of the source file and return it to client directly.
     */
    boolean passThroughMode = false;

    /**
     * Delay of processing the job in milliseconds. Used only for testing. This comebines with
     * passThroughMode are used to simulate the transcoding latency in transcoding without involvign
     * MediaTranscoder.
     */
    int processingDelayMs = 0;
}
+2 −0
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@ private:
        transcodingType = parcel.transcodingType;
        priority = parcel.priority;
        requestUpdate = parcel.requestUpdate;
        isForTesting = parcel.isForTesting;
        testConfig = parcel.testConfig;
    }
};