blob: da7f1ea9fd4002f77234239058116e9d867bfdba [file] [log] [blame]
Patrik Höglund3e113432017-12-15 14:40:10 +01001/*
2 * Copyright (c) 2017 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
11#include "api/rtp_headers.h"
12
Oleh Prypin96a0f612018-10-05 13:13:38 +000013#include <string.h>
14#include <algorithm>
15#include <limits>
16#include <type_traits>
17
18#include "rtc_base/checks.h"
19#include "rtc_base/stringutils.h"
20
Patrik Höglund3e113432017-12-15 14:40:10 +010021namespace webrtc {
22
23RTPHeaderExtension::RTPHeaderExtension()
24 : hasTransmissionTimeOffset(false),
25 transmissionTimeOffset(0),
26 hasAbsoluteSendTime(false),
27 absoluteSendTime(0),
28 hasTransportSequenceNumber(false),
29 transportSequenceNumber(0),
30 hasAudioLevel(false),
31 voiceActivity(false),
32 audioLevel(0),
33 hasVideoRotation(false),
34 videoRotation(kVideoRotation_0),
35 hasVideoContentType(false),
36 videoContentType(VideoContentType::UNSPECIFIED),
Johnny Leee0c8b232018-09-11 16:50:49 -040037 has_video_timing(false),
38 has_frame_marking(false),
39 frame_marking({false, false, false, false, false, 0xFF, 0, 0}) {}
Patrik Höglund3e113432017-12-15 14:40:10 +010040
41RTPHeaderExtension::RTPHeaderExtension(const RTPHeaderExtension& other) =
42 default;
43
44RTPHeaderExtension& RTPHeaderExtension::operator=(
45 const RTPHeaderExtension& other) = default;
46
47RTPHeader::RTPHeader()
48 : markerBit(false),
49 payloadType(0),
50 sequenceNumber(0),
51 timestamp(0),
52 ssrc(0),
53 numCSRCs(0),
54 arrOfCSRCs(),
55 paddingLength(0),
56 headerLength(0),
57 payload_type_frequency(0),
58 extension() {}
59
60RTPHeader::RTPHeader(const RTPHeader& other) = default;
61
62RTPHeader& RTPHeader::operator=(const RTPHeader& other) = default;
63
64} // namespace webrtc