OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 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_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ | |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ | |
7 | |
8 #include "base/compiler_specific.h" | |
9 #include "base/memory/scoped_vector.h" | |
10 #include "base/threading/thread_checker.h" | |
11 #include "content/common/content_export.h" | |
12 #include "content/public/renderer/media_stream_video_sink.h" | |
13 #include "content/renderer/media/media_stream_track_extra_data.h" | |
14 | |
15 namespace webrtc { | |
16 class VideoTrackInterface; | |
17 } | |
18 | |
19 namespace content { | |
20 | |
21 class WebRtcVideoSinkAdapter; | |
22 | |
23 // MediaStreamVideoTrack is a video specific representation of a | |
24 // blink::WebMediaStreamTrack in content. It is owned by the blink object | |
25 // and can be retrieved from a blink object using | |
26 // WebMediaStreamTrack::extraData() | |
27 class CONTENT_EXPORT MediaStreamVideoTrack : public MediaStreamTrackExtraData { | |
28 public: | |
29 explicit MediaStreamVideoTrack(webrtc::VideoTrackInterface* track); | |
30 virtual ~MediaStreamVideoTrack(); | |
31 void AddSink(MediaStreamVideoSink* sink); | |
32 void RemoveSink(MediaStreamVideoSink* sink); | |
33 | |
34 private: | |
35 // Used to DCHECK that we are called on the correct thread. | |
36 base::ThreadChecker thread_checker_; | |
37 // The webrtc video track. | |
38 // TODO(perkj): Make this class independent of webrtc as part of project | |
39 // Piranha plant. | |
Jói
2013/11/28 14:37:17
plant -> Plant
:)
perkj_chrome
2013/11/29 13:29:48
Done.
| |
40 webrtc::VideoTrackInterface* video_track_; | |
41 ScopedVector<WebRtcVideoSinkAdapter> sinks_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack); | |
44 }; | |
45 | |
46 } // namespace content | |
47 | |
48 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ | |
OLD | NEW |