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

Side by Side Diff: webrtc/modules/video_coding/video_receiver.cc

Issue 1474193002: Call InitDecode with proper resolution. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: nullptr woo Created 5 years 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 | « webrtc/modules/video_coding/codec_database.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // Must be called from inside the receive side critical section. 364 // Must be called from inside the receive side critical section.
365 int32_t VideoReceiver::Decode(const VCMEncodedFrame& frame) { 365 int32_t VideoReceiver::Decode(const VCMEncodedFrame& frame) {
366 TRACE_EVENT_ASYNC_STEP1("webrtc", 366 TRACE_EVENT_ASYNC_STEP1("webrtc",
367 "Video", 367 "Video",
368 frame.TimeStamp(), 368 frame.TimeStamp(),
369 "Decode", 369 "Decode",
370 "type", 370 "type",
371 frame.FrameType()); 371 frame.FrameType());
372 // Change decoder if payload type has changed 372 // Change decoder if payload type has changed
373 const bool renderTimingBefore = _codecDataBase.SupportsRenderScheduling(); 373 const bool renderTimingBefore = _codecDataBase.SupportsRenderScheduling();
374 _decoder = 374 _decoder = _codecDataBase.GetDecoder(frame, &_decodedFrameCallback);
375 _codecDataBase.GetDecoder(frame.PayloadType(), &_decodedFrameCallback);
376 if (renderTimingBefore != _codecDataBase.SupportsRenderScheduling()) { 375 if (renderTimingBefore != _codecDataBase.SupportsRenderScheduling()) {
377 // Make sure we reset the decode time estimate since it will 376 // Make sure we reset the decode time estimate since it will
378 // be zero for codecs without render timing. 377 // be zero for codecs without render timing.
379 _timing.ResetDecodeTime(); 378 _timing.ResetDecodeTime();
380 } 379 }
381 if (_decoder == NULL) { 380 if (_decoder == NULL) {
382 return VCM_NO_CODEC_REGISTERED; 381 return VCM_NO_CODEC_REGISTERED;
383 } 382 }
384 // Decode a frame 383 // Decode a frame
385 int32_t ret = _decoder->Decode(frame, clock_->TimeInMilliseconds()); 384 int32_t ret = _decoder->Decode(frame, clock_->TimeInMilliseconds());
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 } 568 }
570 569
571 void VideoReceiver::RegisterPreDecodeImageCallback( 570 void VideoReceiver::RegisterPreDecodeImageCallback(
572 EncodedImageCallback* observer) { 571 EncodedImageCallback* observer) {
573 CriticalSectionScoped cs(_receiveCritSect); 572 CriticalSectionScoped cs(_receiveCritSect);
574 pre_decode_image_callback_ = observer; 573 pre_decode_image_callback_ = observer;
575 } 574 }
576 575
577 } // namespace vcm 576 } // namespace vcm
578 } // namespace webrtc 577 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codec_database.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698