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

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

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | 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/logging.h" 9 #include "base/logging.h"
10 #include "content/renderer/media/media_stream_dependency_factory.h" 10 #include "content/renderer/media/media_stream_dependency_factory.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 std::string track_id = talk_base::ToString(talk_base::CreateRandomId64()); 183 std::string track_id = talk_base::ToString(talk_base::CreateRandomId64());
184 PpFrameWriter* writer = new PpFrameWriter(); 184 PpFrameWriter* writer = new PpFrameWriter();
185 if (!factory->AddNativeVideoMediaTrack(track_id, &stream, writer)) { 185 if (!factory->AddNativeVideoMediaTrack(track_id, &stream, writer)) {
186 delete writer; 186 delete writer;
187 return false; 187 return false;
188 } 188 }
189 189
190 // Gets a handler to the native video track, which owns the |writer|. 190 // Gets a handler to the native video track, which owns the |writer|.
191 MediaStreamExtraData* extra_data = 191 MediaStreamExtraData* extra_data =
192 static_cast<MediaStreamExtraData*>(stream.extraData()); 192 static_cast<MediaStreamExtraData*>(stream.extraData());
193 webrtc::MediaStreamInterface* native_stream = extra_data->stream(); 193 webrtc::MediaStreamInterface* native_stream = extra_data->stream().get();
194 DCHECK(native_stream); 194 DCHECK(native_stream);
195 VideoTrackVector video_tracks = native_stream->GetVideoTracks(); 195 VideoTrackVector video_tracks = native_stream->GetVideoTracks();
196 // Currently one supports one video track per media stream. 196 // Currently one supports one video track per media stream.
197 DCHECK(video_tracks.size() == 1); 197 DCHECK(video_tracks.size() == 1);
198 198
199 *frame_writer = new PpFrameWriterProxy(video_tracks[0].get(), writer); 199 *frame_writer = new PpFrameWriterProxy(video_tracks[0].get(), writer);
200 return true; 200 return true;
201 } 201 }
202 202
203 } // namespace content 203 } // namespace content
204 204
OLDNEW
« no previous file with comments | « content/renderer/media/video_capture_impl_unittest.cc ('k') | content/renderer/media/video_destination_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698