Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Side by Side Diff: media/cast/sender/external_video_encoder.cc

Issue 892383002: RELAND: [Cast] Software encoder support for varying video frame sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for 'access to uninitialized memory' error. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/cast/sender/external_video_encoder.h ('k') | media/cast/sender/fake_software_video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698