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

Unified Diff: webkit/media/crypto/decoders/ffmpeg_util.cc

Issue 10899021: Add CDM video decoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compiles, does nothing. Created 8 years, 4 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: webkit/media/crypto/decoders/ffmpeg_util.cc
diff --git a/webkit/media/crypto/decoders/ffmpeg_util.cc b/webkit/media/crypto/decoders/ffmpeg_util.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8059eef511a10cd97abaa0d1afb0a5149ed836a1
--- /dev/null
+++ b/webkit/media/crypto/decoders/ffmpeg_util.cc
@@ -0,0 +1,23 @@
+// Copyright (c) 2012 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 "base/logging.h"
+#include "webkit/media/crypto/decoders/ffmpeg_util.h"
+#include "webkit/media/crypto/ppapi/content_decryption_module.h"
+
+namespace webkit_media {
+
+using cdm::VideoFrame;
+
+VideoFrame::ColorFormat PixelFormatToVideoFormat(PixelFormat pixel_format) {
+ switch (pixel_format) {
+ case PIX_FMT_YUV420P:
+ return VideoFrame::kFormatYv12;
+ default:
+ DVLOG(1) << "Unsupported PixelFormat: " << pixel_format;
+ }
+ return VideoFrame::kFormatInvalid;
+}
+
+} // namespace webkit_media

Powered by Google App Engine
This is Rietveld 408576698