| 628 | |
| 629 | |
| 630 | AudioFrameRtp::AudioFrameRtp(AMRMode wMode) : ByteVector((headerSizeBits(wMode)+GSM::gAMRKd[wMode]+7)/8), mMode(wMode) |
| 631 | { |
| 632 | setAppendP(0); |
| 633 | // Fill in the RTP and AMR headers. |
| 634 | if (wMode == TCH_FS) { |
| 635 | appendField(0xd,RtpHeaderSize); // RTP type of GSM codec. |
| 636 | } else { |
| 637 | appendField(wMode,RtpHeaderSize); // The CMR field is allegedly not used by anyone yet, but lets set it to the AMR mode we are using. |
| 638 | appendField(0,1); // The F bit must always be zero; we are directed to send one frame every 20ms. |
| 639 | appendField(wMode,4); // This is the important field that must be the AMR type index. |
| 640 | appendField(1,1); // All frames are "good" for now. |
| 641 | } |
| 642 | } |
| 643 | |
| 644 | void AudioFrameRtp::getPayload(BitVector *result) const |
| 645 | { |
nothing calls this directly
no outgoing calls
no test coverage detected