chromium/third_party/libwebm/source/mkvparser/mkvparser.h

// Copyright (c) 2012 The WebM project authors. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS.  All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
#ifndef MKVPARSER_MKVPARSER_H_
#define MKVPARSER_MKVPARSER_H_

#include <cstddef>

namespace mkvparser {

const int E_PARSE_FAILED =;
const int E_FILE_FORMAT_INVALID =;
const int E_BUFFER_NOT_FULL =;

class IMkvReader {};

template <typename Type>
Type* SafeArrayAlloc(unsigned long long num_elements,
                     unsigned long long element_size);
long long GetUIntLength(IMkvReader*, long long, long&);
long long ReadUInt(IMkvReader*, long long, long&);
long long ReadID(IMkvReader* pReader, long long pos, long& len);
long long UnserializeUInt(IMkvReader*, long long pos, long long size);

long UnserializeFloat(IMkvReader*, long long pos, long long size, double&);
long UnserializeInt(IMkvReader*, long long pos, long long size,
                    long long& result);

long UnserializeString(IMkvReader*, long long pos, long long size, char*& str);

long ParseElementHeader(IMkvReader* pReader,
                        long long& pos,  // consume id and size fields
                        long long stop,  // if you know size of element's parent
                        long long& id, long long& size);

bool Match(IMkvReader*, long long&, unsigned long, long long&);
bool Match(IMkvReader*, long long&, unsigned long, unsigned char*&, size_t&);

void GetVersion(int& major, int& minor, int& build, int& revision);

struct EBMLHeader {};

class Segment;
class Track;
class Cluster;

class Block {};

class BlockEntry {};

class SimpleBlock : public BlockEntry {};

class BlockGroup : public BlockEntry {};

///////////////////////////////////////////////////////////////
// ContentEncoding element
// Elements used to describe if the track data has been encrypted or
// compressed with zlib or header stripping.
class ContentEncoding {};

class Track {};

struct PrimaryChromaticity {};

struct MasteringMetadata {};

struct Colour {};

struct Projection {};

class VideoTrack : public Track {};

class AudioTrack : public Track {};

class Tracks {};

class Chapters {};

class Tags {};

class SegmentInfo {};

class SeekHead {};

class Cues;
class CuePoint {};

class Cues {};

class Cluster {};

class Segment {};

}  // namespace mkvparser

inline long mkvparser::Segment::LoadCluster() {}

#endif  // MKVPARSER_MKVPARSER_H_