当前位置: 首页>>代码示例>>Java>>正文


Java Id3Frame类代码示例

本文整理汇总了Java中com.google.android.exoplayer.metadata.id3.Id3Frame的典型用法代码示例。如果您正苦于以下问题:Java Id3Frame类的具体用法?Java Id3Frame怎么用?Java Id3Frame使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Id3Frame类属于com.google.android.exoplayer.metadata.id3包,在下文中一共展示了Id3Frame类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onId3Metadata

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
@Override
public void onId3Metadata(List<Id3Frame> id3Frames) {
    for (Id3Frame id3Frame : id3Frames) {
        if (id3Frame instanceof TxxxFrame) {
            TxxxFrame txxxFrame = (TxxxFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: description=%s, value=%s", txxxFrame.id,
                    txxxFrame.description, txxxFrame.value));
        } else if (id3Frame instanceof PrivFrame) {
            PrivFrame privFrame = (PrivFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: owner=%s", privFrame.id, privFrame.owner));
        } else if (id3Frame instanceof GeobFrame) {
            GeobFrame geobFrame = (GeobFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: mimeType=%s, filename=%s, description=%s",
                    geobFrame.id, geobFrame.mimeType, geobFrame.filename, geobFrame.description));
        } else {
            Log.i(TAG, String.format("ID3 TimedMetadata %s", id3Frame.id));
        }
    }
}
 
开发者ID:sakurabird,项目名称:Android-Example-HLS-ExoPlayer,代码行数:20,代码来源:PlayerActivity.java

示例2: onId3Metadata

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
@Override
public void onId3Metadata(List<Id3Frame> id3Frames) {
    for (Id3Frame id3Frame : id3Frames) {
        if (id3Frame instanceof TxxxFrame) {
            TxxxFrame txxxFrame = (TxxxFrame) id3Frame;
            LOGD(TAG, String.format("ID3 TimedMetadata %s: description=%s, value=%s", txxxFrame.id,
                    txxxFrame.description, txxxFrame.value));
        } else if (id3Frame instanceof PrivFrame) {
            PrivFrame privFrame = (PrivFrame) id3Frame;
            LOGD(TAG, String.format("ID3 TimedMetadata %s: owner=%s", privFrame.id, privFrame.owner));
        } else if (id3Frame instanceof GeobFrame) {
            GeobFrame geobFrame = (GeobFrame) id3Frame;
            LOGD(TAG, String.format("ID3 TimedMetadata %s: mimeType=%s, filename=%s, description=%s",
                    geobFrame.id, geobFrame.mimeType, geobFrame.filename, geobFrame.description));
        } else {
            LOGD(TAG, String.format("ID3 TimedMetadata %s", id3Frame.id));
        }
    }
}
 
开发者ID:kaltura,项目名称:player-sdk-native-android,代码行数:20,代码来源:KExoPlayer.java

示例3: onId3Metadata

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
@Override
public void onId3Metadata(List<Id3Frame> id3Frames) {
    for (Id3Frame id3Frame : id3Frames) {
        if (id3Frame instanceof TxxxFrame) {
            TxxxFrame txxxFrame = (TxxxFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: description=%s, value=%s", txxxFrame.id,
                    txxxFrame.description, txxxFrame.value));
        } else if (id3Frame instanceof PrivFrame) {
            PrivFrame privFrame = (PrivFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: owner=%s", privFrame.id, privFrame.owner));
        } else if (id3Frame instanceof GeobFrame) {
            GeobFrame geobFrame = (GeobFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: mimeType=%s, filename=%s, description=%s",
                    geobFrame.id, geobFrame.mimeType, geobFrame.filename, geobFrame.description));
        } else if (id3Frame instanceof ApicFrame) {
            ApicFrame apicFrame = (ApicFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: mimeType=%s, description=%s",
                    apicFrame.id, apicFrame.mimeType, apicFrame.description));
        } else if (id3Frame instanceof TextInformationFrame) {
            TextInformationFrame textInformationFrame = (TextInformationFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: description=%s", textInformationFrame.id,
                    textInformationFrame.description));
        } else {
            Log.i(TAG, String.format("ID3 TimedMetadata %s", id3Frame.id));
        }
    }
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:28,代码来源:PlayerActivity.java

示例4: onSingleManifest

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
@Override
public void onSingleManifest(HlsPlaylist manifest) {
  if (canceled) {
    return;
  }

  Handler mainHandler = player.getMainHandler();
  LoadControl loadControl = new DefaultLoadControl(new DefaultAllocator(BUFFER_SEGMENT_SIZE));
  DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
  PtsTimestampAdjusterProvider timestampAdjusterProvider = new PtsTimestampAdjusterProvider();

  // Build the video/audio/metadata renderers.
  DataSource dataSource = createDataSource(context, userAgent, bandwidthMeter);
  HlsChunkSource chunkSource = new HlsChunkSource(true /* isMaster */, dataSource, url,
      manifest, DefaultHlsTrackSelector.newDefaultInstance(context), bandwidthMeter,
      timestampAdjusterProvider, HlsChunkSource.ADAPTIVE_MODE_SPLICE);
  HlsSampleSource sampleSource = new HlsSampleSource(chunkSource, loadControl,
      MAIN_BUFFER_SEGMENTS * BUFFER_SEGMENT_SIZE, mainHandler, player, DemoPlayer.TYPE_VIDEO);
  MediaCodecVideoTrackRenderer videoRenderer = new MediaCodecVideoTrackRenderer(context,
      sampleSource, MediaCodecSelector.DEFAULT, MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT,
      5000, mainHandler, player, 50);
  final MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(
      sampleSource, MediaCodecSelector.DEFAULT, null, true, player.getMainHandler(), player,
      AudioCapabilities.getCapabilities(context), AudioManager.STREAM_MUSIC);
  final MetadataTrackRenderer<List<Id3Frame>> id3Renderer = new MetadataTrackRenderer<>(
      sampleSource, new Id3Parser(), player, mainHandler.getLooper());

  TrackRenderer[] renderers = new TrackRenderer[DemoPlayer.RENDERER_COUNT];
  renderers[DemoPlayer.TYPE_VIDEO] = videoRenderer;
  renderers[DemoPlayer.TYPE_AUDIO] = audioRenderer;
  renderers[DemoPlayer.TYPE_METADATA] = id3Renderer;
  player.onRenderers(renderers, bandwidthMeter);
}
 
开发者ID:mkjensen,项目名称:danish-media-license,代码行数:34,代码来源:HlsRendererBuilder.java

示例5: onMetadata

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
/** MetadataTrackRenderer.MetadataRenderer */
@Override
public void onMetadata(List<Id3Frame> id3Frames) {
    if (id3MetadataListener != null && !player.isDisabledTrack(Player.TYPE_METADATA)) {
        id3MetadataListener.onId3Metadata(id3Frames);
    }
}
 
开发者ID:satorufujiwara,项目名称:exoplayer-textureview,代码行数:8,代码来源:EventProxy.java

示例6: getId3MetadataRenderer

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
MetadataTrackRenderer.MetadataRenderer<List<Id3Frame>>
getId3MetadataRenderer() {
  return new MetadataTrackRenderer.MetadataRenderer<List<Id3Frame>>() {
    @Override
    public void onMetadata(List<Id3Frame> metadata) {
      if (id3MetadataListener != null) {
        id3MetadataListener.onId3Metadata(metadata);
      }
    }
  };
}
 
开发者ID:googleads,项目名称:google-media-framework-android,代码行数:12,代码来源:ExoplayerWrapper.java

示例7: onMetadata

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
/**
 * A listener for receiving notifications of id3Frames.
 */
@Override
public void onMetadata(List<Id3Frame> id3Frames) {
  if (id3MetadataListener != null && getSelectedTrack(TYPE_METADATA) != TRACK_DISABLED) {
    id3MetadataListener.onId3Metadata(id3Frames);
  }
}
 
开发者ID:kaltura,项目名称:player-sdk-native-android,代码行数:10,代码来源:ExoplayerWrapper.java

示例8: getId3MetadataRenderer

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
MetadataTrackRenderer.MetadataRenderer<List<Id3Frame>> getId3MetadataRenderer() {
  return new MetadataTrackRenderer.MetadataRenderer<List<Id3Frame>>() {
    @Override
    public void onMetadata(List<Id3Frame> metadata) {
      if (id3MetadataListener != null) {
        id3MetadataListener.onId3Metadata(metadata);
      }
    }
  };
}
 
开发者ID:kaltura,项目名称:player-sdk-native-android,代码行数:11,代码来源:ExoplayerWrapper.java

示例9: onMetadata

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
@Override
public void onMetadata(List<Id3Frame> id3Frames) {
    if (id3MetadataListener != null && getSelectedTrack(TYPE_METADATA) != TRACK_DISABLED) {
        id3MetadataListener.onId3Metadata(id3Frames);
    }
}
 
开发者ID:nejtv,项目名称:androidtv-sample,代码行数:7,代码来源:DemoPlayer.java

示例10: onMetadata

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
@Override
public void onMetadata(List<Id3Frame> id3Frames) {
  if (id3MetadataListener != null && getSelectedTrack(TYPE_METADATA) != TRACK_DISABLED) {
    id3MetadataListener.onId3Metadata(id3Frames);
  }
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:7,代码来源:DemoPlayer.java

示例11: onMetadata

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
@Override
public void onMetadata(List<Id3Frame> metadata) {
    if (id3MetadataListener != null && getSelectedTrack(RENDER_TIMED_METADATA) != DISABLED_TRACK) {
        id3MetadataListener.onId3Metadata(metadata);
    }
}
 
开发者ID:ayaseruri,项目名称:luxunPro,代码行数:7,代码来源:EMExoPlayer.java

示例12: buildTrackRenderers

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
protected void buildTrackRenderers(HlsPlaylist playlist, boolean hasClosedCaptions, boolean hasMultipleAudioTracks) {
    LoadControl loadControl = new DefaultLoadControl(new DefaultAllocator(BUFFER_SEGMENT_SIZE));
    DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter(player.getMainHandler(), player);
    PtsTimestampAdjusterProvider timestampAdjusterProvider = new PtsTimestampAdjusterProvider();


    //Create the Sample Source to be used by the Video Renderer
    DataSource dataSourceVideo = createDataSource(okHttpClient, bandwidthMeter, userAgent);
    HlsChunkSource chunkSourceVideo = new HlsChunkSource(true, dataSourceVideo, playlist, DefaultHlsTrackSelector.newDefaultInstance(context),
            bandwidthMeter, timestampAdjusterProvider);
    HlsSampleSource sampleSourceVideo = new HlsSampleSource(chunkSourceVideo, loadControl,
            BUFFER_SEGMENTS_TOTAL * BUFFER_SEGMENT_SIZE, player.getMainHandler(), player, EMExoPlayer.RENDER_VIDEO);


    //Create the Sample Source to be used by the Audio Renderer
    DataSource dataSourceAudio = new DefaultUriDataSource(context, bandwidthMeter, userAgent);
    HlsChunkSource chunkSourceAudio = new HlsChunkSource(false, dataSourceAudio, playlist, DefaultHlsTrackSelector.newAudioInstance(),
            bandwidthMeter, timestampAdjusterProvider);
    HlsSampleSource sampleSourceAudio = new HlsSampleSource(chunkSourceAudio, loadControl, BUFFER_SEGMENTS_AUDIO * BUFFER_SEGMENT_SIZE,
            player.getMainHandler(), player, EMExoPlayer.RENDER_AUDIO);
    SampleSource[] sampleSourcesAudio = hasMultipleAudioTracks ? new SampleSource[] {sampleSourceVideo, sampleSourceAudio} : new SampleSource[] {sampleSourceVideo};


    //Create the Sample Source to be used by the Closed Captions Renderer
    DataSource dataSourceCC = createDataSource(okHttpClient, bandwidthMeter, userAgent);
    HlsChunkSource chunkSourceCC = new HlsChunkSource(false, dataSourceCC, playlist, DefaultHlsTrackSelector.newSubtitleInstance(),
            bandwidthMeter, timestampAdjusterProvider);
    HlsSampleSource sampleSourceCC = new HlsSampleSource(chunkSourceCC, loadControl,
            BUFFER_SEGMENTS_TEXT * BUFFER_SEGMENT_SIZE, player.getMainHandler(), player, EMExoPlayer.RENDER_CLOSED_CAPTION);


    //Build the renderers
    MediaCodecVideoTrackRenderer videoRenderer = new MediaCodecVideoTrackRenderer(context, sampleSourceVideo, MediaCodecSelector.DEFAULT,
            MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT, MAX_JOIN_TIME, player.getMainHandler(), player, DROPPED_FRAME_NOTIFICATION_AMOUNT);
    EMMediaCodecAudioTrackRenderer audioRenderer = new EMMediaCodecAudioTrackRenderer(sampleSourcesAudio, MediaCodecSelector.DEFAULT, null, true,
            player.getMainHandler(), player, AudioCapabilities.getCapabilities(context), streamType);
    TrackRenderer captionsRenderer = hasClosedCaptions ? new TextTrackRenderer(sampleSourceCC, player, player.getMainHandler().getLooper()) :
            new Eia608TrackRenderer(sampleSourceVideo, player, player.getMainHandler().getLooper());
    MetadataTrackRenderer<List<Id3Frame>> id3Renderer = new MetadataTrackRenderer<>(sampleSourceVideo, new Id3Parser(),
            player, player.getMainHandler().getLooper());


    //Populate the Render list to pass back to the callback
    TrackRenderer[] renderers = new TrackRenderer[EMExoPlayer.RENDER_COUNT];
    renderers[EMExoPlayer.RENDER_VIDEO] = videoRenderer;
    renderers[EMExoPlayer.RENDER_AUDIO] = audioRenderer;
    renderers[EMExoPlayer.RENDER_CLOSED_CAPTION] = captionsRenderer;
    renderers[EMExoPlayer.RENDER_TIMED_METADATA] = id3Renderer;
    player.onRenderers(renderers, bandwidthMeter);
}
 
开发者ID:ayaseruri,项目名称:luxunPro,代码行数:51,代码来源:HlsRenderBuilder.java

示例13: onMetadata

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
@Override
public void onMetadata(List<Id3Frame> metadata) {
  if (id3MetadataListener != null && getSelectedTrack(TYPE_METADATA) != TRACK_DISABLED) {
    id3MetadataListener.onId3Metadata(metadata);
  }
}
 
开发者ID:googleads,项目名称:google-media-framework-android,代码行数:7,代码来源:ExoplayerWrapper.java

示例14: onId3Metadata

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
void onId3Metadata(List<Id3Frame> id3Frames); 
开发者ID:nejtv,项目名称:androidtv-sample,代码行数:2,代码来源:DemoPlayer.java

示例15: onId3Metadata

import com.google.android.exoplayer.metadata.id3.Id3Frame; //导入依赖的package包/类
void onId3Metadata(List<Id3Frame> metadata); 
开发者ID:ayaseruri,项目名称:luxunPro,代码行数:2,代码来源:Id3MetadataListener.java


注:本文中的com.google.android.exoplayer.metadata.id3.Id3Frame类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。