• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TrackInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: vlc2exoTracks

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
/**
 * 
 * @param media
 * @param vlcTracks
 * @param lib
 * @return
 */
static com.google.android.exoplayer.TrackInfo[] vlc2exoTracks(long duration,
		org.videolan.libvlc.Media.Track[] vlcTracks, LibVLC lib) {
	com.google.android.exoplayer.TrackInfo[] res = new com.google.android.exoplayer.TrackInfo[vlcTracks.length];
	System.out.println("ExoVlcUtil.vlc2exoTracks() vlcTracks = " + vlcTracks.length);
	// Media.Track
	for (int i = 0; i < res.length; i++) {
		MediaFormat mf = track2mediaFormat(vlcTracks[i]);

		res[i] = new TrackInfo(mf.getString(MediaFormat.KEY_MIME), duration);
		System.out.println("\t track " + i + " mime type =" + mf.getString(MediaFormat.KEY_MIME) + " duration ="
				+ duration);
	}
	/*
	 * System.out.println(">>>> ExoVlcUtil.vlc2exoTracks() vlcTracks.length = "
	 * +vlcTracks.length); long l; for (int i = 0; i < vlcTracks.length;
	 * i++) { org.videolan.libvlc.TrackInfo vt = vlcTracks[i];
	 * System.out.println("\t\t >>>>>Codec("+i+") "+vlcTracks[i].Codec);
	 * res[i] = new TrackInfo( vt.Codec, (l=lib.getLength()) == -1 ?
	 * com.google.android.exoplayer.C.UNKNOWN_TIME_US : l * MS_2_MICRO); }
	 */
	return res;
}
 
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:30,代码来源:ExoVlcUtil.java


示例2: prepare

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
@Override
public boolean prepare() throws IOException {
  if (context != null) {
    mediaExtractor.setDataSource(context, uri, headers);
  } else {
    mediaExtractor.setDataSource(fileDescriptor, fileDescriptorOffset, fileDescriptorLength);
  }

  int trackCount = mediaExtractor.getTrackCount();
  trackInfos = new TrackInfo[trackCount];
  for (int i = 0; i < trackCount; i++) {
    android.media.MediaFormat format = mediaExtractor.getTrackFormat(i);
    long durationUs = format.containsKey(android.media.MediaFormat.KEY_DURATION)
        ? format.getLong(android.media.MediaFormat.KEY_DURATION) : C.UNKNOWN_TIME_US;
    String mime = format.getString(android.media.MediaFormat.KEY_MIME);
    trackInfos[i] = new TrackInfo(mime, durationUs);
  }

  return true;
}
 
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:21,代码来源:FrameworkSampleExtractor.java


示例3: prepare

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
@Override
public boolean prepare() throws IOException {
  if (!prepared) {
    extractor = new MediaExtractor();
    extractor.setDataSource(context, uri, headers);
    trackStates = new int[extractor.getTrackCount()];
    pendingDiscontinuities = new boolean[trackStates.length];
    trackInfos = new TrackInfo[trackStates.length];
    for (int i = 0; i < trackStates.length; i++) {
      android.media.MediaFormat format = extractor.getTrackFormat(i);
      long duration = format.containsKey(android.media.MediaFormat.KEY_DURATION) ?
          format.getLong(android.media.MediaFormat.KEY_DURATION) : TrackRenderer.UNKNOWN_TIME_US;
      String mime = format.getString(android.media.MediaFormat.KEY_MIME);
      trackInfos[i] = new TrackInfo(mime, duration);
    }
    prepared = true;
  }
  return true;
}
 
开发者ID:lsjwzh,项目名称:ExoPlayerCompat,代码行数:20,代码来源:FrameworkSampleSource.java


示例4: SingleSampleChunkSource

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
/**
 * @param dataSource A {@link DataSource} suitable for loading the sample data.
 * @param dataSpec Defines the location of the sample.
 * @param format The format of the sample.
 * @param durationUs The duration of the sample in microseconds, or {@link C#UNKNOWN_TIME_US} if
 *     the duration is unknown, or {@link C#MATCH_LONGEST_US} if the duration should match the
 *     duration of the longest track whose duration is known.
 * @param mediaFormat The sample media format. May be null.
 */
public SingleSampleChunkSource(DataSource dataSource, DataSpec dataSpec, Format format,
    long durationUs, MediaFormat mediaFormat) {
  this.dataSource = dataSource;
  this.dataSpec = dataSpec;
  this.format = format;
  this.durationUs = durationUs;
  this.mediaFormat = mediaFormat;
  trackInfo = new TrackInfo(format.mimeType, durationUs);
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:19,代码来源:SingleSampleChunkSource.java


示例5: SingleSampleChunkSource

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
/**
 * @param dataSource A {@link DataSource} suitable for loading the sample data.
 * @param dataSpec Defines the location of the sample.
 * @param format The format of the sample.
 * @param durationUs The duration of the sample in microseconds, or {@link C#UNKNOWN_TIME_US} if
 *     the duration is unknown.
 * @param mediaFormat The sample media format. May be null.
 */
public SingleSampleChunkSource(DataSource dataSource, DataSpec dataSpec, Format format,
    long durationUs, MediaFormat mediaFormat) {
  this.dataSource = dataSource;
  this.dataSpec = dataSpec;
  this.format = format;
  this.durationUs = durationUs;
  this.mediaFormat = mediaFormat;
  trackInfo = new TrackInfo(format.mimeType, durationUs);
}
 
开发者ID:Weco,项目名称:android-exoplayer,代码行数:18,代码来源:SingleSampleChunkSource.java


示例6: DashChunkSource

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
private DashChunkSource(ManifestFetcher<MediaPresentationDescription> manifestFetcher,
    MediaPresentationDescription initialManifest, int adaptationSetIndex,
    int[] representationIndices, DataSource dataSource, FormatEvaluator formatEvaluator,
    long liveEdgeLatencyUs) {
  this.manifestFetcher = manifestFetcher;
  this.currentManifest = initialManifest;
  this.adaptationSetIndex = adaptationSetIndex;
  this.representationIndices = representationIndices;
  this.dataSource = dataSource;
  this.evaluator = formatEvaluator;
  this.liveEdgeLatencyUs = liveEdgeLatencyUs;
  this.evaluation = new Evaluation();
  this.headerBuilder = new StringBuilder();

  psshInfo = getPsshInfo(currentManifest, adaptationSetIndex);
  Representation[] representations = getFilteredRepresentations(currentManifest,
      adaptationSetIndex, representationIndices);
  long periodDurationUs = (representations[0].periodDurationMs == TrackRenderer.UNKNOWN_TIME_US)
      ? TrackRenderer.UNKNOWN_TIME_US : representations[0].periodDurationMs * 1000;
  this.trackInfo = new TrackInfo(representations[0].format.mimeType, periodDurationUs);

  this.formats = new Format[representations.length];
  this.representationHolders = new HashMap<String, RepresentationHolder>();
  int maxWidth = 0;
  int maxHeight = 0;
  for (int i = 0; i < representations.length; i++) {
    formats[i] = representations[i].format;
    maxWidth = Math.max(formats[i].width, maxWidth);
    maxHeight = Math.max(formats[i].height, maxHeight);
    Extractor extractor = mimeTypeIsWebm(formats[i].mimeType) ? new WebmExtractor()
        : new FragmentedMp4Extractor();
    representationHolders.put(formats[i].id,
        new RepresentationHolder(representations[i], extractor));
  }
  this.maxWidth = maxWidth;
  this.maxHeight = maxHeight;
  Arrays.sort(formats, new DecreasingBandwidthComparator());
}
 
开发者ID:Weco,项目名称:android-exoplayer,代码行数:39,代码来源:DashChunkSource.java


示例7: getTrackInfos

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
@Override
public TrackInfo[] getTrackInfos() {
	Assertions.checkState(prepared);
	TrackInfo[] r = new TrackInfo[trackInfos.length];
	System.arraycopy(trackInfos, 0, r, 0, trackInfos.length);
	return r;
}
 
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:8,代码来源:VLCSampleExtractor.java


示例8: isActiveTrack

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
boolean isActiveTrack(int track) {
	Assertions.checkState(prepared);
	System.out.println(">>> VLCSampleExtractor.isActiveTrack() track = " + track);
	System.out.println(">>> VLCSampleExtractor.isActiveTrack() vlctracks.length = " + vlctracks.length);
	System.out.println(">>> VLCSampleExtractor.isActiveTrack() trackInfos.length = " + trackInfos.length);
	if (vlctracks.length != trackInfos.length) {
		if ((track < 0) && (track >= trackInfos.length)) {
			ExoVlcUtil.log(this, "getTrackMediaFormat() out of range : " + track + "; track len="
					+ trackInfos.length);
			return false;
		}
		/*
		 * if(track == trackInfos.length - 1 ) return true;
		 */
		TrackInfo t = trackInfos[track];
		System.out.println(">>> VLCSampleExtractor.isActiveTrack() track mime = " + t.mimeType);
		System.out.println(">>> VLCSampleExtractor.isActiveTrack() isVLCAudioMimeType = "
				+ ExoVlcUtil.isVLCAudioMimeType(t.mimeType));

		System.out.println(">>> VLCSampleExtractor.isActiveTrack() isVLCVideoMimeType= "
				+ ExoVlcUtil.isVLCVideoMimeType(t.mimeType));

		if ((ExoVlcUtil.isVLCAudioMimeType(t.mimeType) && track == lib.getAudioTrack())
				|| (ExoVlcUtil.isVLCVideoMimeType(t.mimeType)))
			return true;

		return false;
	}

	if ((track < 0) && (track >= vlctracks.length)) {
		ExoVlcUtil.log(this, "getTrackMediaFormat() out of range : " + track + "; track len=" + vlctracks.length);
		return false;
	}
	Track vt = vlctracks[track];
	if ((vt.type == Track.Type.Video) || (vt.type == Track.Type.Audio && track == lib.getAudioTrack())
			|| (vt.type == Track.Type.Text && track == lib.getSpuTrack()))
		return true;
	return false;
}
 
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:40,代码来源:VLCSampleExtractor.java


示例9: getTrackInfo

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
@Override
public TrackInfo getTrackInfo(int track) {
	Assertions.checkState(prepared);
	TrackInfo[] infos = extractor.getTrackInfos();
	if (track >= 0 && track < infos.length)
		return infos[track];
	ExoVlcUtil.log(this, " getTrackInfo : track=" + track + " is out of range [strat:0,lenght:" + infos.length
			+ "] => ret NULL");
	return null;
}
 
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:11,代码来源:VLCSampleSource.java


示例10: DashChunkSource

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
/**
 * @param dataSource A {@link DataSource} suitable for loading the media data.
 * @param evaluator Selects from the available formats.
 * @param representations The representations to be considered by the source.
 */
public DashChunkSource(DataSource dataSource, FormatEvaluator evaluator,
    Representation... representations) {
  this.dataSource = dataSource;
  this.evaluator = evaluator;
  this.formats = new Format[representations.length];
  this.extractors = new HashMap<String, Extractor>();
  this.segmentIndexes = new HashMap<String, DashSegmentIndex>();
  this.representations = new HashMap<String, Representation>();
  this.trackInfo = new TrackInfo(representations[0].format.mimeType,
      representations[0].periodDurationMs * 1000);
  this.evaluation = new Evaluation();
  int maxWidth = 0;
  int maxHeight = 0;
  for (int i = 0; i < representations.length; i++) {
    formats[i] = representations[i].format;
    maxWidth = Math.max(formats[i].width, maxWidth);
    maxHeight = Math.max(formats[i].height, maxHeight);
    Extractor extractor = formats[i].mimeType.startsWith(MimeTypes.VIDEO_WEBM)
        ? new WebmExtractor() : new FragmentedMp4Extractor();
    extractors.put(formats[i].id, extractor);
    this.representations.put(formats[i].id, representations[i]);
    DashSegmentIndex segmentIndex = representations[i].getIndex();
    if (segmentIndex != null) {
      segmentIndexes.put(formats[i].id, segmentIndex);
    }
  }
  this.maxWidth = maxWidth;
  this.maxHeight = maxHeight;
  Arrays.sort(formats, new DecreasingBandwidthComparator());
}
 
开发者ID:edx,项目名称:edx-app-android,代码行数:36,代码来源:DashChunkSource.java


示例11: getTrackInfo

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
@Override
public TrackInfo getTrackInfo(int track) {
  Assertions.checkState(prepared);
  return trackInfos[track];
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:6,代码来源:HlsSampleSource.java


示例12: getTrackInfo

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
@Override
public TrackInfo getTrackInfo() {
  return selectedSource.getTrackInfo();
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:5,代码来源:MultiTrackChunkSource.java


示例13: getTrackInfo

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
@Override
public TrackInfo getTrackInfo() {
  return trackInfo;
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:5,代码来源:SingleSampleChunkSource.java


示例14: getTrackInfo

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
@Override
public TrackInfo getTrackInfo(int track) {
  Assertions.checkState(state == STATE_PREPARED || state == STATE_ENABLED);
  Assertions.checkState(track == 0);
  return chunkSource.getTrackInfo();
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:7,代码来源:ChunkSampleSource.java


示例15: DashChunkSource

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
DashChunkSource(ManifestFetcher<MediaPresentationDescription> manifestFetcher,
    MediaPresentationDescription initialManifest, int adaptationSetIndex,
    int[] representationIndices, DataSource dataSource, FormatEvaluator formatEvaluator,
    Clock systemClock, long liveEdgeLatencyUs, long elapsedRealtimeOffsetUs,
    boolean startAtLiveEdge, Handler eventHandler, EventListener eventListener) {
  this.manifestFetcher = manifestFetcher;
  this.currentManifest = initialManifest;
  this.adaptationSetIndex = adaptationSetIndex;
  this.representationIndices = representationIndices;
  this.dataSource = dataSource;
  this.formatEvaluator = formatEvaluator;
  this.systemClock = systemClock;
  this.liveEdgeLatencyUs = liveEdgeLatencyUs;
  this.elapsedRealtimeOffsetUs = elapsedRealtimeOffsetUs;
  this.startAtLiveEdge = startAtLiveEdge;
  this.eventHandler = eventHandler;
  this.eventListener = eventListener;
  this.evaluation = new Evaluation();
  this.headerBuilder = new StringBuilder();
  this.seekRangeValues = new long[2];

  drmInitData = getDrmInitData(currentManifest, adaptationSetIndex);
  Representation[] representations = getFilteredRepresentations(currentManifest,
      adaptationSetIndex, representationIndices);
  long periodDurationUs = (representations[0].periodDurationMs == TrackRenderer.UNKNOWN_TIME_US)
      ? TrackRenderer.UNKNOWN_TIME_US : representations[0].periodDurationMs * 1000;
  this.trackInfo = new TrackInfo(representations[0].format.mimeType, periodDurationUs);

  this.formats = new Format[representations.length];
  this.representationHolders = new HashMap<>();
  int maxWidth = 0;
  int maxHeight = 0;
  for (int i = 0; i < representations.length; i++) {
    formats[i] = representations[i].format;
    maxWidth = Math.max(formats[i].width, maxWidth);
    maxHeight = Math.max(formats[i].height, maxHeight);
    Extractor extractor = mimeTypeIsWebm(formats[i].mimeType) ? new WebmExtractor()
        : new FragmentedMp4Extractor();
    representationHolders.put(formats[i].id,
        new RepresentationHolder(representations[i], new ChunkExtractorWrapper(extractor)));
  }
  this.maxWidth = maxWidth;
  this.maxHeight = maxHeight;
  Arrays.sort(formats, new DecreasingBandwidthComparator());
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:46,代码来源:DashChunkSource.java


示例16: getTrackInfo

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
@Override
public final TrackInfo getTrackInfo() {
  return trackInfo;
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:5,代码来源:DashChunkSource.java


示例17: SmoothStreamingChunkSource

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
private SmoothStreamingChunkSource(ManifestFetcher<SmoothStreamingManifest> manifestFetcher,
    SmoothStreamingManifest initialManifest, int streamElementIndex, int[] trackIndices,
    DataSource dataSource, FormatEvaluator formatEvaluator, long liveEdgeLatencyMs) {
  this.manifestFetcher = manifestFetcher;
  this.streamElementIndex = streamElementIndex;
  this.currentManifest = initialManifest;
  this.dataSource = dataSource;
  this.formatEvaluator = formatEvaluator;
  this.liveEdgeLatencyUs = liveEdgeLatencyMs * 1000;

  StreamElement streamElement = getElement(initialManifest);
  trackInfo = new TrackInfo(streamElement.tracks[0].format.mimeType, initialManifest.durationUs);
  evaluation = new Evaluation();

  TrackEncryptionBox[] trackEncryptionBoxes = null;
  ProtectionElement protectionElement = initialManifest.protectionElement;
  if (protectionElement != null) {
    byte[] keyId = getKeyId(protectionElement.data);
    trackEncryptionBoxes = new TrackEncryptionBox[1];
    trackEncryptionBoxes[0] = new TrackEncryptionBox(true, INITIALIZATION_VECTOR_SIZE, keyId);
    DrmInitData.Mapped drmInitData = new DrmInitData.Mapped(MimeTypes.VIDEO_MP4);
    drmInitData.put(protectionElement.uuid, protectionElement.data);
    this.drmInitData = drmInitData;
  } else {
    drmInitData = null;
  }

  int trackCount = trackIndices != null ? trackIndices.length : streamElement.tracks.length;
  formats = new Format[trackCount];
  extractorWrappers = new SparseArray<>();
  mediaFormats = new SparseArray<>();
  int maxWidth = 0;
  int maxHeight = 0;
  for (int i = 0; i < trackCount; i++) {
    int trackIndex = trackIndices != null ? trackIndices[i] : i;
    formats[i] = streamElement.tracks[trackIndex].format;
    maxWidth = Math.max(maxWidth, formats[i].width);
    maxHeight = Math.max(maxHeight, formats[i].height);

    MediaFormat mediaFormat = getMediaFormat(streamElement, trackIndex);
    int trackType = streamElement.type == StreamElement.TYPE_VIDEO ? Track.TYPE_VIDEO
        : Track.TYPE_AUDIO;
    FragmentedMp4Extractor extractor = new FragmentedMp4Extractor(
        FragmentedMp4Extractor.WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME);
    extractor.setTrack(new Track(trackIndex, trackType, streamElement.timescale,
        initialManifest.durationUs, mediaFormat, trackEncryptionBoxes,
        trackType == Track.TYPE_VIDEO ? 4 : -1));
    extractorWrappers.put(trackIndex, new ChunkExtractorWrapper(extractor));
    mediaFormats.put(trackIndex, mediaFormat);
  }
  this.maxWidth = maxWidth;
  this.maxHeight = maxHeight;
  Arrays.sort(formats, new DecreasingBandwidthComparator());
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:55,代码来源:SmoothStreamingChunkSource.java


示例18: getTrackInfo

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
@Override
public TrackInfo getTrackInfo(int track) {
  Assertions.checkState(state != STATE_UNPREPARED);
  Assertions.checkState(track == 0);
  return chunkSource.getTrackInfo();
}
 
开发者ID:Weco,项目名称:android-exoplayer,代码行数:7,代码来源:ChunkSampleSource.java


示例19: SmoothStreamingChunkSource

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
private SmoothStreamingChunkSource(ManifestFetcher<SmoothStreamingManifest> manifestFetcher,
    SmoothStreamingManifest initialManifest, int streamElementIndex, int[] trackIndices,
    DataSource dataSource, FormatEvaluator formatEvaluator, long liveEdgeLatencyMs) {
  this.manifestFetcher = manifestFetcher;
  this.streamElementIndex = streamElementIndex;
  this.currentManifest = initialManifest;
  this.dataSource = dataSource;
  this.formatEvaluator = formatEvaluator;
  this.liveEdgeLatencyUs = liveEdgeLatencyMs * 1000;

  StreamElement streamElement = getElement(initialManifest);
  trackInfo = new TrackInfo(streamElement.tracks[0].mimeType, initialManifest.durationUs);
  evaluation = new Evaluation();

  TrackEncryptionBox[] trackEncryptionBoxes = null;
  ProtectionElement protectionElement = initialManifest.protectionElement;
  if (protectionElement != null) {
    byte[] keyId = getKeyId(protectionElement.data);
    trackEncryptionBoxes = new TrackEncryptionBox[1];
    trackEncryptionBoxes[0] = new TrackEncryptionBox(true, INITIALIZATION_VECTOR_SIZE, keyId);
    psshInfo = Collections.singletonMap(protectionElement.uuid, protectionElement.data);
  } else {
    psshInfo = null;
  }

  int trackCount = trackIndices != null ? trackIndices.length : streamElement.tracks.length;
  formats = new SmoothStreamingFormat[trackCount];
  extractors = new SparseArray<FragmentedMp4Extractor>();
  int maxWidth = 0;
  int maxHeight = 0;
  for (int i = 0; i < trackCount; i++) {
    int trackIndex = trackIndices != null ? trackIndices[i] : i;
    TrackElement trackElement = streamElement.tracks[trackIndex];
    formats[i] = new SmoothStreamingFormat(String.valueOf(trackIndex), trackElement.mimeType,
        trackElement.maxWidth, trackElement.maxHeight, trackElement.numChannels,
        trackElement.sampleRate, trackElement.bitrate, trackIndex);
    maxWidth = Math.max(maxWidth, trackElement.maxWidth);
    maxHeight = Math.max(maxHeight, trackElement.maxHeight);

    MediaFormat mediaFormat = getMediaFormat(streamElement, trackIndex);
    int trackType = streamElement.type == StreamElement.TYPE_VIDEO ? Track.TYPE_VIDEO
        : Track.TYPE_AUDIO;
    FragmentedMp4Extractor extractor = new FragmentedMp4Extractor(
        FragmentedMp4Extractor.WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME);
    extractor.setTrack(new Track(trackIndex, trackType, streamElement.timescale, mediaFormat,
        trackEncryptionBoxes));
    extractors.put(trackIndex, extractor);
  }
  this.maxHeight = maxHeight;
  this.maxWidth = maxWidth;
  Arrays.sort(formats, new DecreasingBandwidthComparator());
}
 
开发者ID:Weco,项目名称:android-exoplayer,代码行数:53,代码来源:SmoothStreamingChunkSource.java


示例20: getDummyVdoTrack

import com.google.android.exoplayer.TrackInfo; //导入依赖的package包/类
static TrackInfo[] getDummyVdoTrack(org.videolan.libvlc.Media media, String mime) {
	System.out.println(">>> ExoVlcUtil.getDummyVdoTrack() ---> duration = " + media.getDuration());
	return new TrackInfo[] { new TrackInfo(mime, media.getDuration()) };
}
 
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:5,代码来源:ExoVlcUtil.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TAudioFormat类代码示例发布时间:2022-05-22
下一篇:
Java ContextPathHandler类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap