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 <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" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/sys_info.h" | 12 #include "base/sys_info.h" |
13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "base/trace_event/trace_event.h" | 15 #include "base/trace_event/trace_event.h" |
16 #include "media/base/video_frame.h" | 16 #include "media/base/video_frame.h" |
17 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
18 | 18 |
19 extern "C" { | 19 extern "C" { |
20 // VPX_CODEC_DISABLE_COMPAT excludes parts of the libvpx API that provide | 20 // VPX_CODEC_DISABLE_COMPAT excludes parts of the libvpx API that provide |
21 // backwards compatibility for legacy applications using the library. | 21 // backwards compatibility for legacy applications using the library. |
22 #define VPX_CODEC_DISABLE_COMPAT 1 | 22 #define VPX_CODEC_DISABLE_COMPAT 1 |
23 #include "third_party/libvpx_new/source/libvpx/vpx/vp8cx.h" | 23 #include "third_party/libvpx/source/libvpx/vpx/vp8cx.h" |
24 #include "third_party/libvpx_new/source/libvpx/vpx/vpx_encoder.h" | 24 #include "third_party/libvpx/source/libvpx/vpx/vpx_encoder.h" |
25 } | 25 } |
26 | 26 |
27 using media::VideoFrame; | 27 using media::VideoFrame; |
28 using media::VideoFrameMetadata; | 28 using media::VideoFrameMetadata; |
29 | 29 |
30 namespace content { | 30 namespace content { |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 const vpx_codec_flags_t kNoFlags = 0; | 34 const vpx_codec_flags_t kNoFlags = 0; |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 encoder_->set_paused(false); | 401 encoder_->set_paused(false); |
402 } | 402 } |
403 | 403 |
404 void VideoTrackRecorder::OnVideoFrameForTesting( | 404 void VideoTrackRecorder::OnVideoFrameForTesting( |
405 const scoped_refptr<media::VideoFrame>& frame, | 405 const scoped_refptr<media::VideoFrame>& frame, |
406 base::TimeTicks timestamp) { | 406 base::TimeTicks timestamp) { |
407 encoder_->StartFrameEncode(frame, timestamp); | 407 encoder_->StartFrameEncode(frame, timestamp); |
408 } | 408 } |
409 | 409 |
410 } // namespace content | 410 } // namespace content |
OLD | NEW |