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

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

Issue 899583002: Revert of [Cast] Software encoder support for varying video frame sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « media/cast/sender/h264_vt_encoder.h ('k') | media/cast/sender/video_encoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/h264_vt_encoder.h" 5 #include "media/cast/sender/h264_vt_encoder.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/big_endian.h" 10 #include "base/big_endian.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 // If the compression session exists, invalidate it. This blocks until all 355 // If the compression session exists, invalidate it. This blocks until all
356 // pending output callbacks have returned and any internal threads have 356 // pending output callbacks have returned and any internal threads have
357 // joined, ensuring no output callback ever sees a dangling encoder pointer. 357 // joined, ensuring no output callback ever sees a dangling encoder pointer.
358 if (compression_session_) { 358 if (compression_session_) {
359 videotoolbox_glue_->VTCompressionSessionInvalidate(compression_session_); 359 videotoolbox_glue_->VTCompressionSessionInvalidate(compression_session_);
360 compression_session_.reset(); 360 compression_session_.reset();
361 } 361 }
362 } 362 }
363 363
364 bool H264VideoToolboxEncoder::CanEncodeVariedFrameSizes() const {
365 return false;
366 }
367
368 bool H264VideoToolboxEncoder::EncodeVideoFrame( 364 bool H264VideoToolboxEncoder::EncodeVideoFrame(
369 const scoped_refptr<media::VideoFrame>& video_frame, 365 const scoped_refptr<media::VideoFrame>& video_frame,
370 const base::TimeTicks& reference_time, 366 const base::TimeTicks& reference_time,
371 const FrameEncodedCallback& frame_encoded_callback) { 367 const FrameEncodedCallback& frame_encoded_callback) {
372 DCHECK(thread_checker_.CalledOnValidThread()); 368 DCHECK(thread_checker_.CalledOnValidThread());
373 DCHECK(!video_frame->visible_rect().IsEmpty()); 369 DCHECK(!video_frame->visible_rect().IsEmpty());
374 DCHECK(!frame_encoded_callback.is_null()); 370 DCHECK(!frame_encoded_callback.is_null());
375 371
376 if (!compression_session_) { 372 if (!compression_session_) {
377 DLOG(ERROR) << " compression session is null"; 373 DLOG(ERROR) << " compression session is null";
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 CopySampleBufferToAnnexBBuffer(sbuf, &encoded_frame->data, keyframe); 533 CopySampleBufferToAnnexBBuffer(sbuf, &encoded_frame->data, keyframe);
538 534
539 encoder->cast_environment_->PostTask( 535 encoder->cast_environment_->PostTask(
540 CastEnvironment::MAIN, FROM_HERE, 536 CastEnvironment::MAIN, FROM_HERE,
541 base::Bind(request->frame_encoded_callback, 537 base::Bind(request->frame_encoded_callback,
542 base::Passed(&encoded_frame))); 538 base::Passed(&encoded_frame)));
543 } 539 }
544 540
545 } // namespace cast 541 } // namespace cast
546 } // namespace media 542 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/sender/h264_vt_encoder.h ('k') | media/cast/sender/video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698