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

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

Issue 809883004: Revert hardware decoder changes causing ChromeOS HW test crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/tegra_v4l2_video_device.cc
diff --git a/content/common/gpu/media/tegra_v4l2_video_device.cc b/content/common/gpu/media/tegra_v4l2_video_device.cc
index 8e7713e6db8c3ff650d59447d05efab128d1111e..991f54a76d3fdfa0dc541795df2a8a5f957d2867 100644
--- a/content/common/gpu/media/tegra_v4l2_video_device.cc
+++ b/content/common/gpu/media/tegra_v4l2_video_device.cc
@@ -170,23 +170,13 @@ bool TegraV4L2Device::Initialize() {
return true;
}
-bool TegraV4L2Device::CanCreateEGLImageFrom(uint32_t v4l2_pixfmt) {
- return v4l2_pixfmt == V4L2_PIX_FMT_NV12M;
-}
-
EGLImageKHR TegraV4L2Device::CreateEGLImage(EGLDisplay egl_display,
EGLContext egl_context,
GLuint texture_id,
gfx::Size /* frame_buffer_size */,
unsigned int buffer_index,
- uint32_t v4l2_pixfmt,
- size_t /* num_v4l2_planes */) {
+ size_t /* planes_count */) {
DVLOG(3) << "CreateEGLImage()";
- if (!CanCreateEGLImageFrom(v4l2_pixfmt)) {
- LOG(ERROR) << "Unsupported V4L2 pixel format";
- return EGL_NO_IMAGE_KHR;
- }
-
EGLint attr = EGL_NONE;
EGLImageKHR egl_image =
eglCreateImageKHR(egl_display,
@@ -220,4 +210,11 @@ uint32 TegraV4L2Device::PreferredInputFormat() {
return V4L2_PIX_FMT_YUV420M;
}
+uint32 TegraV4L2Device::PreferredOutputFormat() {
+ // TODO(posciak): We should support "dontcare" returns here once we
+ // implement proper handling (fallback, negotiation) for this in users.
+ CHECK_EQ(type_, kDecoder);
+ return V4L2_PIX_FMT_NV12M;
+}
+
} // namespace content
« no previous file with comments | « content/common/gpu/media/tegra_v4l2_video_device.h ('k') | content/common/gpu/media/v4l2_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698