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

Side by Side Diff: content/renderer/media/webrtc/media_stream_video_webrtc_sink.h

Issue 2585313002: Propagate MediaStreamTrack video content hints. (Closed)
Patch Set: fix test Created 4 years 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
« no previous file with comments | « no previous file | content/renderer/media/webrtc/media_stream_video_webrtc_sink.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webrtc/media_stream_video_webrtc_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698