summaryrefslogtreecommitdiffstats
path: root/chromium/media/formats/webm/chromeos/ebml_writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/media/formats/webm/chromeos/ebml_writer.cc')
-rw-r--r--chromium/media/formats/webm/chromeos/ebml_writer.cc33
1 files changed, 33 insertions, 0 deletions
diff --git a/chromium/media/formats/webm/chromeos/ebml_writer.cc b/chromium/media/formats/webm/chromeos/ebml_writer.cc
new file mode 100644
index 00000000000..c00063f2b28
--- /dev/null
+++ b/chromium/media/formats/webm/chromeos/ebml_writer.cc
@@ -0,0 +1,33 @@
+// Copyright 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 "media/formats/webm/chromeos/ebml_writer.h"
+
+#include "media/base/media_export.h"
+
+extern "C" {
+#include "third_party/libvpx/source/libvpx/third_party/libmkv/EbmlWriter.h"
+
+EbmlGlobal::EbmlGlobal() {
+}
+
+EbmlGlobal::~EbmlGlobal() {
+}
+
+// These functions must be in the global namespace and visible to libmkv.
+
+void MEDIA_EXPORT Ebml_Write(EbmlGlobal* glob,
+ const void* buffer,
+ unsigned long len) {
+ glob->write_cb.Run(buffer, len);
+}
+
+void MEDIA_EXPORT Ebml_Serialize(EbmlGlobal* glob,
+ const void* buffer,
+ int buffer_size,
+ unsigned long len) {
+ glob->serialize_cb.Run(buffer, buffer_size, len);
+}
+
+} // extern "C"