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

Unified Diff: webrtc/video/send_statistics_proxy.cc

Issue 1903193002: Revert of Deprecate VCMPacketizationCallback::SendData and use EncodedImageCallback instead. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/send_statistics_proxy.cc
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc
index cf3332cfaf44da137edf8cebf543776dc1d06a0e..6951fda01bbbd5520a622cd8fca3150c5be0570c 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -17,7 +17,6 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
-#include "webrtc/modules/video_coding/include/video_codec_interface.h"
#include "webrtc/system_wrappers/include/metrics.h"
namespace webrtc {
@@ -427,17 +426,8 @@
void SendStatisticsProxy::OnSendEncodedImage(
const EncodedImage& encoded_image,
- const CodecSpecificInfo* codec_info) {
- size_t simulcast_idx = 0;
-
- if (codec_info) {
- if (codec_info->codecType == kVideoCodecVP8) {
- simulcast_idx = codec_info->codecSpecific.VP8.simulcastIdx;
- } else if (codec_info->codecType == kVideoCodecGeneric) {
- simulcast_idx = codec_info->codecSpecific.generic.simulcast_idx;
- }
- }
-
+ const RTPVideoHeader* rtp_video_header) {
+ size_t simulcast_idx = rtp_video_header ? rtp_video_header->simulcastIdx : 0;
if (simulcast_idx >= config_.rtp.ssrcs.size()) {
LOG(LS_ERROR) << "Encoded image outside simulcast range (" << simulcast_idx
<< " >= " << config_.rtp.ssrcs.size() << ").";
@@ -479,16 +469,17 @@
}
}
- if (encoded_image.qp_ != -1 && codec_info) {
- if (codec_info->codecType == kVideoCodecVP8) {
+ if (encoded_image.qp_ != -1 && rtp_video_header) {
+ if (rtp_video_header->codec == kRtpVideoVp8) {
int spatial_idx = (config_.rtp.ssrcs.size() == 1)
? -1
: static_cast<int>(simulcast_idx);
uma_container_->qp_counters_[spatial_idx].vp8.Add(encoded_image.qp_);
- } else if (codec_info->codecType == kVideoCodecVP9) {
- int spatial_idx = (codec_info->codecSpecific.VP9.num_spatial_layers == 1)
- ? -1
- : codec_info->codecSpecific.VP9.spatial_idx;
+ } else if (rtp_video_header->codec == kRtpVideoVp9) {
+ int spatial_idx =
+ (rtp_video_header->codecHeader.VP9.num_spatial_layers == 1)
+ ? -1
+ : rtp_video_header->codecHeader.VP9.spatial_idx;
uma_container_->qp_counters_[spatial_idx].vp9.Add(encoded_image.qp_);
}
}
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698