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

Side by Side Diff: content/renderer/media/rtc_encoding_video_capturer.cc

Issue 18308004: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/aura/window.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/media/rtc_encoding_video_capturer.h" 5 #include "content/renderer/media/rtc_encoding_video_capturer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/base/encoded_bitstream_buffer.h" 8 #include "media/base/encoded_bitstream_buffer.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 const media::VideoEncodingParameters& params) { 90 const media::VideoEncodingParameters& params) {
91 params_ = params; 91 params_ = params;
92 } 92 }
93 93
94 void RtcEncodingVideoCapturer::EncodedVideoSourceClient::OnClosed() { 94 void RtcEncodingVideoCapturer::EncodedVideoSourceClient::OnClosed() {
95 finished_ = true; 95 finished_ = true;
96 } 96 }
97 97
98 void RtcEncodingVideoCapturer::EncodedVideoSourceClient::OnBufferReady( 98 void RtcEncodingVideoCapturer::EncodedVideoSourceClient::OnBufferReady(
99 scoped_refptr<const media::EncodedBitstreamBuffer> buffer) { 99 scoped_refptr<const media::EncodedBitstreamBuffer> buffer) {
100 DCHECK(!finished_ && buffer); 100 DCHECK(!finished_ && buffer.get());
101 101
102 // First buffer constitutes the origin of the time for this bitstream context. 102 // First buffer constitutes the origin of the time for this bitstream context.
103 if (time_base_.is_null()) 103 if (time_base_.is_null())
104 time_base_ = buffer->metadata().timestamp; 104 time_base_ = buffer->metadata().timestamp;
105 105
106 ReportEncodedFrame(buffer); 106 ReportEncodedFrame(buffer);
107 encoded_video_source_->ReturnBitstreamBuffer(buffer); 107 encoded_video_source_->ReturnBitstreamBuffer(buffer);
108 } 108 }
109 109
110 void RtcEncodingVideoCapturer::EncodedVideoSourceClient::OnConfigChanged( 110 void RtcEncodingVideoCapturer::EncodedVideoSourceClient::OnConfigChanged(
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 int32_t RtcEncodingVideoCapturer::SetRates(uint32_t newBitRate, 220 int32_t RtcEncodingVideoCapturer::SetRates(uint32_t newBitRate,
221 uint32_t frameRate) { 221 uint32_t frameRate) {
222 if (!encoded_video_source_client_) 222 if (!encoded_video_source_client_)
223 return WEBRTC_VIDEO_CODEC_UNINITIALIZED; 223 return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
224 // TODO(hshi): wire up runtime rate control. 224 // TODO(hshi): wire up runtime rate control.
225 return WEBRTC_VIDEO_CODEC_OK; 225 return WEBRTC_VIDEO_CODEC_OK;
226 } 226 }
227 227
228 } // namespace content 228 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698