| Index: webrtc/modules/rtp_rtcp/source/ssrc_database.h
|
| diff --git a/webrtc/modules/rtp_rtcp/source/ssrc_database.h b/webrtc/modules/rtp_rtcp/source/ssrc_database.h
|
| index 7a3133638d7eb20e5e7cefb58e5f9fca027d0ae6..387b3b2df388e1d2ec524a2b20ab9e6f9c7d1bef 100644
|
| --- a/webrtc/modules/rtp_rtcp/source/ssrc_database.h
|
| +++ b/webrtc/modules/rtp_rtcp/source/ssrc_database.h
|
| @@ -13,38 +13,29 @@
|
|
|
| #include <set>
|
|
|
| +#include "webrtc/base/criticalsection.h"
|
| #include "webrtc/base/random.h"
|
| #include "webrtc/base/scoped_ptr.h"
|
| -#include "webrtc/system_wrappers/include/static_instance.h"
|
| +#include "webrtc/base/thread_annotations.h"
|
| +#include "webrtc/base/thread_checker.h"
|
| #include "webrtc/typedefs.h"
|
|
|
| namespace webrtc {
|
| -class CriticalSectionWrapper;
|
|
|
| class SSRCDatabase {
|
| public:
|
| - static SSRCDatabase* GetSSRCDatabase();
|
| - static void ReturnSSRCDatabase();
|
| + SSRCDatabase();
|
| + ~SSRCDatabase();
|
|
|
| uint32_t CreateSSRC();
|
| void RegisterSSRC(uint32_t ssrc);
|
| void ReturnSSRC(uint32_t ssrc);
|
|
|
| - protected:
|
| - SSRCDatabase();
|
| - virtual ~SSRCDatabase();
|
| -
|
| - static SSRCDatabase* CreateInstance() { return new SSRCDatabase(); }
|
| -
|
| private:
|
| - // Friend function to allow the SSRC destructor to be accessed from the
|
| - // template class.
|
| - friend SSRCDatabase* GetStaticInstance<SSRCDatabase>(
|
| - CountOperation count_operation);
|
| -
|
| - rtc::scoped_ptr<CriticalSectionWrapper> crit_;
|
| + rtc::CriticalSection crit_;
|
| Random random_ GUARDED_BY(crit_);
|
| std::set<uint32_t> ssrcs_ GUARDED_BY(crit_);
|
| + rtc::ThreadChecker thread_checker_;
|
| };
|
| } // namespace webrtc
|
|
|
|
|