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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 case PIXEL_FORMAT_RGB24: | 373 case PIXEL_FORMAT_RGB24: |
374 case PIXEL_FORMAT_RGB32: | 374 case PIXEL_FORMAT_RGB32: |
375 case PIXEL_FORMAT_MJPEG: | 375 case PIXEL_FORMAT_MJPEG: |
376 case PIXEL_FORMAT_MT21: | 376 case PIXEL_FORMAT_MT21: |
377 case PIXEL_FORMAT_YUV420P9: | 377 case PIXEL_FORMAT_YUV420P9: |
378 case PIXEL_FORMAT_YUV422P9: | 378 case PIXEL_FORMAT_YUV422P9: |
379 case PIXEL_FORMAT_YUV444P9: | 379 case PIXEL_FORMAT_YUV444P9: |
380 case PIXEL_FORMAT_YUV420P10: | 380 case PIXEL_FORMAT_YUV420P10: |
381 case PIXEL_FORMAT_YUV422P10: | 381 case PIXEL_FORMAT_YUV422P10: |
382 case PIXEL_FORMAT_YUV444P10: | 382 case PIXEL_FORMAT_YUV444P10: |
| 383 case PIXEL_FORMAT_Y8: |
| 384 case PIXEL_FORMAT_Y16: |
383 case PIXEL_FORMAT_UNKNOWN: | 385 case PIXEL_FORMAT_UNKNOWN: |
384 frame_ready_cb.Run(video_frame); | 386 frame_ready_cb.Run(video_frame); |
385 return; | 387 return; |
386 } | 388 } |
387 | 389 |
388 const gfx::Size coded_size = CodedSize(video_frame, output_format_); | 390 const gfx::Size coded_size = CodedSize(video_frame, output_format_); |
389 // Acquire resources. Incompatible ones will be dropped from the pool. | 391 // Acquire resources. Incompatible ones will be dropped from the pool. |
390 FrameResources* frame_resources = | 392 FrameResources* frame_resources = |
391 GetOrCreateFrameResources(coded_size, output_format_); | 393 GetOrCreateFrameResources(coded_size, output_format_); |
392 if (!frame_resources) { | 394 if (!frame_resources) { |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 } | 767 } |
766 | 768 |
767 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( | 769 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( |
768 const scoped_refptr<VideoFrame>& video_frame, | 770 const scoped_refptr<VideoFrame>& video_frame, |
769 const FrameReadyCB& frame_ready_cb) { | 771 const FrameReadyCB& frame_ready_cb) { |
770 DCHECK(video_frame); | 772 DCHECK(video_frame); |
771 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb); | 773 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb); |
772 } | 774 } |
773 | 775 |
774 } // namespace media | 776 } // namespace media |
OLD | NEW |