diff options
author | bodamnam <bodamnam@google.com> | 2023-04-17 02:40:38 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-04-17 02:40:38 +0000 |
commit | fae165ea8fe8513105b353b1f6892b4f82b3fcb1 (patch) | |
tree | 6135ccd22651c6037711cd1003706f85b32a0a57 | |
parent | 25f685b8bc167d78df31f838e51289ee0ee813aa (diff) | |
parent | bac1ad50f34ca1b40d90bb69066e058af93a79cb (diff) | |
download | ImsMedia-fae165ea8fe8513105b353b1f6892b4f82b3fcb1.tar.gz |
Fix the DTMF is not working am: bac1ad50f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/ImsMedia/+/22520507
Change-Id: I3a6b888a0d9b1d1d126910277c422ee71198c9c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2 files changed, 10 insertions, 10 deletions
diff --git a/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/include/nodes/RtpEncoderNode.h b/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/include/nodes/RtpEncoderNode.h index 54253073..def41205 100644 --- a/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/include/nodes/RtpEncoderNode.h +++ b/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/include/nodes/RtpEncoderNode.h @@ -83,6 +83,7 @@ private: int8_t mRtpTxDtmfPayload; int8_t mRtpRxDtmfPayload; int8_t mDtmfSamplingRate; + int32_t mDtmfTimestamp; int32_t mCvoValue; int8_t mRedundantPayload; int8_t mRedundantLevel; diff --git a/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/nodes/RtpEncoderNode.cpp b/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/nodes/RtpEncoderNode.cpp index 944af956..40f3d1af 100644 --- a/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/nodes/RtpEncoderNode.cpp +++ b/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/nodes/RtpEncoderNode.cpp @@ -36,6 +36,7 @@ RtpEncoderNode::RtpEncoderNode(BaseSessionCallback* callback) : mRtpTxDtmfPayload = 0; mRtpRxDtmfPayload = 0; mDtmfSamplingRate = 0; + mDtmfTimestamp = 0; mCvoValue = CVO_DEFINE_NONE; mRedundantLevel = 0; mRedundantPayload = 0; @@ -446,18 +447,16 @@ bool RtpEncoderNode::ProcessAudioData(ImsMediaSubType subtype, uint8_t* data, ui return false; } + mMark ? mDtmfTimestamp = currentTimestamp : timeDiff = 0; mPrevTimestamp = currentTimestamp; timestampDiff = timeDiff * mSamplingRate; - IMLOGD_PACKET2(IM_PACKET_LOG_RTP, "[ProcessAudioData] dtmf payload, size[%u], TS[%u]", - size, currentTimestamp); + IMLOGD_PACKET3(IM_PACKET_LOG_RTP, + "[ProcessAudioData] dtmf payload, size[%u], TS[%u], diff[%d]", size, + mDtmfTimestamp, timestampDiff); mRtpSession->SendRtpPacket( - mRtpTxDtmfPayload, data, size, currentTimestamp, mMark, timestampDiff); - - if (mMark) - { - mMark = false; - } + mRtpTxDtmfPayload, data, size, mDtmfTimestamp, mMark, timestampDiff); + mMark = false; } } else // MEDIASUBTYPE_RTPPAYLOAD @@ -495,8 +494,8 @@ bool RtpEncoderNode::ProcessAudioData(ImsMediaSubType subtype, uint8_t* data, ui kCollectPacketInfo, kStreamRtpTx, reinterpret_cast<uint64_t>(packet)); timestampDiff = timeDiff * mSamplingRate; - IMLOGD_PACKET3(IM_PACKET_LOG_RTP, "[ProcessAudioData] PayloadTx[%d], Size[%d], TS[%d]", - mRtpPayloadTx, size, currentTimestamp); + IMLOGD_PACKET3(IM_PACKET_LOG_RTP, "[ProcessAudioData] size[%u], TS[%u], diff[%d]", size, + currentTimestamp, timestampDiff); if (!mListRtpExtension.empty()) { |