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

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

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

Format.createContainerFormat介绍

暂无

代码示例

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

private static Format newFormat(String id) {
  return Format.createContainerFormat(
    id,
    /* label= */ null,
    MimeTypes.VIDEO_MP4,
    MimeTypes.VIDEO_H264,
    /* codecs= */ null,
    /* bitrate= */ Format.NO_VALUE,
    /* selectionFlags= */ 0,
    /* language= */ null);
 }
}

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

@Deprecated
public static Format createContainerFormat(
  @Nullable String id,
  @Nullable String containerMimeType,
  @Nullable String sampleMimeType,
  @Nullable String codecs,
  int bitrate,
  @C.SelectionFlags int selectionFlags,
  @Nullable String language) {
 return createContainerFormat(
   id,
   /* label= */ null,
   containerMimeType,
   sampleMimeType,
   codecs,
   bitrate,
   selectionFlags,
   language);
}

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

/**
 * Creates an HLS url from a given http url.
 *
 * @param url The url.
 * @return An HLS url.
 */
public static HlsUrl createMediaPlaylistHlsUrl(String url) {
 Format format =
   Format.createContainerFormat(
     "0",
     /* label= */ null,
     MimeTypes.APPLICATION_M3U8,
     /* sampleMimeType= */ null,
     /* codecs= */ null,
     /* bitrate= */ Format.NO_VALUE,
     /* selectionFlags= */ 0,
     /* language= */ null);
 return new HlsUrl(url, format);
}

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

/**
 * Creates a {@link Format} instance containing all information contained in the given
 * {@link MediaTrack} object.
 *
 * @param mediaTrack The {@link MediaTrack}.
 * @return The equivalent {@link Format}.
 */
public static Format mediaTrackToFormat(MediaTrack mediaTrack) {
 return Format.createContainerFormat(
   mediaTrack.getContentId(),
   /* label= */ null,
   mediaTrack.getContentType(),
   /* sampleMimeType= */ null,
   /* codecs= */ null,
   /* bitrate= */ Format.NO_VALUE,
   /* selectionFlags= */ 0,
   mediaTrack.getLanguage());
}

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

return Format.createContainerFormat(
  id, label, containerMimeType, sampleMimeType, codecs, bitrate, selectionFlags, language);

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

} else {
 format =
   Format.createContainerFormat(
     id,
     name,

相关文章