# RtpUtils

Artifact: [androidx.media3:media3-exoplayer-rtsp](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/rtsp/RtpUtils.java+class:androidx.media3.exoplayer.rtsp.RtpUtils)

*** ** * ** ***


```
@UnstableApi
public final class RtpUtils
```

<br />

*** ** * ** ***

Utility methods for RTP.

## Summary

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/media3/datasource/DataSpec` | `https://developer.android.com/reference/androidx/media3/exoplayer/rtsp/RtpUtils#getIncomingRtpDataSpec(int)(int portNumber)` Returns the `https://developer.android.com/reference/androidx/media3/datasource/DataSpec` with the `https://developer.android.com/reference/android/net/Uri.html` for incoming RTP connection. |

## Public methods

### getIncomingRtpDataSpec

```
public static DataSpec getIncomingRtpDataSpec(int portNumber)
```

Returns the `https://developer.android.com/reference/androidx/media3/datasource/DataSpec` with the `https://developer.android.com/reference/android/net/Uri.html` for incoming RTP connection.