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

Side by Side Diff: media/video/gpu_memory_buffer_video_frame_pool.cc

Issue 2088273003: Video Color Managament (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: log color space Created 4 years, 4 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/media.gyp ('k') | ui/gfx/color_space.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/video/gpu_memory_buffer_video_frame_pool.h" 5 #include "media/video/gpu_memory_buffer_video_frame_pool.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 frame_format, mailbox_holders, release_mailbox_callback, coded_size, 598 frame_format, mailbox_holders, release_mailbox_callback, coded_size,
599 gfx::Rect(visible_size), video_frame->natural_size(), 599 gfx::Rect(visible_size), video_frame->natural_size(),
600 video_frame->timestamp()); 600 video_frame->timestamp());
601 601
602 if (!frame) { 602 if (!frame) {
603 release_mailbox_callback.Run(gpu::SyncToken()); 603 release_mailbox_callback.Run(gpu::SyncToken());
604 frame_ready_cb.Run(video_frame); 604 frame_ready_cb.Run(video_frame);
605 return; 605 return;
606 } 606 }
607 607
608 frame->set_color_space(video_frame->ColorSpace());
609
608 bool allow_overlay = false; 610 bool allow_overlay = false;
609 switch (output_format_) { 611 switch (output_format_) {
610 case PIXEL_FORMAT_I420: 612 case PIXEL_FORMAT_I420:
611 allow_overlay = 613 allow_overlay =
612 video_frame->metadata()->IsTrue(VideoFrameMetadata::ALLOW_OVERLAY); 614 video_frame->metadata()->IsTrue(VideoFrameMetadata::ALLOW_OVERLAY);
613 break; 615 break;
614 case PIXEL_FORMAT_NV12: 616 case PIXEL_FORMAT_NV12:
615 case PIXEL_FORMAT_UYVY: 617 case PIXEL_FORMAT_UYVY:
616 allow_overlay = true; 618 allow_overlay = true;
617 break; 619 break;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 } 763 }
762 764
763 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( 765 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame(
764 const scoped_refptr<VideoFrame>& video_frame, 766 const scoped_refptr<VideoFrame>& video_frame,
765 const FrameReadyCB& frame_ready_cb) { 767 const FrameReadyCB& frame_ready_cb) {
766 DCHECK(video_frame); 768 DCHECK(video_frame);
767 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb); 769 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb);
768 } 770 }
769 771
770 } // namespace media 772 } // namespace media
OLDNEW
« no previous file with comments | « media/media.gyp ('k') | ui/gfx/color_space.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698