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

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: Created 5 years, 2 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 unified diff | Download patch
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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 411
412 // Codec 'implementationName' constants tracked here:
413 // https://code.google.com/p/webrtc/issues/detail?id=4897
414 case kStatsValueNameDecoderImplementationName:
415 return "decoderImplementationName";
416 case kStatsValueNameEncoderImplementationName:
417 return "encoderImplementationName";
418
412 // 'goog' prefixed constants. 419 // 'goog' prefixed constants.
413 case kStatsValueNameAccelerateRate: 420 case kStatsValueNameAccelerateRate:
414 return "googAccelerateRate"; 421 return "googAccelerateRate";
415 case kStatsValueNameActiveConnection: 422 case kStatsValueNameActiveConnection:
416 return "googActiveConnection"; 423 return "googActiveConnection";
417 case kStatsValueNameActualEncBitrate: 424 case kStatsValueNameActualEncBitrate:
418 return "googActualEncBitrate"; 425 return "googActualEncBitrate";
419 case kStatsValueNameAvailableReceiveBandwidth: 426 case kStatsValueNameAvailableReceiveBandwidth:
420 return "googAvailableReceiveBandwidth"; 427 return "googAvailableReceiveBandwidth";
421 case kStatsValueNameAvailableSendBandwidth: 428 case kStatsValueNameAvailableSendBandwidth:
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 case kStatsValueNameTransportType: 592 case kStatsValueNameTransportType:
586 return "googTransportType"; 593 return "googTransportType";
587 case kStatsValueNameTrackId: 594 case kStatsValueNameTrackId:
588 return "googTrackId"; 595 return "googTrackId";
589 case kStatsValueNameTypingNoiseState: 596 case kStatsValueNameTypingNoiseState:
590 return "googTypingNoiseState"; 597 return "googTypingNoiseState";
591 case kStatsValueNameViewLimitedResolution: 598 case kStatsValueNameViewLimitedResolution:
592 return "googViewLimitedResolution"; 599 return "googViewLimitedResolution";
593 case kStatsValueNameWritable: 600 case kStatsValueNameWritable:
594 return "googWritable"; 601 return "googWritable";
595 default:
596 RTC_DCHECK(false);
597 break;
598 } 602 }
599 603
600 return nullptr; 604 return nullptr;
601 } 605 }
602 606
603 std::string StatsReport::Value::ToString() const { 607 std::string StatsReport::Value::ToString() const {
604 switch (type_) { 608 switch (type_) {
605 case kInt: 609 case kInt:
606 return rtc::ToString(value_.int_); 610 return rtc::ToString(value_.int_);
607 case kInt64: 611 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 777 // Looks for a report with the given |id|. If one is not found, NULL
774 // will be returned. 778 // will be returned.
775 StatsReport* StatsCollection::Find(const StatsReport::Id& id) { 779 StatsReport* StatsCollection::Find(const StatsReport::Id& id) {
776 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 780 RTC_DCHECK(thread_checker_.CalledOnValidThread());
777 Container::iterator it = std::find_if(list_.begin(), list_.end(), 781 Container::iterator it = std::find_if(list_.begin(), list_.end(),
778 [&id](const StatsReport* r)->bool { return r->id()->Equals(id); }); 782 [&id](const StatsReport* r)->bool { return r->id()->Equals(id); });
779 return it == list_.end() ? nullptr : *it; 783 return it == list_.end() ? nullptr : *it;
780 } 784 }
781 785
782 } // namespace webrtc 786 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698