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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc

Issue 1924443002: Revert of Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (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
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
11 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h" 11 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h"
12 12
13 #include <assert.h> 13 #include <assert.h>
14 #include <string.h> 14 #include <string.h>
15 15
16 #include <memory>
17
18 #include "webrtc/base/checks.h" 16 #include "webrtc/base/checks.h"
19 #include "webrtc/base/logging.h" 17 #include "webrtc/base/logging.h"
20 #include "webrtc/base/trace_event.h" 18 #include "webrtc/base/trace_event.h"
21 #include "webrtc/modules/rtp_rtcp/include/rtp_cvo.h" 19 #include "webrtc/modules/rtp_rtcp/include/rtp_cvo.h"
22 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" 20 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h"
23 #include "webrtc/modules/rtp_rtcp/source/rtp_format.h" 21 #include "webrtc/modules/rtp_rtcp/source/rtp_format.h"
24 #include "webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h" 22 #include "webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h"
25 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" 23 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
26 24
27 namespace webrtc { 25 namespace webrtc {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if (payload == NULL || payload_data_length == 0) { 67 if (payload == NULL || payload_data_length == 0) {
70 return data_callback_->OnReceivedPayloadData(NULL, 0, rtp_header) == 0 ? 0 68 return data_callback_->OnReceivedPayloadData(NULL, 0, rtp_header) == 0 ? 0
71 : -1; 69 : -1;
72 } 70 }
73 71
74 if (first_packet_received_()) { 72 if (first_packet_received_()) {
75 LOG(LS_INFO) << "Received first video RTP packet"; 73 LOG(LS_INFO) << "Received first video RTP packet";
76 } 74 }
77 75
78 // We are not allowed to hold a critical section when calling below functions. 76 // We are not allowed to hold a critical section when calling below functions.
79 std::unique_ptr<RtpDepacketizer> depacketizer( 77 rtc::scoped_ptr<RtpDepacketizer> depacketizer(
80 RtpDepacketizer::Create(rtp_header->type.Video.codec)); 78 RtpDepacketizer::Create(rtp_header->type.Video.codec));
81 if (depacketizer.get() == NULL) { 79 if (depacketizer.get() == NULL) {
82 LOG(LS_ERROR) << "Failed to create depacketizer."; 80 LOG(LS_ERROR) << "Failed to create depacketizer.";
83 return -1; 81 return -1;
84 } 82 }
85 83
86 rtp_header->type.Video.isFirstPacket = is_first_packet; 84 rtp_header->type.Video.isFirstPacket = is_first_packet;
87 RtpDepacketizer::ParsedPayload parsed_payload; 85 RtpDepacketizer::ParsedPayload parsed_payload;
88 if (!depacketizer->Parse(&parsed_payload, payload, payload_data_length)) 86 if (!depacketizer->Parse(&parsed_payload, payload, payload_data_length))
89 return -1; 87 return -1;
(...skipping 28 matching lines...) Expand all
118 RtpFeedback* callback, 116 RtpFeedback* callback,
119 int8_t payload_type, 117 int8_t payload_type,
120 const char payload_name[RTP_PAYLOAD_NAME_SIZE], 118 const char payload_name[RTP_PAYLOAD_NAME_SIZE],
121 const PayloadUnion& specific_payload) const { 119 const PayloadUnion& specific_payload) const {
122 // TODO(pbos): Remove as soon as audio can handle a changing payload type 120 // TODO(pbos): Remove as soon as audio can handle a changing payload type
123 // without this callback. 121 // without this callback.
124 return 0; 122 return 0;
125 } 123 }
126 124
127 } // namespace webrtc 125 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698