Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 int channels; |
| 132 | 132 |
| 133 // Creates a codec with the given parameters. | 133 // Creates a codec with the given parameters. |
| 134 AudioCodec(int pt, const std::string& nm, int cr, int br, int cs, int pr); | 134 AudioCodec(int id, |
|
perkj_webrtc
2016/01/07 09:47:05
This no longer match VideoCodec below. Would you m
Peter Kasting
2016/01/07 09:48:36
Yeah, I can fix that.
Peter Kasting
2016/01/08 01:36:27
Done.
| |
| 135 const std::string& name, | |
| 136 int clockrate, | |
| 137 int bitrate, | |
| 138 int channels, | |
| 139 int preference); | |
| 135 // Creates an empty codec. | 140 // Creates an empty codec. |
| 136 AudioCodec(); | 141 AudioCodec(); |
| 137 AudioCodec(const AudioCodec& c); | 142 AudioCodec(const AudioCodec& c); |
| 138 ~AudioCodec() = default; | 143 ~AudioCodec() = default; |
| 139 | 144 |
| 140 // Indicates if this codec is compatible with the specified codec. | 145 // Indicates if this codec is compatible with the specified codec. |
| 141 bool Matches(const AudioCodec& codec) const; | 146 bool Matches(const AudioCodec& codec) const; |
| 142 | 147 |
| 143 static bool Preferable(const AudioCodec& first, const AudioCodec& other) { | 148 static bool Preferable(const AudioCodec& first, const AudioCodec& other) { |
| 144 return first.preference > other.preference; | 149 return first.preference > other.preference; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 225 } | 230 } |
| 226 | 231 |
| 227 bool CodecNamesEq(const std::string& name1, const std::string& name2); | 232 bool CodecNamesEq(const std::string& name1, const std::string& name2); |
| 228 bool HasNack(const VideoCodec& codec); | 233 bool HasNack(const VideoCodec& codec); |
| 229 bool HasRemb(const VideoCodec& codec); | 234 bool HasRemb(const VideoCodec& codec); |
| 230 bool HasTransportCc(const VideoCodec& codec); | 235 bool HasTransportCc(const VideoCodec& codec); |
| 231 | 236 |
| 232 } // namespace cricket | 237 } // namespace cricket |
| 233 | 238 |
| 234 #endif // TALK_MEDIA_BASE_CODEC_H_ | 239 #endif // TALK_MEDIA_BASE_CODEC_H_ |
| OLD | NEW |