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

Side by Side Diff: webrtc/api/webrtcsdp.cc

Issue 1930463002: Replace scoped_ptr with unique_ptr in webrtc/api/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months 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/api/videotrack_unittest.cc ('k') | webrtc/api/webrtcsdp_unittest.cc » ('j') | 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 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2011 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
11 #include "webrtc/api/webrtcsdp.h" 11 #include "webrtc/api/webrtcsdp.h"
12 12
13 #include <ctype.h> 13 #include <ctype.h>
14 #include <limits.h> 14 #include <limits.h>
15 #include <stdio.h> 15 #include <stdio.h>
16
16 #include <algorithm> 17 #include <algorithm>
18 #include <memory>
17 #include <string> 19 #include <string>
18 #include <unordered_map> 20 #include <unordered_map>
19 #include <vector> 21 #include <vector>
20 22
21 #include "webrtc/api/jsepicecandidate.h" 23 #include "webrtc/api/jsepicecandidate.h"
22 #include "webrtc/api/jsepsessiondescription.h" 24 #include "webrtc/api/jsepsessiondescription.h"
23 #include "webrtc/base/arraysize.h" 25 #include "webrtc/base/arraysize.h"
24 #include "webrtc/base/common.h" 26 #include "webrtc/base/common.h"
25 #include "webrtc/base/logging.h" 27 #include "webrtc/base/logging.h"
26 #include "webrtc/base/messagedigest.h" 28 #include "webrtc/base/messagedigest.h"
(...skipping 2273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2300 } 2302 }
2301 } 2303 }
2302 2304
2303 // Make a temporary TransportDescription based on |session_td|. 2305 // Make a temporary TransportDescription based on |session_td|.
2304 // Some of this gets overwritten by ParseContent. 2306 // Some of this gets overwritten by ParseContent.
2305 TransportDescription transport( 2307 TransportDescription transport(
2306 session_td.transport_options, session_td.ice_ufrag, session_td.ice_pwd, 2308 session_td.transport_options, session_td.ice_ufrag, session_td.ice_pwd,
2307 session_td.ice_mode, session_td.connection_role, 2309 session_td.ice_mode, session_td.connection_role,
2308 session_td.identity_fingerprint.get()); 2310 session_td.identity_fingerprint.get());
2309 2311
2310 rtc::scoped_ptr<MediaContentDescription> content; 2312 std::unique_ptr<MediaContentDescription> content;
2311 std::string content_name; 2313 std::string content_name;
2312 if (HasAttribute(line, kMediaTypeVideo)) { 2314 if (HasAttribute(line, kMediaTypeVideo)) {
2313 content.reset(ParseContentDescription<VideoContentDescription>( 2315 content.reset(ParseContentDescription<VideoContentDescription>(
2314 message, cricket::MEDIA_TYPE_VIDEO, mline_index, protocol, 2316 message, cricket::MEDIA_TYPE_VIDEO, mline_index, protocol,
2315 payload_types, pos, &content_name, &transport, candidates, error)); 2317 payload_types, pos, &content_name, &transport, candidates, error));
2316 } else if (HasAttribute(line, kMediaTypeAudio)) { 2318 } else if (HasAttribute(line, kMediaTypeAudio)) {
2317 content.reset(ParseContentDescription<AudioContentDescription>( 2319 content.reset(ParseContentDescription<AudioContentDescription>(
2318 message, cricket::MEDIA_TYPE_AUDIO, mline_index, protocol, 2320 message, cricket::MEDIA_TYPE_AUDIO, mline_index, protocol,
2319 payload_types, pos, &content_name, &transport, candidates, error)); 2321 payload_types, pos, &content_name, &transport, candidates, error));
2320 } else if (HasAttribute(line, kMediaTypeData)) { 2322 } else if (HasAttribute(line, kMediaTypeData)) {
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
3173 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( 3175 UpdateCodec<AudioContentDescription, cricket::AudioCodec>(
3174 media_desc, payload_type, feedback_param); 3176 media_desc, payload_type, feedback_param);
3175 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { 3177 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) {
3176 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( 3178 UpdateCodec<VideoContentDescription, cricket::VideoCodec>(
3177 media_desc, payload_type, feedback_param); 3179 media_desc, payload_type, feedback_param);
3178 } 3180 }
3179 return true; 3181 return true;
3180 } 3182 }
3181 3183
3182 } // namespace webrtc 3184 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/videotrack_unittest.cc ('k') | webrtc/api/webrtcsdp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698