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

Side by Side Diff: media/gpu/ipc/client/gpu_video_encode_accelerator_host.h

Issue 2395913003: Cleanup of passing GpuMemoryBuffer backed video frames (Closed)
Patch Set: Rebase Created 4 years, 2 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/base/video_frame.cc ('k') | media/gpu/ipc/client/gpu_video_encode_accelerator_host.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ 5 #ifndef MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_
6 #define MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ 6 #define MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/threading/non_thread_safe.h" 16 #include "base/threading/non_thread_safe.h"
17 #include "gpu/config/gpu_info.h" 17 #include "gpu/config/gpu_info.h"
18 #include "gpu/ipc/client/command_buffer_proxy_impl.h" 18 #include "gpu/ipc/client/command_buffer_proxy_impl.h"
19 #include "ipc/ipc_listener.h" 19 #include "ipc/ipc_listener.h"
20 #include "media/video/video_encode_accelerator.h" 20 #include "media/video/video_encode_accelerator.h"
21 21
22 namespace gfx { 22 namespace gfx {
23 struct GpuMemoryBufferHandle;
24 class Size; 23 class Size;
25 } // namespace gfx 24 } // namespace gfx
26 25
27 namespace gpu { 26 namespace gpu {
28 class GpuChannelHost; 27 class GpuChannelHost;
29 } // namespace gpu 28 } // namespace gpu
30 29
31 namespace media { 30 namespace media {
32 class VideoFrame; 31 class VideoFrame;
33 } // namespace media 32 } // namespace media
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void Destroy() override; 67 void Destroy() override;
69 68
70 // gpu::CommandBufferProxyImpl::DeletionObserver implementation. 69 // gpu::CommandBufferProxyImpl::DeletionObserver implementation.
71 void OnWillDeleteImpl() override; 70 void OnWillDeleteImpl() override;
72 71
73 private: 72 private:
74 // Only Destroy() should be deleting |this|. 73 // Only Destroy() should be deleting |this|.
75 ~GpuVideoEncodeAcceleratorHost() override; 74 ~GpuVideoEncodeAcceleratorHost() override;
76 75
77 // Encode specific video frame types. 76 // Encode specific video frame types.
78 void EncodeGpuMemoryBufferFrame(const scoped_refptr<VideoFrame>& frame,
79 bool force_keyframe);
80 void EncodeSharedMemoryFrame(const scoped_refptr<VideoFrame>& frame, 77 void EncodeSharedMemoryFrame(const scoped_refptr<VideoFrame>& frame,
81 bool force_keyframe); 78 bool force_keyframe);
82 79
83 // Notify |client_| of an error. Posts a task to avoid re-entrancy. 80 // Notify |client_| of an error. Posts a task to avoid re-entrancy.
84 void PostNotifyError(const tracked_objects::Location& location, 81 void PostNotifyError(const tracked_objects::Location& location,
85 Error error, 82 Error error,
86 const std::string& message); 83 const std::string& message);
87 84
88 void Send(IPC::Message* message); 85 void Send(IPC::Message* message);
89 86
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 119
123 // WeakPtr factory for posting tasks back to itself. 120 // WeakPtr factory for posting tasks back to itself.
124 base::WeakPtrFactory<GpuVideoEncodeAcceleratorHost> weak_this_factory_; 121 base::WeakPtrFactory<GpuVideoEncodeAcceleratorHost> weak_this_factory_;
125 122
126 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAcceleratorHost); 123 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAcceleratorHost);
127 }; 124 };
128 125
129 } // namespace media 126 } // namespace media
130 127
131 #endif // MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ 128 #endif // MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_
OLDNEW
« no previous file with comments | « media/base/video_frame.cc ('k') | media/gpu/ipc/client/gpu_video_encode_accelerator_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698