1 /* 2 * Copyright (C) 2019 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; 18 19 import android.media.TranscodingRequestParcel; 20 import android.media.TranscodingVideoTrackFormat; 21 22 /** 23 * TranscodingSession is generated by the MediaTranscodingService upon receiving a 24 * TranscodingRequest. It contains all the necessary configuration generated by the 25 * MediaTranscodingService for the TranscodingRequest. 26 * 27 * {@hide} 28 */ 29 //TODO(hkuang): Implement the parcelable. 30 parcelable TranscodingSessionParcel { 31 /** 32 * A unique positive Id generated by the MediaTranscodingService. 33 */ 34 int sessionId; 35 36 /** 37 * The request associated with the TranscodingSession. 38 */ 39 TranscodingRequestParcel request; 40 41 /** 42 * Output video track's format. This will only be avaiable for video transcoding and it will 43 * be avaiable when the session is finished. 44 */ 45 @nullable TranscodingVideoTrackFormat videoTrackFormat; 46 47 /** 48 * Current number of sessions ahead of this session. The service schedules the session based on 49 * the priority passed from the client. Client could specify whether to receive updates when the 50 * awaitNumberOfSessions changes through setting requestProgressUpdate in the TranscodingRequest. 51 */ 52 int awaitNumberOfSessions; 53 } 54