| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 } | 156 } |
| 157 | 157 |
| 158 bool Codec::HasFeedbackParam(const FeedbackParam& param) const { | 158 bool Codec::HasFeedbackParam(const FeedbackParam& param) const { |
| 159 return feedback_params.Has(param); | 159 return feedback_params.Has(param); |
| 160 } | 160 } |
| 161 | 161 |
| 162 void Codec::IntersectFeedbackParams(const Codec& other) { | 162 void Codec::IntersectFeedbackParams(const Codec& other) { |
| 163 feedback_params.Intersect(other.feedback_params); | 163 feedback_params.Intersect(other.feedback_params); |
| 164 } | 164 } |
| 165 | 165 |
| 166 AudioCodec::AudioCodec(int pt, | 166 AudioCodec::AudioCodec(int id, |
| 167 const std::string& nm, | 167 const std::string& name, |
| 168 int cr, | 168 int clockrate, |
| 169 int br, | 169 int bitrate, |
| 170 int cs, | 170 int channels, |
| 171 int pr) | 171 int preference) |
| 172 : Codec(pt, nm, cr, pr), bitrate(br), channels(cs) { | 172 : Codec(id, name, clockrate, preference), |
| 173 bitrate(bitrate), |
| 174 channels(channels) { |
| 173 } | 175 } |
| 174 | 176 |
| 175 AudioCodec::AudioCodec() : Codec(), bitrate(0), channels(0) { | 177 AudioCodec::AudioCodec() : Codec(), bitrate(0), channels(0) { |
| 176 } | 178 } |
| 177 | 179 |
| 178 AudioCodec::AudioCodec(const AudioCodec& c) = default; | 180 AudioCodec::AudioCodec(const AudioCodec& c) = default; |
| 179 | 181 |
| 180 AudioCodec& AudioCodec::operator=(const AudioCodec& c) { | 182 AudioCodec& AudioCodec::operator=(const AudioCodec& c) { |
| 181 Codec::operator=(c); | 183 Codec::operator=(c); |
| 182 bitrate = c.bitrate; | 184 bitrate = c.bitrate; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 bool HasTransportCc(const VideoCodec& codec) { | 339 bool HasTransportCc(const VideoCodec& codec) { |
| 338 return codec.HasFeedbackParam( | 340 return codec.HasFeedbackParam( |
| 339 FeedbackParam(kRtcpFbParamTransportCc, kParamValueEmpty)); | 341 FeedbackParam(kRtcpFbParamTransportCc, kParamValueEmpty)); |
| 340 } | 342 } |
| 341 | 343 |
| 342 bool CodecNamesEq(const std::string& name1, const std::string& name2) { | 344 bool CodecNamesEq(const std::string& name1, const std::string& name2) { |
| 343 return _stricmp(name1.c_str(), name2.c_str()) == 0; | 345 return _stricmp(name1.c_str(), name2.c_str()) == 0; |
| 344 } | 346 } |
| 345 | 347 |
| 346 } // namespace cricket | 348 } // namespace cricket |
| OLD | NEW |