OLD | NEW |
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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 bool allow_overlay = false; | 672 bool allow_overlay = false; |
673 switch (output_format_) { | 673 switch (output_format_) { |
674 case GpuVideoAcceleratorFactories::OutputFormat::I420: | 674 case GpuVideoAcceleratorFactories::OutputFormat::I420: |
675 allow_overlay = | 675 allow_overlay = |
676 video_frame->metadata()->IsTrue(VideoFrameMetadata::ALLOW_OVERLAY); | 676 video_frame->metadata()->IsTrue(VideoFrameMetadata::ALLOW_OVERLAY); |
677 break; | 677 break; |
678 case GpuVideoAcceleratorFactories::OutputFormat::NV12_SINGLE_GMB: | 678 case GpuVideoAcceleratorFactories::OutputFormat::NV12_SINGLE_GMB: |
679 case GpuVideoAcceleratorFactories::OutputFormat::UYVY: | 679 case GpuVideoAcceleratorFactories::OutputFormat::UYVY: |
680 allow_overlay = true; | 680 allow_overlay = true; |
681 break; | 681 break; |
| 682 case GpuVideoAcceleratorFactories::OutputFormat::NV12_DUAL_GMB: |
| 683 #if defined(OS_WIN) |
| 684 allow_overlay = true; |
| 685 #endif |
| 686 break; |
682 default: | 687 default: |
683 break; | 688 break; |
684 } | 689 } |
685 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, | 690 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, |
686 allow_overlay); | 691 allow_overlay); |
687 | 692 |
688 base::TimeTicks render_time; | 693 base::TimeTicks render_time; |
689 if (video_frame->metadata()->GetTimeTicks(VideoFrameMetadata::REFERENCE_TIME, | 694 if (video_frame->metadata()->GetTimeTicks(VideoFrameMetadata::REFERENCE_TIME, |
690 &render_time)) { | 695 &render_time)) { |
691 frame->metadata()->SetTimeTicks(VideoFrameMetadata::REFERENCE_TIME, | 696 frame->metadata()->SetTimeTicks(VideoFrameMetadata::REFERENCE_TIME, |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 } | 831 } |
827 | 832 |
828 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( | 833 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( |
829 const scoped_refptr<VideoFrame>& video_frame, | 834 const scoped_refptr<VideoFrame>& video_frame, |
830 const FrameReadyCB& frame_ready_cb) { | 835 const FrameReadyCB& frame_ready_cb) { |
831 DCHECK(video_frame); | 836 DCHECK(video_frame); |
832 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb); | 837 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb); |
833 } | 838 } |
834 | 839 |
835 } // namespace media | 840 } // namespace media |
OLD | NEW |