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

Unified Diff: content/renderer/media_recorder/video_track_recorder.cc

Issue 2855503002: RELAND: MediaRecorder: enable encode acceleration for VP8 in Android (Closed)
Patch Set: Disable MAYBE_PeerConnection test on Android Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media_recorder/video_track_recorder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media_recorder/video_track_recorder.cc
diff --git a/content/renderer/media_recorder/video_track_recorder.cc b/content/renderer/media_recorder/video_track_recorder.cc
index 49def8d16071b449fbe87e534409b1c15cf78fee..96cb15c59538018ae513dd08fd64c6216398e6b8 100644
--- a/content/renderer/media_recorder/video_track_recorder.cc
+++ b/content/renderer/media_recorder/video_track_recorder.cc
@@ -109,11 +109,6 @@ CodecEnumerator::CodecEnumerator() {
return;
#endif
-#if defined(OS_ANDROID)
- // See https://crbug.com/653864.
- return;
-#endif
-
content::RenderThreadImpl* const render_thread_impl =
content::RenderThreadImpl::current();
if (!render_thread_impl) {
@@ -131,13 +126,18 @@ CodecEnumerator::CodecEnumerator() {
const auto vea_supported_profiles =
gpu_factories->GetVideoEncodeAcceleratorSupportedProfiles();
for (const auto& supported_profile : vea_supported_profiles) {
+ const media::VideoCodecProfile codec = supported_profile.profile;
+#if defined(OS_ANDROID)
+ // TODO(mcasas): enable other codecs, https://crbug.com/638664.
+ if (codec < media::VP8PROFILE_MIN || codec > media::VP8PROFILE_MAX)
+ continue;
+#endif
for (auto& codec_id_and_profile : kPreferredCodecIdAndVEAProfiles) {
- if (supported_profile.profile >= codec_id_and_profile.min_profile &&
- supported_profile.profile <= codec_id_and_profile.max_profile) {
- DVLOG(2) << "Accelerated codec found: "
- << media::GetProfileName(supported_profile.profile);
- codec_id_to_profile_.insert(std::make_pair(
- codec_id_and_profile.codec_id, supported_profile.profile));
+ if (codec >= codec_id_and_profile.min_profile &&
+ codec <= codec_id_and_profile.max_profile) {
+ DVLOG(2) << "Accelerated codec found: " << media::GetProfileName(codec);
+ codec_id_to_profile_.insert(
+ std::make_pair(codec_id_and_profile.codec_id, codec));
}
}
}
« no previous file with comments | « content/renderer/media_recorder/video_track_recorder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698