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

Side by Side Diff: talk/app/webrtc/statstypes.cc

Issue 1406903002: Expose codec implementation names in stats. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix rebase Created 5 years 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 unified diff | Download patch
« no previous file with comments | « talk/app/webrtc/statstypes.h ('k') | talk/media/base/mediachannel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 case kStatsValueNameTransportId: 401 case kStatsValueNameTransportId:
402 return "transportId"; 402 return "transportId";
403 case kStatsValueNameSelectedCandidatePairId: 403 case kStatsValueNameSelectedCandidatePairId:
404 return "selectedCandidatePairId"; 404 return "selectedCandidatePairId";
405 case kStatsValueNameSsrc: 405 case kStatsValueNameSsrc:
406 return "ssrc"; 406 return "ssrc";
407 case kStatsValueNameState: 407 case kStatsValueNameState:
408 return "state"; 408 return "state";
409 case kStatsValueNameDataChannelId: 409 case kStatsValueNameDataChannelId:
410 return "datachannelid"; 410 return "datachannelid";
411 case kStatsValueNameCodecImplementationName:
412 return "codecImplementationName";
411 413
412 // 'goog' prefixed constants. 414 // 'goog' prefixed constants.
413 case kStatsValueNameAccelerateRate: 415 case kStatsValueNameAccelerateRate:
414 return "googAccelerateRate"; 416 return "googAccelerateRate";
415 case kStatsValueNameActiveConnection: 417 case kStatsValueNameActiveConnection:
416 return "googActiveConnection"; 418 return "googActiveConnection";
417 case kStatsValueNameActualEncBitrate: 419 case kStatsValueNameActualEncBitrate:
418 return "googActualEncBitrate"; 420 return "googActualEncBitrate";
419 case kStatsValueNameAvailableReceiveBandwidth: 421 case kStatsValueNameAvailableReceiveBandwidth:
420 return "googAvailableReceiveBandwidth"; 422 return "googAvailableReceiveBandwidth";
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 case kStatsValueNameTransportType: 587 case kStatsValueNameTransportType:
586 return "googTransportType"; 588 return "googTransportType";
587 case kStatsValueNameTrackId: 589 case kStatsValueNameTrackId:
588 return "googTrackId"; 590 return "googTrackId";
589 case kStatsValueNameTypingNoiseState: 591 case kStatsValueNameTypingNoiseState:
590 return "googTypingNoiseState"; 592 return "googTypingNoiseState";
591 case kStatsValueNameViewLimitedResolution: 593 case kStatsValueNameViewLimitedResolution:
592 return "googViewLimitedResolution"; 594 return "googViewLimitedResolution";
593 case kStatsValueNameWritable: 595 case kStatsValueNameWritable:
594 return "googWritable"; 596 return "googWritable";
595 default:
596 RTC_DCHECK(false);
597 break;
598 } 597 }
599 598
600 return nullptr; 599 return nullptr;
601 } 600 }
602 601
603 std::string StatsReport::Value::ToString() const { 602 std::string StatsReport::Value::ToString() const {
604 switch (type_) { 603 switch (type_) {
605 case kInt: 604 case kInt:
606 return rtc::ToString(value_.int_); 605 return rtc::ToString(value_.int_);
607 case kInt64: 606 case kInt64:
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 // Looks for a report with the given |id|. If one is not found, NULL 772 // Looks for a report with the given |id|. If one is not found, NULL
774 // will be returned. 773 // will be returned.
775 StatsReport* StatsCollection::Find(const StatsReport::Id& id) { 774 StatsReport* StatsCollection::Find(const StatsReport::Id& id) {
776 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 775 RTC_DCHECK(thread_checker_.CalledOnValidThread());
777 Container::iterator it = std::find_if(list_.begin(), list_.end(), 776 Container::iterator it = std::find_if(list_.begin(), list_.end(),
778 [&id](const StatsReport* r)->bool { return r->id()->Equals(id); }); 777 [&id](const StatsReport* r)->bool { return r->id()->Equals(id); });
779 return it == list_.end() ? nullptr : *it; 778 return it == list_.end() ? nullptr : *it;
780 } 779 }
781 780
782 } // namespace webrtc 781 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/statstypes.h ('k') | talk/media/base/mediachannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698