Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_CAST_CAST_DEFINES_H_ | 5 #ifndef MEDIA_CAST_CAST_DEFINES_H_ |
| 6 #define MEDIA_CAST_CAST_DEFINES_H_ | 6 #define MEDIA_CAST_CAST_DEFINES_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 enum DefaultSettings { | 28 enum DefaultSettings { |
| 29 kDefaultMaxQp = 56, | 29 kDefaultMaxQp = 56, |
| 30 kDefaultMinQp = 4, | 30 kDefaultMinQp = 4, |
| 31 kDefaultMaxFrameRate = 30, | 31 kDefaultMaxFrameRate = 30, |
| 32 kDefaultNumberOfVideoBuffers = 1, | 32 kDefaultNumberOfVideoBuffers = 1, |
| 33 kDefaultRtcpIntervalMs = 500, | 33 kDefaultRtcpIntervalMs = 500, |
| 34 kDefaultRtpHistoryMs = 1000, | 34 kDefaultRtpHistoryMs = 1000, |
| 35 kDefaultRtpMaxDelayMs = 100, | 35 kDefaultRtpMaxDelayMs = 100, |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 template <class Collection> | |
|
Alpha Left Google
2013/08/28 00:27:31
Is this being used? I can't find reference in this
pwestin
2013/08/28 16:40:44
It was used; removed since we introduced the linke
| |
| 39 void EraseKeyAndDeleteValuePtr( | |
| 40 Collection* const collection, | |
| 41 const typename Collection::value_type::first_type& key) { | |
| 42 typename Collection::iterator it = collection->find(key); | |
| 43 if (it == collection->end()) return; | |
| 44 | |
| 45 typename Collection::value_type::second_type v = it->second; | |
| 46 collection->erase(it); | |
| 47 delete v; | |
| 48 } | |
| 49 | |
| 38 } // namespace cast | 50 } // namespace cast |
| 39 } // namespace media | 51 } // namespace media |
| 40 | 52 |
| 41 #endif // MEDIA_CAST_CAST_DEFINES_H_ | 53 #endif // MEDIA_CAST_CAST_DEFINES_H_ |
| OLD | NEW |