source: trunk/third/gstreamer/gst/gstprobe.h @ 21005

Revision 21005, 2.2 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21004, which included commits to RCS files with non-trunk default branches.
Line 
1/* GStreamer
2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 *                    2000 Wim Taymans <wim.taymans@chello.be>
4 *
5 * gstprobe.h: Header for GstProbe object
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 */
22
23
24#ifndef __GST_PROBE_H__
25#define __GST_PROBE_H__
26
27#include <glib.h>
28#include <gst/gstdata.h>
29
30G_BEGIN_DECLS
31
32typedef struct _GstProbe GstProbe;
33
34/* the callback should return FALSE if the data should be discarded */
35typedef gboolean                (*GstProbeCallback)             (GstProbe *probe,
36                                                                 GstData **data,
37                                                                 gpointer user_data);
38
39struct _GstProbe {
40  gboolean              single_shot;
41 
42  GstProbeCallback      callback;
43  gpointer              user_data;
44};
45
46
47GstProbe*               gst_probe_new                   (gboolean single_shot,
48                                                         GstProbeCallback callback,
49                                                         gpointer user_data);
50void                    gst_probe_destroy               (GstProbe *probe);
51
52gboolean                gst_probe_perform               (GstProbe *probe, GstData **data);
53
54typedef struct _GstProbeDispatcher GstProbeDispatcher;
55
56struct _GstProbeDispatcher {
57  gboolean              active;
58 
59  GSList                *probes;
60};
61
62GstProbeDispatcher*     gst_probe_dispatcher_new                (void);
63void                    gst_probe_dispatcher_destroy            (GstProbeDispatcher *disp);
64void                    gst_probe_dispatcher_init               (GstProbeDispatcher *disp);
65
66void                    gst_probe_dispatcher_set_active         (GstProbeDispatcher *disp, gboolean active);
67void                    gst_probe_dispatcher_add_probe          (GstProbeDispatcher *disp, GstProbe *probe);
68void                    gst_probe_dispatcher_remove_probe       (GstProbeDispatcher *disp, GstProbe *probe);
69
70gboolean                gst_probe_dispatcher_dispatch           (GstProbeDispatcher *disp, GstData **data);
71
72G_END_DECLS
73
74
75#endif /* __GST_PAD_H__ */
76
Note: See TracBrowser for help on using the repository browser.