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

Side by Side Diff: media/base/android/media_codec_video_decoder.cc

Issue 1551103002: Convert Pass()→std::move() in //media (Android Cast edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 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/base/android/media_codec_video_decoder.h" 5 #include "media/base/android/media_codec_video_decoder.h"
6 6
7 #include <utility>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/logging.h" 10 #include "base/logging.h"
9 #include "media/base/android/media_statistics.h" 11 #include "media/base/android/media_statistics.h"
10 #include "media/base/android/sdk_media_codec_bridge.h" 12 #include "media/base/android/sdk_media_codec_bridge.h"
11 #include "media/base/demuxer_stream.h" 13 #include "media/base/demuxer_stream.h"
12 #include "media/base/timestamp_constants.h" 14 #include "media/base/timestamp_constants.h"
13 15
14 namespace media { 16 namespace media {
15 17
16 namespace { 18 namespace {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 MediaCodecDecoder::ReleaseMediaCodec(); 95 MediaCodecDecoder::ReleaseMediaCodec();
94 delayed_buffers_.clear(); 96 delayed_buffers_.clear();
95 } 97 }
96 98
97 void MediaCodecVideoDecoder::SetVideoSurface(gfx::ScopedJavaSurface surface) { 99 void MediaCodecVideoDecoder::SetVideoSurface(gfx::ScopedJavaSurface surface) {
98 DCHECK(media_task_runner_->BelongsToCurrentThread()); 100 DCHECK(media_task_runner_->BelongsToCurrentThread());
99 101
100 DVLOG(1) << class_name() << "::" << __FUNCTION__ 102 DVLOG(1) << class_name() << "::" << __FUNCTION__
101 << (surface.IsEmpty() ? " empty" : " non-empty"); 103 << (surface.IsEmpty() ? " empty" : " non-empty");
102 104
103 surface_ = surface.Pass(); 105 surface_ = std::move(surface);
104 106
105 needs_reconfigure_ = true; 107 needs_reconfigure_ = true;
106 } 108 }
107 109
108 bool MediaCodecVideoDecoder::HasVideoSurface() const { 110 bool MediaCodecVideoDecoder::HasVideoSurface() const {
109 DCHECK(media_task_runner_->BelongsToCurrentThread()); 111 DCHECK(media_task_runner_->BelongsToCurrentThread());
110 112
111 return !surface_.IsEmpty(); 113 return !surface_.IsEmpty();
112 } 114 }
113 115
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 351
350 // |update_current_time_cb_| might be null if there is audio stream. 352 // |update_current_time_cb_| might be null if there is audio stream.
351 // Do not update current time for stand-alone EOS frames. 353 // Do not update current time for stand-alone EOS frames.
352 if (!update_current_time_cb_.is_null() && update_time) { 354 if (!update_current_time_cb_.is_null() && update_time) {
353 media_task_runner_->PostTask( 355 media_task_runner_->PostTask(
354 FROM_HERE, base::Bind(update_current_time_cb_, pts, pts, false)); 356 FROM_HERE, base::Bind(update_current_time_cb_, pts, pts, false));
355 } 357 }
356 } 358 }
357 359
358 } // namespace media 360 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_codec_player_unittest.cc ('k') | media/base/android/media_drm_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698