public class AACStream extends AudioStream
Session
instantiated with SessionBuilder
instead of using this class directly.
Call MediaStream.setDestinationAddress(InetAddress)
, MediaStream.setDestinationPorts(int)
and AudioStream.setAudioQuality(AudioQuality)
to configure the stream. You can then call start()
to start the RTP stream.
Call stop()
to stop the stream.Modifier and Type | Field and Description |
---|---|
static int[] |
AUDIO_SAMPLING_RATES
There are 13 supported frequencies by ADTS.
|
static java.lang.String |
TAG |
MODE_MEDIACODEC_API, MODE_MEDIACODEC_API_2, MODE_MEDIARECORDER_API, PIPE_API_LS, PIPE_API_PFD
Constructor and Description |
---|
AACStream() |
Modifier and Type | Method and Description |
---|---|
void |
configure()
Configures the stream with the settings supplied with
VideoStream.setVideoQuality(net.majorkernelpanic.streaming.video.VideoQuality)
for a VideoStream and AudioStream.setAudioQuality(net.majorkernelpanic.streaming.audio.AudioQuality)
for a AudioStream . |
java.lang.String |
getSessionDescription()
Returns a description of the stream using SDP.
|
void |
setPreferences(SharedPreferences prefs)
Some data (the actual sampling rate used by the phone and the AAC profile) needs to be stored once
getSessionDescription() is called. |
void |
start()
Starts the stream.
|
void |
stop()
Stops the stream.
|
getAudioQuality, setAudioQuality, setAudioSource
getBitrate, getDestinationPorts, getLocalPorts, getPacketizer, getSSRC, getStreamingMethod, isStreaming, setDestinationAddress, setDestinationPorts, setDestinationPorts, setOutputStream, setStreamingMethod, setTimeToLive
public static final java.lang.String TAG
public static final int[] AUDIO_SAMPLING_RATES
public void setPreferences(SharedPreferences prefs)
getSessionDescription()
is called.prefs
- The SharedPreferences that will be used to store the sampling ratepublic void start() throws java.lang.IllegalStateException, java.io.IOException
MediaStream
start
in interface Stream
start
in class MediaStream
java.lang.IllegalStateException
java.io.IOException
public void configure() throws java.lang.IllegalStateException, java.io.IOException
MediaStream
VideoStream.setVideoQuality(net.majorkernelpanic.streaming.video.VideoQuality)
for a VideoStream
and AudioStream.setAudioQuality(net.majorkernelpanic.streaming.audio.AudioQuality)
for a AudioStream
.configure
in interface Stream
configure
in class MediaStream
java.lang.IllegalStateException
java.io.IOException
public void stop()
stop
in interface Stream
stop
in class MediaStream
public java.lang.String getSessionDescription() throws java.lang.IllegalStateException
getSessionDescription
in interface Stream
getSessionDescription
in class MediaStream
java.lang.IllegalStateException
- Thrown when Stream.configure()
was not called.