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

Side by Side Diff: content/renderer/media_recorder/video_track_recorder_unittest.cc

Issue 2801803002: Android: enable H264&VP8 HW accelerator for MediaRecorder (Closed)
Patch Set: correct alpha setting in webm_muxer instead of demuxer Created 3 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/renderer/media_recorder/video_track_recorder.h" 5 #include "content/renderer/media_recorder/video_track_recorder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 29 matching lines...) Expand all
40 namespace content { 40 namespace content {
41 41
42 ACTION_P(RunClosure, closure) { 42 ACTION_P(RunClosure, closure) {
43 closure.Run(); 43 closure.Run();
44 } 44 }
45 45
46 const VideoTrackRecorder::CodecId kTrackRecorderTestCodec[] = { 46 const VideoTrackRecorder::CodecId kTrackRecorderTestCodec[] = {
47 VideoTrackRecorder::CodecId::VP8, 47 VideoTrackRecorder::CodecId::VP8,
48 VideoTrackRecorder::CodecId::VP9 48 VideoTrackRecorder::CodecId::VP9
49 #if BUILDFLAG(RTC_USE_H264) 49 #if BUILDFLAG(RTC_USE_H264)
50 // This unittest can't enumerate HW codecs due to no render thread created.
51 // So H264 can't be included on Android because OpenH264 is not supported.
emircan 2017/04/17 17:24:06 We create a ChildProcess for test on l.134 which s
braveyao 2017/04/17 18:09:27 It fails to enumerate VEA at https://cs.chromium.o
emircan 2017/04/17 18:39:59 I see. This test only exercises the SW encode path
50 , VideoTrackRecorder::CodecId::H264 52 , VideoTrackRecorder::CodecId::H264
51 #endif 53 #endif
52 }; 54 };
53 const gfx::Size kTrackRecorderTestSize[] = { 55 const gfx::Size kTrackRecorderTestSize[] = {
56 #if !defined(OS_ANDROID)
mcasas 2017/04/17 20:10:39 Use positive ifdefs.
braveyao 2017/04/18 16:15:38 Done.
54 gfx::Size(kVEAEncoderMinResolutionWidth / 2, 57 gfx::Size(kVEAEncoderMinResolutionWidth / 2,
55 kVEAEncoderMinResolutionHeight / 2), 58 kVEAEncoderMinResolutionHeight / 2),
mcasas 2017/04/17 20:10:39 Why do you do this? I think it's so that you can f
braveyao 2017/04/18 16:15:38 Done. You're right. Forgot to remove it as H264 is
59 #endif
56 gfx::Size(kVEAEncoderMinResolutionWidth, kVEAEncoderMinResolutionHeight)}; 60 gfx::Size(kVEAEncoderMinResolutionWidth, kVEAEncoderMinResolutionHeight)};
57 static const int kTrackRecorderTestSizeDiff = 20; 61 static const int kTrackRecorderTestSizeDiff = 20;
58 62
59 class VideoTrackRecorderTest 63 class VideoTrackRecorderTest
60 : public TestWithParam< 64 : public TestWithParam<
61 testing::tuple<VideoTrackRecorder::CodecId, gfx::Size, bool>> { 65 testing::tuple<VideoTrackRecorder::CodecId, gfx::Size, bool>> {
62 public: 66 public:
63 VideoTrackRecorderTest() 67 VideoTrackRecorderTest()
64 : mock_source_(new MockMediaStreamVideoSource(false)) { 68 : mock_source_(new MockMediaStreamVideoSource(false)) {
65 const blink::WebString webkit_track_id( 69 const blink::WebString webkit_track_id(
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 Mock::VerifyAndClearExpectations(this); 328 Mock::VerifyAndClearExpectations(this);
325 } 329 }
326 330
327 INSTANTIATE_TEST_CASE_P(, 331 INSTANTIATE_TEST_CASE_P(,
328 VideoTrackRecorderTest, 332 VideoTrackRecorderTest,
329 ::testing::Combine(ValuesIn(kTrackRecorderTestCodec), 333 ::testing::Combine(ValuesIn(kTrackRecorderTestCodec),
330 ValuesIn(kTrackRecorderTestSize), 334 ValuesIn(kTrackRecorderTestSize),
331 ::testing::Bool())); 335 ::testing::Bool()));
332 336
333 } // namespace content 337 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698