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