PlaybackCacheListener.java revision 1abddd9f6225298066094e20a6c29061b6af4590
1/* 2 * Copyright (C) 2015 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 17package com.android.usbtuner.tvinput; 18 19/** 20 * The listener for cache events occurred during playback. 21 */ 22public interface PlaybackCacheListener { 23 24 /** 25 * Invoked when the start position of the cache has been changed. 26 * 27 * @param startTimeMs the new start time of the cache in millisecond 28 */ 29 void onCacheStartTimeChanged(long startTimeMs); 30 31 /** 32 * Invoked when the state of the cache has been changed. 33 * 34 * @param available whether the cache is available or not 35 */ 36 void onCacheStateChanged(boolean available); 37 38 /** 39 * Invoked when the disk speed is too slow to write the caches. 40 */ 41 void onDiskTooSlow(); 42} 43