static GstFlowReturn
gst_nice_src_create (
- GstBaseSrc *basesrc,
- guint64 offset,
- guint length,
+ GstPushSrc *basesrc,
GstBuffer **buffer);
static gboolean
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-G_DEFINE_TYPE (GstNiceSrc, gst_nice_src, GST_TYPE_BASE_SRC);
+G_DEFINE_TYPE (GstNiceSrc, gst_nice_src, GST_TYPE_PUSH_SRC);
enum
{
static void
gst_nice_src_class_init (GstNiceSrcClass *klass)
{
+ GstPushSrcClass *gstpushsrc_class;
GstBaseSrcClass *gstbasesrc_class;
GstElementClass *gstelement_class;
GObjectClass *gobject_class;
GST_DEBUG_CATEGORY_INIT (nicesrc_debug, "nicesrc",
0, "libnice source");
+ gstpushsrc_class = (GstPushSrcClass *) klass;
+ gstpushsrc_class->create = GST_DEBUG_FUNCPTR (gst_nice_src_create);
+
gstbasesrc_class = (GstBaseSrcClass *) klass;
- gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_nice_src_create);
gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_nice_src_unlock);
gstbasesrc_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_nice_src_unlock_stop);
static GstFlowReturn
gst_nice_src_create (
- GstBaseSrc *basesrc,
- guint64 offset,
- guint length,
+ GstPushSrc *basesrc,
GstBuffer **buffer)
{
GstNiceSrc *nicesrc = GST_NICE_SRC (basesrc);
GST_LOG_OBJECT (nicesrc, "create called");
- nicesrc->offset = offset;
-
GST_OBJECT_LOCK (basesrc);
if (nicesrc->unlocked) {
GST_OBJECT_UNLOCK (basesrc);
#define _GSTNICESRC_H
#include <gst/gst.h>
-#include <gst/base/gstbasesrc.h>
+#include <gst/base/gstpushsrc.h>
#include <nice/nice.h>
struct _GstNiceSrc
{
- GstBaseSrc parent;
+ GstPushSrc parent;
GstPad *srcpad;
NiceAgent *agent;
guint stream_id;
guint component_id;
GMainContext *mainctx;
GMainLoop *mainloop;
- guint64 offset;
- GstFlowReturn flow_ret;
GQueue *outbufs;
gboolean unlocked;
GSource *idle_source;
struct _GstNiceSrcClass
{
- GstBaseSrcClass parent_class;
+ GstPushSrcClass parent_class;
};
GType gst_nice_src_get_type (void);