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

Unified Diff: media/cast/sender/audio_sender.h

Issue 545593002: [Cast] Track audio queued in encoder; account for it in ShouldDropNextFrame(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + MERGE (post-hubbe's refactoring changes) 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/audio_encoder_unittest.cc ('k') | media/cast/sender/audio_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/audio_sender.h
diff --git a/media/cast/sender/audio_sender.h b/media/cast/sender/audio_sender.h
index 728da987ad47cedbfd4fa82c107d62e27c1b6424..b8c3fc4312ecc08fd37827ebf1f3de6706006844 100644
--- a/media/cast/sender/audio_sender.h
+++ b/media/cast/sender/audio_sender.h
@@ -51,17 +51,20 @@ class AudioSender : public FrameSender,
const base::TimeTicks& recorded_time);
protected:
+ virtual int GetNumberOfFramesInEncoder() const OVERRIDE;
virtual void OnAck(uint32 frame_id) OVERRIDE;
private:
// Called by the |audio_encoder_| with the next EncodedFrame to send.
- void SendEncodedAudioFrame(int requested_bitrate_before_encode,
- scoped_ptr<EncodedFrame> audio_frame);
+ void OnEncodedAudioFrame(int encoder_bitrate,
+ scoped_ptr<EncodedFrame> encoded_frame,
+ int samples_skipped);
// Encodes AudioBuses into EncodedFrames.
scoped_ptr<AudioEncoder> audio_encoder_;
- uint64 samples_sent_to_encoder_;
+ // The number of audio samples enqueued in |audio_encoder_|.
+ int samples_in_encoder_;
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<AudioSender> weak_factory_;
« no previous file with comments | « media/cast/sender/audio_encoder_unittest.cc ('k') | media/cast/sender/audio_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698