| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |