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

Unified Diff: media/cast/sender/video_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/frame_sender.cc ('k') | media/cast/sender/video_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/video_sender.h
diff --git a/media/cast/sender/video_sender.h b/media/cast/sender/video_sender.h
index 26609c16aa268ce24c2bfbc527262aa225687020..f1783166d840cab406e8602193eb2e1f4d9bbced 100644
--- a/media/cast/sender/video_sender.h
+++ b/media/cast/sender/video_sender.h
@@ -57,14 +57,22 @@ class VideoSender : public FrameSender,
const base::TimeTicks& capture_time);
protected:
+ virtual int GetNumberOfFramesInEncoder() const OVERRIDE;
virtual void OnAck(uint32 frame_id) OVERRIDE;
private:
+ // Called by the |video_encoder_| with the next EncodedFrame to send.
+ void OnEncodedVideoFrame(int encoder_bitrate,
+ scoped_ptr<EncodedFrame> encoded_frame);
+
// Encodes media::VideoFrame images into EncodedFrames. Per configuration,
// this will point to either the internal software-based encoder or a proxy to
// a hardware-based encoder.
scoped_ptr<VideoEncoder> video_encoder_;
+ // The number of frames queued for encoding, but not yet sent.
+ int frames_in_encoder_;
+
// Remember what we set the bitrate to before, no need to set it again if
// we get the same value.
uint32 last_bitrate_;
« no previous file with comments | « media/cast/sender/frame_sender.cc ('k') | media/cast/sender/video_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698