當前位置: 首頁>>代碼示例>>Java>>正文


Java Util.areEqual方法代碼示例

本文整理匯總了Java中com.google.android.exoplayer2.util.Util.areEqual方法的典型用法代碼示例。如果您正苦於以下問題:Java Util.areEqual方法的具體用法?Java Util.areEqual怎麽用?Java Util.areEqual使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.android.exoplayer2.util.Util的用法示例。


在下文中一共展示了Util.areEqual方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getAdaptiveSupport

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
/**
 * Returns the extent to which the renderer supports adaptation between specified tracks within
 * a {@link TrackGroup}.
 *
 * @param rendererIndex The renderer index.
 * @param groupIndex The index of the group.
 * @return One of {@link RendererCapabilities#ADAPTIVE_SEAMLESS},
 *     {@link RendererCapabilities#ADAPTIVE_NOT_SEAMLESS} and
 *     {@link RendererCapabilities#ADAPTIVE_NOT_SUPPORTED}.
 */
public int getAdaptiveSupport(int rendererIndex, int groupIndex, int[] trackIndices) {
  int handledTrackCount = 0;
  int adaptiveSupport = RendererCapabilities.ADAPTIVE_SEAMLESS;
  boolean multipleMimeTypes = false;
  String firstSampleMimeType = null;
  for (int i = 0; i < trackIndices.length; i++) {
    int trackIndex = trackIndices[i];
    String sampleMimeType = trackGroups[rendererIndex].get(groupIndex).getFormat(trackIndex)
        .sampleMimeType;
    if (handledTrackCount++ == 0) {
      firstSampleMimeType = sampleMimeType;
    } else {
      multipleMimeTypes |= !Util.areEqual(firstSampleMimeType, sampleMimeType);
    }
    adaptiveSupport = Math.min(adaptiveSupport, formatSupport[rendererIndex][groupIndex][i]
        & RendererCapabilities.ADAPTIVE_SUPPORT_MASK);
  }
  return multipleMimeTypes
      ? Math.min(adaptiveSupport, mixedMimeTypeAdaptiveSupport[rendererIndex])
      : adaptiveSupport;
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:32,代碼來源:MappingTrackSelector.java

示例2: equals

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  ChapterFrame other = (ChapterFrame) obj;
  return startTimeMs == other.startTimeMs
      && endTimeMs == other.endTimeMs
      && startOffset == other.startOffset
      && endOffset == other.endOffset
      && Util.areEqual(chapterId, other.chapterId)
      && Arrays.equals(subFrames, other.subFrames);
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:17,代碼來源:ChapterFrame.java

示例3: getGroup

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
private SampleGroup getGroup(String groupName, List<SampleGroup> groups) {
  for (int i = 0; i < groups.size(); i++) {
    if (Util.areEqual(groupName, groups.get(i).title)) {
      return groups.get(i);
    }
  }
  SampleGroup group = new SampleGroup(groupName);
  groups.add(group);
  return group;
}
 
開發者ID:ashwanijanghu,項目名稱:ExoPlayer-Offline,代碼行數:11,代碼來源:SampleChooserActivity.java

示例4: equals

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
@Override
public boolean equals(Object obj) {
  if (!(obj instanceof SchemeData)) {
    return false;
  }
  if (obj == this) {
    return true;
  }
  SchemeData other = (SchemeData) obj;
  return mimeType.equals(other.mimeType) && Util.areEqual(uuid, other.uuid)
      && Arrays.equals(data, other.data);
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:13,代碼來源:DrmInitData.java

示例5: equals

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  Format other = (Format) obj;
  if (bitrate != other.bitrate || maxInputSize != other.maxInputSize
      || width != other.width || height != other.height || frameRate != other.frameRate
      || rotationDegrees != other.rotationDegrees
      || pixelWidthHeightRatio != other.pixelWidthHeightRatio || stereoMode != other.stereoMode
      || channelCount != other.channelCount || sampleRate != other.sampleRate
      || pcmEncoding != other.pcmEncoding || encoderDelay != other.encoderDelay
      || encoderPadding != other.encoderPadding || subsampleOffsetUs != other.subsampleOffsetUs
      || selectionFlags != other.selectionFlags || !Util.areEqual(id, other.id)
      || !Util.areEqual(language, other.language)
      || accessibilityChannel != other.accessibilityChannel
      || !Util.areEqual(containerMimeType, other.containerMimeType)
      || !Util.areEqual(sampleMimeType, other.sampleMimeType)
      || !Util.areEqual(codecs, other.codecs)
      || !Util.areEqual(drmInitData, other.drmInitData)
      || !Util.areEqual(metadata, other.metadata)
      || !Util.areEqual(colorInfo, other.colorInfo)
      || !Arrays.equals(projectionData, other.projectionData)
      || initializationData.size() != other.initializationData.size()) {
    return false;
  }
  for (int i = 0; i < initializationData.size(); i++) {
    if (!Arrays.equals(initializationData.get(i), other.initializationData.get(i))) {
      return false;
    }
  }
  return true;
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:37,代碼來源:Format.java

示例6: isSupportedAdaptiveVideoTrack

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
private static boolean isSupportedAdaptiveVideoTrack(Format format, String mimeType,
    int formatSupport, int requiredAdaptiveSupport, int maxVideoWidth, int maxVideoHeight,
    int maxVideoBitrate) {
  return isSupported(formatSupport, false) && ((formatSupport & requiredAdaptiveSupport) != 0)
      && (mimeType == null || Util.areEqual(format.sampleMimeType, mimeType))
      && (format.width == Format.NO_VALUE || format.width <= maxVideoWidth)
      && (format.height == Format.NO_VALUE || format.height <= maxVideoHeight)
      && (format.bitrate == Format.NO_VALUE || format.bitrate <= maxVideoBitrate);
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:10,代碼來源:DefaultTrackSelector.java

示例7: equals

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  EventMessage other = (EventMessage) obj;
  return durationMs == other.durationMs && id == other.id
      && Util.areEqual(schemeIdUri, other.schemeIdUri) && Util.areEqual(value, other.value)
      && Arrays.equals(messageData, other.messageData);
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:14,代碼來源:EventMessage.java

示例8: equals

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  ApicFrame other = (ApicFrame) obj;
  return pictureType == other.pictureType && Util.areEqual(mimeType, other.mimeType)
      && Util.areEqual(description, other.description)
      && Arrays.equals(pictureData, other.pictureData);
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:14,代碼來源:ApicFrame.java

示例9: equals

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  CommentFrame other = (CommentFrame) obj;
  return Util.areEqual(description, other.description) && Util.areEqual(language, other.language)
      && Util.areEqual(text, other.text);
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:13,代碼來源:CommentFrame.java

示例10: equals

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  GeobFrame other = (GeobFrame) obj;
  return Util.areEqual(mimeType, other.mimeType) && Util.areEqual(filename, other.filename)
      && Util.areEqual(description, other.description) && Arrays.equals(data, other.data);
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:13,代碼來源:GeobFrame.java

示例11: equals

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  ChapterTocFrame other = (ChapterTocFrame) obj;
  return isRoot == other.isRoot
      && isOrdered == other.isOrdered
      && Util.areEqual(elementId, other.elementId)
      && Arrays.equals(children, other.children)
      && Arrays.equals(subFrames, other.subFrames);
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:16,代碼來源:ChapterTocFrame.java

示例12: equals

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  TextInformationFrame other = (TextInformationFrame) obj;
  return id.equals(other.id) && Util.areEqual(description, other.description)
      && Util.areEqual(value, other.value);
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:13,代碼來源:TextInformationFrame.java

示例13: equals

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  PrivFrame other = (PrivFrame) obj;
  return Util.areEqual(owner, other.owner) && Arrays.equals(privateData, other.privateData);
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:12,代碼來源:PrivFrame.java

示例14: equals

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  UrlLinkFrame other = (UrlLinkFrame) obj;
  return id.equals(other.id) && Util.areEqual(description, other.description)
      && Util.areEqual(url, other.url);
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:13,代碼來源:UrlLinkFrame.java

示例15: onInputFormatChanged

import com.google.android.exoplayer2.util.Util; //導入方法依賴的package包/類
/**
 * Called when a new format is read from the upstream {@link MediaPeriod}.
 *
 * @param newFormat The new format.
 * @throws ExoPlaybackException If an error occurs reinitializing the {@link MediaCodec}.
 */
protected void onInputFormatChanged(Format newFormat) throws ExoPlaybackException {
  Format oldFormat = format;
  format = newFormat;

  boolean drmInitDataChanged = !Util.areEqual(format.drmInitData, oldFormat == null ? null
      : oldFormat.drmInitData);
  if (drmInitDataChanged) {
    if (format.drmInitData != null) {
      if (drmSessionManager == null) {
        throw ExoPlaybackException.createForRenderer(
            new IllegalStateException("Media requires a DrmSessionManager"), getIndex());
      }
      pendingDrmSession = drmSessionManager.acquireSession(Looper.myLooper(), format.drmInitData);
      if (pendingDrmSession == drmSession) {
        drmSessionManager.releaseSession(pendingDrmSession);
      }
    } else {
      pendingDrmSession = null;
    }
  }

  if (pendingDrmSession == drmSession && codec != null
      && canReconfigureCodec(codec, codecIsAdaptive, oldFormat, format)) {
    codecReconfigured = true;
    codecReconfigurationState = RECONFIGURATION_STATE_WRITE_PENDING;
    codecNeedsAdaptationWorkaroundBuffer = codecNeedsAdaptationWorkaround
        && format.width == oldFormat.width && format.height == oldFormat.height;
  } else {
    if (codecReceivedBuffers) {
      // Signal end of stream and wait for any final output buffers before re-initialization.
      codecReinitializationState = REINITIALIZATION_STATE_SIGNAL_END_OF_STREAM;
    } else {
      // There aren't any final output buffers, so perform re-initialization immediately.
      releaseCodec();
      maybeInitCodec();
    }
  }
}
 
開發者ID:sanjaysingh1990,項目名稱:Exoplayer2Radio,代碼行數:45,代碼來源:MediaCodecRenderer.java


注:本文中的com.google.android.exoplayer2.util.Util.areEqual方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。