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

Unified Diff: media/cast/audio_sender/audio_encoder.cc

Issue 228603006: Cast: Log whether the video frame is a key frame in kVideoFrameEncoded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win x64 compile Created 6 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 | « no previous file | media/cast/logging/encoding_event_subscriber.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/audio_sender/audio_encoder.cc
diff --git a/media/cast/audio_sender/audio_encoder.cc b/media/cast/audio_sender/audio_encoder.cc
index ab39a6aa3ba9dba01eb39e3b1d2c77741d4aa102..6c336dcabd284983de6842c73b512ca9757efd2e 100644
--- a/media/cast/audio_sender/audio_encoder.cc
+++ b/media/cast/audio_sender/audio_encoder.cc
@@ -30,6 +30,18 @@ void LogAudioFrameEvent(
event_time, event_type, rtp_timestamp, frame_id);
}
+void LogAudioFrameEncodedEvent(
+ const scoped_refptr<media::cast::CastEnvironment>& cast_environment,
+ base::TimeTicks event_time,
+ media::cast::CastLoggingEvent event_type,
+ media::cast::RtpTimestamp rtp_timestamp,
+ uint32 frame_id,
+ size_t frame_size) {
+ cast_environment->Logging()->InsertEncodedFrameEvent(
+ event_time, event_type, rtp_timestamp, frame_id,
+ static_cast<int>(frame_size), /* key_frame - unused */ false);
+}
+
} // namespace
namespace media {
@@ -109,12 +121,13 @@ class AudioEncoder::ImplBase
cast_environment_->PostTask(
CastEnvironment::MAIN,
FROM_HERE,
- base::Bind(&LogAudioFrameEvent,
+ base::Bind(&LogAudioFrameEncodedEvent,
cast_environment_,
cast_environment_->Clock()->NowTicks(),
kAudioFrameEncoded,
audio_frame->rtp_timestamp,
- audio_frame->frame_id));
+ audio_frame->frame_id,
+ audio_frame->data.size()));
// Compute an offset to determine the recorded time for the first
// audio sample in the buffer.
const base::TimeDelta buffer_time_offset =
« no previous file with comments | « no previous file | media/cast/logging/encoding_event_subscriber.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698