blob: 333f161229b8df5b61a0b887f7838a31d3b3c904 [file] [log] [blame]
henrik.lundin84f8cd62016-04-26 07:45:16 -07001/*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#include "modules/audio_coding/neteq/packet.h"
henrik.lundin84f8cd62016-04-26 07:45:16 -070012
13namespace webrtc {
14
15Packet::Packet() = default;
ossua73f6c92016-10-24 08:25:28 -070016Packet::Packet(Packet&& b) = default;
henrik.lundin84f8cd62016-04-26 07:45:16 -070017
18Packet::~Packet() = default;
19
ossua73f6c92016-10-24 08:25:28 -070020Packet& Packet::operator=(Packet&& b) = default;
21
22Packet 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;
Alessio Bazzica8f319a32019-07-24 16:47:02 +000031 clone.packet_info = packet_info;
ossua73f6c92016-10-24 08:25:28 -070032
33 return clone;
34}
35
henrik.lundin84f8cd62016-04-26 07:45:16 -070036} // namespace webrtc