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

Unified Diff: media/ffmpeg/ffmpeg_common.cc

Issue 2801803002: Android: enable H264&VP8 HW accelerator for MediaRecorder (Closed)
Patch Set: 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
Index: media/ffmpeg/ffmpeg_common.cc
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 950b9c0fd103672103d65048a7ad47ab48b89ee7..a241e0491bffc8f5b8ee35073dca92e858d55916 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -506,10 +506,13 @@ bool AVStreamToVideoDecoderConfig(const AVStream* stream,
coded_size.set_height((coded_size.height() + 1) / 2 * 2);
}
- AVDictionaryEntry* webm_alpha =
- av_dict_get(stream->metadata, "alpha_mode", nullptr, 0);
- if (webm_alpha && !strcmp(webm_alpha->value, "1")) {
- format = PIXEL_FORMAT_YV12A;
+ // H264 doesn't support alpha mode.
+ if (codec != kCodecH264) {
emircan 2017/04/07 17:33:04 Why is this necessary? Is there problem with playi
braveyao 2017/04/08 00:56:26 Yes there is problem with playing back H264 record
emircan 2017/04/10 21:18:09 Alpha recording would only happen for WebM/VPx as
braveyao 2017/04/14 22:28:28 I don't understand your concern here. Since HW H26
emircan 2017/04/17 17:24:06 Note: This issue was resolved on https://coderevie
braveyao 2017/04/17 18:09:27 Acknowledged.
+ AVDictionaryEntry* webm_alpha =
+ av_dict_get(stream->metadata, "alpha_mode", nullptr, 0);
+ if (webm_alpha && !strcmp(webm_alpha->value, "1")) {
+ format = PIXEL_FORMAT_YV12A;
+ }
}
// Prefer the color space found by libavcodec if available.

Powered by Google App Engine
This is Rietveld 408576698