2007-03-11 00:48:26 +00:00
|
|
|
/* 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;
|
gst-libs/gst/app/gstappsink.*: Make love to appsink.
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_base_init),
(gst_app_sink_class_init), (gst_app_sink_dispose),
(gst_app_sink_flush_unlocked), (gst_app_sink_start),
(gst_app_sink_stop), (gst_app_sink_event), (gst_app_sink_preroll),
(gst_app_sink_render), (gst_app_sink_get_caps),
(gst_app_sink_set_caps), (gst_app_sink_end_of_stream),
(gst_app_sink_pull_preroll), (gst_app_sink_pull_buffer):
* gst-libs/gst/app/gstappsink.h:
Make love to appsink.
Make it support pulling of the preroll buffer.
Add docs and debug statements.
Fix some races wrt to EOS handling and stopping.
Implement getcaps.
Implement FLUSHING.
API: gst_app_sink_pull_preroll()
2007-08-14 17:38:05 +00:00
|
|
|
GstBuffer *preroll;
|
|
|
|
gboolean started;
|
2007-03-11 00:48:26 +00:00
|
|
|
gboolean end_of_stream;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstAppSinkClass
|
|
|
|
{
|
|
|
|
GstBaseSinkClass basesink_class;
|
|
|
|
};
|
|
|
|
|
|
|
|
GType gst_app_sink_get_type(void);
|
|
|
|
|
|
|
|
GST_DEBUG_CATEGORY_EXTERN (app_sink_debug);
|
|
|
|
|
gst-libs/gst/app/gstappsink.*: Make love to appsink.
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_base_init),
(gst_app_sink_class_init), (gst_app_sink_dispose),
(gst_app_sink_flush_unlocked), (gst_app_sink_start),
(gst_app_sink_stop), (gst_app_sink_event), (gst_app_sink_preroll),
(gst_app_sink_render), (gst_app_sink_get_caps),
(gst_app_sink_set_caps), (gst_app_sink_end_of_stream),
(gst_app_sink_pull_preroll), (gst_app_sink_pull_buffer):
* gst-libs/gst/app/gstappsink.h:
Make love to appsink.
Make it support pulling of the preroll buffer.
Add docs and debug statements.
Fix some races wrt to EOS handling and stopping.
Implement getcaps.
Implement FLUSHING.
API: gst_app_sink_pull_preroll()
2007-08-14 17:38:05 +00:00
|
|
|
void gst_app_sink_set_caps (GstAppSink *appsink, GstCaps *caps);
|
|
|
|
|
|
|
|
gboolean gst_app_sink_end_of_stream (GstAppSink *appsink);
|
|
|
|
|
|
|
|
GstBuffer * gst_app_sink_pull_preroll (GstAppSink *appsink);
|
|
|
|
GstBuffer * gst_app_sink_pull_buffer (GstAppSink *appsink);
|
2007-03-11 00:48:26 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|