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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 if (output_format_ == GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED) { | 397 if (output_format_ == GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED) { |
398 frame_ready_cb.Run(video_frame); | 398 frame_ready_cb.Run(video_frame); |
399 return; | 399 return; |
400 } | 400 } |
401 switch (video_frame->format()) { | 401 switch (video_frame->format()) { |
402 // Supported cases. | 402 // Supported cases. |
403 case PIXEL_FORMAT_YV12: | 403 case PIXEL_FORMAT_YV12: |
404 case PIXEL_FORMAT_I420: | 404 case PIXEL_FORMAT_I420: |
405 break; | 405 break; |
406 // Unsupported cases. | 406 // Unsupported cases. |
| 407 case PIXEL_FORMAT_I422: |
407 case PIXEL_FORMAT_YV12A: | 408 case PIXEL_FORMAT_YV12A: |
408 case PIXEL_FORMAT_YV16: | 409 case PIXEL_FORMAT_YV16: |
409 case PIXEL_FORMAT_YV24: | 410 case PIXEL_FORMAT_YV24: |
410 case PIXEL_FORMAT_NV12: | 411 case PIXEL_FORMAT_NV12: |
411 case PIXEL_FORMAT_NV21: | 412 case PIXEL_FORMAT_NV21: |
412 case PIXEL_FORMAT_UYVY: | 413 case PIXEL_FORMAT_UYVY: |
413 case PIXEL_FORMAT_YUY2: | 414 case PIXEL_FORMAT_YUY2: |
414 case PIXEL_FORMAT_ARGB: | 415 case PIXEL_FORMAT_ARGB: |
415 case PIXEL_FORMAT_XRGB: | 416 case PIXEL_FORMAT_XRGB: |
416 case PIXEL_FORMAT_RGB24: | 417 case PIXEL_FORMAT_RGB24: |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 } | 827 } |
827 | 828 |
828 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( | 829 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( |
829 const scoped_refptr<VideoFrame>& video_frame, | 830 const scoped_refptr<VideoFrame>& video_frame, |
830 const FrameReadyCB& frame_ready_cb) { | 831 const FrameReadyCB& frame_ready_cb) { |
831 DCHECK(video_frame); | 832 DCHECK(video_frame); |
832 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb); | 833 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb); |
833 } | 834 } |
834 | 835 |
835 } // namespace media | 836 } // namespace media |
OLD | NEW |