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

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

Issue 439863003: Cast: Use fixed bitrate and set it once for hardware encoder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 years, 4 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/test/fake_video_encode_accelerator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/fake_video_encode_accelerator.cc
diff --git a/media/cast/test/fake_video_encode_accelerator.cc b/media/cast/test/fake_video_encode_accelerator.cc
index d1bfab339d04af5249dcf02d7a504d2456c48c1b..a391a9a81c6082cf42a60b420eaa3fc7339621db 100644
--- a/media/cast/test/fake_video_encode_accelerator.cc
+++ b/media/cast/test/fake_video_encode_accelerator.cc
@@ -17,11 +17,15 @@ static const unsigned int kMinimumInputCount = 1;
static const size_t kMinimumOutputBufferSize = 123456;
FakeVideoEncodeAccelerator::FakeVideoEncodeAccelerator(
- const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
+ std::vector<uint32>* stored_bitrates)
: task_runner_(task_runner),
+ stored_bitrates_(stored_bitrates),
client_(NULL),
first_(true),
- weak_this_factory_(this) {}
+ weak_this_factory_(this) {
+ DCHECK(stored_bitrates_);
+}
FakeVideoEncodeAccelerator::~FakeVideoEncodeAccelerator() {
weak_this_factory_.InvalidateWeakPtrs();
@@ -80,7 +84,7 @@ void FakeVideoEncodeAccelerator::UseOutputBitstreamBuffer(
void FakeVideoEncodeAccelerator::RequestEncodingParametersChange(
uint32 bitrate,
uint32 framerate) {
- // No-op.
+ stored_bitrates_->push_back(bitrate);
}
void FakeVideoEncodeAccelerator::Destroy() { delete this; }
« no previous file with comments | « media/cast/test/fake_video_encode_accelerator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698