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

Side by Side Diff: media/mojo/common/mojo_video_frame_provider.cc

Issue 2643733002: Allow to use {FFmpeg/Vpx}VideoDecoder from a UtilityProcess (Closed)
Patch Set: Rebase Created 3 years, 10 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/common/mojo_video_frame_provider.h ('k') | media/mojo/services/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/mojo/common/mojo_video_frame_provider.h"
6
7 #include "media/mojo/common/mojo_shared_buffer_video_frame.h"
8
9 namespace media {
10
11 MojoVideoFrameProvider::MojoVideoFrameProvider() {}
12
13 MojoVideoFrameProvider::~MojoVideoFrameProvider() {}
14
15 scoped_refptr<VideoFrame> MojoVideoFrameProvider::CreateZeroInitializedFrame(
16 VideoPixelFormat format,
17 const gfx::Size& coded_size,
18 const gfx::Rect& visible_rect,
19 const gfx::Size& natural_size,
20 base::TimeDelta timestamp) {
21 // TODO(j.isorce): handle above sizes and implement
22 // MojoSharedBufferVideoFrame::CreateZeroInitializedFrame.
23 return MojoSharedBufferVideoFrame::CreateYUV(format, natural_size, timestamp);
24 }
25
26 scoped_refptr<VideoFrame> MojoVideoFrameProvider::WrapVideoFrame(
27 const scoped_refptr<VideoFrame>& frame) {
28 DCHECK(frame->storage_type() == VideoFrame::STORAGE_MOJO_SHARED_BUFFER);
29
30 return MojoSharedBufferVideoFrame::WrapMojoSharedBufferVideoFrame(
31 static_cast<media::MojoSharedBufferVideoFrame*>(frame.get()));
32 }
33
34 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/common/mojo_video_frame_provider.h ('k') | media/mojo/services/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698