Use @C.DataType intdef in HlsDataSourceFactory.createDataSource

PiperOrigin-RevId: 449973324
This commit is contained in:
ibaker 2022-05-20 14:41:06 +01:00 committed by Ian Baker
parent 685761b05b
commit bbb6d8f049
2 changed files with 4 additions and 4 deletions

View file

@ -15,6 +15,7 @@
*/
package com.google.android.exoplayer2.source.hls;
import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.upstream.DataSource;
/** Default implementation of {@link HlsDataSourceFactory}. */
@ -30,7 +31,7 @@ public final class DefaultHlsDataSourceFactory implements HlsDataSourceFactory {
}
@Override
public DataSource createDataSource(int dataType) {
public DataSource createDataSource(@C.DataType int dataType) {
return dataSourceFactory.createDataSource();
}
}

View file

@ -24,9 +24,8 @@ public interface HlsDataSourceFactory {
/**
* Creates a {@link DataSource} for the given data type.
*
* @param dataType The data type for which the {@link DataSource} will be used. One of {@link C}
* {@code .DATA_TYPE_*} constants.
* @param dataType The {@link C.DataType} for which the {@link DataSource} will be used.
* @return A {@link DataSource} for the given data type.
*/
DataSource createDataSource(int dataType);
DataSource createDataSource(@C.DataType int dataType);
}