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

Side by Side Diff: talk/media/base/codec.h

Issue 1316523002: Convert channel counts to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Fix compile Created 4 years, 11 months 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 | « talk/media/base/audiorenderer.h ('k') | talk/media/base/codec.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 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 bool operator==(const Codec& c) const; 122 bool operator==(const Codec& c) const;
123 123
124 bool operator!=(const Codec& c) const { 124 bool operator!=(const Codec& c) const {
125 return !(*this == c); 125 return !(*this == c);
126 } 126 }
127 }; 127 };
128 128
129 struct AudioCodec : public Codec { 129 struct AudioCodec : public Codec {
130 int bitrate; 130 int bitrate;
131 int channels; 131 size_t channels;
132 132
133 // Creates a codec with the given parameters. 133 // Creates a codec with the given parameters.
134 AudioCodec(int id, 134 AudioCodec(int id,
135 const std::string& name, 135 const std::string& name,
136 int clockrate, 136 int clockrate,
137 int bitrate, 137 int bitrate,
138 int channels, 138 size_t channels,
139 int preference); 139 int preference);
140 // Creates an empty codec. 140 // Creates an empty codec.
141 AudioCodec(); 141 AudioCodec();
142 AudioCodec(const AudioCodec& c); 142 AudioCodec(const AudioCodec& c);
143 ~AudioCodec() = default; 143 ~AudioCodec() = default;
144 144
145 // Indicates if this codec is compatible with the specified codec. 145 // Indicates if this codec is compatible with the specified codec.
146 bool Matches(const AudioCodec& codec) const; 146 bool Matches(const AudioCodec& codec) const;
147 147
148 static bool Preferable(const AudioCodec& first, const AudioCodec& other) { 148 static bool Preferable(const AudioCodec& first, const AudioCodec& other) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 235 }
236 236
237 bool CodecNamesEq(const std::string& name1, const std::string& name2); 237 bool CodecNamesEq(const std::string& name1, const std::string& name2);
238 bool HasNack(const VideoCodec& codec); 238 bool HasNack(const VideoCodec& codec);
239 bool HasRemb(const VideoCodec& codec); 239 bool HasRemb(const VideoCodec& codec);
240 bool HasTransportCc(const VideoCodec& codec); 240 bool HasTransportCc(const VideoCodec& codec);
241 241
242 } // namespace cricket 242 } // namespace cricket
243 243
244 #endif // TALK_MEDIA_BASE_CODEC_H_ 244 #endif // TALK_MEDIA_BASE_CODEC_H_
OLDNEW
« no previous file with comments | « talk/media/base/audiorenderer.h ('k') | talk/media/base/codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698