You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
134 lines
4.5 KiB
134 lines
4.5 KiB
/*
|
|
* Copyright (C) 2019 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.tv.tuner@1.0;
|
|
|
|
import IFilter;
|
|
|
|
/**
|
|
* Digtal Video Record (DVR) interface provides record control on Demux's
|
|
* output buffer and playback control on Demux's input buffer.
|
|
*/
|
|
interface IDvr {
|
|
/**
|
|
* Get the descriptor of the DVR's FMQ
|
|
*
|
|
* It is used by the client to get the descriptor of the DVR's Fast
|
|
* Message Queue. The FMQ is used to transfer record or playback data
|
|
* between the client and the HAL.
|
|
*
|
|
* @return result Result status of the operation.
|
|
* SUCCESS if successful,
|
|
* UNKNOWN_ERROR if failed for other reasons.
|
|
* @return queue the descriptor of the DVR's FMQ
|
|
*/
|
|
getQueueDesc() generates (Result result, fmq_sync<uint8_t> queue);
|
|
|
|
/**
|
|
* Configure the DVR.
|
|
*
|
|
* It is used by the client to configure the DVR interface.
|
|
*
|
|
* @param settings the settings of the DVR interface.
|
|
* @return result Result status of the operation.
|
|
* SUCCESS if successful,
|
|
* INVALID_STATE if failed for wrong state.
|
|
* UNKNOWN_ERROR if failed for other reasons.
|
|
*/
|
|
configure(DvrSettings settings) generates (Result result);
|
|
|
|
/**
|
|
* Attach one filter to DVR interface for recording.
|
|
*
|
|
* It is used by the client to add the data filtered out from the filter
|
|
* to record.
|
|
*
|
|
* @param filter the instance of the attached filter.
|
|
* @return result Result status of the operation.
|
|
* SUCCESS if successful,
|
|
* INVALID_STATE if failed for wrong state.
|
|
* UNKNOWN_ERROR if failed for other reasons.
|
|
*/
|
|
attachFilter(IFilter filter) generates (Result result);
|
|
|
|
/**
|
|
* Detach one filter from the DVR's recording.
|
|
*
|
|
* It is used by the client to remove the data of the filter from DVR's
|
|
* recording.
|
|
*
|
|
* @param filter the instance of the detached filter.
|
|
* @return result Result status of the operation.
|
|
* SUCCESS if successful,
|
|
* INVALID_STATE if failed for wrong state.
|
|
* UNKNOWN_ERROR if failed for other reasons.
|
|
*/
|
|
detachFilter(IFilter filter) generates (Result result);
|
|
|
|
/**
|
|
* Start DVR.
|
|
*
|
|
* It is used by the client to ask the DVR to start consuming playback data
|
|
* or producing data for record.
|
|
*
|
|
* @return result Result status of the operation.
|
|
* SUCCESS if successful,
|
|
* INVALID_STATE if failed for wrong state.
|
|
* UNKNOWN_ERROR if failed for other reasons.
|
|
*/
|
|
start() generates (Result result);
|
|
|
|
/**
|
|
* Stop DVR.
|
|
*
|
|
* It is used by the client to ask the DVR to stop consuming playback data
|
|
* or producing data for record.
|
|
*
|
|
* @return result Result status of the operation.
|
|
* SUCCESS if successful,
|
|
* INVALID_STATE if failed for wrong state.
|
|
* UNKNOWN_ERROR if failed for other reasons.
|
|
*/
|
|
stop() generates (Result result);
|
|
|
|
/**
|
|
* Flush DVR data.
|
|
*
|
|
* It is used by the client to ask the DVR to flush the data which is
|
|
* not consumed by HAL for playback or the client for record yet.
|
|
*
|
|
* @return result Result status of the operation.
|
|
* SUCCESS if successful,
|
|
* INVALID_STATE if failed for wrong state.
|
|
* UNKNOWN_ERROR if failed for other reasons.
|
|
*/
|
|
flush() generates (Result result);
|
|
|
|
/**
|
|
* close the DVR instance to release resource for DVR.
|
|
*
|
|
* It is used by the client to close the DVR instance, and HAL clears
|
|
* underneath resource for this DVR instance. Client mustn't access the
|
|
* instance any more and all methods should return a failure.
|
|
*
|
|
* @return result Result status of the operation.
|
|
* SUCCESS if successful,
|
|
* INVALID_STATE if failed for wrong state.
|
|
* UNKNOWN_ERROR if failed for other reasons.
|
|
*/
|
|
close() generates (Result result);
|
|
};
|