OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 #include "content/public/renderer/media_stream_video_sink.h" | 15 #include "content/public/renderer/media_stream_video_sink.h" |
16 #include "content/renderer/media/media_stream_track.h" | 16 #include "content/renderer/media/media_stream_track.h" |
17 #include "content/renderer/media/media_stream_video_source.h" | 17 #include "content/renderer/media/media_stream_video_source.h" |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
21 // MediaStreamVideoTrack is a video specific representation of a | 21 // MediaStreamVideoTrack is a video specific representation of a |
22 // blink::WebMediaStreamTrack in content. It is owned by the blink object | 22 // blink::WebMediaStreamTrack in content. It is owned by the blink object |
23 // and can be retrieved from a blink object using | 23 // and can be retrieved from a blink object using |
24 // WebMediaStreamTrack::extraData() or MediaStreamVideoTrack::GetVideoTrack. | 24 // WebMediaStreamTrack::getExtraData() or MediaStreamVideoTrack::GetVideoTrack. |
25 class CONTENT_EXPORT MediaStreamVideoTrack : public MediaStreamTrack { | 25 class CONTENT_EXPORT MediaStreamVideoTrack : public MediaStreamTrack { |
26 public: | 26 public: |
27 // Help method to create a blink::WebMediaStreamTrack and a | 27 // Help method to create a blink::WebMediaStreamTrack and a |
28 // MediaStreamVideoTrack instance. The MediaStreamVideoTrack object is owned | 28 // MediaStreamVideoTrack instance. The MediaStreamVideoTrack object is owned |
29 // by the blink object in its WebMediaStreamTrack::ExtraData member. | 29 // by the blink object in its WebMediaStreamTrack::ExtraData member. |
30 // |callback| is triggered if the track is added to the source | 30 // |callback| is triggered if the track is added to the source |
31 // successfully and will receive video frames that match |constraints| | 31 // successfully and will receive video frames that match |constraints| |
32 // or if the source fail to provide video frames. | 32 // or if the source fail to provide video frames. |
33 // If |enabled| is true, sinks added to the track will | 33 // If |enabled| is true, sinks added to the track will |
34 // receive video frames when the source deliver frames to the track. | 34 // receive video frames when the source deliver frames to the track. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // by the blink::WebMediaStreamSource and is guaranteed to outlive the | 88 // by the blink::WebMediaStreamSource and is guaranteed to outlive the |
89 // track. | 89 // track. |
90 MediaStreamVideoSource* source_; | 90 MediaStreamVideoSource* source_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack); | 92 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack); |
93 }; | 93 }; |
94 | 94 |
95 } // namespace content | 95 } // namespace content |
96 | 96 |
97 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ | 97 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ |
OLD | NEW |