OLD | NEW |
---|---|
(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 | |
OLD | NEW |