| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "media/cast/sender/external_video_encoder.h" | 5 #include "media/cast/sender/external_video_encoder.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/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "media/base/video_frame.h" | 13 #include "media/base/video_frame.h" |
| 14 #include "media/base/video_util.h" | 14 #include "media/base/video_util.h" |
| 15 #include "media/cast/cast_defines.h" | 15 #include "media/cast/cast_defines.h" |
| 16 #include "media/cast/logging/logging_defines.h" | 16 #include "media/cast/logging/logging_defines.h" |
| 17 #include "media/cast/net/cast_transport_config.h" | 17 #include "media/cast/net/cast_transport_config.h" |
| 18 #include "media/video/video_encode_accelerator.h" | |
| 19 | 18 |
| 20 namespace { | 19 namespace { |
| 21 | 20 |
| 22 static const size_t kOutputBufferCount = 3; | 21 static const size_t kOutputBufferCount = 3; |
| 23 | 22 |
| 24 void LogFrameEncodedEvent( | 23 void LogFrameEncodedEvent( |
| 25 const scoped_refptr<media::cast::CastEnvironment>& cast_environment, | 24 const scoped_refptr<media::cast::CastEnvironment>& cast_environment, |
| 26 base::TimeTicks event_time, | 25 base::TimeTicks event_time, |
| 27 media::cast::RtpTimestamp rtp_timestamp, | 26 media::cast::RtpTimestamp rtp_timestamp, |
| 28 uint32 frame_id) { | 27 uint32 frame_id) { |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 video_config(), | 464 video_config(), |
| 466 frame_size(), | 465 frame_size(), |
| 467 last_frame_id() + 1, | 466 last_frame_id() + 1, |
| 468 CreateEncoderStatusChangeCallback(), | 467 CreateEncoderStatusChangeCallback(), |
| 469 create_vea_cb_, | 468 create_vea_cb_, |
| 470 create_video_encode_memory_cb_)); | 469 create_video_encode_memory_cb_)); |
| 471 } | 470 } |
| 472 | 471 |
| 473 } // namespace cast | 472 } // namespace cast |
| 474 } // namespace media | 473 } // namespace media |
| OLD | NEW |