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

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

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/common/gpu/media/v4l2_video_decode_accelerator.h"
6
5 #include <dlfcn.h> 7 #include <dlfcn.h>
6 #include <errno.h> 8 #include <errno.h>
7 #include <fcntl.h> 9 #include <fcntl.h>
8 #include <linux/videodev2.h> 10 #include <linux/videodev2.h>
9 #include <poll.h> 11 #include <poll.h>
10 #include <string.h> 12 #include <string.h>
11 #include <sys/eventfd.h> 13 #include <sys/eventfd.h>
12 #include <sys/ioctl.h> 14 #include <sys/ioctl.h>
13 #include <sys/mman.h> 15 #include <sys/mman.h>
14 16
17 #include <memory>
18
15 #include "base/bind.h" 19 #include "base/bind.h"
16 #include "base/command_line.h" 20 #include "base/command_line.h"
17 #include "base/macros.h" 21 #include "base/macros.h"
18 #include "base/message_loop/message_loop.h" 22 #include "base/message_loop/message_loop.h"
19 #include "base/numerics/safe_conversions.h" 23 #include "base/numerics/safe_conversions.h"
20 #include "base/thread_task_runner_handle.h" 24 #include "base/thread_task_runner_handle.h"
21 #include "base/trace_event/trace_event.h" 25 #include "base/trace_event/trace_event.h"
22 #include "build/build_config.h" 26 #include "build/build_config.h"
23 #include "content/common/gpu/media/shared_memory_region.h" 27 #include "content/common/gpu/media/shared_memory_region.h"
24 #include "content/common/gpu/media/v4l2_video_decode_accelerator.h"
25 #include "media/base/media_switches.h" 28 #include "media/base/media_switches.h"
26 #include "media/filters/h264_parser.h" 29 #include "media/filters/h264_parser.h"
27 #include "ui/gfx/geometry/rect.h" 30 #include "ui/gfx/geometry/rect.h"
28 #include "ui/gl/gl_context.h" 31 #include "ui/gl/gl_context.h"
29 #include "ui/gl/scoped_binders.h" 32 #include "ui/gl/scoped_binders.h"
30 33
31 #define NOTIFY_ERROR(x) \ 34 #define NOTIFY_ERROR(x) \
32 do { \ 35 do { \
33 LOG(ERROR) << "Setting error state:" << x; \ 36 LOG(ERROR) << "Setting error state:" << x; \
34 SetErrorState(x); \ 37 SetErrorState(x); \
(...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after
2043 2046
2044 void V4L2VideoDecodeAccelerator::PictureCleared() { 2047 void V4L2VideoDecodeAccelerator::PictureCleared() {
2045 DVLOG(3) << "PictureCleared(). clearing count=" << picture_clearing_count_; 2048 DVLOG(3) << "PictureCleared(). clearing count=" << picture_clearing_count_;
2046 DCHECK_EQ(decoder_thread_.message_loop(), base::MessageLoop::current()); 2049 DCHECK_EQ(decoder_thread_.message_loop(), base::MessageLoop::current());
2047 DCHECK_GT(picture_clearing_count_, 0); 2050 DCHECK_GT(picture_clearing_count_, 0);
2048 picture_clearing_count_--; 2051 picture_clearing_count_--;
2049 SendPictureReady(); 2052 SendPictureReady();
2050 } 2053 }
2051 2054
2052 } // namespace content 2055 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698