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

Unified Diff: content/common/gpu/media/gpu_jpeg_decode_accelerator.cc

Issue 1125263005: MJPEG acceleration for V4L2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
diff --git a/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc b/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
index 94cd88e0cadfca066f8e69341a21cfc7f62c684d..4e5948a8aa662fbf69b64b546125eed50b95b16f 100644
--- a/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
@@ -20,6 +20,9 @@
#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
wuchengli 2015/05/25 10:29:23 #if defined(OS_CHROMEOS) #if defined(ARCH_CPU_X8
henryhsu 2015/06/05 03:28:55 Done.
#include "content/common/gpu/media/vaapi_jpeg_decode_accelerator.h"
+#elif defined(USE_V4L2_CODEC)
+#include "content/common/gpu/media/v4l2_device.h"
+#include "content/common/gpu/media/v4l2_jpeg_decode_accelerator.h"
#endif
namespace base {
@@ -112,6 +115,14 @@ bool GpuJpegDecodeAccelerator::Initialize() {
#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
jpeg_decode_accelerator_.reset(
new VaapiJpegDecodeAccelerator(io_message_loop_));
+#elif defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
+ scoped_refptr<V4L2Device> device = V4L2Device::Create(
+ V4L2Device::kJpegDecoder);
+ if (device.get()) {
+ jpeg_decode_accelerator_.reset(new V4L2JpegDecodeAccelerator(
+ device,
+ io_message_loop_));
+ }
#else
DVLOG(1) << "HW JPEG decode acceleration not available.";
return false;

Powered by Google App Engine
This is Rietveld 408576698