| 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_recorder/video_track_recorder.h" | 5 #include "content/renderer/media_recorder/video_track_recorder.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 // Both |encoding_thread| and |encoder| will be destroyed at end-of-scope. | 773 // Both |encoding_thread| and |encoder| will be destroyed at end-of-scope. |
| 774 } | 774 } |
| 775 | 775 |
| 776 VpxEncoder::VpxEncoder( | 776 VpxEncoder::VpxEncoder( |
| 777 bool use_vp9, | 777 bool use_vp9, |
| 778 const VideoTrackRecorder::OnEncodedVideoCB& on_encoded_video_callback, | 778 const VideoTrackRecorder::OnEncodedVideoCB& on_encoded_video_callback, |
| 779 int32_t bits_per_second) | 779 int32_t bits_per_second) |
| 780 : Encoder(on_encoded_video_callback, bits_per_second), | 780 : Encoder(on_encoded_video_callback, bits_per_second), |
| 781 use_vp9_(use_vp9) { | 781 use_vp9_(use_vp9) { |
| 782 codec_config_.g_timebase.den = 0; // Not initialized. | 782 codec_config_.g_timebase.den = 0; // Not initialized. |
| 783 alpha_codec_config_.g_timebase.den = 0; // Not initialized. |
| 783 DCHECK(encoding_thread_->IsRunning()); | 784 DCHECK(encoding_thread_->IsRunning()); |
| 784 } | 785 } |
| 785 | 786 |
| 786 VpxEncoder::~VpxEncoder() { | 787 VpxEncoder::~VpxEncoder() { |
| 787 main_task_runner_->PostTask(FROM_HERE, | 788 main_task_runner_->PostTask(FROM_HERE, |
| 788 base::Bind(&VpxEncoder::ShutdownEncoder, | 789 base::Bind(&VpxEncoder::ShutdownEncoder, |
| 789 base::Passed(&encoding_thread_), | 790 base::Passed(&encoding_thread_), |
| 790 base::Passed(&encoder_))); | 791 base::Passed(&encoder_))); |
| 791 } | 792 } |
| 792 | 793 |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 encoder_->SetPaused(paused_before_init_); | 1231 encoder_->SetPaused(paused_before_init_); |
| 1231 | 1232 |
| 1232 // StartFrameEncode() will be called on Render IO thread. | 1233 // StartFrameEncode() will be called on Render IO thread. |
| 1233 MediaStreamVideoSink::ConnectToTrack( | 1234 MediaStreamVideoSink::ConnectToTrack( |
| 1234 track_, | 1235 track_, |
| 1235 base::Bind(&VideoTrackRecorder::Encoder::StartFrameEncode, encoder_), | 1236 base::Bind(&VideoTrackRecorder::Encoder::StartFrameEncode, encoder_), |
| 1236 false); | 1237 false); |
| 1237 } | 1238 } |
| 1238 | 1239 |
| 1239 } // namespace content | 1240 } // namespace content |
| OLD | NEW |