OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "content/public/renderer/media_stream_video_sink.h" |
| 10 #include "content/renderer/pepper/pepper_media_stream_track_host_base.h" |
| 11 #include "media/base/video_frame.h" |
| 12 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" |
| 13 #include "ui/gfx/size.h" |
| 14 |
| 15 namespace content { |
| 16 |
| 17 class PepperMediaStreamVideoTrackHost : public PepperMediaStreamTrackHostBase, |
| 18 public MediaStreamVideoSink { |
| 19 public: |
| 20 PepperMediaStreamVideoTrackHost(RendererPpapiHost* host, |
| 21 PP_Instance instance, |
| 22 PP_Resource resource, |
| 23 const blink::WebMediaStreamTrack& track); |
| 24 |
| 25 private: |
| 26 virtual ~PepperMediaStreamVideoTrackHost(); |
| 27 |
| 28 // PepperMediaStreamTrackHostBase overrides: |
| 29 virtual void OnClose() OVERRIDE; |
| 30 |
| 31 // MediaStreamVideoSink overrides: |
| 32 virtual void OnVideoFrame( |
| 33 const scoped_refptr<media::VideoFrame>& frame) OVERRIDE; |
| 34 |
| 35 // ResourceHost overrides: |
| 36 virtual void DidConnectPendingHostToResource() OVERRIDE; |
| 37 |
| 38 blink::WebMediaStreamTrack track_; |
| 39 |
| 40 // True if it has been added to |blink::WebMediaStreamTrack| as a sink. |
| 41 bool connected_; |
| 42 |
| 43 // Frame size. |
| 44 gfx::Size frame_size_; |
| 45 |
| 46 // Frame format. |
| 47 media::VideoFrame::Format frame_format_; |
| 48 |
| 49 // The size of frame pixels in bytes. |
| 50 uint32_t frame_data_size_; |
| 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(PepperMediaStreamVideoTrackHost); |
| 53 }; |
| 54 |
| 55 } // namespace content |
| 56 |
| 57 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_ |
OLD | NEW |