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

Side by Side Diff: media/base/video_frame.h

Issue 2096813002: media/vpx: Add support for VP9 alpha channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test files for real Created 4 years, 5 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 | « no previous file | media/base/video_frame.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef MEDIA_BASE_VIDEO_FRAME_H_ 5 #ifndef MEDIA_BASE_VIDEO_FRAME_H_
6 #define MEDIA_BASE_VIDEO_FRAME_H_ 6 #define MEDIA_BASE_VIDEO_FRAME_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 int32_t u_stride, 187 int32_t u_stride,
188 int32_t v_stride, 188 int32_t v_stride,
189 uint8_t* y_data, 189 uint8_t* y_data,
190 uint8_t* u_data, 190 uint8_t* u_data,
191 uint8_t* v_data, 191 uint8_t* v_data,
192 const gfx::GpuMemoryBufferHandle& y_handle, 192 const gfx::GpuMemoryBufferHandle& y_handle,
193 const gfx::GpuMemoryBufferHandle& u_handle, 193 const gfx::GpuMemoryBufferHandle& u_handle,
194 const gfx::GpuMemoryBufferHandle& v_handle, 194 const gfx::GpuMemoryBufferHandle& v_handle,
195 base::TimeDelta timestamp); 195 base::TimeDelta timestamp);
196 196
197 // Wraps external YUVA data of the given parameters with a VideoFrame.
198 // The returned VideoFrame does not own the data passed in.
199 static scoped_refptr<VideoFrame> WrapExternalYuvaData(
200 VideoPixelFormat format,
201 const gfx::Size& coded_size,
202 const gfx::Rect& visible_rect,
203 const gfx::Size& natural_size,
204 int32_t y_stride,
205 int32_t u_stride,
206 int32_t v_stride,
207 int32_t a_stride,
208 uint8_t* y_data,
209 uint8_t* u_data,
210 uint8_t* v_data,
211 uint8_t* a_data,
212 base::TimeDelta timestamp);
213
197 #if defined(OS_LINUX) 214 #if defined(OS_LINUX)
198 // Wraps provided dmabufs 215 // Wraps provided dmabufs
199 // (https://www.kernel.org/doc/Documentation/dma-buf-sharing.txt) with a 216 // (https://www.kernel.org/doc/Documentation/dma-buf-sharing.txt) with a
200 // VideoFrame. The dmabuf fds are dup()ed on creation, so that the VideoFrame 217 // VideoFrame. The dmabuf fds are dup()ed on creation, so that the VideoFrame
201 // retains a reference to them, and are automatically close()d on destruction, 218 // retains a reference to them, and are automatically close()d on destruction,
202 // dropping the reference. The caller may safely close() its reference after 219 // dropping the reference. The caller may safely close() its reference after
203 // calling WrapExternalDmabufs(). 220 // calling WrapExternalDmabufs().
204 // The image data is only accessible via dmabuf fds, which are usually passed 221 // The image data is only accessible via dmabuf fds, which are usually passed
205 // directly to a hardware device and/or to another process, or can also be 222 // directly to a hardware device and/or to another process, or can also be
206 // mapped via mmap() for CPU access. 223 // mapped via mmap() for CPU access.
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 573
557 // Generated at construction time. 574 // Generated at construction time.
558 const int unique_id_; 575 const int unique_id_;
559 576
560 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); 577 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame);
561 }; 578 };
562 579
563 } // namespace media 580 } // namespace media
564 581
565 #endif // MEDIA_BASE_VIDEO_FRAME_H_ 582 #endif // MEDIA_BASE_VIDEO_FRAME_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698