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 #include "content/renderer/media/secure_display_link_tracker.h" | 18 #include "content/renderer/media/secure_display_link_tracker.h" |
| 19 #include "media/capture/video_capture_types.h" |
| 20 #include "third_party/WebKit/public/platform/WebString.h" |
19 | 21 |
20 namespace content { | 22 namespace content { |
21 | 23 |
| 24 // Calculates and returns videoKind value for |format|. |
| 25 // See https://w3c.github.io/mediacapture-depth. |
| 26 blink::WebString CONTENT_EXPORT |
| 27 GetVideoKindForFormat(const media::VideoCaptureFormat& format); |
| 28 |
22 // MediaStreamVideoTrack is a video specific representation of a | 29 // MediaStreamVideoTrack is a video specific representation of a |
23 // blink::WebMediaStreamTrack in content. It is owned by the blink object | 30 // blink::WebMediaStreamTrack in content. It is owned by the blink object |
24 // and can be retrieved from a blink object using | 31 // and can be retrieved from a blink object using |
25 // WebMediaStreamTrack::getExtraData() or MediaStreamVideoTrack::GetVideoTrack. | 32 // WebMediaStreamTrack::getExtraData() or MediaStreamVideoTrack::GetVideoTrack. |
26 class CONTENT_EXPORT MediaStreamVideoTrack : public MediaStreamTrack { | 33 class CONTENT_EXPORT MediaStreamVideoTrack : public MediaStreamTrack { |
27 public: | 34 public: |
28 // Help method to create a blink::WebMediaStreamTrack and a | 35 // Help method to create a blink::WebMediaStreamTrack and a |
29 // MediaStreamVideoTrack instance. The MediaStreamVideoTrack object is owned | 36 // MediaStreamVideoTrack instance. The MediaStreamVideoTrack object is owned |
30 // by the blink object in its WebMediaStreamTrack::ExtraData member. | 37 // by the blink object in its WebMediaStreamTrack::ExtraData member. |
31 // |callback| is triggered if the track is added to the source | 38 // |callback| is triggered if the track is added to the source |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 101 |
95 // This is used for tracking if all connected video sinks are secure. | 102 // This is used for tracking if all connected video sinks are secure. |
96 SecureDisplayLinkTracker<MediaStreamVideoSink> secure_tracker_; | 103 SecureDisplayLinkTracker<MediaStreamVideoSink> secure_tracker_; |
97 | 104 |
98 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack); | 105 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack); |
99 }; | 106 }; |
100 | 107 |
101 } // namespace content | 108 } // namespace content |
102 | 109 |
103 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ | 110 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ |
OLD | NEW |