Class: SippyCup::Media::PCMUPayload
- Inherits:
-
RTPPayload
- Object
- RTPPayload
- SippyCup::Media::PCMUPayload
- Defined in:
- lib/sippy_cup/media/pcmu_payload.rb
Constant Summary collapse
- RTP_PAYLOAD_ID =
0x0
- SILENT_BYTE =
0xff.chr
- PTIME =
in milliseconds
20
- RATE =
in KHz
8
Instance Attribute Summary collapse
-
#ptime ⇒ Object
Returns the value of attribute ptime.
Attributes inherited from RTPPayload
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ PCMUPayload
constructor
A new instance of PCMUPayload.
- #media ⇒ Object
- #timestamp_interval ⇒ Object
Methods inherited from RTPPayload
Constructor Details
#initialize(opts = {}) ⇒ PCMUPayload
Returns a new instance of PCMUPayload.
13 14 15 16 17 |
# File 'lib/sippy_cup/media/pcmu_payload.rb', line 13 def initialize(opts = {}) super RTP_PAYLOAD_ID @ptime = opts[:ptime] || PTIME @rate = opts[:rate] || RATE end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class SippyCup::Media::RTPPayload
Instance Attribute Details
#ptime ⇒ Object
Returns the value of attribute ptime.
11 12 13 |
# File 'lib/sippy_cup/media/pcmu_payload.rb', line 11 def ptime @ptime end |
Instance Method Details
#media ⇒ Object
19 20 21 |
# File 'lib/sippy_cup/media/pcmu_payload.rb', line 19 def media SILENT_BYTE * end |
#timestamp_interval ⇒ Object
23 24 25 |
# File 'lib/sippy_cup/media/pcmu_payload.rb', line 23 def @rate * @ptime end |