1 /* 2 * Copyright (C) 2023 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.ad; 18 19 import android.graphics.Rect; 20 import android.media.tv.TvTrackInfo; 21 import android.net.Uri; 22 import android.os.Bundle; 23 import android.view.Surface; 24 25 /** 26 * Sub-interface of ITvAdService.aidl which is created per session and has its own context. 27 * @hide 28 */ 29 oneway interface ITvAdSession { release()30 void release(); startAdService()31 void startAdService(); stopAdService()32 void stopAdService(); resetAdService()33 void resetAdService(); setSurface(in Surface surface)34 void setSurface(in Surface surface); dispatchSurfaceChanged(int format, int width, int height)35 void dispatchSurfaceChanged(int format, int width, int height); 36 sendCurrentVideoBounds(in Rect bounds)37 void sendCurrentVideoBounds(in Rect bounds); sendCurrentChannelUri(in Uri channelUri)38 void sendCurrentChannelUri(in Uri channelUri); sendTrackInfoList(in List<TvTrackInfo> tracks)39 void sendTrackInfoList(in List<TvTrackInfo> tracks); sendCurrentTvInputId(in String inputId)40 void sendCurrentTvInputId(in String inputId); sendSigningResult(in String signingId, in byte[] result)41 void sendSigningResult(in String signingId, in byte[] result); 42 notifyError(in String errMsg, in Bundle params)43 void notifyError(in String errMsg, in Bundle params); notifyTvMessage(int type, in Bundle data)44 void notifyTvMessage(int type, in Bundle data); 45 createMediaView(in IBinder windowToken, in Rect frame)46 void createMediaView(in IBinder windowToken, in Rect frame); relayoutMediaView(in Rect frame)47 void relayoutMediaView(in Rect frame); removeMediaView()48 void removeMediaView(); 49 notifyTvInputSessionData(in String type, in Bundle data)50 void notifyTvInputSessionData(in String type, in Bundle data); 51 } 52