2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
17 /* MSVS doesn't define off_t */
18 typedef __int64 off_t;
23 #include "tools_common.h"
24 #include "vpx/vpx_encoder.h"
26 typedef off_t EbmlLoc;
38 vpx_rational_t framerate;
40 /* These pointers are to the start of an element */
41 off_t position_reference;
43 off_t segment_info_pos;
48 /* This pointer is to a specific element to be serialized */
51 /* These pointers are to the size field of the element */
55 uint32_t cluster_timecode;
58 struct cue_entry *cue_list;
62 /* Stereo 3D packed frame format */
63 typedef enum stereo_format {
64 STEREO_FORMAT_MONO = 0,
65 STEREO_FORMAT_LEFT_RIGHT = 1,
66 STEREO_FORMAT_BOTTOM_TOP = 2,
67 STEREO_FORMAT_TOP_BOTTOM = 3,
68 STEREO_FORMAT_RIGHT_LEFT = 11
71 void write_webm_seek_element(struct EbmlGlobal *ebml,
75 void write_webm_file_header(struct EbmlGlobal *glob,
76 const vpx_codec_enc_cfg_t *cfg,
77 const struct vpx_rational *fps,
78 stereo_format_t stereo_fmt,
81 void write_webm_block(struct EbmlGlobal *glob,
82 const vpx_codec_enc_cfg_t *cfg,
83 const vpx_codec_cx_pkt_t *pkt);
85 void write_webm_file_footer(struct EbmlGlobal *glob, int hash);