michael@0: // Copyright (c) 2010 The WebM project authors. All Rights Reserved. michael@0: // michael@0: // Use of this source code is governed by a BSD-style license michael@0: // that can be found in the LICENSE file in the root of the source michael@0: // tree. An additional intellectual property rights grant can be found michael@0: // in the file PATENTS. All contributing project authors may michael@0: // be found in the AUTHORS file in the root of the source tree. michael@0: michael@0: #ifdef __cplusplus michael@0: extern "C" { michael@0: #endif michael@0: michael@0: #ifndef MKV_CONTEXT_HPP michael@0: #define MKV_CONTEXT_HPP 1 michael@0: michael@0: #include "EbmlWriter.h" michael@0: michael@0: // these are helper functions michael@0: void writeHeader(EbmlGlobal *ebml); michael@0: void writeSegmentInformation(EbmlGlobal *ebml, EbmlLoc *startInfo, unsigned long timeCodeScale, double duration); michael@0: // this function is a helper only, it assumes a lot of defaults michael@0: void writeVideoTrack(EbmlGlobal *ebml, unsigned int trackNumber, int flagLacing, michael@0: const char *codecId, unsigned int pixelWidth, unsigned int pixelHeight, michael@0: unsigned int displayWidth, unsigned int displayHeight, michael@0: double frameRate); michael@0: void writeAudioTrack(EbmlGlobal *glob, unsigned int trackNumber, int flagLacing, michael@0: const char *codecId, double samplingFrequency, unsigned int channels, michael@0: unsigned char *private_, unsigned long privateSize); michael@0: michael@0: void writeSimpleBlock(EbmlGlobal *ebml, unsigned char trackNumber, short timeCode, michael@0: int isKeyframe, unsigned char lacingFlag, int discardable, michael@0: unsigned char *data, unsigned long dataLength); michael@0: michael@0: #endif michael@0: michael@0: #ifdef __cplusplus michael@0: } michael@0: #endif