| 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_DESTINATION_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DESTINATION_HOST_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DESTINATION_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DESTINATION_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> |
| 11 |
| 10 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 13 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 14 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 15 #include "content/renderer/media/pepper_to_video_track_adapter.h" | 16 #include "content/renderer/media/pepper_to_video_track_adapter.h" |
| 16 #include "ppapi/c/pp_time.h" | 17 #include "ppapi/c/pp_time.h" |
| 17 #include "ppapi/host/resource_host.h" | 18 #include "ppapi/host/resource_host.h" |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 | 21 |
| 21 class RendererPpapiHost; | 22 class RendererPpapiHost; |
| 22 | 23 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 34 ppapi::host::HostMessageContext* context) override; | 35 ppapi::host::HostMessageContext* context) override; |
| 35 | 36 |
| 36 private: | 37 private: |
| 37 int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context, | 38 int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context, |
| 38 const std::string& stream_url); | 39 const std::string& stream_url); |
| 39 int32_t OnHostMsgPutFrame(ppapi::host::HostMessageContext* context, | 40 int32_t OnHostMsgPutFrame(ppapi::host::HostMessageContext* context, |
| 40 const ppapi::HostResource& image_data_resource, | 41 const ppapi::HostResource& image_data_resource, |
| 41 PP_TimeTicks timestamp); | 42 PP_TimeTicks timestamp); |
| 42 int32_t OnHostMsgClose(ppapi::host::HostMessageContext* context); | 43 int32_t OnHostMsgClose(ppapi::host::HostMessageContext* context); |
| 43 | 44 |
| 44 scoped_ptr<FrameWriterInterface> frame_writer_; | 45 std::unique_ptr<FrameWriterInterface> frame_writer_; |
| 45 // Used for checking that timestamps are strictly increasing. | 46 // Used for checking that timestamps are strictly increasing. |
| 46 #if DCHECK_IS_ON() | 47 #if DCHECK_IS_ON() |
| 47 bool has_received_frame_; | 48 bool has_received_frame_; |
| 48 int64_t previous_timestamp_ns_; | 49 int64_t previous_timestamp_ns_; |
| 49 #endif | 50 #endif |
| 50 | 51 |
| 51 base::WeakPtrFactory<PepperVideoDestinationHost> weak_factory_; | 52 base::WeakPtrFactory<PepperVideoDestinationHost> weak_factory_; |
| 52 | 53 |
| 53 DISALLOW_COPY_AND_ASSIGN(PepperVideoDestinationHost); | 54 DISALLOW_COPY_AND_ASSIGN(PepperVideoDestinationHost); |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 } // namespace content | 57 } // namespace content |
| 57 | 58 |
| 58 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DESTINATION_HOST_H_ | 59 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DESTINATION_HOST_H_ |
| OLD | NEW |