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

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: 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..10e46f35c6e72e5f8143f49826dddb52b8edcf05
--- /dev/null
+++ b/webkit/media/crypto/decoders/ffmpeg_util.cc
@@ -0,0 +1,25 @@
+// 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::Format PixelFormatToVideoFormat(PixelFormat pixel_format) {
+ switch (pixel_format) {
+ case PIX_FMT_YUV422P:
+ return VideoFrame::YV16;
+ case PIX_FMT_YUV420P:
+ return VideoFrame::YV12;
+ default:
+ DVLOG(1) << "Unsupported PixelFormat: " << pixel_format;
+ }
+ return VideoFrame::INVALID;
+}
+
+} // namespace webkit_media

Powered by Google App Engine
This is Rietveld 408576698