Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(837)

Unified Diff: webrtc/modules/rtp_rtcp/source/dtmf_queue.h

Issue 2392883002: Multi frequency DTMF support - sender side (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/dtmf_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/dtmf_queue.h
diff --git a/webrtc/modules/rtp_rtcp/source/dtmf_queue.h b/webrtc/modules/rtp_rtcp/source/dtmf_queue.h
index fbfc4efcb14fd461b227bb2804afd06ef5b77191..af546dc2309c760cb24ae698a1c4502518d5f780 100644
--- a/webrtc/modules/rtp_rtcp/source/dtmf_queue.h
+++ b/webrtc/modules/rtp_rtcp/source/dtmf_queue.h
@@ -11,26 +11,30 @@
#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_DTMF_QUEUE_H_
#define WEBRTC_MODULES_RTP_RTCP_SOURCE_DTMF_QUEUE_H_
+#include <list>
+
#include "webrtc/base/criticalsection.h"
-#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h"
-#include "webrtc/typedefs.h"
namespace webrtc {
-class DTMFqueue {
+class DtmfQueue {
public:
- DTMFqueue();
- ~DTMFqueue();
+ struct Event {
+ uint16_t duration_ms = 0;
+ uint8_t payload_type = 0;
+ uint8_t key = 0;
+ uint8_t level = 0;
+ };
+
+ DtmfQueue();
+ ~DtmfQueue();
- int32_t AddDTMF(uint8_t dtmf_key, uint16_t len, uint8_t level);
- int8_t NextDTMF(uint8_t* dtmf_key, uint16_t* len, uint8_t* level);
- bool PendingDTMF();
+ bool AddDtmf(const Event& event);
+ bool NextDtmf(Event* event);
+ bool PendingDtmf() const;
private:
rtc::CriticalSection dtmf_critsect_;
- uint8_t next_empty_index_;
- uint8_t dtmf_key_[DTMF_OUTBAND_MAX];
- uint16_t dtmf_length[DTMF_OUTBAND_MAX];
- uint8_t dtmf_level_[DTMF_OUTBAND_MAX];
+ std::list<Event> queue_;
};
} // namespace webrtc
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/dtmf_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698