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

Side by Side Diff: content/common/gpu/media/ozone_video_decode_accelerator.cc

Issue 269673005: media: Add MediaOzonePlatform support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
(Empty)
1 // Copyright (c) 2014 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 "content/common/gpu/media/ozone_video_decode_accelerator.h"
6
7 #include "base/logging.h"
8 #include "content/common/gpu/media/video_decode_factory_ozone.h"
9
10 namespace content {
11
12 OzoneVideoDecodeAccelerator::OzoneVideoDecodeAccelerator(
13 const base::Callback<bool(void)>& make_context_current) {
14 if (!VideoDecodeFactoryOzone::GetInstance())
15 LOG(FATAL) << "Failed to initialize Video Decode Accelerator on OZONE";
16
17 // vignatti(TODO): make_context_current is not used
18 }
19
20 OzoneVideoDecodeAccelerator::~OzoneVideoDecodeAccelerator() {
21 }
22
23 bool OzoneVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
24 Client* client) {
25 return VideoDecodeFactoryOzone::GetInstance()->Initialize(profile, client);
dshwang 2014/05/06 17:07:45 I'm not sure you can use singleton pattern, becaus
26 }
27
28 void OzoneVideoDecodeAccelerator::Decode(
29 const media::BitstreamBuffer& bitstream_buffer) {
30 VideoDecodeFactoryOzone::GetInstance()->Decode(bitstream_buffer);
31 }
32
33 void OzoneVideoDecodeAccelerator::AssignPictureBuffers(
34 const std::vector<media::PictureBuffer>& buffers) {
35 VideoDecodeFactoryOzone::GetInstance()->AssignPictureBuffers(buffers);
36 }
37
38 void OzoneVideoDecodeAccelerator::ReusePictureBuffer(int32 picture_buffer_id) {
39 VideoDecodeFactoryOzone::GetInstance()->ReusePictureBuffer(
40 picture_buffer_id);
41 }
42
43 void OzoneVideoDecodeAccelerator::Flush() {
44 VideoDecodeFactoryOzone::GetInstance()->Flush();
45 }
46
47 void OzoneVideoDecodeAccelerator::Reset() {
48 VideoDecodeFactoryOzone::GetInstance()->Reset();
49 }
50
51 void OzoneVideoDecodeAccelerator::Destroy() {
52 VideoDecodeFactoryOzone::GetInstance()->Destroy();
53 }
54
55 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/ozone_video_decode_accelerator.h ('k') | content/common/gpu/media/video_decode_factory_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698