2 * Copyright (C) 2007 David Schleef <ds@schleef.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef _GST_APP_SINK_H_
21 #define _GST_APP_SINK_H_
24 #include <gst/base/gstbasesink.h>
28 #define GST_TYPE_APP_SINK \
29 (gst_app_sink_get_type())
30 #define GST_APP_SINK(obj) \
31 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_APP_SINK,GstAppSink))
32 #define GST_APP_SINK_CLASS(klass) \
33 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_APP_SINK,GstAppSinkClass))
34 #define GST_IS_APP_SINK(obj) \
35 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_APP_SINK))
36 #define GST_IS_APP_SINK_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_APP_SINK))
39 typedef struct _GstAppSink GstAppSink;
40 typedef struct _GstAppSinkClass GstAppSinkClass;
57 struct _GstAppSinkClass
59 GstBaseSinkClass basesink_class;
62 gboolean (*eos) (GstAppSink *sink);
63 gboolean (*new_preroll) (GstAppSink *sink);
64 gboolean (*new_buffer) (GstAppSink *sink);
67 GstBuffer * (*pull_preroll) (GstAppSink *sink);
68 GstBuffer * (*pull_buffer) (GstAppSink *sink);
71 GType gst_app_sink_get_type(void);
73 GST_DEBUG_CATEGORY_EXTERN (app_sink_debug);
75 void gst_app_sink_set_caps (GstAppSink *appsink, const GstCaps *caps);
76 GstCaps * gst_app_sink_get_caps (GstAppSink *appsink);
78 gboolean gst_app_sink_is_eos (GstAppSink *appsink);
80 GstBuffer * gst_app_sink_pull_preroll (GstAppSink *appsink);
81 GstBuffer * gst_app_sink_pull_buffer (GstAppSink *appsink);
82 GstBuffer * gst_app_sink_peek_buffer (GstAppSink *appsink);
84 guint gst_app_sink_get_queue_length (GstAppSink *appsink);