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

Side by Side Diff: content/public/renderer/media_stream_utils.cc

Issue 2788613003: Remove GetCurrentVideoTrackFormat dead code. (Closed)
Patch Set: no change. just remove unnecessary dependency on other patchset Created 3 years, 8 months 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 | « content/public/renderer/media_stream_utils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "content/public/renderer/media_stream_utils.h" 5 #include "content/public/renderer/media_stream_utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 web_media_stream_source.setExtraData(media_stream_source); 88 web_media_stream_source.setExtraData(media_stream_source);
89 89
90 blink::WebMediaStreamTrack web_media_stream_track; 90 blink::WebMediaStreamTrack web_media_stream_track;
91 web_media_stream_track.initialize(web_media_stream_source); 91 web_media_stream_track.initialize(web_media_stream_source);
92 if (!media_stream_source->ConnectToTrack(web_media_stream_track)) 92 if (!media_stream_source->ConnectToTrack(web_media_stream_track))
93 return false; 93 return false;
94 web_media_stream->addTrack(web_media_stream_track); 94 web_media_stream->addTrack(web_media_stream_track);
95 return true; 95 return true;
96 } 96 }
97 97
98 const media::VideoCaptureFormat* GetCurrentVideoTrackFormat(
99 const blink::WebMediaStreamTrack& video_track) {
100 if (video_track.isNull())
101 return nullptr;
102
103 MediaStreamVideoSource* const source =
104 MediaStreamVideoSource::GetVideoSource(video_track.source());
105 if (!source)
106 return nullptr;
107
108 return source->GetCurrentFormat();
109 }
110
111 void RequestRefreshFrameFromVideoTrack( 98 void RequestRefreshFrameFromVideoTrack(
112 const blink::WebMediaStreamTrack& video_track) { 99 const blink::WebMediaStreamTrack& video_track) {
113 if (video_track.isNull()) 100 if (video_track.isNull())
114 return; 101 return;
115 MediaStreamVideoSource* const source = 102 MediaStreamVideoSource* const source =
116 MediaStreamVideoSource::GetVideoSource(video_track.source()); 103 MediaStreamVideoSource::GetVideoSource(video_track.source());
117 if (source) 104 if (source)
118 source->RequestRefreshFrame(); 105 source->RequestRefreshFrame();
119 } 106 }
120 107
121 } // namespace content 108 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/media_stream_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698