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

Side by Side Diff: webrtc/media/sctp/sctpdataengine.cc

Issue 2546363002: Refactoring: Declare cricket::Codec constructors protected. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « webrtc/media/base/codec_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 SendQueuedStreamResets(); 962 SendQueuedStreamResets();
963 } 963 }
964 964
965 // Puts the specified |param| from the codec identified by |id| into |dest| 965 // Puts the specified |param| from the codec identified by |id| into |dest|
966 // and returns true. Or returns false if it wasn't there, leaving |dest| 966 // and returns true. Or returns false if it wasn't there, leaving |dest|
967 // untouched. 967 // untouched.
968 static bool GetCodecIntParameter(const std::vector<DataCodec>& codecs, 968 static bool GetCodecIntParameter(const std::vector<DataCodec>& codecs,
969 int id, const std::string& name, 969 int id, const std::string& name,
970 const std::string& param, int* dest) { 970 const std::string& param, int* dest) {
971 std::string value; 971 std::string value;
972 Codec match_pattern; 972 DataCodec match_pattern(id, name);
973 match_pattern.id = id;
974 match_pattern.name = name;
975 for (size_t i = 0; i < codecs.size(); ++i) { 973 for (size_t i = 0; i < codecs.size(); ++i) {
976 if (codecs[i].Matches(match_pattern)) { 974 if (codecs[i].Matches(match_pattern)) {
977 if (codecs[i].GetParam(param, &value)) { 975 if (codecs[i].GetParam(param, &value)) {
978 *dest = rtc::FromString<int>(value); 976 *dest = rtc::FromString<int>(value);
979 return true; 977 return true;
980 } 978 }
981 } 979 }
982 } 980 }
983 return false; 981 return false;
984 } 982 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 } 1055 }
1058 case MSG_SCTPOUTBOUNDPACKET: { 1056 case MSG_SCTPOUTBOUNDPACKET: {
1059 std::unique_ptr<OutboundPacketMessage> pdata( 1057 std::unique_ptr<OutboundPacketMessage> pdata(
1060 static_cast<OutboundPacketMessage*>(msg->pdata)); 1058 static_cast<OutboundPacketMessage*>(msg->pdata));
1061 OnPacketFromSctpToNetwork(pdata->data().get()); 1059 OnPacketFromSctpToNetwork(pdata->data().get());
1062 break; 1060 break;
1063 } 1061 }
1064 } 1062 }
1065 } 1063 }
1066 } // namespace cricket 1064 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/base/codec_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698