summaryrefslogtreecommitdiffstats
path: root/gst/qtdemux/qtdemux_types.h
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-01-12 10:22:16 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-01-12 10:22:16 +0000
commita09ea6cce49d4079218d6805da7d2a0a2aee6fcf (patch)
treef2b6f89b2459fa8947a7887f5bb8458febfd6475 /gst/qtdemux/qtdemux_types.h
parent65f0ce927deb93ad6c582a7e7897d45f74e4663a (diff)
gst/qtdemux/: Cleanup and refactor to make the code more readable.
Original commit message from CVS: * gst/qtdemux/Makefile.am: * gst/qtdemux/qtdemux.c: (extract_initial_length_and_fourcc), (gst_qtdemux_loop_state_header), (gst_qtdemux_combine_flows), (gst_qtdemux_loop_state_movie), (gst_qtdemux_loop), (gst_qtdemux_chain), (qtdemux_sink_activate_pull), (qtdemux_inflate), (qtdemux_parse_moov), (qtdemux_parse_container), (qtdemux_parse_node), (qtdemux_tree_get_child_by_type), (qtdemux_tree_get_sibling_by_type), (gst_qtdemux_add_stream), (qtdemux_parse_samples), (qtdemux_parse_segments), (qtdemux_parse_trak), (qtdemux_tag_add_str), (qtdemux_tag_add_num), (qtdemux_tag_add_date), (qtdemux_tag_add_gnre), (qtdemux_parse_udta), (qtdemux_redirects_sort_func), (qtdemux_process_redirects), (qtdemux_parse_redirects), (qtdemux_parse_tree), (gst_qtdemux_handle_esds), (qtdemux_video_caps), (qtdemux_audio_caps): * gst/qtdemux/qtdemux.h: * gst/qtdemux/qtdemux_dump.c: (qtdemux_dump_mvhd), (qtdemux_dump_tkhd), (qtdemux_dump_elst), (qtdemux_dump_mdhd), (qtdemux_dump_hdlr), (qtdemux_dump_vmhd), (qtdemux_dump_dref), (qtdemux_dump_stsd), (qtdemux_dump_stts), (qtdemux_dump_stss), (qtdemux_dump_stsc), (qtdemux_dump_stsz), (qtdemux_dump_stco), (qtdemux_dump_co64), (qtdemux_dump_dcom), (qtdemux_dump_cmvd), (qtdemux_dump_unknown), (qtdemux_node_dump_foreach), (qtdemux_node_dump): * gst/qtdemux/qtdemux_dump.h: * gst/qtdemux/qtdemux_fourcc.h: * gst/qtdemux/qtdemux_types.c: (qtdemux_type_get): * gst/qtdemux/qtdemux_types.h: * gst/qtdemux/qtpalette.h: Cleanup and refactor to make the code more readable. Move debugging/tables into separate files. Add 2/4/16 color palletee support. Fix raw 15 bit RGB handling. Use more FOURCC constants. Add some docs.
Diffstat (limited to 'gst/qtdemux/qtdemux_types.h')
-rw-r--r--gst/qtdemux/qtdemux_types.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/gst/qtdemux/qtdemux_types.h b/gst/qtdemux/qtdemux_types.h
new file mode 100644
index 00000000..7142410f
--- /dev/null
+++ b/gst/qtdemux/qtdemux_types.h
@@ -0,0 +1,58 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GST_QTDEMUX_TYPES_H__
+#define __GST_QTDEMUX_TYPES_H__
+
+#include <gst/gst.h>
+
+#include "qtdemux.h"
+
+G_BEGIN_DECLS
+
+typedef void (*QtDumpFunc) (GstQTDemux * qtdemux, guint8 * buffer, int depth);
+
+typedef struct _QtNodeType QtNodeType;
+
+#define QT_UINT32(a) (GST_READ_UINT32_BE(a))
+#define QT_UINT24(a) (GST_READ_UINT32_BE(a) >> 8)
+#define QT_UINT16(a) (GST_READ_UINT16_BE(a))
+#define QT_UINT8(a) (GST_READ_UINT8(a))
+#define QT_FP32(a) ((GST_READ_UINT32_BE(a))/65536.0)
+#define QT_FP16(a) ((GST_READ_UINT16_BE(a))/256.0)
+#define QT_FOURCC(a) (GST_READ_UINT32_LE(a))
+#define QT_UINT64(a) ((((guint64)QT_UINT32(a))<<32)|QT_UINT32(((guint8 *)a)+4))
+
+typedef enum {
+ QT_FLAG_NONE = (0),
+ QT_FLAG_CONTAINER = (1 << 0)
+} QtFlags;
+
+struct _QtNodeType {
+ guint32 fourcc;
+ const gchar *name;
+ QtFlags flags;
+ QtDumpFunc dump;
+};
+
+const QtNodeType *qtdemux_type_get (guint32 fourcc);
+
+G_END_DECLS
+
+#endif /* __GST_QTDEMUX_TYPES_H__ */