2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 * Copyright (C) <2009> STEricsson <benjamin.gaignard@stericsson.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __GST_QTDEMUX_TYPES_H__
22 #define __GST_QTDEMUX_TYPES_H__
25 #include <gst/base/gstbytereader.h>
31 typedef gboolean (*QtDumpFunc) (GstQTDemux * qtdemux, GstByteReader * data,
34 typedef struct _QtNodeType QtNodeType;
36 #define QT_UINT32(a) (GST_READ_UINT32_BE(a))
37 #define QT_UINT24(a) (GST_READ_UINT32_BE(a) >> 8)
38 #define QT_UINT16(a) (GST_READ_UINT16_BE(a))
39 #define QT_UINT8(a) (GST_READ_UINT8(a))
40 #define QT_FP32(a) ((GST_READ_UINT32_BE(a))/65536.0)
41 #define QT_SFP32(a) (((gint)(GST_READ_UINT32_BE(a)))/65536.0)
42 #define QT_FP16(a) ((GST_READ_UINT16_BE(a))/256.0)
43 #define QT_FOURCC(a) (GST_READ_UINT32_LE(a))
44 #define QT_UINT64(a) ((((guint64)QT_UINT32(a))<<32)|QT_UINT32(((guint8 *)a)+4))
48 QT_FLAG_CONTAINER = (1 << 0)
60 TF_BASE_DATA_OFFSET = 0x000001, /* base-data-offset-present */
61 TF_SAMPLE_DESCRIPTION_INDEX = 0x000002, /* sample-description-index-present */
62 TF_DEFAULT_SAMPLE_DURATION = 0x000008, /* default-sample-duration-present */
63 TF_DEFAULT_SAMPLE_SIZE = 0x000010, /* default-sample-size-present */
64 TF_DEFAULT_SAMPLE_FLAGS = 0x000020, /* default-sample-flags-present */
65 TF_DURATION_IS_EMPTY = 0x100000 /* duration-is-empty */
70 TR_DATA_OFFSET = 0x000001, /* data-offset-present */
71 TR_FIRST_SAMPLE_FLAGS = 0x000004, /* first-sample-flags-present */
72 TR_SAMPLE_DURATION = 0x000100, /* sample-duration-present */
73 TR_SAMPLE_SIZE = 0x000200, /* sample-size-present */
74 TR_SAMPLE_FLAGS = 0x000400, /* sample-flags-present */
75 TR_COMPOSITION_TIME_OFFSETS = 0x000800 /* sample-composition-time-offsets-presents */
78 const QtNodeType *qtdemux_type_get (guint32 fourcc);
82 #endif /* __GST_QTDEMUX_TYPES_H__ */