OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WEBRTC_WEBRTC_VIDEO_TRACK_ADAPTER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_TRACK_ADAPTER_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_TRACK_ADAPTER_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_TRACK_ADAPTER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 webrtc::VideoTrackInterface* webrtc_video_track() { | 36 webrtc::VideoTrackInterface* webrtc_video_track() { |
37 return video_track_.get(); | 37 return video_track_.get(); |
38 } | 38 } |
39 | 39 |
40 rtc::Optional<bool> SourceNeedsDenoisingForTesting() const; | 40 rtc::Optional<bool> SourceNeedsDenoisingForTesting() const; |
41 | 41 |
42 protected: | 42 protected: |
43 // Implementation of MediaStreamSink. | 43 // Implementation of MediaStreamSink. |
44 void OnEnabledChanged(bool enabled) override; | 44 void OnEnabledChanged(bool enabled) override; |
| 45 void OnContentHintChanged( |
| 46 blink::WebMediaStreamTrack::ContentHintType content_hint) override; |
45 | 47 |
46 private: | 48 private: |
47 // Helper to request a refresh frame from the source. Called via the callback | 49 // Helper to request a refresh frame from the source. Called via the callback |
48 // passed to WebRtcVideoSourceAdapter. | 50 // passed to WebRtcVideoSourceAdapter. |
49 void RequestRefreshFrame(); | 51 void RequestRefreshFrame(); |
50 | 52 |
51 // Used to DCHECK that we are called on the correct thread. | 53 // Used to DCHECK that we are called on the correct thread. |
52 base::ThreadChecker thread_checker_; | 54 base::ThreadChecker thread_checker_; |
53 | 55 |
54 // |video_source_| and |video_track_source_proxy_| are held as references to | 56 // |video_source_| and |video_track_source_proxy_| are held as references to |
(...skipping 11 matching lines...) Expand all Loading... |
66 // MediaStreamVideoWebRtcSink in order to allow it to request refresh frames. | 68 // MediaStreamVideoWebRtcSink in order to allow it to request refresh frames. |
67 // See comments in media_stream_video_webrtc_sink.cc. | 69 // See comments in media_stream_video_webrtc_sink.cc. |
68 base::WeakPtrFactory<MediaStreamVideoWebRtcSink> weak_factory_; | 70 base::WeakPtrFactory<MediaStreamVideoWebRtcSink> weak_factory_; |
69 | 71 |
70 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoWebRtcSink); | 72 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoWebRtcSink); |
71 }; | 73 }; |
72 | 74 |
73 } // namespace content | 75 } // namespace content |
74 | 76 |
75 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_TRACK_ADAPTER_H_ | 77 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_TRACK_ADAPTER_H_ |
OLD | NEW |