| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  *  Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. |    2  *  Copyright (c) 2004 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 #ifndef WEBRTC_MEDIA_BASE_CODEC_H_ |   11 #ifndef WEBRTC_MEDIA_BASE_CODEC_H_ | 
|   12 #define WEBRTC_MEDIA_BASE_CODEC_H_ |   12 #define WEBRTC_MEDIA_BASE_CODEC_H_ | 
|   13  |   13  | 
|   14 #include <map> |   14 #include <map> | 
|   15 #include <set> |   15 #include <set> | 
|   16 #include <string> |   16 #include <string> | 
|   17 #include <vector> |   17 #include <vector> | 
|   18  |   18  | 
|   19 #include "webrtc/api/rtpparameters.h" |   19 #include "webrtc/api/rtpparameters.h" | 
 |   20 #include "webrtc/common_types.h" | 
|   20 #include "webrtc/media/base/mediaconstants.h" |   21 #include "webrtc/media/base/mediaconstants.h" | 
|   21  |   22  | 
|   22 namespace cricket { |   23 namespace cricket { | 
|   23  |   24  | 
|   24 typedef std::map<std::string, std::string> CodecParameterMap; |   25 typedef std::map<std::string, std::string> CodecParameterMap; | 
|   25  |   26  | 
|   26 extern const int kMaxPayloadId; |   27 extern const int kMaxPayloadId; | 
|   27  |   28  | 
|   28 class FeedbackParam { |   29 class FeedbackParam { | 
|   29  public: |   30  public: | 
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  134   bool operator==(const AudioCodec& c) const; |  135   bool operator==(const AudioCodec& c) const; | 
|  135  |  136  | 
|  136   bool operator!=(const AudioCodec& c) const { |  137   bool operator!=(const AudioCodec& c) const { | 
|  137     return !(*this == c); |  138     return !(*this == c); | 
|  138   } |  139   } | 
|  139 }; |  140 }; | 
|  140  |  141  | 
|  141 struct VideoCodec : public Codec { |  142 struct VideoCodec : public Codec { | 
|  142   // Creates a codec with the given parameters. |  143   // Creates a codec with the given parameters. | 
|  143   VideoCodec(int id, const std::string& name); |  144   VideoCodec(int id, const std::string& name); | 
 |  145   // Creates a codec with the given name and empty id. | 
 |  146   explicit VideoCodec(const std::string& name); | 
|  144   // Creates an empty codec. |  147   // Creates an empty codec. | 
|  145   VideoCodec(); |  148   VideoCodec(); | 
|  146   VideoCodec(const VideoCodec& c); |  149   VideoCodec(const VideoCodec& c); | 
|  147   virtual ~VideoCodec() = default; |  150   virtual ~VideoCodec() = default; | 
|  148  |  151  | 
|  149   std::string ToString() const; |  152   std::string ToString() const; | 
|  150  |  153  | 
|  151   VideoCodec& operator=(const VideoCodec& c); |  154   VideoCodec& operator=(const VideoCodec& c); | 
|  152  |  155  | 
|  153   bool operator==(const VideoCodec& c) const; |  156   bool operator==(const VideoCodec& c) const; | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  193   for (const auto& codec : codecs) { |  196   for (const auto& codec : codecs) { | 
|  194     if (codec.id == payload_type) { |  197     if (codec.id == payload_type) { | 
|  195       *codec_out = codec; |  198       *codec_out = codec; | 
|  196       return true; |  199       return true; | 
|  197     } |  200     } | 
|  198   } |  201   } | 
|  199   return false; |  202   return false; | 
|  200 } |  203 } | 
|  201  |  204  | 
|  202 bool CodecNamesEq(const std::string& name1, const std::string& name2); |  205 bool CodecNamesEq(const std::string& name1, const std::string& name2); | 
 |  206 bool CodecNamesEq(const char* name1, const char* name2); | 
 |  207 webrtc::VideoCodecType CodecTypeFromName(const std::string& name); | 
|  203 bool HasNack(const Codec& codec); |  208 bool HasNack(const Codec& codec); | 
|  204 bool HasRemb(const Codec& codec); |  209 bool HasRemb(const Codec& codec); | 
|  205 bool HasTransportCc(const Codec& codec); |  210 bool HasTransportCc(const Codec& codec); | 
 |  211 bool IsCodecSupported(const std::vector<VideoCodec>& supported_codecs, | 
 |  212                       const VideoCodec& codec); | 
|  206  |  213  | 
|  207 }  // namespace cricket |  214 }  // namespace cricket | 
|  208  |  215  | 
|  209 #endif  // WEBRTC_MEDIA_BASE_CODEC_H_ |  216 #endif  // WEBRTC_MEDIA_BASE_CODEC_H_ | 
| OLD | NEW |