Triton Mobile SDK for Android 3.5.1 This is a custom android player made by Triton Digital

Loading...
Searching...
No Matches
Public Member Functions | List of all members
com.tritondigital.net.streaming.proxy.dataprovider.Packet Interface Reference

Interface for all types of Packets. More...

Inheritance diagram for com.tritondigital.net.streaming.proxy.dataprovider.Packet:

## Public Member Functions
byte[] | getData ()
| Gets the packet raw data.
int | getLength ()
| Gets the size of the entire packet (payload size + header size)

## Detailed Description

Interface for all types of Packets.

Contains minimal methods needed to send those packets as an array of bytes.

It is important to understand that the bytes array of the packet is only valid from by 0 to byte 'getLength() -1'. To minimise memory allocation, if a packet is reused but has a different payload size, the same buffer is reused. It is essential to use 'getLength' to know the actual size of the packet.

## Member Function Documentation

## ◆ getData()

byte[] com.tritondigital.net.streaming.proxy.dataprovider.Packet.getData | ( |  | ) |

Gets the packet raw data.

Typically used to send the bytes to a socket after constructing it and setting the various header fields / payload.

Implemented in com.tritondigital.net.streaming.proxy.dataprovider.raw.RawPacket, and com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.

## ◆ getLength()

int com.tritondigital.net.streaming.proxy.dataprovider.Packet.getLength | ( |  | ) |

Gets the size of the entire packet (payload size + header size)

Implemented in com.tritondigital.net.streaming.proxy.dataprovider.raw.RawPacket, and com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.

The documentation for this interface was generated from the following file:

- streamingproxy/src/main/java/com/tritondigital/net/streaming/proxy/dataprovider/Packet.java