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

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

Issue 736033002: PepperVideoSourceHost: Use natural_size instead of visible_rect.size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bbudge@s comments Created 6 years 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 | « no previous file | content/renderer/pepper/pepper_video_source_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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_ 6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void Close(); 72 void Close();
73 73
74 RendererPpapiHost* renderer_ppapi_host_; 74 RendererPpapiHost* renderer_ppapi_host_;
75 75
76 ppapi::host::ReplyMessageContext reply_context_; 76 ppapi::host::ReplyMessageContext reply_context_;
77 77
78 scoped_ptr<VideoSourceHandler> source_handler_; 78 scoped_ptr<VideoSourceHandler> source_handler_;
79 scoped_refptr<FrameReceiver> frame_receiver_; 79 scoped_refptr<FrameReceiver> frame_receiver_;
80 std::string stream_url_; 80 std::string stream_url_;
81 scoped_refptr<media::VideoFrame> last_frame_; 81 scoped_refptr<media::VideoFrame> last_frame_;
82 // An internal frame buffer to avoid reallocations. It is only allocated if
83 // scaling is needed.
84 scoped_refptr<media::VideoFrame> scaled_frame_;
82 bool get_frame_pending_; 85 bool get_frame_pending_;
83 // We use only one ImageData resource in order to avoid allocating 86 // We use only one ImageData resource in order to avoid allocating
84 // shared memory repeatedly. We send the same one each time the plugin 87 // shared memory repeatedly. We send the same one each time the plugin
85 // requests a frame. For this to work, the plugin must finish using 88 // requests a frame. For this to work, the plugin must finish using
86 // the ImageData it receives prior to calling GetFrame, and not access 89 // the ImageData it receives prior to calling GetFrame, and not access
87 // the ImageData until it gets its next callback to GetFrame. 90 // the ImageData until it gets its next callback to GetFrame.
88 scoped_refptr<PPB_ImageData_Impl> shared_image_; 91 scoped_refptr<PPB_ImageData_Impl> shared_image_;
89 PP_ImageDataDesc shared_image_desc_; 92 PP_ImageDataDesc shared_image_desc_;
90 93
91 base::WeakPtrFactory<PepperVideoSourceHost> weak_factory_; 94 base::WeakPtrFactory<PepperVideoSourceHost> weak_factory_;
92 95
93 DISALLOW_COPY_AND_ASSIGN(PepperVideoSourceHost); 96 DISALLOW_COPY_AND_ASSIGN(PepperVideoSourceHost);
94 }; 97 };
95 98
96 } // namespace content 99 } // namespace content
97 100
98 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_ 101 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_video_source_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698