OLD | NEW |
---|---|
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/base/checks.h" | |
11 #include "webrtc/common_types.h" | 12 #include "webrtc/common_types.h" |
12 | 13 |
13 #include <string.h> | 14 #include <string.h> |
14 | 15 |
15 namespace webrtc { | 16 namespace webrtc { |
16 | 17 |
17 int InStream::Rewind() { return -1; } | 18 int InStream::Rewind() { return -1; } |
18 | 19 |
19 int OutStream::Rewind() { return -1; } | 20 int OutStream::Rewind() { return -1; } |
20 | 21 |
(...skipping 17 matching lines...) Loading... | |
38 : markerBit(false), | 39 : markerBit(false), |
39 payloadType(0), | 40 payloadType(0), |
40 sequenceNumber(0), | 41 sequenceNumber(0), |
41 timestamp(0), | 42 timestamp(0), |
42 ssrc(0), | 43 ssrc(0), |
43 numCSRCs(0), | 44 numCSRCs(0), |
44 paddingLength(0), | 45 paddingLength(0), |
45 headerLength(0), | 46 headerLength(0), |
46 payload_type_frequency(0), | 47 payload_type_frequency(0), |
47 extension() { | 48 extension() { |
48 memset(&arrOfCSRCs, 0, sizeof(arrOfCSRCs)); | 49 memset(&arrOfCSRCs, 0, sizeof(arrOfCSRCs)); |
tommi
2016/05/23 17:05:08
can we get rid of this memset as well?
hta-webrtc
2016/05/23 17:19:33
If the tests still pass....
| |
49 } | 50 } |
50 | 51 |
52 VideoCodec::VideoCodec() | |
53 : codecType(kVideoCodecUnknown), | |
54 plName(), | |
55 plType(0), | |
56 width(0), | |
57 height(0), | |
58 startBitrate(0), | |
59 maxBitrate(0), | |
60 minBitrate(0), | |
61 targetBitrate(0), | |
62 maxFramerate(0), | |
63 qpMax(0), | |
64 numberOfSimulcastStreams(0), | |
65 simulcastStream(), | |
66 spatialLayers(), | |
67 mode(kRealtimeVideo), | |
68 codec_specific_() {} | |
69 | |
70 VideoCodecVP8* VideoCodec::VP8() { | |
71 RTC_DCHECK_EQ(codecType, kVideoCodecVP8); | |
72 return &codec_specific_.VP8; | |
73 } | |
74 | |
75 const VideoCodecVP8& VideoCodec::VP8() const { | |
76 RTC_DCHECK_EQ(codecType, kVideoCodecVP8); | |
77 return codec_specific_.VP8; | |
78 } | |
79 | |
80 VideoCodecVP9* VideoCodec::VP9() { | |
81 RTC_DCHECK_EQ(codecType, kVideoCodecVP9); | |
82 return &codec_specific_.VP9; | |
83 } | |
84 | |
85 const VideoCodecVP9& VideoCodec::VP9() const { | |
86 RTC_DCHECK_EQ(codecType, kVideoCodecVP9); | |
87 return codec_specific_.VP9; | |
88 } | |
89 | |
90 VideoCodecH264* VideoCodec::H264() { | |
91 RTC_DCHECK_EQ(codecType, kVideoCodecH264); | |
92 return &codec_specific_.H264; | |
93 } | |
94 | |
95 const VideoCodecH264& VideoCodec::H264() const { | |
96 RTC_DCHECK_EQ(codecType, kVideoCodecH264); | |
97 return codec_specific_.H264; | |
98 } | |
99 | |
51 } // namespace webrtc | 100 } // namespace webrtc |
OLD | NEW |