com.google.android.exoplayer2.Format.toLogString()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(211)

本文整理了Java中com.google.android.exoplayer2.Format.toLogString()方法的一些代码示例,展示了Format.toLogString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Format.toLogString()方法的具体详情如下:
包路径:com.google.android.exoplayer2.Format
类名称:Format
方法名:toLogString

Format.toLogString介绍

[英]Returns a prettier String than #toString(), intended for logging.
[中]返回比用于日志记录的#toString()更漂亮的字符串。

代码示例

代码示例来源:origin: google/ExoPlayer

@Override
public void onUpstreamDiscarded(EventTime eventTime, MediaLoadData mediaLoadData) {
 logd(eventTime, "upstreamDiscarded", Format.toLogString(mediaLoadData.trackFormat));
}

代码示例来源:origin: google/ExoPlayer

@Override
public void onDownstreamFormatChanged(EventTime eventTime, MediaLoadData mediaLoadData) {
 logd(eventTime, "downstreamFormatChanged", Format.toLogString(mediaLoadData.trackFormat));
}

代码示例来源:origin: CarGuo/GSYVideoPlayer

@Override
public void onAudioInputFormatChanged(Format format) {
  Log.d(TAG, "audioFormatChanged [" + getSessionTimeString() + ", " + Format.toLogString(format)
      + "]");
}

代码示例来源:origin: CarGuo/GSYVideoPlayer

@Override
public void onVideoInputFormatChanged(Format format) {
  Log.d(TAG, "videoFormatChanged [" + getSessionTimeString() + ", " + Format.toLogString(format)
      + "]");
}

代码示例来源:origin: google/ExoPlayer

@Override
public void onDecoderInputFormatChanged(EventTime eventTime, int trackType, Format format) {
 logd(
   eventTime,
   "decoderInputFormatChanged",
   getTrackTypeString(trackType) + ", " + Format.toLogString(format));
}

代码示例来源:origin: CarGuo/GSYVideoPlayer

mappedTrackInfo.getTrackFormatSupport(rendererIndex, groupIndex, trackIndex));
  Log.d(TAG, "      " + status + " Track:" + trackIndex + ", "
      + Format.toLogString(trackGroup.getFormat(trackIndex))
      + ", supported=" + formatSupport);
    RendererCapabilities.FORMAT_UNSUPPORTED_TYPE);
Log.d(TAG, "      " + status + " Track:" + trackIndex + ", "
    + Format.toLogString(trackGroup.getFormat(trackIndex))
    + ", supported=" + formatSupport);

代码示例来源:origin: google/ExoPlayer

private int[] getVideoTrackIndices(
  TrackGroup trackGroup,
  int[] formatSupports,
  String[] formatIds,
  boolean canIncludeAdditionalFormats) {
 List<Integer> trackIndices = new ArrayList<>();
 // Always select explicitly listed representations.
 for (String formatId : formatIds) {
  int trackIndex = getTrackIndex(trackGroup, formatId);
  Log.d(tag, "Adding base video format: "
    + Format.toLogString(trackGroup.getFormat(trackIndex)));
  trackIndices.add(trackIndex);
 }
 // Select additional video representations, if supported by the device.
 if (canIncludeAdditionalFormats) {
  for (int i = 0; i < trackGroup.length; i++) {
   if (!trackIndices.contains(i) && isFormatHandled(formatSupports[i])) {
    Log.d(tag, "Adding extra video format: "
      + Format.toLogString(trackGroup.getFormat(i)));
    trackIndices.add(i);
   }
  }
 }
 int[] trackIndicesArray = Util.toArray(trackIndices);
 Arrays.sort(trackIndicesArray);
 return trackIndicesArray;
}

代码示例来源:origin: yuliskov/SmartYouTubeTV

@Override
public void onVideoInputFormatChanged(Format format) {
 Log.d(TAG, "videoFormatChanged [" + getSessionTimeString() + ", " + Format.toLogString(format)
   + "]");
}

代码示例来源:origin: yuliskov/SmartYouTubeTV

@Override
public void onAudioInputFormatChanged(Format format) {
 Log.d(TAG, "audioFormatChanged [" + getSessionTimeString() + ", " + Format.toLogString(format)
   + "]");
}

代码示例来源:origin: google/ExoPlayer

+ trackIndex
 + ", "
 + Format.toLogString(trackGroup.getFormat(trackIndex))
 + ", supported="
 + formatSupport);
+ trackIndex
+ ", "
+ Format.toLogString(trackGroup.getFormat(trackIndex))
+ ", supported="
+ formatSupport);

代码示例来源:origin: yuliskov/SmartYouTubeTV

mappedTrackInfo.getTrackFormatSupport(rendererIndex, groupIndex, trackIndex));
 Log.d(TAG, "      " + status + " Track:" + trackIndex + ", "
   + Format.toLogString(trackGroup.getFormat(trackIndex))
   + ", supported=" + formatSupport);
  RendererCapabilities.FORMAT_UNSUPPORTED_TYPE);
Log.d(TAG, "      " + status + " Track:" + trackIndex + ", "
  + Format.toLogString(trackGroup.getFormat(trackIndex))
  + ", supported=" + formatSupport);

代码示例来源:origin: huyongli/TigerVideo

@Override
public void onAudioInputFormatChanged(Format format) {
  Log.d(TAG, "audioFormatChanged [" + getSessionTimeString() + ", " + Format.toLogString(format)
      + "]");
}

代码示例来源:origin: huyongli/TigerVideo

@Override
public void onVideoInputFormatChanged(Format format) {
  Log.d(TAG, "videoFormatChanged [" + getSessionTimeString() + ", " + Format.toLogString(format)
      + "]");
}

代码示例来源:origin: huyongli/TigerVideo

mappedTrackInfo.getTrackFormatSupport(rendererIndex, groupIndex, trackIndex));
  Log.d(TAG, "      " + status + " Track:" + trackIndex + ", "
      + Format.toLogString(trackGroup.getFormat(trackIndex))
      + ", supported=" + formatSupport);
    RendererCapabilities.FORMAT_UNSUPPORTED_TYPE);
Log.d(TAG, "      " + status + " Track:" + trackIndex + ", "
    + Format.toLogString(trackGroup.getFormat(trackIndex))
    + ", supported=" + formatSupport);

相关文章