Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: media/video/gpu_memory_buffer_video_frame_pool.cc

Issue 1154153003: Relanding 1143663007: VideoFrame: Separate Pixel Format from Storage Type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NV12 support in CrOS Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/mojo/services/media_type_converters.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « media/mojo/services/media_type_converters.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698