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, setAudioSourcegetBitrate, getDestinationPorts, getLocalPorts, getPacketizer, getSSRC, getStreamingMethod, isStreaming, setDestinationAddress, setDestinationPorts, setDestinationPorts, setOutputStream, setStreamingMethod, setTimeToLivepublic 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
MediaStreamstart in interface Streamstart in class MediaStreamjava.lang.IllegalStateExceptionjava.io.IOExceptionpublic void configure()
throws java.lang.IllegalStateException,
java.io.IOException
MediaStreamVideoStream.setVideoQuality(net.majorkernelpanic.streaming.video.VideoQuality)
for a VideoStream and AudioStream.setAudioQuality(net.majorkernelpanic.streaming.audio.AudioQuality)
for a AudioStream.configure in interface Streamconfigure in class MediaStreamjava.lang.IllegalStateExceptionjava.io.IOExceptionpublic void stop()
stop in interface Streamstop in class MediaStreampublic java.lang.String getSessionDescription()
throws java.lang.IllegalStateException
getSessionDescription in interface StreamgetSessionDescription in class MediaStreamjava.lang.IllegalStateException - Thrown when Stream.configure() was not called.