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

Unified Diff: webrtc/video/send_statistics_proxy.cc

Issue 2998293002: Make CodecType conversion functions non-optional. (Closed)
Patch Set: Keep old functions for backwards-compat Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/video/send_statistics_proxy.cc
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc
index a6f421ae042a882dfd9bbd90175bf81bfbbdcfe6..3b973435226f756eec241ca23b8121ad0c9b95fd 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -50,12 +50,8 @@ const char* GetUmaPrefix(VideoEncoderConfig::ContentType content_type) {
HistogramCodecType PayloadNameToHistogramCodecType(
const std::string& payload_name) {
- rtc::Optional<VideoCodecType> codecType =
- PayloadNameToCodecType(payload_name);
- if (!codecType) {
- return kVideoUnknown;
- }
- switch (*codecType) {
+ VideoCodecType codecType = PayloadStringToCodecType(payload_name);
+ switch (codecType) {
case kVideoCodecVP8:
return kVideoVp8;
case kVideoCodecVP9:
« no previous file with comments | « webrtc/sdk/objc/Framework/Classes/VideoToolbox/objc_video_decoder_factory.mm ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698