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

Side by Side Diff: media/cast/test/fake_video_encode_accelerator.cc

Issue 418193003: Using PROFILE_ANY for vp8 and vp9 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « media/cast/sender/external_video_encoder.cc ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/test/fake_video_encode_accelerator.h" 5 #include "media/cast/test/fake_video_encode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 20 matching lines...) Expand all
31 weak_this_factory_.InvalidateWeakPtrs(); 31 weak_this_factory_.InvalidateWeakPtrs();
32 } 32 }
33 33
34 bool FakeVideoEncodeAccelerator::Initialize( 34 bool FakeVideoEncodeAccelerator::Initialize(
35 media::VideoFrame::Format input_format, 35 media::VideoFrame::Format input_format,
36 const gfx::Size& input_visible_size, 36 const gfx::Size& input_visible_size,
37 VideoCodecProfile output_profile, 37 VideoCodecProfile output_profile,
38 uint32 initial_bitrate, 38 uint32 initial_bitrate,
39 Client* client) { 39 Client* client) {
40 client_ = client; 40 client_ = client;
41 if (output_profile != media::VP8PROFILE_MAIN && 41 if (output_profile != media::VP8PROFILE_ANY &&
42 output_profile != media::H264PROFILE_MAIN) { 42 output_profile != media::H264PROFILE_MAIN) {
43 return false; 43 return false;
44 } 44 }
45 task_runner_->PostTask( 45 task_runner_->PostTask(
46 FROM_HERE, 46 FROM_HERE,
47 base::Bind(&FakeVideoEncodeAccelerator::DoRequireBitstreamBuffers, 47 base::Bind(&FakeVideoEncodeAccelerator::DoRequireBitstreamBuffers,
48 weak_this_factory_.GetWeakPtr(), 48 weak_this_factory_.GetWeakPtr(),
49 kMinimumInputCount, 49 kMinimumInputCount,
50 input_visible_size, 50 input_visible_size,
51 kMinimumOutputBufferSize)); 51 kMinimumOutputBufferSize));
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void FakeVideoEncodeAccelerator::DoBitstreamBufferReady( 104 void FakeVideoEncodeAccelerator::DoBitstreamBufferReady(
105 int32 bitstream_buffer_id, 105 int32 bitstream_buffer_id,
106 size_t payload_size, 106 size_t payload_size,
107 bool key_frame) const { 107 bool key_frame) const {
108 client_->BitstreamBufferReady(bitstream_buffer_id, payload_size, key_frame); 108 client_->BitstreamBufferReady(bitstream_buffer_id, payload_size, key_frame);
109 } 109 }
110 110
111 } // namespace test 111 } // namespace test
112 } // namespace cast 112 } // namespace cast
113 } // namespace media 113 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/sender/external_video_encoder.cc ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698