通过EXOPlayer从流音乐中获取元数据

时间:2016-10-12 15:23:06

标签: java android metadata exoplayer

我使用EXOPlayer播放网络电台:

allocator = new DefaultAllocator(BUFFER_SEGMENT_SIZE);// Allocator - класс отвечающий за буфер

// Build the video and audio renderers.

bandwidthMeter = new DefaultBandwidthMeter(mHandler, null);
dataSource = new DefaultUriDataSource(this, bandwidthMeter, USER_AGENT);
sampleSource = new ExtractorSampleSource(Uri.parse(samplePath), dataSource, allocator, BUFFER_SEGMENT_COUNT * BUFFER_SEGMENT_SIZE);
audioRenderer = new MediaCodecAudioTrackRenderer(sampleSource, MediaCodecSelector.DEFAULT, null, true, mHandler, mMediaCodecAudioTrackRendererEventListener);

// Invoke the callback.
mPlayer.prepare(audioRenderer);
mPlayer.setPlayWhenReady(true);
isPrepared = true;

但我如何从Stream中提取元数据?(标题,曲目和许多其他)服务器:icecast v.3+kh

0 个答案:

没有答案