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

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

Issue 825843002: Add JPEG decoder for VAAPI JPEG decode acceleration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mjpeg-vaapi-jpeg-parser
Patch Set: Created 5 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/debug/trace_event.h" 6 #include "base/debug/trace_event.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return false; 112 return false;
113 } 113 }
114 #elif defined(USE_OZONE) 114 #elif defined(USE_OZONE)
115 if (gfx::GetGLImplementation() != gfx::kGLImplementationEGLGLES2) { 115 if (gfx::GetGLImplementation() != gfx::kGLImplementationEGLGLES2) {
116 DVLOG(1) << "HW video decode acceleration not available without " 116 DVLOG(1) << "HW video decode acceleration not available without "
117 << "EGLGLES2."; 117 << "EGLGLES2.";
118 return false; 118 return false;
119 } 119 }
120 #endif // USE_X11 120 #endif // USE_X11
121 121
122 vaapi_wrapper_ = VaapiWrapper::Create( 122 vaapi_wrapper_ = VaapiWrapper::CreateForVideoCodec(
123 VaapiWrapper::kDecode, 123 VaapiWrapper::kDecode, profile,
124 profile,
125 base::Bind(&ReportToUMA, content::VaapiH264Decoder::VAAPI_ERROR)); 124 base::Bind(&ReportToUMA, content::VaapiH264Decoder::VAAPI_ERROR));
126 125
127 if (!vaapi_wrapper_.get()) { 126 if (!vaapi_wrapper_.get()) {
128 LOG(ERROR) << "Failed initializing VAAPI"; 127 LOG(ERROR) << "Failed initializing VAAPI";
129 return false; 128 return false;
130 } 129 }
131 130
132 decoder_.reset( 131 decoder_.reset(
133 new VaapiH264Decoder( 132 new VaapiH264Decoder(
134 vaapi_wrapper_.get(), 133 vaapi_wrapper_.get(),
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 DCHECK_EQ(message_loop_, base::MessageLoop::current()); 731 DCHECK_EQ(message_loop_, base::MessageLoop::current());
733 Cleanup(); 732 Cleanup();
734 delete this; 733 delete this;
735 } 734 }
736 735
737 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { 736 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() {
738 return false; 737 return false;
739 } 738 }
740 739
741 } // namespace content 740 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698