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 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 325 |
326 scoped_refptr<VideoFrame> | 326 scoped_refptr<VideoFrame> |
327 GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( | 327 GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( |
328 const scoped_refptr<VideoFrame>& video_frame) { | 328 const scoped_refptr<VideoFrame>& video_frame) { |
329 switch (video_frame->format()) { | 329 switch (video_frame->format()) { |
330 // Supported cases. | 330 // Supported cases. |
331 case VideoFrame::YV12: | 331 case VideoFrame::YV12: |
332 case VideoFrame::I420: | 332 case VideoFrame::I420: |
333 return pool_impl_->CreateHardwareFrame(video_frame); | 333 return pool_impl_->CreateHardwareFrame(video_frame); |
334 // Unsupported cases. | 334 // Unsupported cases. |
335 case media::VideoFrame::YV12A: | 335 case VideoFrame::YV12A: |
336 case media::VideoFrame::YV16: | 336 case VideoFrame::YV16: |
337 case media::VideoFrame::YV24: | 337 case VideoFrame::YV24: |
338 #if defined(VIDEO_HOLE) | 338 #if defined(OS_MACOSX) || defined(OS_CHROMEOS) |
339 case media::VideoFrame::HOLE: | 339 case VideoFrame::NV12: |
340 #endif // defined(VIDEO_HOLE) | 340 #endif |
341 case media::VideoFrame::ARGB: | 341 case VideoFrame::ARGB: |
342 case media::VideoFrame::NATIVE_TEXTURE: | 342 case VideoFrame::XRGB: |
343 case media::VideoFrame::UNKNOWN: | 343 case VideoFrame::UNKNOWN: |
344 case media::VideoFrame::NV12: | |
345 break; | 344 break; |
346 } | 345 } |
347 return video_frame; | 346 return video_frame; |
348 } | 347 } |
349 | 348 |
350 } // namespace media | 349 } // namespace media |
OLD | NEW |