Fixup for initial implementation(sp).
[libmkv.git] / src / matroska.h
blobc0f38fbafde2eb17b2c070fd9eb3a32526c90987
1 /*****************************************************************************
2 * matroska.h:
3 *****************************************************************************
4 * Copyright (C) 2007 libmkv
5 * $Id: $
7 * Authors: Mike Matsnev
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
23 #ifndef _MATROSKA_H
24 #define _MATROSKA_H 1
26 typedef struct mk_Context_s mk_Context;
28 struct mk_Context_s {
29 mk_Context *next, **prev, *parent;
30 mk_Writer *owner;
31 unsigned id;
33 void *data;
34 unsigned d_cur, d_max;
37 struct mk_Writer_s {
38 FILE *fp;
40 uint32_t duration_ptr;
42 mk_Context *root;
43 mk_Context *cluster;
44 mk_Context *frame;
45 mk_Context *freelist;
46 mk_Context *actlist;
48 int64_t def_duration;
49 int64_t timescale;
50 int64_t cluster_tc_scaled;
52 uint8_t wrote_header;
54 int64_t frame_tc;
55 int64_t prev_frame_tc_scaled;
56 int64_t max_frame_tc;
57 uint8_t in_frame;
58 uint8_t keyframe;
60 uint8_t num_tracks;
61 mk_Track **tracks;
64 struct mk_Track_s {
65 int track_id;
66 mk_TrackConfig *config;
69 #endif