1 /* 2 * Copyright (C) 2016 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 package org.mozilla.thirdparty.com.google.android.exoplayer2.extractor; 17 18 /** 19 * Receives stream level data extracted by an {@link Extractor}. 20 */ 21 public interface ExtractorOutput { 22 23 /** 24 * Called by the {@link Extractor} to get the {@link TrackOutput} for a specific track. 25 * <p> 26 * The same {@link TrackOutput} is returned if multiple calls are made with the same {@code id}. 27 * 28 * @param id A track identifier. 29 * @param type The type of the track. Typically one of the {@link org.mozilla.thirdparty.com.google.android.exoplayer2C} 30 * {@code TRACK_TYPE_*} constants. 31 * @return The {@link TrackOutput} for the given track identifier. 32 */ track(int id, int type)33 TrackOutput track(int id, int type); 34 35 /** 36 * Called when all tracks have been identified, meaning no new {@code trackId} values will be 37 * passed to {@link #track(int, int)}. 38 */ endTracks()39 void endTracks(); 40 41 /** 42 * Called when a {@link SeekMap} has been extracted from the stream. 43 * 44 * @param seekMap The extracted {@link SeekMap}. 45 */ seekMap(SeekMap seekMap)46 void seekMap(SeekMap seekMap); 47 48 } 49