Java Code Examples for com.google.android.exoplayer2.audio.DtsUtil#parseDtsFormat()

The following examples show how to use com.google.android.exoplayer2.audio.DtsUtil#parseDtsFormat() . 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: DtsReader.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
/**
 * Parses the sample header.
 */
private void parseHeader() {
  byte[] frameData = headerScratchBytes.data;
  if (format == null) {
    format = DtsUtil.parseDtsFormat(frameData, formatId, language, null);
    output.format(format);
  }
  sampleSize = DtsUtil.getDtsFrameSize(frameData);
  // In this class a sample is an access unit (frame in DTS), but the format's sample rate
  // specifies the number of PCM audio samples per second.
  sampleDurationUs = (int) (C.MICROS_PER_SECOND
      * DtsUtil.parseDtsAudioSampleCount(frameData) / format.sampleRate);
}
 
Example 2
Source File: DtsReader.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Parses the sample header.
 */
private void parseHeader() {
  byte[] frameData = headerScratchBytes.data;
  if (format == null) {
    format = DtsUtil.parseDtsFormat(frameData, formatId, language, null);
    output.format(format);
  }
  sampleSize = DtsUtil.getDtsFrameSize(frameData);
  // In this class a sample is an access unit (frame in DTS), but the format's sample rate
  // specifies the number of PCM audio samples per second.
  sampleDurationUs = (int) (C.MICROS_PER_SECOND
      * DtsUtil.parseDtsAudioSampleCount(frameData) / format.sampleRate);
}
 
Example 3
Source File: DtsReader.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Parses the sample header.
 */
private void parseHeader() {
  byte[] frameData = headerScratchBytes.data;
  if (format == null) {
    format = DtsUtil.parseDtsFormat(frameData, formatId, language, null);
    output.format(format);
  }
  sampleSize = DtsUtil.getDtsFrameSize(frameData);
  // In this class a sample is an access unit (frame in DTS), but the format's sample rate
  // specifies the number of PCM audio samples per second.
  sampleDurationUs = (int) (C.MICROS_PER_SECOND
      * DtsUtil.parseDtsAudioSampleCount(frameData) / format.sampleRate);
}
 
Example 4
Source File: DtsReader.java    From K-Sonic with MIT License 5 votes vote down vote up
/**
 * Parses the sample header.
 */
private void parseHeader() {
  byte[] frameData = headerScratchBytes.data;
  if (format == null) {
    format = DtsUtil.parseDtsFormat(frameData, formatId, language, null);
    output.format(format);
  }
  sampleSize = DtsUtil.getDtsFrameSize(frameData);
  // In this class a sample is an access unit (frame in DTS), but the format's sample rate
  // specifies the number of PCM audio samples per second.
  sampleDurationUs = (int) (C.MICROS_PER_SECOND
      * DtsUtil.parseDtsAudioSampleCount(frameData) / format.sampleRate);
}
 
Example 5
Source File: DtsReader.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Parses the sample header.
 */
private void parseHeader() {
  byte[] frameData = headerScratchBytes.data;
  if (format == null) {
    format = DtsUtil.parseDtsFormat(frameData, formatId, language, null);
    output.format(format);
  }
  sampleSize = DtsUtil.getDtsFrameSize(frameData);
  // In this class a sample is an access unit (frame in DTS), but the format's sample rate
  // specifies the number of PCM audio samples per second.
  sampleDurationUs = (int) (C.MICROS_PER_SECOND
      * DtsUtil.parseDtsAudioSampleCount(frameData) / format.sampleRate);
}
 
Example 6
Source File: DtsReader.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Parses the sample header.
 */
private void parseHeader() {
  byte[] frameData = headerScratchBytes.data;
  if (format == null) {
    format = DtsUtil.parseDtsFormat(frameData, formatId, language, null);
    output.format(format);
  }
  sampleSize = DtsUtil.getDtsFrameSize(frameData);
  // In this class a sample is an access unit (frame in DTS), but the format's sample rate
  // specifies the number of PCM audio samples per second.
  sampleDurationUs = (int) (C.MICROS_PER_SECOND
      * DtsUtil.parseDtsAudioSampleCount(frameData) / format.sampleRate);
}