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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 case PIXEL_FORMAT_YUV422P9: | 421 case PIXEL_FORMAT_YUV422P9: |
422 case PIXEL_FORMAT_YUV444P9: | 422 case PIXEL_FORMAT_YUV444P9: |
423 case PIXEL_FORMAT_YUV420P10: | 423 case PIXEL_FORMAT_YUV420P10: |
424 case PIXEL_FORMAT_YUV422P10: | 424 case PIXEL_FORMAT_YUV422P10: |
425 case PIXEL_FORMAT_YUV444P10: | 425 case PIXEL_FORMAT_YUV444P10: |
426 case PIXEL_FORMAT_YUV420P12: | 426 case PIXEL_FORMAT_YUV420P12: |
427 case PIXEL_FORMAT_YUV422P12: | 427 case PIXEL_FORMAT_YUV422P12: |
428 case PIXEL_FORMAT_YUV444P12: | 428 case PIXEL_FORMAT_YUV444P12: |
429 case PIXEL_FORMAT_Y8: | 429 case PIXEL_FORMAT_Y8: |
430 case PIXEL_FORMAT_Y16: | 430 case PIXEL_FORMAT_Y16: |
| 431 case PIXEL_FORMAT_I422: |
431 case PIXEL_FORMAT_UNKNOWN: | 432 case PIXEL_FORMAT_UNKNOWN: |
432 frame_ready_cb.Run(video_frame); | 433 frame_ready_cb.Run(video_frame); |
433 return; | 434 return; |
434 } | 435 } |
435 | 436 |
436 const gfx::Size coded_size = CodedSize(video_frame, output_format_); | 437 const gfx::Size coded_size = CodedSize(video_frame, output_format_); |
437 // Acquire resources. Incompatible ones will be dropped from the pool. | 438 // Acquire resources. Incompatible ones will be dropped from the pool. |
438 FrameResources* frame_resources = | 439 FrameResources* frame_resources = |
439 GetOrCreateFrameResources(coded_size, output_format_); | 440 GetOrCreateFrameResources(coded_size, output_format_); |
440 if (!frame_resources) { | 441 if (!frame_resources) { |
(...skipping 385 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 |