gstreamer/gst-libs/gst/app/gstappsrc.h
Jan Schmidt a2b410a595 Remove AppSrc/AppSink that are moving to -base. Partially fixes #564421
Original commit message from CVS:
* configure.ac:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
* docs/plugins/gst-plugins-bad-plugins-sections.txt:
* docs/plugins/inspect/plugin-app.xml:
* examples/Makefile.am:
* examples/app/.cvsignore:
* examples/app/Makefile.am:
* examples/app/appsink-src.c:
* examples/app/appsrc-ra.c:
* examples/app/appsrc-seekable.c:
* examples/app/appsrc-stream.c:
* examples/app/appsrc-stream2.c:
* examples/app/appsrc_ex.c:
* gst-libs/gst/Makefile.am:
* gst-libs/gst/app/.cvsignore:
* gst-libs/gst/app/Makefile.am:
* gst-libs/gst/app/gstapp-marshal.list:
* gst-libs/gst/app/gstappbuffer.c:
* gst-libs/gst/app/gstappbuffer.h:
* gst-libs/gst/app/gstappsink.c:
* gst-libs/gst/app/gstappsink.h:
* gst-libs/gst/app/gstappsrc.c:
* gst-libs/gst/app/gstappsrc.h:
* gst/app/Makefile.am:
* gst/app/gstapp.c:
Remove AppSrc/AppSink that are moving to -base. Partially fixes
#564421
2009-01-05 23:03:31 +00:00

120 lines
3.5 KiB
C

/* 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_SRC_H_
#define _GST_APP_SRC_H_
#include <gst/gst.h>
#include <gst/base/gstpushsrc.h>
G_BEGIN_DECLS
#define GST_TYPE_APP_SRC \
(gst_app_src_get_type())
#define GST_APP_SRC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_APP_SRC,GstAppSrc))
#define GST_APP_SRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_APP_SRC,GstAppSrcClass))
#define GST_IS_APP_SRC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_APP_SRC))
#define GST_IS_APP_SRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_APP_SRC))
typedef struct _GstAppSrc GstAppSrc;
typedef struct _GstAppSrcClass GstAppSrcClass;
/**
* GstAppStreamType:
* @GST_APP_STREAM_TYPE_STREAM: No seeking is supported in the stream, such as a
* live stream.
* @GST_APP_STREAM_TYPE_SEEKABLE: The stream is seekable but seeking might not
* be very fast, such as data from a webserver.
* @GST_APP_STREAM_TYPE_RANDOM_ACCESS: The stream is seekable and seeking is fast,
* such as in a local file.
*
* The stream type.
*/
typedef enum
{
GST_APP_STREAM_TYPE_STREAM,
GST_APP_STREAM_TYPE_SEEKABLE,
GST_APP_STREAM_TYPE_RANDOM_ACCESS
} GstAppStreamType;
struct _GstAppSrc
{
GstBaseSrc basesrc;
/*< private >*/
GCond *cond;
GMutex *mutex;
GQueue *queue;
GstCaps *caps;
gint64 size;
GstAppStreamType stream_type;
guint64 max_bytes;
GstFormat format;
gboolean block;
gboolean flushing;
gboolean started;
gboolean is_eos;
guint64 queued_bytes;
guint64 offset;
GstAppStreamType current_type;
};
struct _GstAppSrcClass
{
GstBaseSrcClass basesrc_class;
/* signals */
void (*need_data) (GstAppSrc *src, guint length);
void (*enough_data) (GstAppSrc *src);
gboolean (*seek_data) (GstAppSrc *src, guint64 offset);
/* actions */
GstFlowReturn (*push_buffer) (GstAppSrc *src, GstBuffer *buffer);
GstFlowReturn (*end_of_stream) (GstAppSrc *src);
};
GType gst_app_src_get_type(void);
GST_DEBUG_CATEGORY_EXTERN (app_src_debug);
void gst_app_src_set_caps (GstAppSrc *appsrc, const GstCaps *caps);
GstCaps* gst_app_src_get_caps (GstAppSrc *appsrc);
void gst_app_src_set_size (GstAppSrc *appsrc, gint64 size);
gint64 gst_app_src_get_size (GstAppSrc *appsrc);
void gst_app_src_set_stream_type (GstAppSrc *appsrc, GstAppStreamType type);
GstAppStreamType gst_app_src_get_stream_type (GstAppSrc *appsrc);
void gst_app_src_set_max_bytes (GstAppSrc *appsrc, guint64 max);
guint64 gst_app_src_get_max_bytes (GstAppSrc *appsrc);
GstFlowReturn gst_app_src_push_buffer (GstAppSrc *appsrc, GstBuffer *buffer);
GstFlowReturn gst_app_src_end_of_stream (GstAppSrc *appsrc);
G_END_DECLS
#endif