/*
 * Copyright (C) 2022 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.hardware.camera.device;

/**
 * OfflineStream:
 *
 * Information about a stream being switched to offline mode via the
 * ICameraDeviceSession#switchToOffline method.
 *
 */
@VintfStability
parcelable OfflineStream {
    /**
     * IDs of a stream to be transferred to offline session.
     *
     * For devices that do not support HAL buffer management, this must be
     * one of stream ID listed in streamsToKeep argument of the
     * switchToOffline call.
     * For devices that support HAL buffer management, this could be any stream
     * that was configured right before calling switchToOffline.
     */
    int id;

    /**
     * Number of outstanding buffers that will be returned via offline session
     */
    int numOutstandingBuffers;

    /**
     * Buffer ID of buffers currently cached between camera service and this
     * stream, which may or may not be owned by the camera HAL right now.
     * See StreamBuffer#bufferId for more details.
     */
    long[] circulatingBufferIds;
}
