Chromium Code Reviews| Index: content/common/gpu/media/ozone_video_decode_accelerator.cc |
| diff --git a/content/common/gpu/media/ozone_video_decode_accelerator.cc b/content/common/gpu/media/ozone_video_decode_accelerator.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..992a6cb3c775c23284331ee5607b6377549d9fcd |
| --- /dev/null |
| +++ b/content/common/gpu/media/ozone_video_decode_accelerator.cc |
| @@ -0,0 +1,55 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "content/common/gpu/media/ozone_video_decode_accelerator.h" |
| + |
| +#include "base/logging.h" |
| +#include "content/common/gpu/media/video_decode_factory_ozone.h" |
| + |
| +namespace content { |
| + |
| +OzoneVideoDecodeAccelerator::OzoneVideoDecodeAccelerator( |
| + const base::Callback<bool(void)>& make_context_current) { |
| + if (!VideoDecodeFactoryOzone::GetInstance()) |
| + LOG(FATAL) << "Failed to initialize Video Decode Accelerator on OZONE"; |
| + |
| + // vignatti(TODO): make_context_current is not used |
| +} |
| + |
| +OzoneVideoDecodeAccelerator::~OzoneVideoDecodeAccelerator() { |
| +} |
| + |
| +bool OzoneVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile, |
| + Client* client) { |
| + return VideoDecodeFactoryOzone::GetInstance()->Initialize(profile, client); |
|
dshwang
2014/05/06 17:07:45
I'm not sure you can use singleton pattern, becaus
|
| +} |
| + |
| +void OzoneVideoDecodeAccelerator::Decode( |
| + const media::BitstreamBuffer& bitstream_buffer) { |
| + VideoDecodeFactoryOzone::GetInstance()->Decode(bitstream_buffer); |
| +} |
| + |
| +void OzoneVideoDecodeAccelerator::AssignPictureBuffers( |
| + const std::vector<media::PictureBuffer>& buffers) { |
| + VideoDecodeFactoryOzone::GetInstance()->AssignPictureBuffers(buffers); |
| +} |
| + |
| +void OzoneVideoDecodeAccelerator::ReusePictureBuffer(int32 picture_buffer_id) { |
| + VideoDecodeFactoryOzone::GetInstance()->ReusePictureBuffer( |
| + picture_buffer_id); |
| +} |
| + |
| +void OzoneVideoDecodeAccelerator::Flush() { |
| + VideoDecodeFactoryOzone::GetInstance()->Flush(); |
| +} |
| + |
| +void OzoneVideoDecodeAccelerator::Reset() { |
| + VideoDecodeFactoryOzone::GetInstance()->Reset(); |
| +} |
| + |
| +void OzoneVideoDecodeAccelerator::Destroy() { |
| + VideoDecodeFactoryOzone::GetInstance()->Destroy(); |
| +} |
| + |
| +} // namespace content |