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

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

Issue 1955233002: Revert of Memory copy the VideoFrame to match the requirement for HW encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/external_video_encoder.cc ('k') | media/cast/sender/video_sender.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/size_adaptable_video_encoder_base.h" 5 #include "media/cast/sender/size_adaptable_video_encoder_base.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 status_change_cb_.Run(status); 150 status_change_cb_.Run(status);
151 } 151 }
152 152
153 void SizeAdaptableVideoEncoderBase::OnEncodedVideoFrame( 153 void SizeAdaptableVideoEncoderBase::OnEncodedVideoFrame(
154 const FrameEncodedCallback& frame_encoded_callback, 154 const FrameEncodedCallback& frame_encoded_callback,
155 std::unique_ptr<SenderEncodedFrame> encoded_frame) { 155 std::unique_ptr<SenderEncodedFrame> encoded_frame) {
156 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 156 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
157 --frames_in_encoder_; 157 --frames_in_encoder_;
158 DCHECK_GE(frames_in_encoder_, 0); 158 DCHECK_GE(frames_in_encoder_, 0);
159 159 next_frame_id_ = encoded_frame->frame_id + 1;
160 if (encoded_frame)
161 next_frame_id_ = encoded_frame->frame_id + 1;
162 frame_encoded_callback.Run(std::move(encoded_frame)); 160 frame_encoded_callback.Run(std::move(encoded_frame));
163 } 161 }
164 162
165 } // namespace cast 163 } // namespace cast
166 } // namespace media 164 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/sender/external_video_encoder.cc ('k') | media/cast/sender/video_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698