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

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

Issue 340903003: [Cast] Halt AudioSender transmission when too many frames are in-flight. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/audio_sender/audio_sender.h » ('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 f81ad26377abd11eab0c89350f167a29ad096ac0..8860c7dd2d87b31f0a939f19fd65911a88a1eca2 100644
--- a/media/cast/audio_sender/audio_encoder.cc
+++ b/media/cast/audio_sender/audio_encoder.cc
@@ -9,14 +9,12 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
-#include "base/logging.h"
#include "base/stl_util.h"
#include "base/sys_byteorder.h"
#include "base/time/time.h"
#include "media/base/audio_bus.h"
#include "media/cast/cast_defines.h"
#include "media/cast/cast_environment.h"
-#include "media/cast/logging/logging_defines.h"
#include "third_party/opus/src/include/opus.h"
namespace media {
@@ -33,28 +31,6 @@ const int kFrameDurationMillis = 1000 / kFramesPerSecond; // No remainder!
// coming in too slow with respect to the capture timestamps.
const int kUnderrunThresholdMillis = 3 * kFrameDurationMillis;
-void LogAudioFrameEncodedEvent(
- const scoped_refptr<media::cast::CastEnvironment>& cast_environment,
- base::TimeTicks event_time,
- media::cast::RtpTimestamp rtp_timestamp,
- uint32 frame_id,
- size_t frame_size) {
- if (!cast_environment->CurrentlyOn(CastEnvironment::MAIN)) {
- cast_environment->PostTask(
- CastEnvironment::MAIN,
- FROM_HERE,
- base::Bind(&LogAudioFrameEncodedEvent,
- cast_environment, event_time,
- rtp_timestamp, frame_id, frame_size));
- return;
- }
- cast_environment->Logging()->InsertEncodedFrameEvent(
- event_time, media::cast::FRAME_ENCODED, media::cast::AUDIO_EVENT,
- rtp_timestamp, frame_id,
- static_cast<int>(frame_size), /* key_frame - unused */ false,
- /*target_bitrate - unused*/ 0);
-}
-
} // namespace
@@ -150,11 +126,6 @@ class AudioEncoder::ImplBase
audio_frame->reference_time = frame_capture_time_;
if (EncodeFromFilledBuffer(&audio_frame->data)) {
- LogAudioFrameEncodedEvent(cast_environment_,
- cast_environment_->Clock()->NowTicks(),
- audio_frame->rtp_timestamp,
- audio_frame->frame_id,
- audio_frame->data.size());
cast_environment_->PostTask(
CastEnvironment::MAIN,
FROM_HERE,
« no previous file with comments | « no previous file | media/cast/audio_sender/audio_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698