summaryrefslogtreecommitdiff
path: root/chromium/media/webm/chromeos/ebml_writer.cc
blob: 5c5f07db718744f9c57f21d4cc7b9ddcbe3bc0ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// 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 "media/webm/chromeos/ebml_writer.h"

#include "media/base/media_export.h"

extern "C" {
#include "third_party/libvpx/source/libvpx/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"