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

Unified Diff: media/cast/test/cast_benchmarks.cc

Issue 519443002: Cast: merge InsertCoded{Audio,Video}Frame into InsertFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more missing test file fixed Created 6 years, 3 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 | « media/cast/sender/video_sender.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/cast_benchmarks.cc
diff --git a/media/cast/test/cast_benchmarks.cc b/media/cast/test/cast_benchmarks.cc
index 07b4de538217adcd55d11189731a48114086b1e5..deec12ca538a56be1a05b3e0bd9b9c8fa0ac0f01 100644
--- a/media/cast/test/cast_benchmarks.cc
+++ b/media/cast/test/cast_benchmarks.cc
@@ -112,6 +112,7 @@ class CastTransportSenderWrapper : public CastTransportSender {
const CastTransportRtpConfig& config,
const RtcpCastMessageCallback& cast_message_cb,
const RtcpRttCallback& rtt_cb) OVERRIDE {
+ audio_ssrc_ = config.ssrc;
transport_->InitializeAudio(config, cast_message_cb, rtt_cb);
}
@@ -119,19 +120,18 @@ class CastTransportSenderWrapper : public CastTransportSender {
const CastTransportRtpConfig& config,
const RtcpCastMessageCallback& cast_message_cb,
const RtcpRttCallback& rtt_cb) OVERRIDE {
+ video_ssrc_ = config.ssrc;
transport_->InitializeVideo(config, cast_message_cb, rtt_cb);
}
- virtual void InsertCodedAudioFrame(
- const EncodedFrame& audio_frame) OVERRIDE {
- *encoded_audio_bytes_ += audio_frame.data.size();
- transport_->InsertCodedAudioFrame(audio_frame);
- }
-
- virtual void InsertCodedVideoFrame(
- const EncodedFrame& video_frame) OVERRIDE {
- *encoded_video_bytes_ += video_frame.data.size();
- transport_->InsertCodedVideoFrame(video_frame);
+ virtual void InsertFrame(uint32 ssrc,
+ const EncodedFrame& frame) OVERRIDE {
+ if (ssrc == audio_ssrc_) {
+ *encoded_audio_bytes_ += frame.data.size();
+ } else if (ssrc == video_ssrc_) {
+ *encoded_video_bytes_ += frame.data.size();
+ }
+ transport_->InsertFrame(ssrc, frame);
}
virtual void SendSenderReport(
@@ -160,6 +160,7 @@ class CastTransportSenderWrapper : public CastTransportSender {
private:
scoped_ptr<CastTransportSender> transport_;
+ uint32 audio_ssrc_, video_ssrc_;
uint64* encoded_video_bytes_;
uint64* encoded_audio_bytes_;
};
« no previous file with comments | « media/cast/sender/video_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698