Triton Mobile SDK for Android 3.5.1
This is a custom android player made by Triton Digital
Loading...
Searching...
No Matches
com.tritondigital.net.streaming.proxy.dataprovider.raw.RawPacketProvider Class Reference
Inheritance diagram for com.tritondigital.net.streaming.proxy.dataprovider.raw.RawPacketProvider:
com.tritondigital.net.streaming.proxy.dataprovider.DataProvider

Classes

interface  StateChangedListener
 Interface to be implemented in order to be notified about the important changes of state of the server. More...
 

Public Member Functions

void onAudioConfigDecoded (AudioConfig audioConfig)
 
void onAudioDataDecoded (byte[] audioData, int audioDataLength, int timestamp)
 
String getMimeType ()
 Returns the mime-type string (audio/aac, audio/mpeg) to be sent by the HTTP server in response to a GET request.
 
void stop ()
 In addition to the default stop, Resets the Audio Config state to make sure to block the next time that this provider is used, until the Audio Config is ready again.
 
void stopBlockingUntilAudioConfigReady ()
 Unblock the thread waiting on a call to blockUntilReady.
 
boolean isAudioConfigReady ()
 Tells if the Audio Config strings can be used without blocking.
 
void setStateChangedListener (StateChangedListener stateChangedListener)
 Sets the listener to be notified by any state change on this provider.
 
- Public Member Functions inherited from com.tritondigital.net.streaming.proxy.dataprovider.DataProvider
Packet getPacket ()
 Returns the next Packet in the stream.
 
void addFreePacketToPool (Packet packet)
 Puts the given packet back in the free pool packets.
 
void clearInternalBuffer ()
 If the provider keeps a buffer of already available packets, clear it immediately.
 

Public Attributes

final String TAG = "RawPacketProvider"
 

Protected Member Functions

Packet createEmptyPacket ()
 
void notifyListenerAudioConfigReady ()
 Notifies listener that the Audio Config can now be used without blocking.
 
- Protected Member Functions inherited from com.tritondigital.net.streaming.proxy.dataprovider.DataProvider
Packet getFreePacket ()
 Returns a free packet to use for the creation of a new packet.
 
void enqueuePacket (Packet packet)
 Enqueue a Packet to be sent to the server.
 

Protected Attributes

AudioConfig mAudioConfig
 
- Protected Attributes inherited from com.tritondigital.net.streaming.proxy.dataprovider.DataProvider
final ArrayBlockingQueue< PacketmPacketsQueue = new ArrayBlockingQueue<>(QUEUE_SIZE)
 List of all packets that were received from the client and not sent to the server yet.
 
final ArrayBlockingQueue< PacketmFreePacketsPool = new ArrayBlockingQueue<>(QUEUE_SIZE)
 

Detailed Description

This class is used to provide the data exactly as it is received. It does not alter the packet structure at all, it simply stores the decoded packets to retransmit them to the server when needed,

This class is typically used when the Proxy connects to a Stream, takes the MetaData but do not modify the audio data at all, because it is already in a format that the client / player supports.

Member Function Documentation

◆ createEmptyPacket()

Packet com.tritondigital.net.streaming.proxy.dataprovider.raw.RawPacketProvider.createEmptyPacket ( )
protected

◆ isAudioConfigReady()

boolean com.tritondigital.net.streaming.proxy.dataprovider.raw.RawPacketProvider.isAudioConfigReady ( )

Tells if the Audio Config strings can be used without blocking.

It is assumed that once the AudioConfig has been received, all mandatory information are available. Thus, this method returns false until the AudioConfig has been received from the protocol container decoder.

◆ notifyListenerAudioConfigReady()

void com.tritondigital.net.streaming.proxy.dataprovider.raw.RawPacketProvider.notifyListenerAudioConfigReady ( )
protected

Notifies listener that the Audio Config can now be used without blocking.

Called by the subclasses to indicate that the provider has received enough data and is ready to be used as the source for streaming.

◆ stop()

void com.tritondigital.net.streaming.proxy.dataprovider.raw.RawPacketProvider.stop ( )

In addition to the default stop, Resets the Audio Config state to make sure to block the next time that this provider is used, until the Audio Config is ready again.

Reimplemented from com.tritondigital.net.streaming.proxy.dataprovider.DataProvider.


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