1 /* GStreamer RIFF I/O 2 * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net> 3 * 4 * riff-read.h: function declarations for parsing a RIFF file 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Library General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Library General Public License for more details. 15 * 16 * You should have received a copy of the GNU Library General Public 17 * License along with this library; if not, write to the 18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 * Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef __GST_RIFF_READ_H__ 23 #define __GST_RIFF_READ_H__ 24 25 #include <glib.h> 26 #include <gst/gst.h> 27 28 #include "riff-ids.h" 29 30 G_BEGIN_DECLS 31 32 /* 33 * Operate using pull_range(). 34 */ 35 36 GST_RIFF_API 37 GstFlowReturn gst_riff_read_chunk (GstElement * element, 38 GstPad * pad, 39 guint64 * offset, 40 guint32 * tag, 41 GstBuffer ** chunk_data); 42 43 /* 44 * These functions operate on provided data (the caller is 45 * supposed to strip the chunk headers). The buffer is 46 * provided by the caller, the strf/strh/data are filled in 47 * by the function. 48 */ 49 50 GST_RIFF_API 51 gboolean gst_riff_parse_chunk (GstElement * element, 52 GstBuffer * buf, 53 guint * offset, 54 guint32 * fourcc, 55 GstBuffer ** chunk_data); 56 57 GST_RIFF_API 58 gboolean gst_riff_parse_file_header (GstElement * element, 59 GstBuffer * buf, 60 guint32 * doctype); 61 62 GST_RIFF_API 63 gboolean gst_riff_parse_strh (GstElement * element, 64 GstBuffer * buf, 65 gst_riff_strh ** strh); 66 67 GST_RIFF_API 68 gboolean gst_riff_parse_strf_vids (GstElement * element, 69 GstBuffer * buf, 70 gst_riff_strf_vids ** strf, 71 GstBuffer ** data); 72 73 GST_RIFF_API 74 gboolean gst_riff_parse_strf_auds (GstElement * element, 75 GstBuffer * buf, 76 gst_riff_strf_auds ** strf, 77 GstBuffer ** data); 78 79 GST_RIFF_API 80 gboolean gst_riff_parse_strf_iavs (GstElement * element, 81 GstBuffer * buf, 82 gst_riff_strf_iavs ** strf, 83 GstBuffer ** data); 84 85 GST_RIFF_API 86 void gst_riff_parse_info (GstElement * element, 87 GstBuffer * buf, 88 GstTagList ** taglist); 89 /* 90 * Init. 91 */ 92 93 GST_RIFF_API 94 void gst_riff_init (void); 95 96 G_END_DECLS 97 98 #endif /* __GST_RIFF_READ_H__ */ 99