Class a.r.VMPtx(TxBase):

Part of aculab.rtp View Source View In Hierarchy

An RTP speech data transmitter.

Logging: output from a VMPtx is prefixed with vtx-
Method __init__ Allocate an RTP transmitter, get the datafeed and add its event
Method close Stop the transmitter.
Method __del__ Undocumented
Method on_vmptx Internal event handler.
Method listen_to Listen to a timeslot or a tx instance.
Method config_codec Configure a codec.
Method configure Configure the Transmitter according to the SDP.
Method config_tones Configure RFC2833 tone conversion/elimination.
Method tones Send RFC 2833 digits.

Inherited from TxBase:

Method tx_tdm_connect For Transmitter subclasses: connect to a timeslot on its DSP's
Method get_module Return a unique identifier for module comparisons.
Method get_switch Return a unique identifier for switch card comparisons.
def __init__(self, controller, card=0, module=0, user_data=None, ts_type=lowlevel.kSMTimeslotTypeALaw, reactor=Reactor): (source)
Allocate an RTP transmitter, get the datafeed and add its event to the reactor.
def close(self): (source)
Stop the transmitter.
def __del__(self): (source)
Undocumented
def on_vmptx(self): (source)
Internal event handler.
def listen_to(self, source, tdm=None): (source)

Listen to a timeslot or a tx instance.

Switching protocol. Applications should generally use switching.connect.
Parameterssourcea tuple (stream, timeslot, [timeslot_type]) or a transmitter instance (VMPtx, FMPtx or TDMtx), which must be on the same module.
tdmUsed internally - TxBase.tx_tdm_connect will call listen_to recursively and supply a tdm.
def config_codec(self, pt, fmt, vad_mode=lowlevel.kSMVMPTxVADModeDisabled, ptime=20): (source)
Configure a codec.
ParametersptThe payload type as an int.
fmta PTMarker decribing the codec.
def configure(self, sdp, source_rtp=None, source_rtcp=None, vad_mode=lowlevel.kSMVMPTxVADModeDisabled, ptime=20): (source)

Configure the Transmitter according to the SDP.

By default, do not do voice activity detection (i.e. don't do silence suppression) and send 20ms of data in each packet.
ParameterssdpAn instance of class SDP.
source_rtpthe receivers source rtp address (as a tuple) Needed for symmetric RTP.
source_rtcpthe receivers source rtcp address (as a tuple)
vad_modevoice activity detection mode.
ptimehow much data (in ms) to send per packet per packet.
def config_tones(self, convert=False, elim=True): (source)
Configure RFC2833 tone conversion/elimination. By default, don't convert tones, but eliminate them.
def tones(self, tones, length=0.040000000000000001, interval=0.10000000000000001): (source)
Send RFC 2833 digits.
Parameterstonesa list of RFC 2833 tone names. See rfc2833_id2name for a list of valid names.
lengththe length in seconds. Must be a multiple of 0.01 (10ms). The default is 0.04s (40ms).
intervalthe interval between tones, in seconds. The default is 0.1s (100ms).
API Documentation for pyAculab, generated by pydoctor at 2009-01-02 15:12:29.