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

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

Issue 128683003: [PPAPI] Implement media stream video track API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@video_track_impl_cl
Patch Set: Rebase it Created 6 years, 11 months 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
OLDNEW
(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 :
18 public PepperMediaStreamTrackHostBase,
19 public MediaStreamVideoSink {
20 public:
21 PepperMediaStreamVideoTrackHost(RendererPpapiHost* host,
22 PP_Instance instance,
23 PP_Resource resource,
24 const blink::WebMediaStreamTrack& track);
25
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 protected:
36 virtual void DidConnectPendingHostToResource() OVERRIDE;
dmichael (off chromium) 2014/01/09 21:06:47 nit: I think all the virtual functions could be pr
Peng 2014/01/10 19:14:30 Done.
37
38 private:
39 blink::WebMediaStreamTrack track_;
40
41 // True if it has been added to |blink::WebMediaStreamTrack| as a sink.
42 bool connected_;
43
44 // Frame size in pixels.
45 gfx::Size frame_size_;
dmichael (off chromium) 2014/01/09 21:06:47 I found this name slightly confusing. It might be
Peng 2014/01/10 19:14:30 No. It is a gfx::Size. I mean the width and height
dmichael (off chromium) 2014/01/13 21:26:47 Okay, sorry for my misunderstanding. I think the p
46
47 // Frame format.
48 media::VideoFrame::Format frame_format_;
49
50 // The size of frame pixels in bytes.
51 uint32_t frame_data_size_;
52
53 DISALLOW_COPY_AND_ASSIGN(PepperMediaStreamVideoTrackHost);
54 };
55
56 } // namespace content
57
58 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698