diff options
author | David Schleef <ds@schleef.org> | 2007-03-11 00:48:26 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2007-03-11 00:48:26 +0000 |
commit | 25c51917b442748b9862528b736f8562bf9a5a89 (patch) | |
tree | 6900dfb21e3ad536dfa15e2d5257839c5c14b1b0 /gst-libs/gst/app/gstappsink.h | |
parent | 4300e22d54d459ee17025207acc2ad627dff064e (diff) | |
download | gst-plugins-bad-25c51917b442748b9862528b736f8562bf9a5a89.tar.gz gst-plugins-bad-25c51917b442748b9862528b736f8562bf9a5a89.tar.bz2 gst-plugins-bad-25c51917b442748b9862528b736f8562bf9a5a89.zip |
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.
Diffstat (limited to 'gst-libs/gst/app/gstappsink.h')
-rw-r--r-- | gst-libs/gst/app/gstappsink.h | 71 |
1 files changed, 71 insertions, 0 deletions
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 <ds@schleef.org> + * + * 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 <gst/gst.h> +#include <gst/base/gstbasesink.h> + +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 + |