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

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

Issue 2895293002: Android: tidy up outdated version checks. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « media/base/android/media_codec_util.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 // 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 const AndroidVideoDecodeAccelerator::PlatformConfig& platform_config) { 119 const AndroidVideoDecodeAccelerator::PlatformConfig& platform_config) {
120 if (platform_config.force_deferred_surface_creation) 120 if (platform_config.force_deferred_surface_creation)
121 return true; 121 return true;
122 122
123 // TODO(liberato): We might still want to defer if we've got a routing 123 // TODO(liberato): We might still want to defer if we've got a routing
124 // token. It depends on whether we want to use it right away or not. 124 // token. It depends on whether we want to use it right away or not.
125 if (surface_id != SurfaceManager::kNoSurfaceID || overlay_routing_token) 125 if (surface_id != SurfaceManager::kNoSurfaceID || overlay_routing_token)
126 return false; 126 return false;
127 127
128 return codec == kCodecH264 && codec_allocator->IsAnyRegisteredAVDA() && 128 return codec == kCodecH264 && codec_allocator->IsAnyRegisteredAVDA() &&
129 platform_config.sdk_int <= 18; 129 platform_config.sdk_int <= base::android::SDK_VERSION_JELLY_BEAN_MR2;
130 } 130 }
131 131
132 std::unique_ptr<AndroidOverlay> CreateContentVideoViewOverlay( 132 std::unique_ptr<AndroidOverlay> CreateContentVideoViewOverlay(
133 int32_t surface_id, 133 int32_t surface_id,
134 AndroidOverlayConfig config) { 134 AndroidOverlayConfig config) {
135 return base::MakeUnique<ContentVideoViewOverlay>(surface_id, 135 return base::MakeUnique<ContentVideoViewOverlay>(surface_id,
136 std::move(config)); 136 std::move(config));
137 } 137 }
138 138
139 } // namespace 139 } // namespace
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 codec_allocator_->ReleaseMediaCodec(std::move(media_codec_), 1693 codec_allocator_->ReleaseMediaCodec(std::move(media_codec_),
1694 codec_config_->surface_bundle); 1694 codec_config_->surface_bundle);
1695 } 1695 }
1696 1696
1697 void AndroidVideoDecodeAccelerator::ReleaseCodecAndBundle() { 1697 void AndroidVideoDecodeAccelerator::ReleaseCodecAndBundle() {
1698 ReleaseCodec(); 1698 ReleaseCodec();
1699 codec_config_->surface_bundle = nullptr; 1699 codec_config_->surface_bundle = nullptr;
1700 } 1700 }
1701 1701
1702 } // namespace media 1702 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_codec_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698