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

Side by Side Diff: content/renderer/pepper/video_decoder_shim.h

Issue 1111653004: Replace SW YUV conversion with higher quality Shader+FBO in pepper video path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix coding style issues. Created 5 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 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 #ifndef CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_
6 #define CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ 6 #define CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 21 matching lines...) Expand all
32 class GLES2Interface; 32 class GLES2Interface;
33 } 33 }
34 } 34 }
35 35
36 namespace media { 36 namespace media {
37 class DecoderBuffer; 37 class DecoderBuffer;
38 } 38 }
39 39
40 namespace content { 40 namespace content {
41 41
42 class YUVConverter;
42 class PepperVideoDecoderHost; 43 class PepperVideoDecoderHost;
43 44
44 // This class is a shim to wrap a media::VideoDecoder so that it can be used 45 // This class is a shim to wrap a media::VideoDecoder so that it can be used
45 // by PepperVideoDecoderHost in place of a media::VideoDecodeAccelerator. 46 // by PepperVideoDecoderHost in place of a media::VideoDecodeAccelerator.
46 // This class should be constructed, used, and destructed on the main (render) 47 // This class should be constructed, used, and destructed on the main (render)
47 // thread. 48 // thread.
48 class VideoDecoderShim : public media::VideoDecodeAccelerator { 49 class VideoDecoderShim : public media::VideoDecodeAccelerator {
49 public: 50 public:
50 explicit VideoDecoderShim(PepperVideoDecoderHost* host); 51 explicit VideoDecoderShim(PepperVideoDecoderHost* host);
51 ~VideoDecoderShim() override; 52 ~VideoDecoderShim() override;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 TextureIdSet available_textures_; 103 TextureIdSet available_textures_;
103 // Track textures that are no longer needed (these are plugin ids.) 104 // Track textures that are no longer needed (these are plugin ids.)
104 TextureIdSet textures_to_dismiss_; 105 TextureIdSet textures_to_dismiss_;
105 // Mailboxes for pending texture requests, to write to plugin's textures. 106 // Mailboxes for pending texture requests, to write to plugin's textures.
106 std::vector<gpu::Mailbox> pending_texture_mailboxes_; 107 std::vector<gpu::Mailbox> pending_texture_mailboxes_;
107 108
108 // Queue of completed decode ids, for notifying the host. 109 // Queue of completed decode ids, for notifying the host.
109 typedef std::queue<uint32_t> CompletedDecodeQueue; 110 typedef std::queue<uint32_t> CompletedDecodeQueue;
110 CompletedDecodeQueue completed_decodes_; 111 CompletedDecodeQueue completed_decodes_;
111 112
112 // Queue of decoded frames that have been converted to RGB and await upload to 113 // Queue of decoded frames that await rgb->yuv conversion
113 // a GL texture.
114 typedef std::queue<linked_ptr<PendingFrame> > PendingFrameQueue; 114 typedef std::queue<linked_ptr<PendingFrame> > PendingFrameQueue;
115 PendingFrameQueue pending_frames_; 115 PendingFrameQueue pending_frames_;
116 116
117 // The optimal number of textures to allocate for decoder_impl_. 117 // The optimal number of textures to allocate for decoder_impl_.
118 uint32_t texture_pool_size_; 118 uint32_t texture_pool_size_;
119 119
120 uint32_t num_pending_decodes_; 120 uint32_t num_pending_decodes_;
121 121
122 scoped_ptr<YUVConverter> yuv_converter_;
123
122 base::WeakPtrFactory<VideoDecoderShim> weak_ptr_factory_; 124 base::WeakPtrFactory<VideoDecoderShim> weak_ptr_factory_;
123 125
124 DISALLOW_COPY_AND_ASSIGN(VideoDecoderShim); 126 DISALLOW_COPY_AND_ASSIGN(VideoDecoderShim);
125 }; 127 };
126 128
127 } // namespace content 129 } // namespace content
128 130
129 #endif // CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ 131 #endif // CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/video_decoder_shim.cc » ('j') | content/renderer/pepper/video_decoder_shim.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698