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

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

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WebGL video to texture support and readPixels from R16UI for CPU access Created 4 years, 4 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
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 #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
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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 } 760 }
759 761
760 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( 762 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame(
761 const scoped_refptr<VideoFrame>& video_frame, 763 const scoped_refptr<VideoFrame>& video_frame,
762 const FrameReadyCB& frame_ready_cb) { 764 const FrameReadyCB& frame_ready_cb) {
763 DCHECK(video_frame); 765 DCHECK(video_frame);
764 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb); 766 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb);
765 } 767 }
766 768
767 } // namespace media 769 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698