Class FilterFormat

java.lang.Object
com.castlabs.android.player.filter.FilterFormat

public final class FilterFormat extends Object
Wrapper class around a Format, as well as any information that may be required to filter it.
Since:
4.2.26
  • Constructor Details

    • FilterFormat

      public FilterFormat(@NonNull com.google.android.exoplayer2.Format format, int mediaType, @NonNull com.google.android.exoplayer2.Format[] groupFormats, boolean isAd)
  • Method Details

    • getFormat

      @NonNull public com.google.android.exoplayer2.Format getFormat()
      Returns:
      the format of this track
    • getGroupFormats

      @NonNull public com.google.android.exoplayer2.Format[] getGroupFormats()
      Returns:
      the formats for all tracks in the same group
    • remove

      public void remove()
      Mark this track as to be removed with reason SdkConsts.FILTER_REASON_CUSTOM.
    • remove

      public void remove(int filterReason)
      Marks this track to be removed with the provided reason
      Parameters:
      filterReason - the reason for this removal
    • keep

      public void keep()
      Marks this track to be kept by clearing the filter reason.
    • getMediaType

      public int getMediaType()
      Returns:
      the media type of this track
    • isAd

      public boolean isAd()
      Returns:
      whether this track belongs to an Ad Period
    • isFiltered

      public boolean isFiltered()
      Returns:
      whether this track has been marked as filtered
    • getFilterReason

      public int getFilterReason()
      Returns:
      the filter reason, or 0 in case the track is unfiltered