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

Side by Side Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2114473002: Remove usage of MediaCodec.getName(), use proxy instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "media/gpu/android_video_decode_accelerator.h" 5 #include "media/gpu/android_video_decode_accelerator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 // Note that async codec construction might still be in progress. In that 1409 // Note that async codec construction might still be in progress. In that
1410 // case, the codec will be deleted when it completes once we invalidate all 1410 // case, the codec will be deleted when it completes once we invalidate all
1411 // our weak refs. 1411 // our weak refs.
1412 weak_this_factory_.InvalidateWeakPtrs(); 1412 weak_this_factory_.InvalidateWeakPtrs();
1413 if (media_codec_) { 1413 if (media_codec_) {
1414 manager->StopTimer(this); 1414 manager->StopTimer(this);
1415 // If codec construction is broken, then we can't release this codec if it's 1415 // If codec construction is broken, then we can't release this codec if it's
1416 // backed by hardware, else it may hang too. Post it to the construction 1416 // backed by hardware, else it may hang too. Post it to the construction
1417 // thread, and it'll get freed if things start working. If things are 1417 // thread, and it'll get freed if things start working. If things are
1418 // already working, then it'll be freed soon. 1418 // already working, then it'll be freed soon.
1419 if (media_codec_->IsSoftwareCodec()) { 1419 manager->ConstructionTaskRunner()->DeleteSoon(FROM_HERE,
1420 media_codec_.reset(); 1420 media_codec_.release());
1421 } else {
1422 manager->ConstructionTaskRunner()->DeleteSoon(FROM_HERE,
1423 media_codec_.release());
1424 }
1425 } 1421 }
1426 delete this; 1422 delete this;
1427 } 1423 }
1428 1424
1429 bool AndroidVideoDecodeAccelerator::TryToSetupDecodeOnSeparateThread( 1425 bool AndroidVideoDecodeAccelerator::TryToSetupDecodeOnSeparateThread(
1430 const base::WeakPtr<Client>& decode_client, 1426 const base::WeakPtr<Client>& decode_client,
1431 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) { 1427 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) {
1432 return false; 1428 return false;
1433 } 1429 }
1434 1430
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1750 // http://crbug.com/582170 1746 // http://crbug.com/582170
1751 capabilities.flags |= media::VideoDecodeAccelerator::Capabilities:: 1747 capabilities.flags |= media::VideoDecodeAccelerator::Capabilities::
1752 SUPPORTS_EXTERNAL_OUTPUT_SURFACE; 1748 SUPPORTS_EXTERNAL_OUTPUT_SURFACE;
1753 } 1749 }
1754 } 1750 }
1755 1751
1756 return capabilities; 1752 return capabilities;
1757 } 1753 }
1758 1754
1759 } // namespace media 1755 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698