| 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..645b59410fe8028692754395596cc7595f3544c9
|
| --- /dev/null
|
| +++ b/content/common/gpu/media/ozone_video_decode_accelerator.cc
|
| @@ -0,0 +1,56 @@
|
| +// 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 "ui/ozone/media/video_decode_factory_ozone.h"
|
| +
|
| +namespace content {
|
| +
|
| +OzoneVideoDecodeAccelerator::OzoneVideoDecodeAccelerator(
|
| + const base::Callback<bool(void)>& make_context_current) {
|
| + if (!ui::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 ui::VideoDecodeFactoryOzone::GetInstance()->Initialize(
|
| + profile, client);
|
| +}
|
| +
|
| +void OzoneVideoDecodeAccelerator::Decode(
|
| + const media::BitstreamBuffer& bitstream_buffer) {
|
| + ui::VideoDecodeFactoryOzone::GetInstance()->Decode(bitstream_buffer);
|
| +}
|
| +
|
| +void OzoneVideoDecodeAccelerator::AssignPictureBuffers(
|
| + const std::vector<media::PictureBuffer>& buffers) {
|
| + ui::VideoDecodeFactoryOzone::GetInstance()->AssignPictureBuffers(buffers);
|
| +}
|
| +
|
| +void OzoneVideoDecodeAccelerator::ReusePictureBuffer(int32 picture_buffer_id) {
|
| + ui::VideoDecodeFactoryOzone::GetInstance()->ReusePictureBuffer(
|
| + picture_buffer_id);
|
| +}
|
| +
|
| +void OzoneVideoDecodeAccelerator::Flush() {
|
| + ui::VideoDecodeFactoryOzone::GetInstance()->Flush();
|
| +}
|
| +
|
| +void OzoneVideoDecodeAccelerator::Reset() {
|
| + ui::VideoDecodeFactoryOzone::GetInstance()->Reset();
|
| +}
|
| +
|
| +void OzoneVideoDecodeAccelerator::Destroy() {
|
| + ui::VideoDecodeFactoryOzone::GetInstance()->Destroy();
|
| +}
|
| +
|
| +} // namespace content
|
|
|