[18713] | 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 | |
---|
| 30 | G_BEGIN_DECLS |
---|
| 31 | |
---|
[21447] | 32 | #define GST_TYPE_PROBE (gst_probe_get_type()) |
---|
| 33 | #define GST_PROBE(object) ((GstProbe *) object) |
---|
| 34 | |
---|
[18713] | 35 | typedef struct _GstProbe GstProbe; |
---|
| 36 | |
---|
[21447] | 37 | GType gst_probe_get_type (void) G_GNUC_CONST; |
---|
| 38 | |
---|
[18713] | 39 | /* the callback should return FALSE if the data should be discarded */ |
---|
[21447] | 40 | typedef gboolean (*GstProbeCallback) (GstProbe *probe, |
---|
| 41 | GstData **data, |
---|
| 42 | gpointer user_data); |
---|
[18713] | 43 | |
---|
| 44 | struct _GstProbe { |
---|
| 45 | gboolean single_shot; |
---|
[21447] | 46 | |
---|
| 47 | GstProbeCallback callback; |
---|
| 48 | gpointer user_data; |
---|
[18713] | 49 | }; |
---|
| 50 | |
---|
| 51 | |
---|
[21447] | 52 | GstProbe* gst_probe_new (gboolean single_shot, |
---|
| 53 | GstProbeCallback callback, |
---|
[18713] | 54 | gpointer user_data); |
---|
| 55 | void gst_probe_destroy (GstProbe *probe); |
---|
| 56 | |
---|
[21447] | 57 | gboolean gst_probe_perform (GstProbe *probe, GstData **data); |
---|
[18713] | 58 | |
---|
| 59 | typedef struct _GstProbeDispatcher GstProbeDispatcher; |
---|
| 60 | |
---|
| 61 | struct _GstProbeDispatcher { |
---|
| 62 | gboolean active; |
---|
[21447] | 63 | |
---|
[18713] | 64 | GSList *probes; |
---|
| 65 | }; |
---|
| 66 | |
---|
[21447] | 67 | GstProbeDispatcher* gst_probe_dispatcher_new (void); |
---|
| 68 | void gst_probe_dispatcher_destroy (GstProbeDispatcher *disp); |
---|
| 69 | void gst_probe_dispatcher_init (GstProbeDispatcher *disp); |
---|
[18713] | 70 | |
---|
| 71 | void gst_probe_dispatcher_set_active (GstProbeDispatcher *disp, gboolean active); |
---|
| 72 | void gst_probe_dispatcher_add_probe (GstProbeDispatcher *disp, GstProbe *probe); |
---|
| 73 | void gst_probe_dispatcher_remove_probe (GstProbeDispatcher *disp, GstProbe *probe); |
---|
| 74 | |
---|
[21004] | 75 | gboolean gst_probe_dispatcher_dispatch (GstProbeDispatcher *disp, GstData **data); |
---|
[18713] | 76 | |
---|
| 77 | G_END_DECLS |
---|
| 78 | |
---|
[21447] | 79 | #endif /* __GST_PROBE_H__ */ |
---|
[18713] | 80 | |
---|