rtp_headers.cc (1883B)
1 /* 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 13 #include "api/video/video_content_type.h" 14 #include "api/video/video_rotation.h" 15 #include "rtc_base/checks.h" 16 17 namespace webrtc { 18 19 AudioLevel::AudioLevel() : voice_activity_(false), audio_level_(0) {} 20 21 AudioLevel::AudioLevel(bool voice_activity, int audio_level) 22 : voice_activity_(voice_activity), audio_level_(audio_level) { 23 RTC_CHECK_GE(audio_level, 0); 24 RTC_CHECK_LE(audio_level, 127); 25 } 26 27 RTPHeaderExtension::RTPHeaderExtension() 28 : hasTransmissionTimeOffset(false), 29 transmissionTimeOffset(0), 30 hasAbsoluteSendTime(false), 31 absoluteSendTime(0), 32 hasTransportSequenceNumber(false), 33 transportSequenceNumber(0), 34 hasVideoRotation(false), 35 videoRotation(kVideoRotation_0), 36 hasVideoContentType(false), 37 videoContentType(VideoContentType::UNSPECIFIED), 38 has_video_timing(false), 39 csrcAudioLevels() {} 40 41 RTPHeaderExtension::RTPHeaderExtension(const RTPHeaderExtension& other) = 42 default; 43 44 RTPHeaderExtension& RTPHeaderExtension::operator=( 45 const RTPHeaderExtension& other) = default; 46 47 RTPHeader::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 extension() {} 58 59 RTPHeader::RTPHeader(const RTPHeader& other) = default; 60 61 RTPHeader& RTPHeader::operator=(const RTPHeader& other) = default; 62 63 } // namespace webrtc