OLD | NEW |
---|---|
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_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 22 matching lines...) Expand all Loading... | |
33 PP_Resource resource, | 33 PP_Resource resource, |
34 const blink::WebMediaStreamTrack& track); | 34 const blink::WebMediaStreamTrack& track); |
35 | 35 |
36 // Output mode constructor. | 36 // Output mode constructor. |
37 // In output mode, this class passes video frames from the associated | 37 // In output mode, this class passes video frames from the associated |
38 // pepper plugin to a newly created blink::WebMediaStreamTrack. | 38 // pepper plugin to a newly created blink::WebMediaStreamTrack. |
39 PepperMediaStreamVideoTrackHost(RendererPpapiHost* host, | 39 PepperMediaStreamVideoTrackHost(RendererPpapiHost* host, |
40 PP_Instance instance, | 40 PP_Instance instance, |
41 PP_Resource resource); | 41 PP_Resource resource); |
42 | 42 |
43 ~PepperMediaStreamVideoTrackHost() override; | |
dcheng
2016/04/06 19:57:02
Ditto.
bbudge
2016/04/06 21:01:20
OK.
| |
44 | |
43 bool IsMediaStreamVideoTrackHost() override; | 45 bool IsMediaStreamVideoTrackHost() override; |
44 | 46 |
45 blink::WebMediaStreamTrack track() { return track_; } | 47 blink::WebMediaStreamTrack track() { return track_; } |
46 | 48 |
47 private: | 49 private: |
48 ~PepperMediaStreamVideoTrackHost() override; | |
49 | |
50 void InitBuffers(); | 50 void InitBuffers(); |
51 | 51 |
52 // PepperMediaStreamTrackHostBase overrides: | 52 // PepperMediaStreamTrackHostBase overrides: |
53 void OnClose() override; | 53 void OnClose() override; |
54 int32_t OnHostMsgEnqueueBuffer(ppapi::host::HostMessageContext* context, | 54 int32_t OnHostMsgEnqueueBuffer(ppapi::host::HostMessageContext* context, |
55 int32_t index) override; | 55 int32_t index) override; |
56 | 56 |
57 // Sends frame with |index| to |track_|. | 57 // Sends frame with |index| to |track_|. |
58 int32_t SendFrameToTrack(int32_t index); | 58 int32_t SendFrameToTrack(int32_t index); |
59 | 59 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 scoped_refptr<FrameDeliverer> frame_deliverer_; | 126 scoped_refptr<FrameDeliverer> frame_deliverer_; |
127 | 127 |
128 base::WeakPtrFactory<PepperMediaStreamVideoTrackHost> weak_factory_; | 128 base::WeakPtrFactory<PepperMediaStreamVideoTrackHost> weak_factory_; |
129 | 129 |
130 DISALLOW_COPY_AND_ASSIGN(PepperMediaStreamVideoTrackHost); | 130 DISALLOW_COPY_AND_ASSIGN(PepperMediaStreamVideoTrackHost); |
131 }; | 131 }; |
132 | 132 |
133 } // namespace content | 133 } // namespace content |
134 | 134 |
135 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_ | 135 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_ |
OLD | NEW |