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

Side by Side Diff: webrtc/modules/audio_coding/neteq/packet.cc

Issue 2425223002: NetEq now works with packets as values, rather than pointers. (Closed)
Patch Set: Compare packets better in test. One more const. Created 4 years, 2 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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/audio_coding/neteq/packet.h" 11 #include "webrtc/modules/audio_coding/neteq/packet.h"
12 12
13 namespace webrtc { 13 namespace webrtc {
14 14
15 Packet::Packet() = default; 15 Packet::Packet() = default;
16 Packet::Packet(Packet&& b) = default;
16 17
17 Packet::~Packet() = default; 18 Packet::~Packet() = default;
18 19
20 Packet& Packet::operator=(Packet&& b) = default;
21
22 Packet Packet::Clone() const {
23 RTC_CHECK(!frame);
24
25 Packet clone;
26 clone.timestamp = timestamp;
27 clone.sequence_number = sequence_number;
28 clone.payload_type = payload_type;
29 clone.payload.SetData(payload.data(), payload.size());
30 clone.priority = priority;
31
32 return clone;
33 }
34
19 } // namespace webrtc 35 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/packet.h ('k') | webrtc/modules/audio_coding/neteq/packet_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698