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

Side by Side Diff: webkit/media/webvideoframe_impl.cc

Issue 12385073: Add interface implementations for WebVideoFrameImpl to give the exact video Format, textureId and t… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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 (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 #include "media/base/video_frame.h" 5 #include "media/base/video_frame.h"
6 #include "webkit/media/webvideoframe_impl.h" 6 #include "webkit/media/webvideoframe_impl.h"
7 7
8 namespace webkit_media { 8 namespace webkit_media {
9 9
10 WebVideoFrameImpl::WebVideoFrameImpl( 10 WebVideoFrameImpl::WebVideoFrameImpl(
11 scoped_refptr<media::VideoFrame> video_frame) 11 scoped_refptr<media::VideoFrame> video_frame)
12 : video_frame(video_frame) { 12 : video_frame(video_frame) {
13 } 13 }
14 14
15 WebVideoFrameImpl::~WebVideoFrameImpl() {} 15 WebVideoFrameImpl::~WebVideoFrameImpl() {}
16 16
17 WebKit::WebVideoFrame::Format WebVideoFrameImpl::format() const
18 {
19 // media::VideoFrame::Format is in sync with WebKit::WebVideoFrame::Format
20 return video_frame ?
21 (WebKit::WebVideoFrame::Format)(video_frame->format()) :
22 WebKit::WebVideoFrame::FormatInvalid;
23 }
24
25 unsigned WebVideoFrameImpl::textureId() const
26 {
27 return video_frame ? video_frame->texture_id() : 0;
28 }
29
30 unsigned WebVideoFrameImpl::textureTarget() const
31 {
32 return video_frame ? video_frame->texture_target() : 0;
33 }
17 } // namespace webkit_media 34 } // namespace webkit_media
OLDNEW
« webkit/media/webvideoframe_impl.h ('K') | « webkit/media/webvideoframe_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698