public abstract class RecordSession
extends java.lang.Object
RecordSession
- RTSP/RTP record session base class.Modifier and Type | Class and Description |
---|---|
protected class |
RecordSession.CameraListener
CameraListener - ICamera listener. |
static interface |
RecordSession.IListener
IListener - listener. |
static class |
RecordSession.ListenerAdapter
ListenerAdapter - RecordSession.IListener adapter. |
protected class |
RecordSession.MicrophoneListener
MicrophoneListener - IMicrophone listener. |
Modifier and Type | Field and Description |
---|---|
protected MediaTrackInfo |
audioTrack |
protected ICamera |
camera |
protected RecordSession.CameraListener |
cameraListener |
protected java.lang.String |
information |
protected RecordSession.IListener |
listener |
protected IMicrophone |
microphone |
protected RecordSession.MicrophoneListener |
microphoneListener |
protected java.lang.String |
name |
protected MediaTrackInfo |
videoTrack |
Constructor and Description |
---|
RecordSession()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
attachCamera(int codec,
byte[] codecConfig,
ICamera camera)
Specifies a video stream from a
camera object
passed as the source. |
boolean |
attachCamera(int codec,
byte[] codecConfig,
java.net.InetSocketAddress address,
ICamera camera)
Specifies a video stream sent to the
address from a camera object
passed as the source. |
boolean |
attachMicrophone(int codec,
byte[] codecConfig,
IMicrophone microphone)
Specifies an audio stream from a
microphone object
passed as the source. |
boolean |
attachMicrophone(int codec,
byte[] codecConfig,
java.net.InetSocketAddress address,
IMicrophone microphone)
Specifies an audio stream sent to the
address from a microphone object
passed as the source. |
protected boolean |
bindMediaTrackDataProviderToSession(MediaTrackInfo track,
ISenderSession session)
Binds
track data provider to the session . |
IPresentation |
getPresentation()
Returns
IPresentation to announce. |
void |
setInformation(java.lang.String information)
Sets session's information.
|
void |
setListener(RecordSession.IListener listener)
Sets the listener.
|
void |
setName(java.lang.String name)
Sets session's name.
|
protected void |
unbindMediaTrackDataProviders()
Unbinds media track data provider.
|
protected java.lang.String name
protected java.lang.String information
protected MediaTrackInfo audioTrack
protected IMicrophone microphone
protected RecordSession.MicrophoneListener microphoneListener
protected MediaTrackInfo videoTrack
protected ICamera camera
protected RecordSession.CameraListener cameraListener
protected RecordSession.IListener listener
public void setListener(RecordSession.IListener listener)
listener
- public boolean attachCamera(int codec, byte[] codecConfig, ICamera camera)
camera
object
passed as the source.codec
- video codec (one of VideoCodec
constants)codecConfig
- video codec configuraioncamera
- source of the video transmissiontrue
if video source is accepted by library; otherwise false
public boolean attachCamera(int codec, byte[] codecConfig, java.net.InetSocketAddress address, ICamera camera)
address
from a camera
object
passed as the source.codec
- video codec (one of VideoCodec
constants)codecConfig
- video codec configuraionaddress
- addresscamera
- source of the video transmissiontrue
if video source is accepted by library; otherwise false
public boolean attachMicrophone(int codec, byte[] codecConfig, IMicrophone microphone)
microphone
object
passed as the source.codec
- audio codec (one of AudioCodec
constants)codecConfig
- audio codec configuraionmicrophone
- source of the audio transmissiontrue
if audio source is accepted by library; otherwise false
public boolean attachMicrophone(int codec, byte[] codecConfig, java.net.InetSocketAddress address, IMicrophone microphone)
address
from a microphone
object
passed as the source.codec
- audio codec (one of AudioCodec
constants)codecConfig
- audio codec configuraionaddress
- addressmicrophone
- source of the audio transmissiontrue
if audio source is accepted by library; otherwise false
public void setName(java.lang.String name)
name
- session's namepublic void setInformation(java.lang.String information)
information
- session's informationpublic IPresentation getPresentation()
IPresentation
to announce.IPresentation
to announceprotected boolean bindMediaTrackDataProviderToSession(MediaTrackInfo track, ISenderSession session)
track
data provider to the session
.track
- session
- true
if added; otherwise false
protected void unbindMediaTrackDataProviders()