chromium/third_party/libwebm/source/mkvmuxer/mkvmuxer.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 MKVMUXER_MKVMUXER_H_
#define MKVMUXER_MKVMUXER_H_

#include <stdint.h>

#include <cstddef>
#include <list>
#include <map>

#include "common/webmids.h"
#include "mkvmuxer/mkvmuxertypes.h"

// For a description of the WebM elements see
// http://www.webmproject.org/code/specs/container/.

namespace mkvparser {
class IMkvReader;
}  // namespace mkvparser

namespace mkvmuxer {

class MkvWriter;
class Segment;

const uint64_t kMaxTrackNumber =;

///////////////////////////////////////////////////////////////
// Interface used by the mkvmuxer to write out the Mkv data.
class IMkvWriter {};

// Writes out the EBML header for a WebM file, but allows caller to specify
// DocType. This function must be called before any other libwebm writing
// functions are called.
bool WriteEbmlHeader(IMkvWriter* writer, uint64_t doc_type_version,
                     const char* const doc_type);

// Writes out the EBML header for a WebM file. This function must be called
// before any other libwebm writing functions are called.
bool WriteEbmlHeader(IMkvWriter* writer, uint64_t doc_type_version);

// Deprecated. Writes out EBML header with doc_type_version as
// kDefaultDocTypeVersion. Exists for backward compatibility.
bool WriteEbmlHeader(IMkvWriter* writer);

// Copies in Chunk from source to destination between the given byte positions
bool ChunkedCopy(mkvparser::IMkvReader* source, IMkvWriter* dst, int64_t start,
                 int64_t size);

///////////////////////////////////////////////////////////////
// Class to hold data the will be written to a block.
class Frame {};

///////////////////////////////////////////////////////////////
// Class to hold one cue point in a Cues element.
class CuePoint {};

///////////////////////////////////////////////////////////////
// Cues element.
class Cues {};

///////////////////////////////////////////////////////////////
// ContentEncAESSettings element
class ContentEncAESSettings {};

///////////////////////////////////////////////////////////////
// ContentEncoding element
// Elements used to describe if the track data has been encrypted or
// compressed with zlib or header stripping.
// Currently only whole frames can be encrypted with AES. This dictates that
// ContentEncodingOrder will be 0, ContentEncodingScope will be 1,
// ContentEncodingType will be 1, and ContentEncAlgo will be 5.
class ContentEncoding {};

///////////////////////////////////////////////////////////////
// Colour element.
class PrimaryChromaticity {};

class MasteringMetadata {};

class Colour {};

///////////////////////////////////////////////////////////////
// Projection element.
class Projection {};

///////////////////////////////////////////////////////////////
// Track element.
class Track {};

///////////////////////////////////////////////////////////////
// Track that has video specific elements.
class VideoTrack : public Track {};

///////////////////////////////////////////////////////////////
// Track that has audio specific elements.
class AudioTrack : public Track {};

///////////////////////////////////////////////////////////////
// Tracks element
class Tracks {};

///////////////////////////////////////////////////////////////
// Chapter element
//
class Chapter {};

///////////////////////////////////////////////////////////////
// Chapters element
//
class Chapters {};

///////////////////////////////////////////////////////////////
// Tag element
//
class Tag {};

///////////////////////////////////////////////////////////////
// Tags element
//
class Tags {};

///////////////////////////////////////////////////////////////
// Cluster element
//
// Notes:
//  |Init| must be called before any other method in this class.
class Cluster {};

///////////////////////////////////////////////////////////////
// SeekHead element
class SeekHead {};

///////////////////////////////////////////////////////////////
// Segment Information element
class SegmentInfo {};

///////////////////////////////////////////////////////////////
// This class represents the main segment in a WebM file. Currently only
// supports one Segment element.
//
// Notes:
//  |Init| must be called before any other method in this class.
class Segment {};

}  // namespace mkvmuxer

#endif  // MKVMUXER_MKVMUXER_H_