From 25c51917b442748b9862528b736f8562bf9a5a89 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sun, 11 Mar 2007 00:48:26 +0000 Subject: Add appsrc/appsink example. Original commit message from CVS: * configure.ac: * examples/Makefile.am: * examples/app/Makefile.am: * examples/app/appsrc_ex.c: Add appsrc/appsink example. * gst-libs/gst/app/Makefile.am: * gst-libs/gst/app/gstapp.c: * gst-libs/gst/app/gstappsink.c: * gst-libs/gst/app/gstappsink.h: * gst/app/gstapp.c: Add appsink. --- gst-libs/gst/app/gstappsink.h | 71 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 gst-libs/gst/app/gstappsink.h (limited to 'gst-libs/gst/app/gstappsink.h') diff --git a/gst-libs/gst/app/gstappsink.h b/gst-libs/gst/app/gstappsink.h new file mode 100644 index 00000000..2873e363 --- /dev/null +++ b/gst-libs/gst/app/gstappsink.h @@ -0,0 +1,71 @@ +/* GStreamer + * Copyright (C) 2007 David Schleef + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef _GST_APP_SINK_H_ +#define _GST_APP_SINK_H_ + +#include +#include + +G_BEGIN_DECLS + +#define GST_TYPE_APP_SINK \ + (gst_app_sink_get_type()) +#define GST_APP_SINK(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_APP_SINK,GstAppSink)) +#define GST_APP_SINK_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_APP_SINK,GstAppSinkClass)) +#define GST_IS_APP_SINK(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_APP_SINK)) +#define GST_IS_APP_SINK_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_APP_SINK)) + +typedef struct _GstAppSink GstAppSink; +typedef struct _GstAppSinkClass GstAppSinkClass; + +struct _GstAppSink +{ + GstBaseSink basesink; + + /*< private >*/ + GstCaps *caps; + + GCond *cond; + GMutex *mutex; + GQueue *queue; + gboolean end_of_stream; +}; + +struct _GstAppSinkClass +{ + GstBaseSinkClass basesink_class; +}; + +GType gst_app_sink_get_type(void); + +GST_DEBUG_CATEGORY_EXTERN (app_sink_debug); + +void gst_app_sink_set_caps (GstAppSink *appsink, GstCaps *caps); +gboolean gst_app_sink_end_of_stream (GstAppSink *appsink); +GstBuffer *gst_app_sink_pull_buffer (GstAppSink *appsink); + +G_END_DECLS + +#endif + -- cgit v1.2.1