| 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" |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 weak_factory_.GetWeakPtr(), | 340 weak_factory_.GetWeakPtr(), |
| 341 frame_size, | 341 frame_size, |
| 342 codec_profile, | 342 codec_profile, |
| 343 video_config.max_frame_rate, | 343 video_config.max_frame_rate, |
| 344 initialization_cb)); | 344 initialization_cb)); |
| 345 } | 345 } |
| 346 | 346 |
| 347 ExternalVideoEncoder::~ExternalVideoEncoder() { | 347 ExternalVideoEncoder::~ExternalVideoEncoder() { |
| 348 } | 348 } |
| 349 | 349 |
| 350 bool ExternalVideoEncoder::CanEncodeVariedFrameSizes() const { |
| 351 return false; |
| 352 } |
| 353 |
| 350 bool ExternalVideoEncoder::EncodeVideoFrame( | 354 bool ExternalVideoEncoder::EncodeVideoFrame( |
| 351 const scoped_refptr<media::VideoFrame>& video_frame, | 355 const scoped_refptr<media::VideoFrame>& video_frame, |
| 352 const base::TimeTicks& reference_time, | 356 const base::TimeTicks& reference_time, |
| 353 const FrameEncodedCallback& frame_encoded_callback) { | 357 const FrameEncodedCallback& frame_encoded_callback) { |
| 354 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); | 358 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); |
| 355 DCHECK(!video_frame->visible_rect().IsEmpty()); | 359 DCHECK(!video_frame->visible_rect().IsEmpty()); |
| 356 DCHECK(!frame_encoded_callback.is_null()); | 360 DCHECK(!frame_encoded_callback.is_null()); |
| 357 | 361 |
| 358 if (!client_) | 362 if (!client_) |
| 359 return false; // Not ready. | 363 return false; // Not ready. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 base::Bind(&VEAClientImpl::Initialize, | 425 base::Bind(&VEAClientImpl::Initialize, |
| 422 client_, | 426 client_, |
| 423 frame_size, | 427 frame_size, |
| 424 codec_profile, | 428 codec_profile, |
| 425 bit_rate_, | 429 bit_rate_, |
| 426 initialization_cb)); | 430 initialization_cb)); |
| 427 } | 431 } |
| 428 | 432 |
| 429 } // namespace cast | 433 } // namespace cast |
| 430 } // namespace media | 434 } // namespace media |
| OLD | NEW |