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

Unified Diff: media/filters/gpu_video_decoder.cc

Issue 1822983002: Support external buffer import in VDA interface and add a V4L2SVDA impl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/rtc_video_decoder.cc ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.cc
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc
index 2e11d8786863c034b87f05dd097905f068276d53..6149959c173305ce4abadb109c5d4caaeda1dd65 100644
--- a/media/filters/gpu_video_decoder.cc
+++ b/media/filters/gpu_video_decoder.cc
@@ -541,12 +541,15 @@ void GpuVideoDecoder::PictureReady(const media::Picture& picture) {
DCHECK(decoder_texture_target_);
- bool opaque = IsOpaque(config_.format());
+ VideoPixelFormat pixel_format = vda_->GetOutputFormat();
+ if (pixel_format == PIXEL_FORMAT_UNKNOWN) {
+ pixel_format =
+ IsOpaque(config_.format()) ? PIXEL_FORMAT_XRGB : PIXEL_FORMAT_ARGB;
+ }
scoped_refptr<VideoFrame> frame(VideoFrame::WrapNativeTexture(
- opaque ? PIXEL_FORMAT_XRGB : PIXEL_FORMAT_ARGB,
- gpu::MailboxHolder(pb.texture_mailbox(0), gpu::SyncToken(),
- decoder_texture_target_),
+ pixel_format, gpu::MailboxHolder(pb.texture_mailbox(0), gpu::SyncToken(),
+ decoder_texture_target_),
BindToCurrentLoop(base::Bind(
&GpuVideoDecoder::ReleaseMailbox, weak_factory_.GetWeakPtr(),
factories_, picture.picture_buffer_id(), pb.texture_ids())),
« no previous file with comments | « content/renderer/media/rtc_video_decoder.cc ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698