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