Package com.google.android.exoplayer2.source

## Class MergingMediaSource.IllegalMergeException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.io.IOException
      - - com.google.android.exoplayer2.source.MergingMediaSource.IllegalMergeException

- All Implemented Interfaces:
    `Serializable`
  Enclosing class:
    MergingMediaSource

      public static final class MergingMediaSource.IllegalMergeException
      extends IOException

  Thrown when a `MergingMediaSource` cannot merge its sources.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static interface` | `MergingMediaSource.IllegalMergeException.Reason` | The reason the merge failed.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `@com.google.android.exoplayer2.source.MergingMediaSource.IllegalMergeException.Reason int` | `reason` | The reason the merge failed.
    `static int` | `REASON_PERIOD_COUNT_MISMATCH` | The sources have different period counts.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `IllegalMergeException​(@com.google.android.exoplayer2.source.MergingMediaSource.IllegalMergeException.Reason int reason)` |

  - ### Method Summary

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### REASON_PERIOD_COUNT_MISMATCH

          public static final int REASON_PERIOD_COUNT_MISMATCH

      The sources have different period counts.
      See Also:
        Constant Field Values

    - #### reason

          public final @com.google.android.exoplayer2.source.MergingMediaSource.IllegalMergeException.Reason int reason

      The reason the merge failed.

  - ### Constructor Detail

    - #### IllegalMergeException

          public IllegalMergeException​(@com.google.android.exoplayer2.source.MergingMediaSource.IllegalMergeException.Reason int reason)

      Parameters:
        `reason` - The reason the merge failed.