Part of aculab.rtp View Source View In Hierarchy
An RTP speech data transmitter.
Logging: output from a VMPtx is prefixed withvtx-
| 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. |
Listen to a timeslot or a tx instance.
Switching protocol. Applications should generally useswitching.connect.
| Parameters | source | a tuple (stream, timeslot, [timeslot_type]) or a transmitter instance
(VMPtx, FMPtx or TDMtx), which must be
on the same module.
|
| tdm | Used internally - TxBase.tx_tdm_connect will call listen_to recursively and supply a tdm. |
| Parameters | pt | The payload type as an int. |
| fmt | a PTMarker decribing
the codec.
|
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.| Parameters | sdp | An instance of class SDP.
|
| source_rtp | the receivers source rtp address (as a tuple) Needed for symmetric RTP. | |
| source_rtcp | the receivers source rtcp address (as a tuple) | |
| vad_mode | voice activity detection mode. | |
| ptime | how much data (in ms) to send per packet per packet. |
| Parameters | tones | a list of RFC 2833 tone names. See rfc2833_id2name
for a list of valid names.
|
| length | the length in seconds. Must be a multiple of 0.01 (10ms). The default is 0.04s (40ms). | |
| interval | the interval between tones, in seconds. The default is 0.1s (100ms). |