Package com.google.android.exoplayer2.source.rtsp

## Class RtpPacket.Builder

- java.lang.Object
- - com.google.android.exoplayer2.source.rtsp.RtpPacket.Builder

- Enclosing class:
    RtpPacket

      public static final class RtpPacket.Builder
      extends Object

  Builder class for an `RtpPacket`

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Builder()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `RtpPacket` | `build()` | Builds the `RtpPacket`.
    `RtpPacket.Builder` | `setCsrc​(byte[] csrc)` | Sets `RtpPacket.csrc`.
    `RtpPacket.Builder` | `setMarker​(boolean marker)` | Sets `RtpPacket.marker`.
    `RtpPacket.Builder` | `setPadding​(boolean padding)` | Sets the `RtpPacket.padding`.
    `RtpPacket.Builder` | `setPayloadData​(byte[] payloadData)` | Sets `RtpPacket.payloadData`.
    `RtpPacket.Builder` | `setPayloadType​(byte payloadType)` | Sets `RtpPacket.payloadType`.
    `RtpPacket.Builder` | `setSequenceNumber​(int sequenceNumber)` | Sets `RtpPacket.sequenceNumber`.
    `RtpPacket.Builder` | `setSsrc​(int ssrc)` | Sets `RtpPacket.ssrc`.
    `RtpPacket.Builder` | `setTimestamp​(long timestamp)` | Sets `RtpPacket.timestamp`.

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

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

- - ### Constructor Detail

    - #### Builder

          public Builder()

  - ### Method Detail

    - #### setPadding

          @CanIgnoreReturnValue
          public RtpPacket.Builder setPadding​(boolean padding)

      Sets the `RtpPacket.padding`. The default is false.

    - #### setMarker

          @CanIgnoreReturnValue
          public RtpPacket.Builder setMarker​(boolean marker)

      Sets `RtpPacket.marker`. The default is false.

    - #### setPayloadType

          @CanIgnoreReturnValue
          public RtpPacket.Builder setPayloadType​(byte payloadType)

      Sets `RtpPacket.payloadType`. The default is 0.

    - #### setSequenceNumber

          @CanIgnoreReturnValue
          public RtpPacket.Builder setSequenceNumber​(int sequenceNumber)

      Sets `RtpPacket.sequenceNumber`. The default is 0.

    - #### setTimestamp

          @CanIgnoreReturnValue
          public RtpPacket.Builder setTimestamp​(long timestamp)

      Sets `RtpPacket.timestamp`. The default is 0.

    - #### setSsrc

          @CanIgnoreReturnValue
          public RtpPacket.Builder setSsrc​(int ssrc)

      Sets `RtpPacket.ssrc`. The default is 0.

    - #### setCsrc

          @CanIgnoreReturnValue
          public RtpPacket.Builder setCsrc​(byte[] csrc)

      Sets `RtpPacket.csrc`. The default is an empty byte array.

    - #### setPayloadData

          @CanIgnoreReturnValue
          public RtpPacket.Builder setPayloadData​(byte[] payloadData)

      Sets `RtpPacket.payloadData`. The default is an empty byte array.

    - #### build

          public RtpPacket build()

      Builds the `RtpPacket`.