OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2185 } | 2185 } |
2186 | 2186 |
2187 std::string protocol = fields[2]; | 2187 std::string protocol = fields[2]; |
2188 | 2188 |
2189 // <fmt> | 2189 // <fmt> |
2190 std::vector<int> codec_preference; | 2190 std::vector<int> codec_preference; |
2191 if (IsRtp(protocol)) { | 2191 if (IsRtp(protocol)) { |
2192 for (size_t j = 3 ; j < fields.size(); ++j) { | 2192 for (size_t j = 3 ; j < fields.size(); ++j) { |
2193 // TODO(wu): Remove when below bug is fixed. | 2193 // TODO(wu): Remove when below bug is fixed. |
2194 // https://bugzilla.mozilla.org/show_bug.cgi?id=996329 | 2194 // https://bugzilla.mozilla.org/show_bug.cgi?id=996329 |
2195 if (fields[j] == "" && j == fields.size() - 1) { | 2195 if (fields[j].empty() && j == fields.size() - 1) { |
2196 continue; | 2196 continue; |
2197 } | 2197 } |
2198 | 2198 |
2199 int pl = 0; | 2199 int pl = 0; |
2200 if (!GetPayloadTypeFromString(line, fields[j], &pl, error)) { | 2200 if (!GetPayloadTypeFromString(line, fields[j], &pl, error)) { |
2201 return false; | 2201 return false; |
2202 } | 2202 } |
2203 codec_preference.push_back(pl); | 2203 codec_preference.push_back(pl); |
2204 } | 2204 } |
2205 } | 2205 } |
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3098 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( | 3098 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( |
3099 media_desc, payload_type, feedback_param); | 3099 media_desc, payload_type, feedback_param); |
3100 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { | 3100 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { |
3101 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( | 3101 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( |
3102 media_desc, payload_type, feedback_param); | 3102 media_desc, payload_type, feedback_param); |
3103 } | 3103 } |
3104 return true; | 3104 return true; |
3105 } | 3105 } |
3106 | 3106 |
3107 } // namespace webrtc | 3107 } // namespace webrtc |
OLD | NEW |