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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.h

Issue 1645873002: Use ParamTraits for media::BitstreamBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/memory/shared_memory.h" 16 #include "base/memory/shared_memory.h"
17 #include "base/synchronization/waitable_event.h" 17 #include "base/synchronization/waitable_event.h"
18 #include "content/common/gpu/gpu_command_buffer_stub.h" 18 #include "content/common/gpu/gpu_command_buffer_stub.h"
19 #include "gpu/command_buffer/service/texture_manager.h" 19 #include "gpu/command_buffer/service/texture_manager.h"
20 #include "gpu/config/gpu_info.h" 20 #include "gpu/config/gpu_info.h"
21 #include "ipc/ipc_listener.h" 21 #include "ipc/ipc_listener.h"
22 #include "ipc/ipc_sender.h" 22 #include "ipc/ipc_sender.h"
23 #include "media/video/video_decode_accelerator.h" 23 #include "media/video/video_decode_accelerator.h"
24 #include "ui/gfx/geometry/size.h" 24 #include "ui/gfx/geometry/size.h"
25 25
26 struct AcceleratedVideoDecoderMsg_Decode_Params;
27
28 namespace content { 26 namespace content {
29 27
30 class GpuVideoDecodeAccelerator 28 class GpuVideoDecodeAccelerator
31 : public IPC::Listener, 29 : public IPC::Listener,
32 public IPC::Sender, 30 public IPC::Sender,
33 public media::VideoDecodeAccelerator::Client, 31 public media::VideoDecodeAccelerator::Client,
34 public GpuCommandBufferStub::DestructionObserver { 32 public GpuCommandBufferStub::DestructionObserver {
35 public: 33 public:
36 // Each of the arguments to the constructor must outlive this object. 34 // Each of the arguments to the constructor must outlive this object.
37 // |stub->decoder()| will be made current around any operation that touches 35 // |stub->decoder()| will be made current around any operation that touches
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 scoped_ptr<media::VideoDecodeAccelerator> CreateVaapiVDA(); 84 scoped_ptr<media::VideoDecodeAccelerator> CreateVaapiVDA();
87 scoped_ptr<media::VideoDecodeAccelerator> CreateVTVDA(); 85 scoped_ptr<media::VideoDecodeAccelerator> CreateVTVDA();
88 scoped_ptr<media::VideoDecodeAccelerator> CreateOzoneVDA(); 86 scoped_ptr<media::VideoDecodeAccelerator> CreateOzoneVDA();
89 scoped_ptr<media::VideoDecodeAccelerator> CreateAndroidVDA(); 87 scoped_ptr<media::VideoDecodeAccelerator> CreateAndroidVDA();
90 88
91 // We only allow self-delete, from OnWillDestroyStub(), after cleanup there. 89 // We only allow self-delete, from OnWillDestroyStub(), after cleanup there.
92 ~GpuVideoDecodeAccelerator() override; 90 ~GpuVideoDecodeAccelerator() override;
93 91
94 // Handlers for IPC messages. 92 // Handlers for IPC messages.
95 void OnSetCdm(int cdm_id); 93 void OnSetCdm(int cdm_id);
96 void OnDecode(const AcceleratedVideoDecoderMsg_Decode_Params& params); 94 void OnDecode(const media::BitstreamBuffer& bitstream_buffer);
97 void OnAssignPictureBuffers(const std::vector<int32_t>& buffer_ids, 95 void OnAssignPictureBuffers(const std::vector<int32_t>& buffer_ids,
98 const std::vector<uint32_t>& texture_ids); 96 const std::vector<uint32_t>& texture_ids);
99 void OnReusePictureBuffer(int32_t picture_buffer_id); 97 void OnReusePictureBuffer(int32_t picture_buffer_id);
100 void OnFlush(); 98 void OnFlush();
101 void OnReset(); 99 void OnReset();
102 void OnDestroy(); 100 void OnDestroy();
103 101
104 // Called on IO thread when |filter_| has been removed. 102 // Called on IO thread when |filter_| has been removed.
105 void OnFilterRemoved(); 103 void OnFilterRemoved();
106 104
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 157
160 // A map from picture buffer ID to TextureRef that have not been cleared. 158 // A map from picture buffer ID to TextureRef that have not been cleared.
161 std::map<int32_t, scoped_refptr<gpu::gles2::TextureRef>> uncleared_textures_; 159 std::map<int32_t, scoped_refptr<gpu::gles2::TextureRef>> uncleared_textures_;
162 160
163 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); 161 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator);
164 }; 162 };
165 163
166 } // namespace content 164 } // namespace content
167 165
168 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ 166 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « content/common/gpu/media/gpu_jpeg_decode_accelerator.cc ('k') | content/common/gpu/media/gpu_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698