Java Code Examples for com.google.android.exoplayer2.util.MimeTypes#APPLICATION_EMSG

The following examples show how to use com.google.android.exoplayer2.util.MimeTypes#APPLICATION_EMSG . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MetadataDecoderFactory.java    From MediaSDK with Apache License 2.0 6 votes vote down vote up
@Override
public MetadataDecoder createDecoder(Format format) {
  @Nullable String mimeType = format.sampleMimeType;
  if (mimeType != null) {
    switch (mimeType) {
      case MimeTypes.APPLICATION_ID3:
        return new Id3Decoder();
      case MimeTypes.APPLICATION_EMSG:
        return new EventMessageDecoder();
      case MimeTypes.APPLICATION_SCTE35:
        return new SpliceInfoDecoder();
      case MimeTypes.APPLICATION_ICY:
        return new IcyDecoder();
      default:
        break;
    }
  }
  throw new IllegalArgumentException(
      "Attempted to create decoder for unsupported MIME type: " + mimeType);
}
 
Example 2
Source File: MetadataDecoderFactory.java    From K-Sonic with MIT License 6 votes vote down vote up
private Class<?> getDecoderClass(String mimeType) {
  if (mimeType == null) {
    return null;
  }
  try {
    switch (mimeType) {
      case MimeTypes.APPLICATION_ID3:
        return Class.forName("com.google.android.exoplayer2.metadata.id3.Id3Decoder");
      case MimeTypes.APPLICATION_EMSG:
        return Class.forName("com.google.android.exoplayer2.metadata.emsg.EventMessageDecoder");
      case MimeTypes.APPLICATION_SCTE35:
        return Class.forName("com.google.android.exoplayer2.metadata.scte35.SpliceInfoDecoder");
      default:
        return null;
    }
  } catch (ClassNotFoundException e) {
    return null;
  }
}
 
Example 3
Source File: MetadataDecoderFactory.java    From Telegram-FOSS with GNU General Public License v2.0 6 votes vote down vote up
@Override
public MetadataDecoder createDecoder(Format format) {
  switch (format.sampleMimeType) {
    case MimeTypes.APPLICATION_ID3:
      return new Id3Decoder();
    case MimeTypes.APPLICATION_EMSG:
      return new EventMessageDecoder();
    case MimeTypes.APPLICATION_SCTE35:
      return new SpliceInfoDecoder();
    case MimeTypes.APPLICATION_ICY:
      return new IcyDecoder();
    default:
      throw new IllegalArgumentException(
          "Attempted to create decoder for unsupported format");
  }
}
 
Example 4
Source File: MetadataDecoderFactory.java    From Telegram with GNU General Public License v2.0 6 votes vote down vote up
@Override
public MetadataDecoder createDecoder(Format format) {
  switch (format.sampleMimeType) {
    case MimeTypes.APPLICATION_ID3:
      return new Id3Decoder();
    case MimeTypes.APPLICATION_EMSG:
      return new EventMessageDecoder();
    case MimeTypes.APPLICATION_SCTE35:
      return new SpliceInfoDecoder();
    case MimeTypes.APPLICATION_ICY:
      return new IcyDecoder();
    default:
      throw new IllegalArgumentException(
          "Attempted to create decoder for unsupported format");
  }
}
 
Example 5
Source File: MetadataDecoderFactory.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public MetadataDecoder createDecoder(Format format) {
  switch (format.sampleMimeType) {
    case MimeTypes.APPLICATION_ID3:
      return new Id3Decoder();
    case MimeTypes.APPLICATION_EMSG:
      return new EventMessageDecoder();
    case MimeTypes.APPLICATION_SCTE35:
      return new SpliceInfoDecoder();
    default:
      throw new IllegalArgumentException("Attempted to create decoder for unsupported format");
  }
}
 
Example 6
Source File: MetadataDecoderFactory.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public MetadataDecoder createDecoder(Format format) {
  switch (format.sampleMimeType) {
    case MimeTypes.APPLICATION_ID3:
      return new Id3Decoder();
    case MimeTypes.APPLICATION_EMSG:
      return new EventMessageDecoder();
    case MimeTypes.APPLICATION_SCTE35:
      return new SpliceInfoDecoder();
    default:
      throw new IllegalArgumentException("Attempted to create decoder for unsupported format");
  }
}