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

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

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
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/video_media_codec_decoder.h" 5 #include "media/base/android/video_media_codec_decoder.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 79
80 void VideoMediaCodecDecoder::ReleaseDecoderResources() { 80 void VideoMediaCodecDecoder::ReleaseDecoderResources() {
81 DCHECK(media_task_runner_->BelongsToCurrentThread()); 81 DCHECK(media_task_runner_->BelongsToCurrentThread());
82 DVLOG(1) << class_name() << "::" << __FUNCTION__; 82 DVLOG(1) << class_name() << "::" << __FUNCTION__;
83 83
84 DoEmergencyStop(); 84 DoEmergencyStop();
85 85
86 ReleaseMediaCodec(); 86 ReleaseMediaCodec();
87 87
88 surface_ = gfx::ScopedJavaSurface(); 88 surface_ = gl::ScopedJavaSurface();
89 } 89 }
90 90
91 void VideoMediaCodecDecoder::ReleaseMediaCodec() { 91 void VideoMediaCodecDecoder::ReleaseMediaCodec() {
92 DCHECK(media_task_runner_->BelongsToCurrentThread()); 92 DCHECK(media_task_runner_->BelongsToCurrentThread());
93 93
94 MediaCodecDecoder::ReleaseMediaCodec(); 94 MediaCodecDecoder::ReleaseMediaCodec();
95 delayed_buffers_.clear(); 95 delayed_buffers_.clear();
96 } 96 }
97 97
98 void VideoMediaCodecDecoder::SetVideoSurface(gfx::ScopedJavaSurface surface) { 98 void VideoMediaCodecDecoder::SetVideoSurface(gl::ScopedJavaSurface surface) {
99 DCHECK(media_task_runner_->BelongsToCurrentThread()); 99 DCHECK(media_task_runner_->BelongsToCurrentThread());
100 100
101 DVLOG(1) << class_name() << "::" << __FUNCTION__ 101 DVLOG(1) << class_name() << "::" << __FUNCTION__
102 << (surface.IsEmpty() ? " empty" : " non-empty"); 102 << (surface.IsEmpty() ? " empty" : " non-empty");
103 103
104 surface_ = std::move(surface); 104 surface_ = std::move(surface);
105 105
106 needs_reconfigure_ = true; 106 needs_reconfigure_ = true;
107 } 107 }
108 108
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 // |update_current_time_cb_| might be null if there is audio stream. 351 // |update_current_time_cb_| might be null if there is audio stream.
352 // Do not update current time for stand-alone EOS frames. 352 // Do not update current time for stand-alone EOS frames.
353 if (!update_current_time_cb_.is_null() && update_time) { 353 if (!update_current_time_cb_.is_null() && update_time) {
354 media_task_runner_->PostTask( 354 media_task_runner_->PostTask(
355 FROM_HERE, base::Bind(update_current_time_cb_, pts, pts, false)); 355 FROM_HERE, base::Bind(update_current_time_cb_, pts, pts, false));
356 } 356 }
357 } 357 }
358 358
359 } // namespace media 359 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/video_media_codec_decoder.h ('k') | media/gpu/android_copying_backing_strategy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698