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 "ui/ozone/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 (!ui::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 ui::VideoDecodeFactoryOzone::GetInstance()->Initialize( |
| 26 profile, client); |
| 27 } |
| 28 |
| 29 void OzoneVideoDecodeAccelerator::Decode( |
| 30 const media::BitstreamBuffer& bitstream_buffer) { |
| 31 ui::VideoDecodeFactoryOzone::GetInstance()->Decode(bitstream_buffer); |
| 32 } |
| 33 |
| 34 void OzoneVideoDecodeAccelerator::AssignPictureBuffers( |
| 35 const std::vector<media::PictureBuffer>& buffers) { |
| 36 ui::VideoDecodeFactoryOzone::GetInstance()->AssignPictureBuffers(buffers); |
| 37 } |
| 38 |
| 39 void OzoneVideoDecodeAccelerator::ReusePictureBuffer(int32 picture_buffer_id) { |
| 40 ui::VideoDecodeFactoryOzone::GetInstance()->ReusePictureBuffer( |
| 41 picture_buffer_id); |
| 42 } |
| 43 |
| 44 void OzoneVideoDecodeAccelerator::Flush() { |
| 45 ui::VideoDecodeFactoryOzone::GetInstance()->Flush(); |
| 46 } |
| 47 |
| 48 void OzoneVideoDecodeAccelerator::Reset() { |
| 49 ui::VideoDecodeFactoryOzone::GetInstance()->Reset(); |
| 50 } |
| 51 |
| 52 void OzoneVideoDecodeAccelerator::Destroy() { |
| 53 ui::VideoDecodeFactoryOzone::GetInstance()->Destroy(); |
| 54 } |
| 55 |
| 56 } // namespace content |
OLD | NEW |