public final class RtspRecordSession
extends java.lang.Object
RtspRecordSession - RTSP record session.| Constructor and Description |
|---|
RtspRecordSession(RtspConnection connection,
IPresentation presentation,
RtpUdpSessionManager rtpSessionManager)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attachAudio(IMicrophone microphone)
Specifies an audio stream sent over the INetStream object,
from a
microphone object passed as the source. |
void |
attachCamera(ICamera camera)
Starts capturing video from the specified source, or stops capturing
if
camera is set to null. |
void |
pause()
Pauses the playback.
|
void |
record()
Starts the recording.
|
StatusCode[] |
setup(int port)
Setups all presentation's media tracks.
|
void |
teardown()
Teardowns playback.
|
public RtspRecordSession(RtspConnection connection,
IPresentation presentation,
RtpUdpSessionManager rtpSessionManager)
connection - presentation - rtpSessionManager - public void attachAudio(IMicrophone microphone)
microphone object passed as the source.microphone - source of the audio transmissionpublic void attachCamera(ICamera camera)
camera is set to null. This method is available only
to the publisher of the specified stream.camera - source of the video transmissionsnapshotMilliseconds - Specifies whether the video stream is continuous,
a single frame, or a series of single frames used to create time-lapse photographypublic StatusCode[] setup(int port)
Note: - If port is less than 255 then interleaved mode is used. - If UDP transport is used then STUN client does work to get client outside ip:port.
port - public void record()
throws java.lang.IllegalStateException,
RtspMethodException
Note:
- Start sending the audio/video data after 'RECORD' is accepted by server.
java.lang.IllegalStateException - if connection is not established yetRtspMethodException - if response status code is different from 2xx.public void pause()
throws java.lang.IllegalStateException,
RtspMethodException
java.lang.IllegalStateException - if connection is not established yetRtspMethodException - if response status code is different from 2xx.public void teardown()
throws java.lang.IllegalStateException,
RtspMethodException
args - play argumentsjava.lang.IllegalStateException - if connection is not established yetRtspMethodException - if response status code is different from 2xx.