Commit 0ad36399 authored by Markus Handell's avatar Markus Handell Committed by Commit Bot

VideoTrackRecorder: Add support for PIXEL_FORMAT_ABGR.

Android MediaRecorder choked on receiving frames in
PIXEL_FORMAT_ABGR encoding. This resulted in no encoding
happening, and consequently ondataavailable callbacks
not getting fired.

This patch adds support for the format.

TESTED=manual appr.tc test hijacking the remote stream
and recording it.

Bug: 1052298
Change-Id: I6fd4aa4bb0421efbfa7a5892febb95176b9e30e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2087770Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Markus Handell <handellm@google.com>
Cr-Commit-Position: refs/heads/master@{#747238}
parent 1ee9b76c
......@@ -241,6 +241,7 @@ void VideoTrackRecorderImpl::Encoder::StartFrameEncode(
if (!(video_frame->format() == media::PIXEL_FORMAT_I420 ||
video_frame->format() == media::PIXEL_FORMAT_ARGB ||
video_frame->format() == media::PIXEL_FORMAT_ABGR ||
video_frame->format() == media::PIXEL_FORMAT_I420A ||
video_frame->format() == media::PIXEL_FORMAT_NV12 ||
video_frame->format() == media::PIXEL_FORMAT_XRGB)) {
......@@ -313,6 +314,7 @@ void VideoTrackRecorderImpl::Encoder::RetrieveFrameOnMainThread(
// TODO(crbug/1023390): Add browsertest for these.
DCHECK(video_frame->HasTextures());
DCHECK(video_frame->format() == media::PIXEL_FORMAT_ARGB ||
video_frame->format() == media::PIXEL_FORMAT_ABGR ||
video_frame->format() == media::PIXEL_FORMAT_XRGB);
const gfx::Size& old_visible_size = video_frame->visible_rect().size();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment