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

Unified Diff: content/common/gpu/media/vt_video_decode_accelerator.cc

Issue 322433004: Create VTVideoDecodeAccelerator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 6 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
« no previous file with comments | « content/common/gpu/media/vt_video_decode_accelerator.h ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/vt_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/vt_video_decode_accelerator.cc b/content/common/gpu/media/vt_video_decode_accelerator.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2b5e1948adb24fe91c8fe5b6f5c87fb99e1ebc7a
--- /dev/null
+++ b/content/common/gpu/media/vt_video_decode_accelerator.cc
@@ -0,0 +1,63 @@
+// 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/vt_video_decode_accelerator.h"
+
+namespace content {
+
+VTVideoDecodeAccelerator::VTVideoDecodeAccelerator(CGLContextObj cgl_context)
+ : loop_proxy_(base::MessageLoopProxy::current()),
+ cgl_context_(cgl_context),
+ client_(NULL),
+ weak_this_factory_(this) {
+}
+
+VTVideoDecodeAccelerator::~VTVideoDecodeAccelerator() {
+}
+
+bool VTVideoDecodeAccelerator::Initialize(
+ media::VideoCodecProfile profile,
+ Client* client) {
+ DCHECK(CalledOnValidThread());
+ DVLOG(2) << __FUNCTION__;
+ client_ = client;
+
+ // Only H.264 is supported.
+ if (profile < media::H264PROFILE_MIN || profile > media::H264PROFILE_MAX)
+ return false;
+
+ // Prevent anyone from using VTVideoDecoder for now. http://crbug.com/133828
+ return false;
+}
+
+void VTVideoDecodeAccelerator::Decode(const media::BitstreamBuffer& bitstream) {
+ DCHECK(CalledOnValidThread());
+}
+
+void VTVideoDecodeAccelerator::AssignPictureBuffers(
+ const std::vector<media::PictureBuffer>& pictures) {
+ DCHECK(CalledOnValidThread());
+}
+
+void VTVideoDecodeAccelerator::ReusePictureBuffer(int32_t picture_id) {
+ DCHECK(CalledOnValidThread());
+}
+
+void VTVideoDecodeAccelerator::Flush() {
+ DCHECK(CalledOnValidThread());
+}
+
+void VTVideoDecodeAccelerator::Reset() {
+ DCHECK(CalledOnValidThread());
+}
+
+void VTVideoDecodeAccelerator::Destroy() {
+ DCHECK(CalledOnValidThread());
+}
+
+bool VTVideoDecodeAccelerator::CanDecodeOnIOThread() {
+ return false;
+}
+
+} // namespace content
« no previous file with comments | « content/common/gpu/media/vt_video_decode_accelerator.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698