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

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

Issue 1869303004: media: Implement zero-copy video playback for VP8. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: optimize only VP8 Created 4 years, 8 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 | « cc/resources/video_resource_updater.cc ('k') | 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 static scoped_refptr<VideoFrame> WrapYUV420NativeTextures( 142 static scoped_refptr<VideoFrame> WrapYUV420NativeTextures(
143 const gpu::MailboxHolder& y_mailbox_holder, 143 const gpu::MailboxHolder& y_mailbox_holder,
144 const gpu::MailboxHolder& u_mailbox_holder, 144 const gpu::MailboxHolder& u_mailbox_holder,
145 const gpu::MailboxHolder& v_mailbox_holder, 145 const gpu::MailboxHolder& v_mailbox_holder,
146 const ReleaseMailboxCB& mailbox_holders_release_cb, 146 const ReleaseMailboxCB& mailbox_holders_release_cb,
147 const gfx::Size& coded_size, 147 const gfx::Size& coded_size,
148 const gfx::Rect& visible_rect, 148 const gfx::Rect& visible_rect,
149 const gfx::Size& natural_size, 149 const gfx::Size& natural_size,
150 base::TimeDelta timestamp); 150 base::TimeDelta timestamp);
151 151
152 // Wraps a set of native textures representing YV12A data with a VideoFrame.
153 // |mailbox_holders_release_cb| will be called with a sync token as the
154 // argument when the VideoFrame is to be destroyed.
155 static scoped_refptr<VideoFrame> WrapYV12ANativeTextures(
156 const gpu::MailboxHolder& y_mailbox_holder,
157 const gpu::MailboxHolder& u_mailbox_holder,
158 const gpu::MailboxHolder& v_mailbox_holder,
159 const gpu::MailboxHolder& a_mailbox_holder,
160 const ReleaseMailboxCB& mailbox_holders_release_cb,
161 const gfx::Size& coded_size,
162 const gfx::Rect& visible_rect,
163 const gfx::Size& natural_size,
164 base::TimeDelta timestamp);
165
152 // Wraps packed image data residing in a memory buffer with a VideoFrame. 166 // Wraps packed image data residing in a memory buffer with a VideoFrame.
153 // The image data resides in |data| and is assumed to be packed tightly in a 167 // The image data resides in |data| and is assumed to be packed tightly in a
154 // buffer of logical dimensions |coded_size| with the appropriate bit depth 168 // buffer of logical dimensions |coded_size| with the appropriate bit depth
155 // and plane count as given by |format|. Returns NULL on failure. 169 // and plane count as given by |format|. Returns NULL on failure.
156 static scoped_refptr<VideoFrame> WrapExternalData( 170 static scoped_refptr<VideoFrame> WrapExternalData(
157 VideoPixelFormat format, 171 VideoPixelFormat format,
158 const gfx::Size& coded_size, 172 const gfx::Size& coded_size,
159 const gfx::Rect& visible_rect, 173 const gfx::Rect& visible_rect,
160 const gfx::Size& natural_size, 174 const gfx::Size& natural_size,
161 uint8_t* data, 175 uint8_t* data,
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 gpu::SyncToken release_sync_token_; 575 gpu::SyncToken release_sync_token_;
562 576
563 VideoFrameMetadata metadata_; 577 VideoFrameMetadata metadata_;
564 578
565 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); 579 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame);
566 }; 580 };
567 581
568 } // namespace media 582 } // namespace media
569 583
570 #endif // MEDIA_BASE_VIDEO_FRAME_H_ 584 #endif // MEDIA_BASE_VIDEO_FRAME_H_
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698