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

Side by Side Diff: content/renderer/media/video_destination_handler.cc

Issue 63253002: Rename WebKit namespace to blink (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "content/renderer/media/video_destination_handler.h" 5 #include "content/renderer/media/video_destination_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 bool VideoDestinationHandler::Open( 162 bool VideoDestinationHandler::Open(
163 MediaStreamDependencyFactory* factory, 163 MediaStreamDependencyFactory* factory,
164 MediaStreamRegistryInterface* registry, 164 MediaStreamRegistryInterface* registry,
165 const std::string& url, 165 const std::string& url,
166 FrameWriterInterface** frame_writer) { 166 FrameWriterInterface** frame_writer) {
167 if (!factory) { 167 if (!factory) {
168 factory = RenderThreadImpl::current()->GetMediaStreamDependencyFactory(); 168 factory = RenderThreadImpl::current()->GetMediaStreamDependencyFactory();
169 DCHECK(factory != NULL); 169 DCHECK(factory != NULL);
170 } 170 }
171 WebKit::WebMediaStream stream; 171 blink::WebMediaStream stream;
172 if (registry) { 172 if (registry) {
173 stream = registry->GetMediaStream(url); 173 stream = registry->GetMediaStream(url);
174 } else { 174 } else {
175 stream = 175 stream =
176 WebKit::WebMediaStreamRegistry::lookupMediaStreamDescriptor(GURL(url)); 176 blink::WebMediaStreamRegistry::lookupMediaStreamDescriptor(GURL(url));
177 } 177 }
178 if (stream.isNull() || !stream.extraData()) { 178 if (stream.isNull() || !stream.extraData()) {
179 LOG(ERROR) << "VideoDestinationHandler::Open - invalid url: " << url; 179 LOG(ERROR) << "VideoDestinationHandler::Open - invalid url: " << url;
180 return false; 180 return false;
181 } 181 }
182 182
183 // Create a new native video track and add it to |stream|. 183 // Create a new native video track and add it to |stream|.
184 std::string track_id; 184 std::string track_id;
185 // According to spec, a media stream track's id should be globally unique. 185 // According to spec, a media stream track's id should be globally unique.
186 // There's no easy way to strictly achieve that. The id generated with this 186 // There's no easy way to strictly achieve that. The id generated with this
(...skipping 14 matching lines...) Expand all
201 VideoTrackVector video_tracks = native_stream->GetVideoTracks(); 201 VideoTrackVector video_tracks = native_stream->GetVideoTracks();
202 // Currently one supports one video track per media stream. 202 // Currently one supports one video track per media stream.
203 DCHECK(video_tracks.size() == 1); 203 DCHECK(video_tracks.size() == 1);
204 204
205 *frame_writer = new PpFrameWriterProxy(video_tracks[0].get(), writer); 205 *frame_writer = new PpFrameWriterProxy(video_tracks[0].get(), writer);
206 return true; 206 return true;
207 } 207 }
208 208
209 } // namespace content 209 } // namespace content
210 210
OLDNEW
« no previous file with comments | « content/renderer/media/video_destination_handler.h ('k') | content/renderer/media/video_destination_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698