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

Side by Side Diff: content/common/gpu/media/vaapi_h264_decoder_unittest.cc

Issue 333253002: Add VaapiVideoEncodeAccelerator for HW-accelerated video encode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile fixes Created 6 years, 6 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 | Annotate | Revision Log
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 <string> 5 #include <string>
6 6
7 // This has to be included first. 7 // This has to be included first.
8 // See http://code.google.com/p/googletest/issues/detail?id=371 8 // See http://code.google.com/p/googletest/issues/detail?id=371
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 base::FilePath output_file) { 120 base::FilePath output_file) {
121 x_display_ = XOpenDisplay(NULL); 121 x_display_ = XOpenDisplay(NULL);
122 if (!x_display_) { 122 if (!x_display_) {
123 LOG(ERROR) << "Can't open X display"; 123 LOG(ERROR) << "Can't open X display";
124 return false; 124 return false;
125 } 125 }
126 126
127 media::VideoCodecProfile profile = media::H264PROFILE_BASELINE; 127 media::VideoCodecProfile profile = media::H264PROFILE_BASELINE;
128 base::Closure report_error_cb = 128 base::Closure report_error_cb =
129 base::Bind(&LogOnError, VaapiH264Decoder::VAAPI_ERROR); 129 base::Bind(&LogOnError, VaapiH264Decoder::VAAPI_ERROR);
130 wrapper_ = VaapiWrapper::Create(profile, x_display_, report_error_cb); 130 wrapper_ = VaapiWrapper::Create(
131 VaapiWrapper::kDecode, profile, x_display_, report_error_cb);
131 if (!wrapper_.get()) { 132 if (!wrapper_.get()) {
132 LOG(ERROR) << "Can't create vaapi wrapper"; 133 LOG(ERROR) << "Can't create vaapi wrapper";
133 return false; 134 return false;
134 } 135 }
135 136
136 decoder_.reset(new VaapiH264Decoder( 137 decoder_.reset(new VaapiH264Decoder(
137 wrapper_.get(), 138 wrapper_.get(),
138 base::Bind(&VaapiH264DecoderLoop::OutputPicture, base::Unretained(this)), 139 base::Bind(&VaapiH264DecoderLoop::OutputPicture, base::Unretained(this)),
139 base::Bind(&LogOnError))); 140 base::Bind(&LogOnError)));
140 141
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 content::g_md5sum = it->second; 377 content::g_md5sum = it->second;
377 continue; 378 continue;
378 } 379 }
379 if (it->first == "v" || it->first == "vmodule") 380 if (it->first == "v" || it->first == "vmodule")
380 continue; 381 continue;
381 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; 382 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second;
382 } 383 }
383 384
384 return RUN_ALL_TESTS(); 385 return RUN_ALL_TESTS();
385 } 386 }
OLDNEW
« no previous file with comments | « content/common/gpu/media/vaapi_h264_decoder.cc ('k') | content/common/gpu/media/vaapi_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698