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

Side by Side Diff: media/gpu/v4l2_slice_video_decode_accelerator.cc

Issue 2043303004: More WaitableEvent stragglers migrated to enum-based constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@d_4_misc
Patch Set: Created 4 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
« no previous file with comments | « media/audio/cras/cras_unified_unittest.cc ('k') | ui/ozone/platform/drm/gpu/proxy_helpers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "media/gpu/v4l2_slice_video_decode_accelerator.h" 5 #include "media/gpu/v4l2_slice_video_decode_accelerator.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <linux/videodev2.h> 9 #include <linux/videodev2.h>
10 #include <poll.h> 10 #include <poll.h>
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 FROM_HERE, 1433 FROM_HERE,
1434 base::Bind(base::IgnoreResult(&V4L2Device::DestroyEGLImage), device_, 1434 base::Bind(base::IgnoreResult(&V4L2Device::DestroyEGLImage), device_,
1435 egl_display_, output_record.egl_image)); 1435 egl_display_, output_record.egl_image));
1436 } 1436 }
1437 1437
1438 picture_buffers_to_dismiss.push_back(output_record.picture_id); 1438 picture_buffers_to_dismiss.push_back(output_record.picture_id);
1439 } 1439 }
1440 1440
1441 if (dismiss) { 1441 if (dismiss) {
1442 DVLOGF(2) << "Scheduling picture dismissal"; 1442 DVLOGF(2) << "Scheduling picture dismissal";
1443 base::WaitableEvent done(false, false); 1443 base::WaitableEvent done(base::WaitableEvent::ResetPolicy::AUTOMATIC,
1444 base::WaitableEvent::InitialState::NOT_SIGNALED);
1444 child_task_runner_->PostTask( 1445 child_task_runner_->PostTask(
1445 FROM_HERE, base::Bind(&V4L2SliceVideoDecodeAccelerator::DismissPictures, 1446 FROM_HERE, base::Bind(&V4L2SliceVideoDecodeAccelerator::DismissPictures,
1446 weak_this_, picture_buffers_to_dismiss, &done)); 1447 weak_this_, picture_buffers_to_dismiss, &done));
1447 done.Wait(); 1448 done.Wait();
1448 } 1449 }
1449 1450
1450 // At this point client can't call ReusePictureBuffer on any of the pictures 1451 // At this point client can't call ReusePictureBuffer on any of the pictures
1451 // anymore, so it's safe to destroy. 1452 // anymore, so it's safe to destroy.
1452 return DestroyOutputBuffers(); 1453 return DestroyOutputBuffers();
1453 } 1454 }
(...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after
2801 V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles() { 2802 V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles() {
2802 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); 2803 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
2803 if (!device) 2804 if (!device)
2804 return SupportedProfiles(); 2805 return SupportedProfiles();
2805 2806
2806 return device->GetSupportedDecodeProfiles(arraysize(supported_input_fourccs_), 2807 return device->GetSupportedDecodeProfiles(arraysize(supported_input_fourccs_),
2807 supported_input_fourccs_); 2808 supported_input_fourccs_);
2808 } 2809 }
2809 2810
2810 } // namespace media 2811 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/cras/cras_unified_unittest.cc ('k') | ui/ozone/platform/drm/gpu/proxy_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698