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"
30 typedef off_t EbmlLoc;
42 vpx_rational_t framerate;
44 /* These pointers are to the start of an element */
45 off_t position_reference;
47 off_t segment_info_pos;
52 /* This pointer is to a specific element to be serialized */
55 /* These pointers are to the size field of the element */
59 uint32_t cluster_timecode;
62 struct cue_entry *cue_list;
66 /* Stereo 3D packed frame format */
67 typedef enum stereo_format {
68 STEREO_FORMAT_MONO = 0,
69 STEREO_FORMAT_LEFT_RIGHT = 1,
70 STEREO_FORMAT_BOTTOM_TOP = 2,
71 STEREO_FORMAT_TOP_BOTTOM = 3,
72 STEREO_FORMAT_RIGHT_LEFT = 11
75 void write_webm_seek_element(struct EbmlGlobal *ebml,
79 void write_webm_file_header(struct EbmlGlobal *glob,
80 const vpx_codec_enc_cfg_t *cfg,
81 const struct vpx_rational *fps,
82 stereo_format_t stereo_fmt,
85 void write_webm_block(struct EbmlGlobal *glob,
86 const vpx_codec_enc_cfg_t *cfg,
87 const vpx_codec_cx_pkt_t *pkt);
89 void write_webm_file_footer(struct EbmlGlobal *glob, int hash);