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

Side by Side Diff: webrtc/common_types.cc

Issue 2001533003: Refactoring: Hide VideoCodec.codecSpecific as "private" (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 years, 1 month 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
« no previous file with comments | « webrtc/common_types.h ('k') | webrtc/modules/video_coding/codec_database.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 StreamDataCounters::StreamDataCounters() : first_packet_time_ms(-1) {} 18 StreamDataCounters::StreamDataCounters() : first_packet_time_ms(-1) {}
18 19
19 RTPHeaderExtension::RTPHeaderExtension() 20 RTPHeaderExtension::RTPHeaderExtension()
20 : hasTransmissionTimeOffset(false), 21 : hasTransmissionTimeOffset(false),
(...skipping 14 matching lines...) Expand all
35 sequenceNumber(0), 36 sequenceNumber(0),
36 timestamp(0), 37 timestamp(0),
37 ssrc(0), 38 ssrc(0),
38 numCSRCs(0), 39 numCSRCs(0),
39 arrOfCSRCs(), 40 arrOfCSRCs(),
40 paddingLength(0), 41 paddingLength(0),
41 headerLength(0), 42 headerLength(0),
42 payload_type_frequency(0), 43 payload_type_frequency(0),
43 extension() {} 44 extension() {}
44 45
46 VideoCodec::VideoCodec()
47 : codecType(kVideoCodecUnknown),
48 plName(),
49 plType(0),
50 width(0),
51 height(0),
52 startBitrate(0),
53 maxBitrate(0),
54 minBitrate(0),
55 targetBitrate(0),
56 maxFramerate(0),
57 qpMax(0),
58 numberOfSimulcastStreams(0),
59 simulcastStream(),
60 spatialLayers(),
61 mode(kRealtimeVideo),
62 codecSpecific() {}
63
64 VideoCodecVP8* VideoCodec::VP8() {
65 RTC_DCHECK_EQ(codecType, kVideoCodecVP8);
66 return &codecSpecific.VP8;
67 }
68
69 const VideoCodecVP8& VideoCodec::VP8() const {
70 RTC_DCHECK_EQ(codecType, kVideoCodecVP8);
71 return codecSpecific.VP8;
72 }
73
74 VideoCodecVP9* VideoCodec::VP9() {
75 RTC_DCHECK_EQ(codecType, kVideoCodecVP9);
76 return &codecSpecific.VP9;
77 }
78
79 const VideoCodecVP9& VideoCodec::VP9() const {
80 RTC_DCHECK_EQ(codecType, kVideoCodecVP9);
81 return codecSpecific.VP9;
82 }
83
84 VideoCodecH264* VideoCodec::H264() {
85 RTC_DCHECK_EQ(codecType, kVideoCodecH264);
86 return &codecSpecific.H264;
87 }
88
89 const VideoCodecH264& VideoCodec::H264() const {
90 RTC_DCHECK_EQ(codecType, kVideoCodecH264);
91 return codecSpecific.H264;
92 }
93
45 } // namespace webrtc 94 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/common_types.h ('k') | webrtc/modules/video_coding/codec_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698