• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright 2021, 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.tv.tuner;
18 
19 import android.hardware.tv.tuner.DemuxFilterType;
20 import android.hardware.tv.tuner.DvrType;
21 import android.media.tv.tuner.ITunerDvr;
22 import android.media.tv.tuner.ITunerDvrCallback;
23 import android.media.tv.tuner.ITunerFilter;
24 import android.media.tv.tuner.ITunerFilterCallback;
25 import android.media.tv.tuner.ITunerFrontend;
26 import android.media.tv.tuner.ITunerTimeFilter;
27 
28 /**
29  * Tuner Demux interface handles tuner related operations.
30  *
31  * {@hide}
32  */
33 interface ITunerDemux {
34 
35     /**
36      * Set a frontend resource as data input of the demux
37      */
setFrontendDataSource(in ITunerFrontend frontend)38     void setFrontendDataSource(in ITunerFrontend frontend);
39 
40     /**
41      * Set a frontend resource by ID as data input of the demux
42      */
setFrontendDataSourceById(in int frontendId)43     void setFrontendDataSourceById(in int frontendId);
44 
45     /**
46      * Open a new filter in the demux
47      */
openFilter(in DemuxFilterType type, in int bufferSize, in ITunerFilterCallback cb)48     ITunerFilter openFilter(in DemuxFilterType type, in int bufferSize,
49         in ITunerFilterCallback cb);
50 
51     /**
52      * Open time filter of the demux.
53      */
openTimeFilter()54     ITunerTimeFilter openTimeFilter();
55 
56     /**
57      * Get hardware sync ID for audio and video.
58      */
getAvSyncHwId(ITunerFilter tunerFilter)59     int getAvSyncHwId(ITunerFilter tunerFilter);
60 
61     /**
62      * Get current time stamp to use for A/V sync.
63      */
getAvSyncTime(in int avSyncHwId)64     long getAvSyncTime(in int avSyncHwId);
65 
66     /**
67      * Open a DVR (Digital Video Record) instance in the demux.
68      */
openDvr(in DvrType dvbType, in int bufferSize, in ITunerDvrCallback cb)69     ITunerDvr openDvr(in DvrType dvbType, in int bufferSize, in ITunerDvrCallback cb);
70 
71     /**
72      * Connect Conditional Access Modules (CAM) through Common Interface (CI).
73      */
connectCiCam(in int ciCamId)74     void connectCiCam(in int ciCamId);
75 
76     /**
77      * Disconnect Conditional Access Modules (CAM).
78      */
disconnectCiCam()79     void disconnectCiCam();
80 
81     /**
82      * Releases the ITunerDemux instance.
83      */
close()84     void close();
85 }
86