2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 * Copyright (C) 2000,2005 Wim Taymans <wim@fluendo.com>
4 * Copyright (C) 2006 Tim-Philipp Müller <tim centricular net>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef __GST_TYPEFINDHELPER_H__
25 #define __GST_TYPEFINDHELPER_H__
28 #include <gst/base/base-prelude.h>
33 GstCaps * gst_type_find_helper (GstPad *src, guint64 size);
36 GstCaps * gst_type_find_helper_for_data (GstObject *obj,
39 GstTypeFindProbability *prob);
41 GstCaps * gst_type_find_helper_for_buffer (GstObject *obj,
43 GstTypeFindProbability *prob);
45 GstCaps * gst_type_find_helper_for_extension (GstObject * obj,
46 const gchar * extension);
49 * GstTypeFindHelperGetRangeFunction:
50 * @obj: a #GstObject that will handle the getrange request
51 * @parent: (allow-none): the parent of @obj or %NULL
52 * @offset: the offset of the range
53 * @length: the length of the range
54 * @buffer: (out): a memory location to hold the result buffer
56 * This function will be called by gst_type_find_helper_get_range() when
57 * typefinding functions request to peek at the data of a stream at certain
58 * offsets. If this function returns GST_FLOW_OK, the result buffer will be
59 * stored in @buffer. The contents of @buffer is invalid for any other
62 * This function is supposed to behave exactly like a #GstPadGetRangeFunction.
64 * Returns: GST_FLOW_OK for success
66 typedef GstFlowReturn (*GstTypeFindHelperGetRangeFunction) (GstObject *obj,
72 GstCaps * gst_type_find_helper_get_range (GstObject *obj,
74 GstTypeFindHelperGetRangeFunction func,
76 const gchar *extension,
77 GstTypeFindProbability *prob);
81 #endif /* __GST_TYPEFINDHELPER_H__ */