public class H264Stream extends VideoStream
Session instantiated with SessionBuilder instead of using this class directly.
Call MediaStream.setDestinationAddress(InetAddress), MediaStream.setDestinationPorts(int) and VideoStream.setVideoQuality(VideoQuality)
to configure the stream. You can then call start() to start the RTP stream.
Call VideoStream.stop() to stop the stream.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TAG |
MODE_MEDIACODEC_API, MODE_MEDIACODEC_API_2, MODE_MEDIARECORDER_API, PIPE_API_LS, PIPE_API_PFD| Constructor and Description |
|---|
H264Stream()
Constructs the H.264 stream.
|
H264Stream(int cameraId)
Constructs the H.264 stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure()
Configures the stream.
|
java.lang.String |
getSessionDescription()
Returns a description of the stream using SDP.
|
void |
start()
Starts the stream.
|
getCamera, getFlashState, getVideoQuality, setCamera, setFlashState, setPreferences, setPreviewOrientation, setSurfaceView, setVideoQuality, startPreview, stop, stopPreview, switchCamera, toggleFlashgetBitrate, getDestinationPorts, getLocalPorts, getPacketizer, getSSRC, getStreamingMethod, isStreaming, setDestinationAddress, setDestinationPorts, setDestinationPorts, setOutputStream, setStreamingMethod, setTimeToLivepublic static final java.lang.String TAG
public H264Stream()
public H264Stream(int cameraId)
cameraId - Can be either CameraInfo.CAMERA_FACING_BACK or CameraInfo.CAMERA_FACING_FRONTjava.io.IOExceptionpublic java.lang.String getSessionDescription()
throws java.lang.IllegalStateException
getSessionDescription in interface StreamgetSessionDescription in class VideoStreamjava.lang.IllegalStateException - Thrown when Stream.configure() wa not called.public void start()
throws java.lang.IllegalStateException,
java.io.IOException
VideoStream.startPreview() has not already been called.start in interface Streamstart in class VideoStreamjava.lang.IllegalStateExceptionjava.io.IOExceptionpublic void configure()
throws java.lang.IllegalStateException,
java.io.IOException
getSessionDescription() to apply
your configuration of the stream.configure in interface Streamconfigure in class VideoStreamjava.lang.IllegalStateExceptionjava.io.IOException