MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / AudioFrameRtp

Method AudioFrameRtp

GSM/GSMTransfer.cpp:630–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628
629
630AudioFrameRtp::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
644void AudioFrameRtp::getPayload(BitVector *result) const
645{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected