| OLD | NEW |
| 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/renderer/media/video_track_recorder.h" | 5 #include "content/renderer/media/video_track_recorder.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/sys_info.h" | 9 #include "base/sys_info.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 } | 298 } |
| 299 | 299 |
| 300 VideoTrackRecorder::~VideoTrackRecorder() { | 300 VideoTrackRecorder::~VideoTrackRecorder() { |
| 301 DCHECK(main_render_thread_checker_.CalledOnValidThread()); | 301 DCHECK(main_render_thread_checker_.CalledOnValidThread()); |
| 302 RemoveFromVideoTrack(this, track_); | 302 RemoveFromVideoTrack(this, track_); |
| 303 weak_factory_.InvalidateWeakPtrs(); | 303 weak_factory_.InvalidateWeakPtrs(); |
| 304 track_.reset(); | 304 track_.reset(); |
| 305 } | 305 } |
| 306 | 306 |
| 307 void VideoTrackRecorder::OnVideoFrame(const scoped_refptr<VideoFrame>& frame, | 307 void VideoTrackRecorder::OnVideoFrame(const scoped_refptr<VideoFrame>& frame, |
| 308 const base::TimeTicks& timestamp) { | 308 base::TimeTicks timestamp) { |
| 309 DCHECK(main_render_thread_checker_.CalledOnValidThread()); | 309 DCHECK(main_render_thread_checker_.CalledOnValidThread()); |
| 310 encoder_->StartFrameEncode(frame, timestamp); | 310 encoder_->StartFrameEncode(frame, timestamp); |
| 311 } | 311 } |
| 312 | 312 |
| 313 } // namespace content | 313 } // namespace content |
| OLD | NEW |