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

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

Issue 14328033: EVDA: Modify V4L APIs for 3.8 kernel (Closed) Base URL: https://chromium.googlesource.com/chromium/src@git-svn
Patch Set: 3.4/3.8 compatibility Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/exynos_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/exynos_video_decode_accelerator.cc b/content/common/gpu/media/exynos_video_decode_accelerator.cc
index 3eb66999e930509b7018703cd895fbb020e13bc5..74e71abb34936b46c2a998ed1b4b8fe40544d8e4 100644
--- a/content/common/gpu/media/exynos_video_decode_accelerator.cc
+++ b/content/common/gpu/media/exynos_video_decode_accelerator.cc
@@ -1194,8 +1194,11 @@ void ExynosVideoDecodeAccelerator::DequeueMfc() {
while (mfc_input_buffer_queued_count_ > 0) {
DCHECK(mfc_input_streamon_);
memset(&dqbuf, 0, sizeof(dqbuf));
+ memset(planes, 0, sizeof(planes));
dqbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
dqbuf.memory = V4L2_MEMORY_MMAP;
+ dqbuf.m.planes = planes;
+ dqbuf.length = 1;
if (ioctl(mfc_fd_, VIDIOC_DQBUF, &dqbuf) != 0) {
if (errno == EAGAIN) {
// EAGAIN if we're just out of buffers to dequeue.
@@ -1327,11 +1330,15 @@ void ExynosVideoDecodeAccelerator::DequeueGsc() {
// Dequeue completed GSC input (VIDEO_OUTPUT) buffers, and recycle to the free
// list. Also recycle the corresponding MFC output buffers at this time.
struct v4l2_buffer dqbuf;
+ struct v4l2_plane planes[2];
while (gsc_input_buffer_queued_count_ > 0) {
DCHECK(gsc_input_streamon_);
memset(&dqbuf, 0, sizeof(dqbuf));
+ memset(planes, 0, sizeof(planes));
dqbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
dqbuf.memory = V4L2_MEMORY_DMABUF;
+ dqbuf.m.planes = planes;
+ dqbuf.length = 2;
if (ioctl(gsc_fd_, VIDIOC_DQBUF, &dqbuf) != 0) {
if (errno == EAGAIN) {
// EAGAIN if we're just out of buffers to dequeue.
@@ -1359,8 +1366,11 @@ void ExynosVideoDecodeAccelerator::DequeueGsc() {
while (gsc_output_buffer_queued_count_ > 0) {
DCHECK(gsc_output_streamon_);
memset(&dqbuf, 0, sizeof(dqbuf));
+ memset(planes, 0, sizeof(planes));
dqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
dqbuf.memory = V4L2_MEMORY_DMABUF;
+ dqbuf.m.planes = planes;
+ dqbuf.length = 1;
if (ioctl(gsc_fd_, VIDIOC_DQBUF, &dqbuf) != 0) {
if (errno == EAGAIN) {
// EAGAIN if we're just out of buffers to dequeue.
@@ -2060,7 +2070,12 @@ bool ExynosVideoDecodeAccelerator::CreateGscInputBuffers() {
memset(&control, 0, sizeof(control));
control.id = V4L2_CID_GLOBAL_ALPHA;
control.value = 255;
- IOCTL_OR_ERROR_RETURN_FALSE(gsc_fd_, VIDIOC_S_CTRL, &control);
+ if (HANDLE_EINTR(ioctl(gsc_fd_, VIDIOC_S_CTRL, &control)) != 0) {
sheu 2013/05/23 23:03:04 This is the 3.4/3.8 compatibility bit.
+ memset(&control, 0, sizeof(control));
+ control.id = V4L2_CID_ALPHA_COMPONENT;
+ control.value = 255;
+ IOCTL_OR_ERROR_RETURN_FALSE(gsc_fd_, VIDIOC_S_CTRL, &control);
+ }
struct v4l2_requestbuffers reqbufs;
memset(&reqbufs, 0, sizeof(reqbufs));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698