• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2014 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;
18 
19 import android.graphics.Rect;
20 import android.media.PlaybackParams;
21 import android.media.tv.AdRequest;
22 import android.media.tv.BroadcastInfoRequest;
23 import android.media.tv.TvTrackInfo;
24 import android.net.Uri;
25 import android.os.Bundle;
26 import android.view.Surface;
27 
28 /**
29  * Sub-interface of ITvInputService which is created per session and has its own context.
30  * @hide
31  */
32 oneway interface ITvInputSession {
release()33     void release();
34 
setMain(boolean isMain)35     void setMain(boolean isMain);
setSurface(in Surface surface)36     void setSurface(in Surface surface);
dispatchSurfaceChanged(int format, int width, int height)37     void dispatchSurfaceChanged(int format, int width, int height);
38     // TODO: Remove this once it becomes irrelevant for applications to handle audio focus. The plan
39     // is to introduce some new concepts that will solve a number of problems in audio policy today.
setVolume(float volume)40     void setVolume(float volume);
tune(in Uri channelUri, in Bundle params)41     void tune(in Uri channelUri, in Bundle params);
setCaptionEnabled(boolean enabled)42     void setCaptionEnabled(boolean enabled);
selectTrack(int type, in String trackId)43     void selectTrack(int type, in String trackId);
44 
setInteractiveAppNotificationEnabled(boolean enable)45     void setInteractiveAppNotificationEnabled(boolean enable);
46 
appPrivateCommand(in String action, in Bundle data)47     void appPrivateCommand(in String action, in Bundle data);
48 
createOverlayView(in IBinder windowToken, in Rect frame)49     void createOverlayView(in IBinder windowToken, in Rect frame);
relayoutOverlayView(in Rect frame)50     void relayoutOverlayView(in Rect frame);
removeOverlayView()51     void removeOverlayView();
52 
unblockContent(in String unblockedRating)53     void unblockContent(in String unblockedRating);
54 
timeShiftPlay(in Uri recordedProgramUri)55     void timeShiftPlay(in Uri recordedProgramUri);
timeShiftPause()56     void timeShiftPause();
timeShiftResume()57     void timeShiftResume();
timeShiftSeekTo(long timeMs)58     void timeShiftSeekTo(long timeMs);
timeShiftSetPlaybackParams(in PlaybackParams params)59     void timeShiftSetPlaybackParams(in PlaybackParams params);
timeShiftEnablePositionTracking(boolean enable)60     void timeShiftEnablePositionTracking(boolean enable);
61 
62     // For the recording session
startRecording(in Uri programUri, in Bundle params)63     void startRecording(in Uri programUri, in Bundle params);
stopRecording()64     void stopRecording();
pauseRecording(in Bundle params)65     void pauseRecording(in Bundle params);
resumeRecording(in Bundle params)66     void resumeRecording(in Bundle params);
67 
68     // For broadcast info
requestBroadcastInfo(in BroadcastInfoRequest request)69     void requestBroadcastInfo(in BroadcastInfoRequest request);
removeBroadcastInfo(int id)70     void removeBroadcastInfo(int id);
71 
72     // For ad request
requestAd(in AdRequest request)73     void requestAd(in AdRequest request);
74 }
75