mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Refactor #6.HLS.2
Rename HlsSampleSource2 -> HlsSampleSource. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=122418334
This commit is contained in:
parent
770f2c2c58
commit
ca49d6ff40
2 changed files with 4 additions and 4 deletions
|
|
@ -29,7 +29,7 @@ import com.google.android.exoplayer.demo.player.DemoPlayer;
|
||||||
import com.google.android.exoplayer.demo.ui.TrackSelectionHelper;
|
import com.google.android.exoplayer.demo.ui.TrackSelectionHelper;
|
||||||
import com.google.android.exoplayer.drm.UnsupportedDrmException;
|
import com.google.android.exoplayer.drm.UnsupportedDrmException;
|
||||||
import com.google.android.exoplayer.extractor.ExtractorSampleSource;
|
import com.google.android.exoplayer.extractor.ExtractorSampleSource;
|
||||||
import com.google.android.exoplayer.hls.HlsSampleSource2;
|
import com.google.android.exoplayer.hls.HlsSampleSource;
|
||||||
import com.google.android.exoplayer.metadata.id3.GeobFrame;
|
import com.google.android.exoplayer.metadata.id3.GeobFrame;
|
||||||
import com.google.android.exoplayer.metadata.id3.Id3Frame;
|
import com.google.android.exoplayer.metadata.id3.Id3Frame;
|
||||||
import com.google.android.exoplayer.metadata.id3.PrivFrame;
|
import com.google.android.exoplayer.metadata.id3.PrivFrame;
|
||||||
|
|
@ -278,7 +278,7 @@ public class PlayerActivity extends Activity implements SurfaceHolder.Callback,
|
||||||
return new DashSampleSource(uri, dataSourceFactory, player.getBandwidthMeter(),
|
return new DashSampleSource(uri, dataSourceFactory, player.getBandwidthMeter(),
|
||||||
player.getMainHandler(), player);
|
player.getMainHandler(), player);
|
||||||
case Util.TYPE_HLS:
|
case Util.TYPE_HLS:
|
||||||
return new HlsSampleSource2(uri, dataSourceFactory, player.getBandwidthMeter(),
|
return new HlsSampleSource(uri, dataSourceFactory, player.getBandwidthMeter(),
|
||||||
player.getMainHandler(), player);
|
player.getMainHandler(), player);
|
||||||
case Util.TYPE_OTHER:
|
case Util.TYPE_OTHER:
|
||||||
Allocator allocator = new DefaultAllocator(C.DEFAULT_BUFFER_SEGMENT_SIZE);
|
Allocator allocator = new DefaultAllocator(C.DEFAULT_BUFFER_SEGMENT_SIZE);
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* A {@link SampleSource} for HLS streams.
|
* A {@link SampleSource} for HLS streams.
|
||||||
*/
|
*/
|
||||||
public final class HlsSampleSource2 implements SampleSource {
|
public final class HlsSampleSource implements SampleSource {
|
||||||
|
|
||||||
private final ManifestFetcher<HlsPlaylist> manifestFetcher;
|
private final ManifestFetcher<HlsPlaylist> manifestFetcher;
|
||||||
private final HlsTrackStreamWrapper[] trackStreamWrappers;
|
private final HlsTrackStreamWrapper[] trackStreamWrappers;
|
||||||
|
|
@ -59,7 +59,7 @@ public final class HlsSampleSource2 implements SampleSource {
|
||||||
private TrackGroupArray trackGroups;
|
private TrackGroupArray trackGroups;
|
||||||
private HlsTrackStreamWrapper[] enabledTrackStreamWrappers;
|
private HlsTrackStreamWrapper[] enabledTrackStreamWrappers;
|
||||||
|
|
||||||
public HlsSampleSource2(Uri uri, DataSourceFactory dataSourceFactory,
|
public HlsSampleSource(Uri uri, DataSourceFactory dataSourceFactory,
|
||||||
BandwidthMeter bandwidthMeter, Handler eventHandler,
|
BandwidthMeter bandwidthMeter, Handler eventHandler,
|
||||||
ChunkTrackStreamEventListener eventListener) {
|
ChunkTrackStreamEventListener eventListener) {
|
||||||
HlsPlaylistParser parser = new HlsPlaylistParser();
|
HlsPlaylistParser parser = new HlsPlaylistParser();
|
||||||
Loading…
Reference in a new issue