2 #ifndef __GST_PIFFDEMUX_TYPES_H__
3 #define __GST_PIFFDEMUX_TYPES_H__
6 #include <gst/base/gstbytereader.h>
12 typedef gboolean (*PiffDumpFunc) (GstPiffDemux * piffdemux, GstByteReader * data, int depth);
14 typedef struct _PiffNodeType PiffNodeType;
16 #define PIFF_UINT32(a) (GST_READ_UINT32_BE(a))
17 #define PIFF_UINT24(a) (GST_READ_UINT32_BE(a) >> 8)
18 #define PIFF_UINT16(a) (GST_READ_UINT16_BE(a))
19 #define PIFF_UINT8(a) (GST_READ_UINT8(a))
20 #define PIFF_FP32(a) ((GST_READ_UINT32_BE(a))/65536.0)
21 #define PIFF_SFP32(a) (((gint)(GST_READ_UINT32_BE(a)))/65536.0)
22 #define PIFF_FP16(a) ((GST_READ_UINT16_BE(a))/256.0)
23 #define PIFF_FOURCC(a) (GST_READ_UINT32_LE(a))
24 #define PIFF_UINT64(a) ((((guint64)PIFF_UINT32(a))<<32)|PIFF_UINT32(((guint8 *)a)+4))
28 PIFF_FLAG_CONTAINER = (1 << 0)
31 struct _PiffNodeType {
40 TF_BASE_DATA_OFFSET = 0x000001, /* base-data-offset-present */
41 TF_SAMPLE_DESCRIPTION_INDEX = 0x000002, /* sample-description-index-present */
42 TF_DEFAULT_SAMPLE_DURATION = 0x000008, /* default-sample-duration-present */
43 TF_DEFAULT_SAMPLE_SIZE = 0x000010, /* default-sample-size-present */
44 TF_DEFAULT_SAMPLE_FLAGS = 0x000020, /* default-sample-flags-present */
45 TF_DURATION_IS_EMPTY = 0x100000 /* duration-is-empty */
50 TR_DATA_OFFSET = 0x000001, /* data-offset-present */
51 TR_FIRST_SAMPLE_FLAGS = 0x000004, /* first-sample-flags-present */
52 TR_SAMPLE_DURATION = 0x000100, /* sample-duration-present */
53 TR_SAMPLE_SIZE = 0x000200, /* sample-size-present */
54 TR_SAMPLE_FLAGS = 0x000400, /* sample-flags-present */
55 TR_COMPOSITION_TIME_OFFSETS = 0x000800 /* sample-composition-time-offsets-presents */
60 SE_OVERRIDE_TE_FLAGS = 0x000001, /* override existing track encryption parameters */
61 SE_USE_SUBSAMPLE_ENCRYPTION = 0x000002, /* Use SubSample Encryption */
63 const PiffNodeType *piffdemux_type_get (guint32 fourcc);
67 #endif /* __GST_PIFFDEMUX_TYPES_H__ */