summaryrefslogtreecommitdiff
path: root/include/gst/app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-08-03 21:02:36 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-08-03 21:02:36 +0300
commit5323a782c4e8c42781f22ce2f488962a18f82554 (patch)
treef71537197b16f0f8fd0d6937f7120d018d220814 /include/gst/app
parent50acf9d37183f86f6f623aad410003392b0af41f (diff)
Jabber: initial version of Jingle support
Diffstat (limited to 'include/gst/app')
-rw-r--r--include/gst/app/app-enumtypes.h24
-rw-r--r--include/gst/app/app-prelude.h33
-rw-r--r--include/gst/app/app.h28
-rw-r--r--include/gst/app/gstappsink.h194
-rw-r--r--include/gst/app/gstappsrc.h232
5 files changed, 511 insertions, 0 deletions
diff --git a/include/gst/app/app-enumtypes.h b/include/gst/app/app-enumtypes.h
new file mode 100644
index 0000000000..bc57942113
--- /dev/null
+++ b/include/gst/app/app-enumtypes.h
@@ -0,0 +1,24 @@
+
+/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */
+
+#pragma once
+
+ #include <glib-object.h>
+ #include <gst/app/app-prelude.h>
+
+ G_BEGIN_DECLS
+
+/* enumerations from "gstappsrc.h" */
+
+GST_APP_API
+GType gst_app_stream_type_get_type (void);
+#define GST_TYPE_APP_STREAM_TYPE (gst_app_stream_type_get_type())
+
+GST_APP_API
+GType gst_app_leaky_type_get_type (void);
+#define GST_TYPE_APP_LEAKY_TYPE (gst_app_leaky_type_get_type())
+
+G_END_DECLS
+
+/* Generated data ends here */
+
diff --git a/include/gst/app/app-prelude.h b/include/gst/app/app-prelude.h
new file mode 100644
index 0000000000..d3e71079d0
--- /dev/null
+++ b/include/gst/app/app-prelude.h
@@ -0,0 +1,33 @@
+/* GStreamer App Library
+ * Copyright (C) 2018 GStreamer developers
+ *
+ * app-prelude.h: prelude include header for gst-app library
+ *
+ * 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., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_APP_PRELUDE_H__
+#define __GST_APP_PRELUDE_H__
+
+#include <gst/gst.h>
+
+#ifdef BUILDING_GST_APP
+#define GST_APP_API GST_API_EXPORT /* from config.h */
+#else
+#define GST_APP_API GST_API_IMPORT
+#endif
+
+#endif /* __GST_APP_PRELUDE_H__ */
diff --git a/include/gst/app/app.h b/include/gst/app/app.h
new file mode 100644
index 0000000000..e83dfc7bfd
--- /dev/null
+++ b/include/gst/app/app.h
@@ -0,0 +1,28 @@
+/* GStreamer
+ * Copyright (C) 2012 GStreamer developers
+ *
+ * gstapp.h: single include header for gst-app library
+ *
+ * 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., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_APP_H__
+#define __GST_APP_H__
+
+#include <gst/app/gstappsrc.h>
+#include <gst/app/gstappsink.h>
+
+#endif /* __GST_APP_H__ */
diff --git a/include/gst/app/gstappsink.h b/include/gst/app/gstappsink.h
new file mode 100644
index 0000000000..90e678f53f
--- /dev/null
+++ b/include/gst/app/gstappsink.h
@@ -0,0 +1,194 @@
+/* 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., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GST_APP_SINK_H_
+#define _GST_APP_SINK_H_
+
+#include <gst/gst.h>
+#include <gst/base/gstbasesink.h>
+#include <gst/app/app-prelude.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))
+#define GST_APP_SINK_CAST(obj) \
+ ((GstAppSink*)(obj))
+
+typedef struct _GstAppSink GstAppSink;
+typedef struct _GstAppSinkClass GstAppSinkClass;
+typedef struct _GstAppSinkPrivate GstAppSinkPrivate;
+
+/* FIXME 2.0: Make the instance/class struct private */
+
+/**
+ * GstAppSinkCallbacks: (skip)
+ * @eos: Called when the end-of-stream has been reached. This callback
+ * is called from the streaming thread.
+ * @new_preroll: Called when a new preroll sample is available.
+ * This callback is called from the streaming thread.
+ * The new preroll sample can be retrieved with
+ * gst_app_sink_pull_preroll() either from this callback
+ * or from any other thread.
+ * @new_sample: Called when a new sample is available.
+ * This callback is called from the streaming thread.
+ * The new sample can be retrieved with
+ * gst_app_sink_pull_sample() either from this callback
+ * or from any other thread.
+ * @new_event: Called when a new event is available.
+ * This callback is called from the streaming thread.
+ * The new event can be retrieved with
+ * gst_app_sink_pull_event() either from this callback
+ * or from any other thread.
+ * The callback should return %TRUE if the event has been handled,
+ * %FALSE otherwise.
+ * Since: 1.20
+ *
+ * A set of callbacks that can be installed on the appsink with
+ * gst_app_sink_set_callbacks().
+ */
+typedef struct {
+ void (*eos) (GstAppSink *appsink, gpointer user_data);
+ GstFlowReturn (*new_preroll) (GstAppSink *appsink, gpointer user_data);
+ GstFlowReturn (*new_sample) (GstAppSink *appsink, gpointer user_data);
+ gboolean (*new_event) (GstAppSink *appsink, gpointer user_data);
+
+ /*< private >*/
+ gpointer _gst_reserved[GST_PADDING - 1];
+} GstAppSinkCallbacks;
+
+struct _GstAppSink
+{
+ GstBaseSink basesink;
+
+ /*< private >*/
+ GstAppSinkPrivate *priv;
+
+ /*< private >*/
+ gpointer _gst_reserved[GST_PADDING];
+};
+
+struct _GstAppSinkClass
+{
+ GstBaseSinkClass basesink_class;
+
+ /* signals */
+ void (*eos) (GstAppSink *appsink);
+ GstFlowReturn (*new_preroll) (GstAppSink *appsink);
+ GstFlowReturn (*new_sample) (GstAppSink *appsink);
+ /* new_event is missing as we ran out padding */
+
+ /* actions */
+ GstSample * (*pull_preroll) (GstAppSink *appsink);
+ GstSample * (*pull_sample) (GstAppSink *appsink);
+ GstSample * (*try_pull_preroll) (GstAppSink *appsink, GstClockTime timeout);
+ GstSample * (*try_pull_sample) (GstAppSink *appsink, GstClockTime timeout);
+ /**
+ * GstAppSinkClass::try_pull_object:
+ *
+ * See #GstAppSink::try-pull-object: signal.
+ *
+ * Since: 1.20
+ */
+ GstMiniObject * (*try_pull_object) (GstAppSink *appsink, GstClockTime timeout);
+
+ /*< private >*/
+ gpointer _gst_reserved[GST_PADDING - 3];
+};
+
+GST_APP_API
+GType gst_app_sink_get_type (void);
+
+GST_APP_API
+void gst_app_sink_set_caps (GstAppSink *appsink, const GstCaps *caps);
+
+GST_APP_API
+GstCaps * gst_app_sink_get_caps (GstAppSink *appsink);
+
+GST_APP_API
+gboolean gst_app_sink_is_eos (GstAppSink *appsink);
+
+GST_APP_API
+void gst_app_sink_set_emit_signals (GstAppSink *appsink, gboolean emit);
+
+GST_APP_API
+gboolean gst_app_sink_get_emit_signals (GstAppSink *appsink);
+
+GST_APP_API
+void gst_app_sink_set_max_buffers (GstAppSink *appsink, guint max);
+
+GST_APP_API
+guint gst_app_sink_get_max_buffers (GstAppSink *appsink);
+
+GST_APP_API
+void gst_app_sink_set_drop (GstAppSink *appsink, gboolean drop);
+
+GST_APP_API
+gboolean gst_app_sink_get_drop (GstAppSink *appsink);
+
+GST_APP_API
+void gst_app_sink_set_buffer_list_support (GstAppSink *appsink, gboolean enable_lists);
+
+GST_APP_API
+gboolean gst_app_sink_get_buffer_list_support (GstAppSink *appsink);
+
+GST_APP_API
+void gst_app_sink_set_wait_on_eos (GstAppSink *appsink, gboolean wait);
+
+GST_APP_API
+gboolean gst_app_sink_get_wait_on_eos (GstAppSink *appsink);
+
+GST_APP_API
+GstSample * gst_app_sink_pull_preroll (GstAppSink *appsink);
+
+GST_APP_API
+GstSample * gst_app_sink_pull_sample (GstAppSink *appsink);
+
+GST_APP_API
+GstMiniObject * gst_app_sink_pull_object (GstAppSink *appsink);
+
+GST_APP_API
+GstSample * gst_app_sink_try_pull_preroll (GstAppSink *appsink, GstClockTime timeout);
+
+GST_APP_API
+GstSample * gst_app_sink_try_pull_sample (GstAppSink *appsink, GstClockTime timeout);
+
+GST_APP_API
+GstMiniObject * gst_app_sink_try_pull_object (GstAppSink *appsink, GstClockTime timeout);
+
+GST_APP_API
+void gst_app_sink_set_callbacks (GstAppSink * appsink,
+ GstAppSinkCallbacks *callbacks,
+ gpointer user_data,
+ GDestroyNotify notify);
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAppSink, gst_object_unref)
+
+G_END_DECLS
+
+#endif
+
diff --git a/include/gst/app/gstappsrc.h b/include/gst/app/gstappsrc.h
new file mode 100644
index 0000000000..16180fd165
--- /dev/null
+++ b/include/gst/app/gstappsrc.h
@@ -0,0 +1,232 @@
+/* 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., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GST_APP_SRC_H_
+#define _GST_APP_SRC_H_
+
+#include <gst/gst.h>
+#include <gst/base/gstpushsrc.h>
+#include <gst/app/app-prelude.h>
+#include <gst/app/app-enumtypes.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))
+#define GST_APP_SRC_CAST(obj) \
+ ((GstAppSrc*)(obj))
+
+typedef struct _GstAppSrc GstAppSrc;
+typedef struct _GstAppSrcClass GstAppSrcClass;
+typedef struct _GstAppSrcPrivate GstAppSrcPrivate;
+
+/* FIXME 2.0: Make the instance/class struct private */
+
+/**
+ * GstAppSrcCallbacks: (skip)
+ * @need_data: Called when the appsrc needs more data. A buffer or EOS should be
+ * pushed to appsrc from this thread or another thread. @length is just a hint
+ * and when it is set to -1, any number of bytes can be pushed into @appsrc.
+ * @enough_data: Called when appsrc has enough data. It is recommended that the
+ * application stops calling push-buffer until the need_data callback is
+ * emitted again to avoid excessive buffer queueing.
+ * @seek_data: Called when a seek should be performed to the offset.
+ * The next push-buffer should produce buffers from the new @offset.
+ * This callback is only called for seekable stream types.
+ *
+ * A set of callbacks that can be installed on the appsrc with
+ * gst_app_src_set_callbacks().
+ */
+typedef struct {
+ void (*need_data) (GstAppSrc *src, guint length, gpointer user_data);
+ void (*enough_data) (GstAppSrc *src, gpointer user_data);
+ gboolean (*seek_data) (GstAppSrc *src, guint64 offset, gpointer user_data);
+
+ /*< private >*/
+ gpointer _gst_reserved[GST_PADDING];
+} GstAppSrcCallbacks;
+
+/**
+ * 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;
+
+/**
+ * GstAppLeakyType:
+ * @GST_APP_LEAKY_TYPE_NONE: Not Leaky
+ * @GST_APP_LEAKY_TYPE_UPSTREAM: Leaky on upstream (new buffers)
+ * @GST_APP_LEAKY_TYPE_DOWNSTREAM: Leaky on downstream (old buffers)
+ *
+ * Buffer dropping scheme to avoid the element's internal queue to block when
+ * full.
+ *
+ * Since: 1.20
+ */
+typedef enum {
+ GST_APP_LEAKY_TYPE_NONE,
+ GST_APP_LEAKY_TYPE_UPSTREAM,
+ GST_APP_LEAKY_TYPE_DOWNSTREAM
+} GstAppLeakyType;
+
+struct _GstAppSrc
+{
+ GstBaseSrc basesrc;
+
+ /*< private >*/
+ GstAppSrcPrivate *priv;
+
+ /*< private >*/
+ gpointer _gst_reserved[GST_PADDING];
+};
+
+struct _GstAppSrcClass
+{
+ GstBaseSrcClass basesrc_class;
+
+ /* signals */
+ void (*need_data) (GstAppSrc *appsrc, guint length);
+ void (*enough_data) (GstAppSrc *appsrc);
+ gboolean (*seek_data) (GstAppSrc *appsrc, guint64 offset);
+
+ /* actions */
+ GstFlowReturn (*push_buffer) (GstAppSrc *appsrc, GstBuffer *buffer);
+ GstFlowReturn (*end_of_stream) (GstAppSrc *appsrc);
+ GstFlowReturn (*push_sample) (GstAppSrc *appsrc, GstSample *sample);
+ GstFlowReturn (*push_buffer_list) (GstAppSrc *appsrc, GstBufferList *buffer_list);
+
+ /*< private >*/
+ gpointer _gst_reserved[GST_PADDING-2];
+};
+
+GST_APP_API
+GType gst_app_src_get_type (void);
+
+GST_APP_API
+void gst_app_src_set_caps (GstAppSrc *appsrc, const GstCaps *caps);
+
+GST_APP_API
+GstCaps* gst_app_src_get_caps (GstAppSrc *appsrc);
+
+GST_APP_API
+void gst_app_src_set_size (GstAppSrc *appsrc, gint64 size);
+
+GST_APP_API
+gint64 gst_app_src_get_size (GstAppSrc *appsrc);
+
+GST_APP_API
+void gst_app_src_set_duration (GstAppSrc *appsrc, GstClockTime duration);
+
+GST_APP_API
+GstClockTime gst_app_src_get_duration (GstAppSrc *appsrc);
+
+GST_APP_API
+void gst_app_src_set_stream_type (GstAppSrc *appsrc, GstAppStreamType type);
+
+GST_APP_API
+GstAppStreamType gst_app_src_get_stream_type (GstAppSrc *appsrc);
+
+GST_APP_API
+void gst_app_src_set_max_bytes (GstAppSrc *appsrc, guint64 max);
+
+GST_APP_API
+guint64 gst_app_src_get_max_bytes (GstAppSrc *appsrc);
+
+GST_APP_API
+guint64 gst_app_src_get_current_level_bytes (GstAppSrc *appsrc);
+
+GST_APP_API
+void gst_app_src_set_max_buffers (GstAppSrc *appsrc, guint64 max);
+
+GST_APP_API
+guint64 gst_app_src_get_max_buffers (GstAppSrc *appsrc);
+
+GST_APP_API
+guint64 gst_app_src_get_current_level_buffers (GstAppSrc *appsrc);
+
+GST_APP_API
+void gst_app_src_set_max_time (GstAppSrc *appsrc, GstClockTime max);
+
+GST_APP_API
+GstClockTime gst_app_src_get_max_time (GstAppSrc *appsrc);
+
+GST_APP_API
+GstClockTime gst_app_src_get_current_level_time (GstAppSrc *appsrc);
+
+GST_APP_API
+void gst_app_src_set_leaky_type (GstAppSrc *appsrc, GstAppLeakyType leaky);
+
+GST_APP_API
+GstAppLeakyType gst_app_src_get_leaky_type (GstAppSrc *appsrc);
+
+GST_APP_API
+void gst_app_src_set_latency (GstAppSrc *appsrc, guint64 min, guint64 max);
+
+GST_APP_API
+void gst_app_src_get_latency (GstAppSrc *appsrc, guint64 *min, guint64 *max);
+
+GST_APP_API
+void gst_app_src_set_emit_signals (GstAppSrc *appsrc, gboolean emit);
+
+GST_APP_API
+gboolean gst_app_src_get_emit_signals (GstAppSrc *appsrc);
+
+GST_APP_API
+GstFlowReturn gst_app_src_push_buffer (GstAppSrc *appsrc, GstBuffer *buffer);
+
+GST_APP_API
+GstFlowReturn gst_app_src_push_buffer_list (GstAppSrc * appsrc, GstBufferList * buffer_list);
+
+GST_APP_API
+GstFlowReturn gst_app_src_end_of_stream (GstAppSrc *appsrc);
+
+GST_APP_API
+GstFlowReturn gst_app_src_push_sample (GstAppSrc *appsrc, GstSample *sample);
+
+GST_APP_API
+void gst_app_src_set_callbacks (GstAppSrc * appsrc,
+ GstAppSrcCallbacks *callbacks,
+ gpointer user_data,
+ GDestroyNotify notify);
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAppSrc, gst_object_unref)
+
+G_END_DECLS
+
+#endif