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

Unified 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 side-by-side diff with in-line comments
Download patch
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
« 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