mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
Reparented everything to GstElement, removing GstSrc, GstSink, GstFilter, and GstConnection. Also fixed a bug in gst...
Original commit message from CVS: Reparented everything to GstElement, removing GstSrc, GstSink, GstFilter, and GstConnection. Also fixed a bug in gst_bin_iterate_func.
This commit is contained in:
parent
1768119da6
commit
09eeadb15f
71 changed files with 224 additions and 937 deletions
|
@ -33,10 +33,6 @@ libgst_la_SOURCES = \
|
||||||
gstbin.c \
|
gstbin.c \
|
||||||
gstpipeline.c \
|
gstpipeline.c \
|
||||||
gstthread.c \
|
gstthread.c \
|
||||||
gstsrc.c \
|
|
||||||
gstfilter.c \
|
|
||||||
gstsink.c \
|
|
||||||
gstconnection.c \
|
|
||||||
gsttype.c \
|
gsttype.c \
|
||||||
gstcaps.c \
|
gstcaps.c \
|
||||||
gstprops.c \
|
gstprops.c \
|
||||||
|
@ -65,10 +61,6 @@ libgstinclude_HEADERS = \
|
||||||
gstbin.h \
|
gstbin.h \
|
||||||
gstpipeline.h \
|
gstpipeline.h \
|
||||||
gstthread.h \
|
gstthread.h \
|
||||||
gstsrc.h \
|
|
||||||
gstfilter.h \
|
|
||||||
gstsink.h \
|
|
||||||
gstconnection.h \
|
|
||||||
gsttype.h \
|
gsttype.h \
|
||||||
gstcaps.h \
|
gstcaps.h \
|
||||||
gstprops.h \
|
gstprops.h \
|
||||||
|
|
|
@ -63,7 +63,7 @@ static GstBuffer * gst_asyncdisksrc_get_region (GstPad *pad, gulong offset, gul
|
||||||
static GstElementStateReturn gst_asyncdisksrc_change_state (GstElement *element);
|
static GstElementStateReturn gst_asyncdisksrc_change_state (GstElement *element);
|
||||||
|
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_asyncdisksrc_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_asyncdisksrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -82,7 +82,7 @@ gst_asyncdisksrc_get_type(void)
|
||||||
(GtkArgGetFunc)gst_asyncdisksrc_get_arg,
|
(GtkArgGetFunc)gst_asyncdisksrc_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
asyncdisksrc_type = gtk_type_unique (GST_TYPE_SRC, &asyncdisksrc_info);
|
asyncdisksrc_type = gtk_type_unique (GST_TYPE_ELEMENT, &asyncdisksrc_info);
|
||||||
}
|
}
|
||||||
return asyncdisksrc_type;
|
return asyncdisksrc_type;
|
||||||
}
|
}
|
||||||
|
@ -92,13 +92,11 @@ gst_asyncdisksrc_class_init (GstAsyncDiskSrcClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SRC);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstAsyncDiskSrc::location", GST_TYPE_FILENAME,
|
gtk_object_add_arg_type ("GstAsyncDiskSrc::location", GST_TYPE_FILENAME,
|
||||||
GTK_ARG_READWRITE, ARG_LOCATION);
|
GTK_ARG_READWRITE, ARG_LOCATION);
|
||||||
|
@ -118,7 +116,7 @@ gst_asyncdisksrc_class_init (GstAsyncDiskSrcClass *klass)
|
||||||
static void
|
static void
|
||||||
gst_asyncdisksrc_init (GstAsyncDiskSrc *asyncdisksrc)
|
gst_asyncdisksrc_init (GstAsyncDiskSrc *asyncdisksrc)
|
||||||
{
|
{
|
||||||
GST_FLAG_SET (asyncdisksrc, GST_SRC_ASYNC);
|
// GST_FLAG_SET (asyncdisksrc, GST_SRC_ASYNC);
|
||||||
|
|
||||||
g_print("init\n");
|
g_print("init\n");
|
||||||
asyncdisksrc->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
asyncdisksrc->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||||
|
@ -221,7 +219,7 @@ gst_asyncdisksrc_get (GstPad *pad)
|
||||||
|
|
||||||
/* deal with EOF state */
|
/* deal with EOF state */
|
||||||
if (src->curoffset >= src->size) {
|
if (src->curoffset >= src->size) {
|
||||||
gst_src_signal_eos (GST_SRC (src));
|
gst_element_signal_eos (GST_ELEMENT (src));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,7 +274,7 @@ gst_asyncdisksrc_get_region (GstPad *pad, gulong offset, gulong size)
|
||||||
|
|
||||||
/* deal with EOF state */
|
/* deal with EOF state */
|
||||||
if (offset >= src->size) {
|
if (offset >= src->size) {
|
||||||
gst_src_signal_eos (GST_SRC (src));
|
gst_element_signal_eos (GST_ELEMENT (src));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,16 +44,16 @@ GstElementDetails gst_asyncdisksrc_details;
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ASYNCDISKSRC))
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ASYNCDISKSRC))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_ASYNCDISKSRC_OPEN = GST_SRC_FLAG_LAST,
|
GST_ASYNCDISKSRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_ASYNCDISKSRC_FLAG_LAST = GST_SRC_FLAG_LAST + 2,
|
GST_ASYNCDISKSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
|
||||||
} GstAsyncDiskSrcFlags;
|
} GstAsyncDiskSrcFlags;
|
||||||
|
|
||||||
typedef struct _GstAsyncDiskSrc GstAsyncDiskSrc;
|
typedef struct _GstAsyncDiskSrc GstAsyncDiskSrc;
|
||||||
typedef struct _GstAsyncDiskSrcClass GstAsyncDiskSrcClass;
|
typedef struct _GstAsyncDiskSrcClass GstAsyncDiskSrcClass;
|
||||||
|
|
||||||
struct _GstAsyncDiskSrc {
|
struct _GstAsyncDiskSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ struct _GstAsyncDiskSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstAsyncDiskSrcClass {
|
struct _GstAsyncDiskSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_asyncdisksrc_get_type(void);
|
GtkType gst_asyncdisksrc_get_type(void);
|
||||||
|
|
|
@ -115,7 +115,7 @@ gst_audiosink_channels_get_type(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static GstSinkClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
static guint gst_audiosink_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_audiosink_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
static GstPadTemplate *gst_audiosink_sink_template;
|
static GstPadTemplate *gst_audiosink_sink_template;
|
||||||
|
@ -136,7 +136,7 @@ gst_audiosink_get_type (void)
|
||||||
(GtkArgGetFunc)NULL,
|
(GtkArgGetFunc)NULL,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
audiosink_type = gtk_type_unique (GST_TYPE_SINK, &audiosink_info);
|
audiosink_type = gtk_type_unique (GST_TYPE_ELEMENT, &audiosink_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
return audiosink_type;
|
return audiosink_type;
|
||||||
|
@ -151,7 +151,7 @@ gst_audiosink_class_init (GstAudioSinkClass *klass)
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class(GST_TYPE_FILTER);
|
parent_class = gtk_type_class(GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstAudioSink::mute", GTK_TYPE_BOOL,
|
gtk_object_add_arg_type ("GstAudioSink::mute", GTK_TYPE_BOOL,
|
||||||
GTK_ARG_READWRITE, ARG_MUTE);
|
GTK_ARG_READWRITE, ARG_MUTE);
|
||||||
|
|
|
@ -46,16 +46,16 @@ GstElementDetails gst_audiosink_details;
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSINK))
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSINK))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_AUDIOSINK_OPEN = GST_SINK_FLAG_LAST,
|
GST_AUDIOSINK_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_AUDIOSINK_FLAG_LAST = GST_SINK_FLAG_LAST+2,
|
GST_AUDIOSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
|
||||||
} GstAudioSinkFlags;
|
} GstAudioSinkFlags;
|
||||||
|
|
||||||
typedef struct _GstAudioSink GstAudioSink;
|
typedef struct _GstAudioSink GstAudioSink;
|
||||||
typedef struct _GstAudioSinkClass GstAudioSinkClass;
|
typedef struct _GstAudioSinkClass GstAudioSinkClass;
|
||||||
|
|
||||||
struct _GstAudioSink {
|
struct _GstAudioSink {
|
||||||
GstSink sink;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ struct _GstAudioSink {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstAudioSinkClass {
|
struct _GstAudioSinkClass {
|
||||||
GstSinkClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*handoff) (GstElement *element,GstPad *pad);
|
void (*handoff) (GstElement *element,GstPad *pad);
|
||||||
|
|
|
@ -66,7 +66,7 @@ static void gst_audiosrc_sync_parms (GstAudioSrc *audiosrc);
|
||||||
|
|
||||||
static GstBuffer * gst_audiosrc_get (GstPad *pad);
|
static GstBuffer * gst_audiosrc_get (GstPad *pad);
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_audiosrc_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_audiosrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -85,7 +85,7 @@ gst_audiosrc_get_type (void)
|
||||||
(GtkArgGetFunc)gst_audiosrc_get_arg,
|
(GtkArgGetFunc)gst_audiosrc_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
audiosrc_type = gtk_type_unique (GST_TYPE_SRC, &audiosrc_info);
|
audiosrc_type = gtk_type_unique (GST_TYPE_ELEMENT, &audiosrc_info);
|
||||||
}
|
}
|
||||||
return audiosrc_type;
|
return audiosrc_type;
|
||||||
}
|
}
|
||||||
|
@ -95,13 +95,11 @@ gst_audiosrc_class_init (GstAudioSrcClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SRC);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstAudioSrc::bytes_per_read", GTK_TYPE_ULONG,
|
gtk_object_add_arg_type ("GstAudioSrc::bytes_per_read", GTK_TYPE_ULONG,
|
||||||
GTK_ARG_READWRITE, ARG_BYTESPERREAD);
|
GTK_ARG_READWRITE, ARG_BYTESPERREAD);
|
||||||
|
@ -161,7 +159,7 @@ gst_audiosrc_get (GstPad *pad)
|
||||||
src->bytes_per_read);
|
src->bytes_per_read);
|
||||||
|
|
||||||
if (readbytes == 0) {
|
if (readbytes == 0) {
|
||||||
gst_src_signal_eos (GST_SRC (src));
|
gst_element_signal_eos (GST_ELEMENT (src));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,16 +47,16 @@ GstElementDetails gst_audiosrc_details;
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSRC))
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSRC))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_AUDIOSRC_OPEN = GST_SRC_FLAG_LAST,
|
GST_AUDIOSRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_AUDIOSRC_FLAG_LAST = GST_SRC_FLAG_LAST+2,
|
GST_AUDIOSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
|
||||||
} GstAudioSrcFlags;
|
} GstAudioSrcFlags;
|
||||||
|
|
||||||
typedef struct _GstAudioSrc GstAudioSrc;
|
typedef struct _GstAudioSrc GstAudioSrc;
|
||||||
typedef struct _GstAudioSrcClass GstAudioSrcClass;
|
typedef struct _GstAudioSrcClass GstAudioSrcClass;
|
||||||
|
|
||||||
struct _GstAudioSrc {
|
struct _GstAudioSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
|
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
@ -79,7 +79,7 @@ struct _GstAudioSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstAudioSrcClass {
|
struct _GstAudioSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_audiosrc_get_type(void);
|
GtkType gst_audiosrc_get_type(void);
|
||||||
|
|
|
@ -63,7 +63,7 @@ static GstBuffer * gst_disksrc_get (GstPad *pad);
|
||||||
static GstElementStateReturn gst_disksrc_change_state (GstElement *element);
|
static GstElementStateReturn gst_disksrc_change_state (GstElement *element);
|
||||||
|
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_disksrc_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_disksrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -81,7 +81,7 @@ gst_disksrc_get_type(void) {
|
||||||
(GtkArgGetFunc)gst_disksrc_get_arg,
|
(GtkArgGetFunc)gst_disksrc_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
disksrc_type = gtk_type_unique(GST_TYPE_SRC,&disksrc_info);
|
disksrc_type = gtk_type_unique(GST_TYPE_ELEMENT,&disksrc_info);
|
||||||
}
|
}
|
||||||
return disksrc_type;
|
return disksrc_type;
|
||||||
}
|
}
|
||||||
|
@ -91,13 +91,11 @@ gst_disksrc_class_init (GstDiskSrcClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SRC);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstDiskSrc::location", GST_TYPE_FILENAME,
|
gtk_object_add_arg_type ("GstDiskSrc::location", GST_TYPE_FILENAME,
|
||||||
GTK_ARG_READWRITE, ARG_LOCATION);
|
GTK_ARG_READWRITE, ARG_LOCATION);
|
||||||
|
@ -227,7 +225,7 @@ gst_disksrc_get (GstPad *pad)
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
} else if (readbytes == 0) {
|
} else if (readbytes == 0) {
|
||||||
gst_src_signal_eos (GST_SRC (src));
|
gst_element_signal_eos (GST_ELEMENT (src));
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,16 +46,16 @@ extern GstElementDetails gst_disksrc_details;
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_DISKSRC))
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_DISKSRC))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_DISKSRC_OPEN = GST_SRC_FLAG_LAST,
|
GST_DISKSRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_DISKSRC_FLAG_LAST = GST_SRC_FLAG_LAST+2,
|
GST_DISKSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
|
||||||
} GstDiskSrcFlags;
|
} GstDiskSrcFlags;
|
||||||
|
|
||||||
typedef struct _GstDiskSrc GstDiskSrc;
|
typedef struct _GstDiskSrc GstDiskSrc;
|
||||||
typedef struct _GstDiskSrcClass GstDiskSrcClass;
|
typedef struct _GstDiskSrcClass GstDiskSrcClass;
|
||||||
|
|
||||||
struct _GstDiskSrc {
|
struct _GstDiskSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ struct _GstDiskSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstDiskSrcClass {
|
struct _GstDiskSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_disksrc_get_type(void);
|
GtkType gst_disksrc_get_type(void);
|
||||||
|
|
|
@ -29,14 +29,15 @@
|
||||||
#include <gstfakesrc.h>
|
#include <gstfakesrc.h>
|
||||||
#include <gstfdsink.h>
|
#include <gstfdsink.h>
|
||||||
#include <gstfdsrc.h>
|
#include <gstfdsrc.h>
|
||||||
#if HAVE_LIBGHTTP
|
|
||||||
#include <gsthttpsrc.h>
|
|
||||||
#endif /* HAVE_LIBGHTTP */
|
|
||||||
#include <gstpipefilter.h>
|
#include <gstpipefilter.h>
|
||||||
#include <gstqueue.h>
|
#include <gstqueue.h>
|
||||||
#include <gstsinesrc.h>
|
#include <gstsinesrc.h>
|
||||||
#include <gsttypefind.h>
|
#include <gsttypefind.h>
|
||||||
|
|
||||||
|
#if HAVE_LIBGHTTP
|
||||||
|
#include <gsthttpsrc.h>
|
||||||
|
#endif /* HAVE_LIBGHTTP */
|
||||||
|
|
||||||
|
|
||||||
struct _elements_entry {
|
struct _elements_entry {
|
||||||
gchar *name;
|
gchar *name;
|
||||||
|
@ -55,13 +56,14 @@ static struct _elements_entry _elements[] = {
|
||||||
{ "identity", gst_identity_get_type, &gst_identity_details, NULL },
|
{ "identity", gst_identity_get_type, &gst_identity_details, NULL },
|
||||||
{ "fdsink", gst_fdsink_get_type, &gst_fdsink_details, NULL },
|
{ "fdsink", gst_fdsink_get_type, &gst_fdsink_details, NULL },
|
||||||
{ "fdsrc", gst_fdsrc_get_type, &gst_fdsrc_details, NULL },
|
{ "fdsrc", gst_fdsrc_get_type, &gst_fdsrc_details, NULL },
|
||||||
#if HAVE_LIBGHTTP
|
|
||||||
{ "httpsrc", gst_httpsrc_get_type, &gst_httpsrc_details, NULL },
|
|
||||||
#endif /* HAVE_LIBGHTTP */
|
|
||||||
{ "pipefilter", gst_pipefilter_get_type, &gst_pipefilter_details, NULL },
|
{ "pipefilter", gst_pipefilter_get_type, &gst_pipefilter_details, NULL },
|
||||||
{ "queue", gst_queue_get_type, &gst_queue_details, NULL },
|
{ "queue", gst_queue_get_type, &gst_queue_details, NULL },
|
||||||
{ "sinesrc", gst_sinesrc_get_type, &gst_sinesrc_details, NULL },
|
{ "sinesrc", gst_sinesrc_get_type, &gst_sinesrc_details, NULL },
|
||||||
{ "typefind", gst_typefind_get_type, &gst_typefind_details, NULL },
|
{ "typefind", gst_typefind_get_type, &gst_typefind_details, NULL },
|
||||||
|
|
||||||
|
#if HAVE_LIBGHTTP
|
||||||
|
{ "httpsrc", gst_httpsrc_get_type, &gst_httpsrc_details, NULL },
|
||||||
|
#endif /* HAVE_LIBGHTTP */
|
||||||
|
|
||||||
{ NULL, 0 },
|
{ NULL, 0 },
|
||||||
};
|
};
|
||||||
|
|
|
@ -49,7 +49,7 @@ static void gst_fakesink_init(GstFakeSink *fakesink);
|
||||||
|
|
||||||
static void gst_fakesink_chain(GstPad *pad,GstBuffer *buf);
|
static void gst_fakesink_chain(GstPad *pad,GstBuffer *buf);
|
||||||
|
|
||||||
static GstSinkClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
static guint gst_fakesink_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_fakesink_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -68,7 +68,7 @@ gst_fakesink_get_type (void)
|
||||||
(GtkArgGetFunc)NULL,
|
(GtkArgGetFunc)NULL,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
fakesink_type = gtk_type_unique (GST_TYPE_SINK, &fakesink_info);
|
fakesink_type = gtk_type_unique (GST_TYPE_ELEMENT, &fakesink_info);
|
||||||
}
|
}
|
||||||
return fakesink_type;
|
return fakesink_type;
|
||||||
}
|
}
|
||||||
|
@ -77,10 +77,8 @@ static void
|
||||||
gst_fakesink_class_init (GstFakeSinkClass *klass)
|
gst_fakesink_class_init (GstFakeSinkClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstSinkClass *gstsink_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstsink_class = (GstSinkClass*)klass;
|
|
||||||
|
|
||||||
gst_fakesink_signals[SIGNAL_HANDOFF] =
|
gst_fakesink_signals[SIGNAL_HANDOFF] =
|
||||||
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
|
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
|
||||||
|
@ -90,7 +88,7 @@ gst_fakesink_class_init (GstFakeSinkClass *klass)
|
||||||
gtk_object_class_add_signals (gtkobject_class, gst_fakesink_signals,
|
gtk_object_class_add_signals (gtkobject_class, gst_fakesink_signals,
|
||||||
LAST_SIGNAL);
|
LAST_SIGNAL);
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SINK);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -49,13 +49,13 @@ typedef struct _GstFakeSink GstFakeSink;
|
||||||
typedef struct _GstFakeSinkClass GstFakeSinkClass;
|
typedef struct _GstFakeSinkClass GstFakeSinkClass;
|
||||||
|
|
||||||
struct _GstFakeSink {
|
struct _GstFakeSink {
|
||||||
GstSink sink;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFakeSinkClass {
|
struct _GstFakeSinkClass {
|
||||||
GstSinkClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*handoff) (GstElement *element,GstPad *pad);
|
void (*handoff) (GstElement *element,GstPad *pad);
|
||||||
|
|
|
@ -76,7 +76,7 @@ static void gst_fakesrc_get_arg (GtkObject *object, GtkArg *arg, guint id);
|
||||||
static GstBuffer* gst_fakesrc_get (GstPad *pad);
|
static GstBuffer* gst_fakesrc_get (GstPad *pad);
|
||||||
static void gst_fakesrc_loop (GstElement *element);
|
static void gst_fakesrc_loop (GstElement *element);
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
static guint gst_fakesrc_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_fakesrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -95,7 +95,7 @@ gst_fakesrc_get_type (void)
|
||||||
(GtkArgGetFunc)NULL,
|
(GtkArgGetFunc)NULL,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
fakesrc_type = gtk_type_unique (GST_TYPE_SRC, &fakesrc_info);
|
fakesrc_type = gtk_type_unique (GST_TYPE_ELEMENT, &fakesrc_info);
|
||||||
}
|
}
|
||||||
return fakesrc_type;
|
return fakesrc_type;
|
||||||
}
|
}
|
||||||
|
@ -104,12 +104,10 @@ static void
|
||||||
gst_fakesrc_class_init (GstFakeSrcClass *klass)
|
gst_fakesrc_class_init (GstFakeSrcClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SRC);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstFakeSrc::num_sources", GTK_TYPE_INT,
|
gtk_object_add_arg_type ("GstFakeSrc::num_sources", GTK_TYPE_INT,
|
||||||
GTK_ARG_READWRITE, ARG_NUM_SOURCES);
|
GTK_ARG_READWRITE, ARG_NUM_SOURCES);
|
||||||
|
|
|
@ -59,7 +59,7 @@ typedef struct _GstFakeSrc GstFakeSrc;
|
||||||
typedef struct _GstFakeSrcClass GstFakeSrcClass;
|
typedef struct _GstFakeSrcClass GstFakeSrcClass;
|
||||||
|
|
||||||
struct _GstFakeSrc {
|
struct _GstFakeSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
|
|
||||||
gboolean loop_based;
|
gboolean loop_based;
|
||||||
gint numsrcpads;
|
gint numsrcpads;
|
||||||
|
@ -70,7 +70,7 @@ struct _GstFakeSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFakeSrcClass {
|
struct _GstFakeSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*handoff) (GstElement *element,GstPad *pad);
|
void (*handoff) (GstElement *element,GstPad *pad);
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void gst_fdsink_get_arg (GtkObject *object, GtkArg *arg, guint id);
|
||||||
|
|
||||||
static void gst_fdsink_chain (GstPad *pad,GstBuffer *buf);
|
static void gst_fdsink_chain (GstPad *pad,GstBuffer *buf);
|
||||||
|
|
||||||
static GstSinkClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_fdsink_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_fdsink_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -70,7 +70,7 @@ gst_fdsink_get_type (void)
|
||||||
(GtkArgGetFunc)gst_fdsink_get_arg,
|
(GtkArgGetFunc)gst_fdsink_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
fdsink_type = gtk_type_unique (GST_TYPE_SINK, &fdsink_info);
|
fdsink_type = gtk_type_unique (GST_TYPE_ELEMENT, &fdsink_info);
|
||||||
}
|
}
|
||||||
return fdsink_type;
|
return fdsink_type;
|
||||||
}
|
}
|
||||||
|
@ -79,12 +79,10 @@ static void
|
||||||
gst_fdsink_class_init (GstFdSinkClass *klass)
|
gst_fdsink_class_init (GstFdSinkClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstSinkClass *gstsink_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstsink_class = (GstSinkClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SINK);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstFdSink::fd", GTK_TYPE_INT,
|
gtk_object_add_arg_type ("GstFdSink::fd", GTK_TYPE_INT,
|
||||||
GTK_ARG_READWRITE, ARG_FD);
|
GTK_ARG_READWRITE, ARG_FD);
|
||||||
|
|
|
@ -49,7 +49,7 @@ typedef struct _GstFdSink GstFdSink;
|
||||||
typedef struct _GstFdSinkClass GstFdSinkClass;
|
typedef struct _GstFdSinkClass GstFdSinkClass;
|
||||||
|
|
||||||
struct _GstFdSink {
|
struct _GstFdSink {
|
||||||
GstSink sink;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ struct _GstFdSink {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFdSinkClass {
|
struct _GstFdSinkClass {
|
||||||
GstSinkClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_fdsink_get_type(void);
|
GtkType gst_fdsink_get_type(void);
|
||||||
|
|
|
@ -60,7 +60,7 @@ static void gst_fdsrc_get_arg (GtkObject *object, GtkArg *arg, guint id);
|
||||||
static GstBuffer * gst_fdsrc_get (GstPad *pad);
|
static GstBuffer * gst_fdsrc_get (GstPad *pad);
|
||||||
|
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_fdsrc_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_fdsrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -79,7 +79,7 @@ gst_fdsrc_get_type (void)
|
||||||
(GtkArgGetFunc)gst_fdsrc_get_arg,
|
(GtkArgGetFunc)gst_fdsrc_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
fdsrc_type = gtk_type_unique (GST_TYPE_SRC, &fdsrc_info);
|
fdsrc_type = gtk_type_unique (GST_TYPE_ELEMENT, &fdsrc_info);
|
||||||
}
|
}
|
||||||
return fdsrc_type;
|
return fdsrc_type;
|
||||||
}
|
}
|
||||||
|
@ -88,12 +88,10 @@ static void
|
||||||
gst_fdsrc_class_init (GstFdSrcClass *klass)
|
gst_fdsrc_class_init (GstFdSrcClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class(GST_TYPE_SRC);
|
parent_class = gtk_type_class(GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstFdSrc::location", GST_TYPE_FILENAME,
|
gtk_object_add_arg_type ("GstFdSrc::location", GST_TYPE_FILENAME,
|
||||||
GTK_ARG_WRITABLE, ARG_LOCATION);
|
GTK_ARG_WRITABLE, ARG_LOCATION);
|
||||||
|
@ -197,7 +195,7 @@ gst_fdsrc_get(GstPad *pad)
|
||||||
/* read it in from the file */
|
/* read it in from the file */
|
||||||
readbytes = read(src->fd,GST_BUFFER_DATA(buf),src->bytes_per_read);
|
readbytes = read(src->fd,GST_BUFFER_DATA(buf),src->bytes_per_read);
|
||||||
if (readbytes == 0) {
|
if (readbytes == 0) {
|
||||||
gst_src_signal_eos(GST_SRC(src));
|
gst_element_signal_eos(GST_ELEMENT(src));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ typedef struct _GstFdSrc GstFdSrc;
|
||||||
typedef struct _GstFdSrcClass GstFdSrcClass;
|
typedef struct _GstFdSrcClass GstFdSrcClass;
|
||||||
|
|
||||||
struct _GstFdSrc {
|
struct _GstFdSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ struct _GstFdSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFdSrcClass {
|
struct _GstFdSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_fdsrc_get_type(void);
|
GtkType gst_fdsrc_get_type(void);
|
||||||
|
|
|
@ -61,7 +61,7 @@ static gboolean gst_httpsrc_open_url (GstHttpSrc *src);
|
||||||
static void gst_httpsrc_close_url (GstHttpSrc *src);
|
static void gst_httpsrc_close_url (GstHttpSrc *src);
|
||||||
|
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_httpsrc_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_httpsrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -80,7 +80,7 @@ gst_httpsrc_get_type (void)
|
||||||
(GtkArgGetFunc)gst_httpsrc_get_arg,
|
(GtkArgGetFunc)gst_httpsrc_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
httpsrc_type = gtk_type_unique (GST_TYPE_SRC, &httpsrc_info);
|
httpsrc_type = gtk_type_unique (GST_TYPE_ELEMENT, &httpsrc_info);
|
||||||
}
|
}
|
||||||
return httpsrc_type;
|
return httpsrc_type;
|
||||||
}
|
}
|
||||||
|
@ -90,13 +90,11 @@ gst_httpsrc_class_init (GstHttpSrcClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SRC);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstHttpSrc::location", GTK_TYPE_STRING,
|
gtk_object_add_arg_type ("GstHttpSrc::location", GTK_TYPE_STRING,
|
||||||
|
@ -137,7 +135,7 @@ gst_httpsrc_get(GstPad *pad)
|
||||||
readbytes = read(src->fd,GST_BUFFER_DATA(buf),src->bytes_per_read);
|
readbytes = read(src->fd,GST_BUFFER_DATA(buf),src->bytes_per_read);
|
||||||
|
|
||||||
if (readbytes == 0) {
|
if (readbytes == 0) {
|
||||||
gst_src_signal_eos(GST_SRC(src));
|
gst_element_signal_eos(GST_ELEMENT(src));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,16 +48,16 @@ GstElementDetails gst_httpsrc_details;
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_HTTPSRC))
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_HTTPSRC))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_HTTPSRC_OPEN = GST_SRC_FLAG_LAST,
|
GST_HTTPSRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_HTTPSRC_FLAG_LAST = GST_SRC_FLAG_LAST+2,
|
GST_HTTPSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
|
||||||
} GstHttpSrcFlags;
|
} GstHttpSrcFlags;
|
||||||
|
|
||||||
typedef struct _GstHttpSrc GstHttpSrc;
|
typedef struct _GstHttpSrc GstHttpSrc;
|
||||||
typedef struct _GstHttpSrcClass GstHttpSrcClass;
|
typedef struct _GstHttpSrcClass GstHttpSrcClass;
|
||||||
|
|
||||||
struct _GstHttpSrc {
|
struct _GstHttpSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ struct _GstHttpSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstHttpSrcClass {
|
struct _GstHttpSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_httpsrc_get_type(void);
|
GtkType gst_httpsrc_get_type(void);
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void gst_identity_get_arg (GtkObject *object, GtkArg *arg, guint id);
|
||||||
|
|
||||||
static void gst_identity_chain (GstPad *pad, GstBuffer *buf);
|
static void gst_identity_chain (GstPad *pad, GstBuffer *buf);
|
||||||
|
|
||||||
static GstFilterClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_identity_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_identity_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -70,7 +70,7 @@ gst_identity_get_type (void)
|
||||||
(GtkArgGetFunc)gst_identity_get_arg,
|
(GtkArgGetFunc)gst_identity_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
identity_type = gtk_type_unique (GST_TYPE_FILTER, &identity_info);
|
identity_type = gtk_type_unique (GST_TYPE_ELEMENT, &identity_info);
|
||||||
}
|
}
|
||||||
return identity_type;
|
return identity_type;
|
||||||
}
|
}
|
||||||
|
@ -79,12 +79,10 @@ static void
|
||||||
gst_identity_class_init (GstIdentityClass *klass)
|
gst_identity_class_init (GstIdentityClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstFilterClass *gstfilter_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstfilter_class = (GstFilterClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_FILTER);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstIdentity::loop_based", GTK_TYPE_BOOL,
|
gtk_object_add_arg_type ("GstIdentity::loop_based", GTK_TYPE_BOOL,
|
||||||
GTK_ARG_READWRITE, ARG_LOOP_BASED);
|
GTK_ARG_READWRITE, ARG_LOOP_BASED);
|
||||||
|
|
|
@ -49,7 +49,7 @@ typedef struct _GstIdentity GstIdentity;
|
||||||
typedef struct _GstIdentityClass GstIdentityClass;
|
typedef struct _GstIdentityClass GstIdentityClass;
|
||||||
|
|
||||||
struct _GstIdentity {
|
struct _GstIdentity {
|
||||||
GstFilter filter;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
@ -58,7 +58,7 @@ struct _GstIdentity {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstIdentityClass {
|
struct _GstIdentityClass {
|
||||||
GstFilterClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_identity_get_type(void);
|
GtkType gst_identity_get_type(void);
|
||||||
|
|
|
@ -61,7 +61,7 @@ void gst_pipefilter_chain(GstPad *pad,GstBuffer *buf);
|
||||||
|
|
||||||
static GstElementStateReturn gst_pipefilter_change_state(GstElement *element);
|
static GstElementStateReturn gst_pipefilter_change_state(GstElement *element);
|
||||||
|
|
||||||
static GstFilterClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_pipefilter_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_pipefilter_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -79,21 +79,19 @@ gst_pipefilter_get_type(void) {
|
||||||
(GtkArgGetFunc)gst_pipefilter_get_arg,
|
(GtkArgGetFunc)gst_pipefilter_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
pipefilter_type = gtk_type_unique(GST_TYPE_FILTER,&pipefilter_info);
|
pipefilter_type = gtk_type_unique(GST_TYPE_ELEMENT,&pipefilter_info);
|
||||||
}
|
}
|
||||||
return pipefilter_type;
|
return pipefilter_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gst_pipefilter_class_init(GstPipefilterClass *klass) {
|
static void gst_pipefilter_class_init(GstPipefilterClass *klass) {
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstFilterClass *gstfilter_class;
|
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstfilter_class = (GstFilterClass*)klass;
|
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class(GST_TYPE_FILTER);
|
parent_class = gtk_type_class(GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gstelement_class->change_state = gst_pipefilter_change_state;
|
gstelement_class->change_state = gst_pipefilter_change_state;
|
||||||
|
|
||||||
|
|
|
@ -45,16 +45,16 @@ GstElementDetails gst_pipefilter_details;
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEFILTER))
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEFILTER))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_PIPEFILTER_OPEN = GST_FILTER_FLAG_LAST,
|
GST_PIPEFILTER_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_PIPEFILTER_FLAG_LAST = GST_FILTER_FLAG_LAST,
|
GST_PIPEFILTER_FLAG_LAST = GST_ELEMENT_FLAG_LAST,
|
||||||
} GstPipeFilterFlags;
|
} GstPipeFilterFlags;
|
||||||
|
|
||||||
typedef struct _GstPipefilter GstPipefilter;
|
typedef struct _GstPipefilter GstPipefilter;
|
||||||
typedef struct _GstPipefilterClass GstPipefilterClass;
|
typedef struct _GstPipefilterClass GstPipefilterClass;
|
||||||
|
|
||||||
struct _GstPipefilter {
|
struct _GstPipefilter {
|
||||||
GstFilter filter;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
@ -74,7 +74,7 @@ struct _GstPipefilter {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPipefilterClass {
|
struct _GstPipefilterClass {
|
||||||
GstFilterClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_pipefilter_get_type(void);
|
GtkType gst_pipefilter_get_type(void);
|
||||||
|
|
|
@ -67,7 +67,7 @@ static void gst_queue_flush (GstQueue *queue);
|
||||||
static GstElementStateReturn gst_queue_change_state (GstElement *element);
|
static GstElementStateReturn gst_queue_change_state (GstElement *element);
|
||||||
|
|
||||||
|
|
||||||
static GstConnectionClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_queue_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_queue_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -85,7 +85,7 @@ gst_queue_get_type(void) {
|
||||||
(GtkArgGetFunc)gst_queue_get_arg,
|
(GtkArgGetFunc)gst_queue_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
queue_type = gtk_type_unique (GST_TYPE_CONNECTION, &queue_info);
|
queue_type = gtk_type_unique (GST_TYPE_ELEMENT, &queue_info);
|
||||||
}
|
}
|
||||||
return queue_type;
|
return queue_type;
|
||||||
}
|
}
|
||||||
|
@ -95,13 +95,11 @@ gst_queue_class_init (GstQueueClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
GstConnectionClass *gstconnection_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
gstconnection_class = (GstConnectionClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_CONNECTION);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstQueue::level", GTK_TYPE_INT,
|
gtk_object_add_arg_type ("GstQueue::level", GTK_TYPE_INT,
|
||||||
GTK_ARG_READABLE, ARG_LEVEL);
|
GTK_ARG_READABLE, ARG_LEVEL);
|
||||||
|
|
|
@ -49,7 +49,7 @@ typedef struct _GstQueue GstQueue;
|
||||||
typedef struct _GstQueueClass GstQueueClass;
|
typedef struct _GstQueueClass GstQueueClass;
|
||||||
|
|
||||||
struct _GstQueue {
|
struct _GstQueue {
|
||||||
GstConnection Connection;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
@ -71,7 +71,7 @@ struct _GstQueue {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstQueueClass {
|
struct _GstQueueClass {
|
||||||
GstConnectionClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_queue_get_type (void);
|
GtkType gst_queue_get_type (void);
|
||||||
|
|
|
@ -64,7 +64,7 @@ void gst_sinesrc_sync_parms(GstSineSrc *sinesrc);
|
||||||
|
|
||||||
static GstBuffer * gst_sinesrc_get(GstPad *pad);
|
static GstBuffer * gst_sinesrc_get(GstPad *pad);
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_sinesrc_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_sinesrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -82,7 +82,7 @@ gst_sinesrc_get_type(void) {
|
||||||
(GtkArgGetFunc)gst_sinesrc_get_arg,
|
(GtkArgGetFunc)gst_sinesrc_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
sinesrc_type = gtk_type_unique(GST_TYPE_SRC,&sinesrc_info);
|
sinesrc_type = gtk_type_unique(GST_TYPE_ELEMENT,&sinesrc_info);
|
||||||
}
|
}
|
||||||
return sinesrc_type;
|
return sinesrc_type;
|
||||||
}
|
}
|
||||||
|
@ -91,13 +91,11 @@ static void
|
||||||
gst_sinesrc_class_init(GstSineSrcClass *klass) {
|
gst_sinesrc_class_init(GstSineSrcClass *klass) {
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class(GST_TYPE_SRC);
|
parent_class = gtk_type_class(GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type("GstSineSrc::volume", GTK_TYPE_DOUBLE,
|
gtk_object_add_arg_type("GstSineSrc::volume", GTK_TYPE_DOUBLE,
|
||||||
GTK_ARG_READWRITE, ARG_VOLUME);
|
GTK_ARG_READWRITE, ARG_VOLUME);
|
||||||
|
|
|
@ -50,7 +50,7 @@ typedef struct _GstSineSrc GstSineSrc;
|
||||||
typedef struct _GstSineSrcClass GstSineSrcClass;
|
typedef struct _GstSineSrcClass GstSineSrcClass;
|
||||||
|
|
||||||
struct _GstSineSrc {
|
struct _GstSineSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
|
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
@ -71,7 +71,7 @@ struct _GstSineSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstSineSrcClass {
|
struct _GstSineSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_sinesrc_get_type(void);
|
GtkType gst_sinesrc_get_type(void);
|
||||||
|
|
|
@ -36,10 +36,6 @@
|
||||||
#include <gst/gstbin.h>
|
#include <gst/gstbin.h>
|
||||||
#include <gst/gstpipeline.h>
|
#include <gst/gstpipeline.h>
|
||||||
#include <gst/gstthread.h>
|
#include <gst/gstthread.h>
|
||||||
#include <gst/gstsrc.h>
|
|
||||||
#include <gst/gstfilter.h>
|
|
||||||
#include <gst/gstsink.h>
|
|
||||||
#include <gst/gstconnection.h>
|
|
||||||
#include <gst/gsttype.h>
|
#include <gst/gsttype.h>
|
||||||
#include <gst/gstcaps.h>
|
#include <gst/gstcaps.h>
|
||||||
#include <gst/gstprops.h>
|
#include <gst/gstprops.h>
|
||||||
|
|
13
gst/gstbin.c
13
gst/gstbin.c
|
@ -24,8 +24,6 @@
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
|
||||||
#include "gstbin.h"
|
#include "gstbin.h"
|
||||||
#include "gstsrc.h"
|
|
||||||
#include "gstconnection.h"
|
|
||||||
|
|
||||||
#include "gstscheduler.h"
|
#include "gstscheduler.h"
|
||||||
|
|
||||||
|
@ -729,7 +727,9 @@ gst_bin_iterate_func (GstBin *bin)
|
||||||
|
|
||||||
DEBUG("have entry \"%s\"\n",gst_element_get_name(entry));
|
DEBUG("have entry \"%s\"\n",gst_element_get_name(entry));
|
||||||
|
|
||||||
if (GST_IS_SRC (entry) || GST_IS_CONNECTION (entry)) {
|
if (GST_IS_BIN (entry)) {
|
||||||
|
gst_bin_iterate (GST_BIN (entry));
|
||||||
|
} else {
|
||||||
pads = entry->pads;
|
pads = entry->pads;
|
||||||
while (pads) {
|
while (pads) {
|
||||||
pad = GST_PAD (pads->data);
|
pad = GST_PAD (pads->data);
|
||||||
|
@ -743,13 +743,6 @@ gst_bin_iterate_func (GstBin *bin)
|
||||||
}
|
}
|
||||||
pads = g_list_next (pads);
|
pads = g_list_next (pads);
|
||||||
}
|
}
|
||||||
// } else if (GST_IS_CONNECTION (entry)) {
|
|
||||||
// gst_connection_push (GST_CONNECTION (entry));
|
|
||||||
} else if (GST_IS_BIN (entry))
|
|
||||||
gst_bin_iterate (GST_BIN (entry));
|
|
||||||
else {
|
|
||||||
fprintf(stderr, "gstbin: entry \"%s\" cannot be handled\n", gst_element_get_name (entry));
|
|
||||||
// g_assert_not_reached ();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
//#define GST_DEBUG_ENABLED
|
//#define GST_DEBUG_ENABLED
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
|
||||||
|
#include "gstelement.h"
|
||||||
#include "gstclock.h"
|
#include "gstclock.h"
|
||||||
#include "gstsink.h"
|
|
||||||
|
|
||||||
|
|
||||||
static GstClock *the_system_clock = NULL;
|
static GstClock *the_system_clock = NULL;
|
||||||
|
@ -70,7 +70,7 @@ gst_clock_get_system(void)
|
||||||
void
|
void
|
||||||
gst_clock_register (GstClock *clock, GstObject *obj)
|
gst_clock_register (GstClock *clock, GstObject *obj)
|
||||||
{
|
{
|
||||||
if (GST_IS_SINK (obj)) {
|
if ((GST_ELEMENT(obj))->numsrcpads == 0) {
|
||||||
DEBUG("gst_clock: setting registered sink object 0x%p\n", obj);
|
DEBUG("gst_clock: setting registered sink object 0x%p\n", obj);
|
||||||
clock->sinkobjects = g_list_append (clock->sinkobjects, obj);
|
clock->sinkobjects = g_list_append (clock->sinkobjects, obj);
|
||||||
clock->num++;
|
clock->num++;
|
||||||
|
|
|
@ -1,98 +0,0 @@
|
||||||
/* GStreamer
|
|
||||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
||||||
* 2000 Wim Taymans <wtay@chello.be>
|
|
||||||
*
|
|
||||||
* gstconnection.c: GstConnection element (depracated)
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
#include "gstconnection.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* Connection signals and args */
|
|
||||||
enum {
|
|
||||||
/* FILL ME */
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
ARG_0,
|
|
||||||
/* FILL ME */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void gst_connection_class_init (GstConnectionClass *klass);
|
|
||||||
static void gst_connection_init (GstConnection *connection);
|
|
||||||
|
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
|
||||||
//static guint gst_connection_signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
GtkType
|
|
||||||
gst_connection_get_type(void) {
|
|
||||||
static GtkType connection_type = 0;
|
|
||||||
|
|
||||||
if (!connection_type) {
|
|
||||||
static const GtkTypeInfo connection_info = {
|
|
||||||
"GstConnection",
|
|
||||||
sizeof(GstConnection),
|
|
||||||
sizeof(GstConnectionClass),
|
|
||||||
(GtkClassInitFunc)gst_connection_class_init,
|
|
||||||
(GtkObjectInitFunc)gst_connection_init,
|
|
||||||
(GtkArgSetFunc)NULL,
|
|
||||||
(GtkArgGetFunc)NULL,
|
|
||||||
(GtkClassInitFunc)NULL,
|
|
||||||
};
|
|
||||||
connection_type = gtk_type_unique (GST_TYPE_ELEMENT, &connection_info);
|
|
||||||
}
|
|
||||||
return connection_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_connection_class_init (GstConnectionClass *klass)
|
|
||||||
{
|
|
||||||
GtkObjectClass *gtkobject_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_connection_init (GstConnection *connection)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_connection_new:
|
|
||||||
* @name: name of new connection
|
|
||||||
*
|
|
||||||
* Create a new connection with given name.
|
|
||||||
*
|
|
||||||
* Returns: new connection
|
|
||||||
*/
|
|
||||||
GstElement*
|
|
||||||
gst_connection_new (gchar *name)
|
|
||||||
{
|
|
||||||
GstElement *connection = GST_ELEMENT (gtk_type_new (gst_connection_get_type ()));
|
|
||||||
|
|
||||||
gst_element_set_name (GST_ELEMENT (connection), name);
|
|
||||||
|
|
||||||
return connection;
|
|
||||||
}
|
|
|
@ -1,66 +0,0 @@
|
||||||
/* GStreamer
|
|
||||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
||||||
* 2000 Wim Taymans <wtay@chello.be>
|
|
||||||
*
|
|
||||||
* gstconnection.h: Header for GstConnection element (depracated)
|
|
||||||
*
|
|
||||||
* 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_CONNECTION_H__
|
|
||||||
#define __GST_CONNECTION_H__
|
|
||||||
|
|
||||||
|
|
||||||
#include <gst/gstelement.h>
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_CONNECTION \
|
|
||||||
(gst_connection_get_type())
|
|
||||||
#define GST_CONNECTION(obj) \
|
|
||||||
(GTK_CHECK_CAST((obj),GST_TYPE_CONNECTION,GstConnection))
|
|
||||||
#define GST_CONNECTION_CLASS(klass) \
|
|
||||||
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_CONNECTION,GstConnectionClass))
|
|
||||||
#define GST_IS_CONNECTION(obj) \
|
|
||||||
(GTK_CHECK_TYPE((obj),GST_TYPE_CONNECTION))
|
|
||||||
#define GST_IS_CONNECTION_CLASS(obj) \
|
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_CONNECTION))
|
|
||||||
|
|
||||||
typedef struct _GstConnection GstConnection;
|
|
||||||
typedef struct _GstConnectionClass GstConnectionClass;
|
|
||||||
|
|
||||||
struct _GstConnection {
|
|
||||||
GstElement element;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GstConnectionClass {
|
|
||||||
GstElementClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GtkType gst_connection_get_type (void);
|
|
||||||
GstElement* gst_connection_new (gchar *name);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_CONNECTION_H__ */
|
|
|
@ -33,6 +33,7 @@ enum {
|
||||||
NEW_PAD,
|
NEW_PAD,
|
||||||
NEW_GHOST_PAD,
|
NEW_GHOST_PAD,
|
||||||
ERROR,
|
ERROR,
|
||||||
|
EOS,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -100,6 +101,10 @@ gst_element_class_init (GstElementClass *klass)
|
||||||
GTK_SIGNAL_OFFSET (GstElementClass, error),
|
GTK_SIGNAL_OFFSET (GstElementClass, error),
|
||||||
gtk_marshal_NONE__STRING, GTK_TYPE_NONE,1,
|
gtk_marshal_NONE__STRING, GTK_TYPE_NONE,1,
|
||||||
GTK_TYPE_STRING);
|
GTK_TYPE_STRING);
|
||||||
|
gst_element_signals[EOS] =
|
||||||
|
gtk_signal_new ("eos", GTK_RUN_LAST, gtkobject_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GstElementClass,eos),
|
||||||
|
gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
|
||||||
gtk_object_class_add_signals (gtkobject_class, gst_element_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (gtkobject_class, gst_element_signals, LAST_SIGNAL);
|
||||||
|
@ -825,3 +830,19 @@ gst_element_set_loop_function(GstElement *element,
|
||||||
/* set the NEW_LOOPFUNC flag so everyone knows to go try again */
|
/* set the NEW_LOOPFUNC flag so everyone knows to go try again */
|
||||||
GST_FLAG_SET(element,GST_ELEMENT_NEW_LOOPFUNC);
|
GST_FLAG_SET(element,GST_ELEMENT_NEW_LOOPFUNC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_src_signal_eos:
|
||||||
|
* @src: source to trigger the eos signal of
|
||||||
|
*
|
||||||
|
* singals the eos signal to indicate that the end of the stream
|
||||||
|
* is reached.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_element_signal_eos (GstElement *element)
|
||||||
|
{
|
||||||
|
g_return_if_fail (element != NULL);
|
||||||
|
g_return_if_fail (GST_IS_ELEMENT (element));
|
||||||
|
|
||||||
|
gtk_signal_emit (GTK_OBJECT (element), gst_element_signals[EOS]);
|
||||||
|
}
|
||||||
|
|
|
@ -148,6 +148,7 @@ struct _GstElementClass {
|
||||||
void (*new_pad) (GstElement *element,GstPad *pad);
|
void (*new_pad) (GstElement *element,GstPad *pad);
|
||||||
void (*new_ghost_pad) (GstElement *element,GstPad *pad);
|
void (*new_ghost_pad) (GstElement *element,GstPad *pad);
|
||||||
void (*error) (GstElement *element,gchar *error);
|
void (*error) (GstElement *element,gchar *error);
|
||||||
|
void (*eos) (GstElement *element);
|
||||||
|
|
||||||
/* change the element state */
|
/* change the element state */
|
||||||
GstElementStateReturn (*change_state) (GstElement *element);
|
GstElementStateReturn (*change_state) (GstElement *element);
|
||||||
|
@ -197,6 +198,9 @@ void gst_element_add_ghost_pad (GstElement *element, GstPad *pad);
|
||||||
void gst_element_connect (GstElement *src, gchar *srcpadname,
|
void gst_element_connect (GstElement *src, gchar *srcpadname,
|
||||||
GstElement *dest, gchar *destpadname);
|
GstElement *dest, gchar *destpadname);
|
||||||
|
|
||||||
|
void gst_element_signal_eos (GstElement *element);
|
||||||
|
|
||||||
|
|
||||||
/* called by the app to set the state of the element */
|
/* called by the app to set the state of the element */
|
||||||
gint gst_element_set_state (GstElement *element, GstElementState state);
|
gint gst_element_set_state (GstElement *element, GstElementState state);
|
||||||
|
|
||||||
|
|
|
@ -1,97 +0,0 @@
|
||||||
/* GStreamer
|
|
||||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
||||||
* 2000 Wim Taymans <wtay@chello.be>
|
|
||||||
*
|
|
||||||
* gstfilter.c: GstFilter element (depracated)
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
#include "gstfilter.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* Filter signals and args */
|
|
||||||
enum {
|
|
||||||
/* FILL ME */
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
ARG_0,
|
|
||||||
/* FILL ME */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void gst_filter_class_init (GstFilterClass *klass);
|
|
||||||
static void gst_filter_init (GstFilter *filter);
|
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
|
||||||
//static guint gst_filter_signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
GtkType
|
|
||||||
gst_filter_get_type(void) {
|
|
||||||
static GtkType filter_type = 0;
|
|
||||||
|
|
||||||
if (!filter_type) {
|
|
||||||
static const GtkTypeInfo filter_info = {
|
|
||||||
"GstFilter",
|
|
||||||
sizeof(GstFilter),
|
|
||||||
sizeof(GstFilterClass),
|
|
||||||
(GtkClassInitFunc)gst_filter_class_init,
|
|
||||||
(GtkObjectInitFunc)gst_filter_init,
|
|
||||||
(GtkArgSetFunc)NULL,
|
|
||||||
(GtkArgGetFunc)NULL,
|
|
||||||
(GtkClassInitFunc)NULL,
|
|
||||||
};
|
|
||||||
filter_type = gtk_type_unique(GST_TYPE_ELEMENT,&filter_info);
|
|
||||||
}
|
|
||||||
return filter_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_filter_class_init (GstFilterClass *klass)
|
|
||||||
{
|
|
||||||
GtkObjectClass *gtkobject_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_filter_init (GstFilter *filter)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_filter_new:
|
|
||||||
* @name: name of new filter
|
|
||||||
*
|
|
||||||
* Create a new filter with given name.
|
|
||||||
*
|
|
||||||
* Returns: new filter
|
|
||||||
*/
|
|
||||||
GstElement*
|
|
||||||
gst_filter_new (gchar *name)
|
|
||||||
{
|
|
||||||
GstElement *filter = GST_ELEMENT (gtk_type_new (gst_filter_get_type()));
|
|
||||||
|
|
||||||
gst_element_set_name (GST_ELEMENT (filter), name);
|
|
||||||
|
|
||||||
return filter;
|
|
||||||
}
|
|
|
@ -1,67 +0,0 @@
|
||||||
/* GStreamer
|
|
||||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
||||||
* 2000 Wim Taymans <wtay@chello.be>
|
|
||||||
*
|
|
||||||
* gstfilter.h: Header for GstFilter element (depracated)
|
|
||||||
*
|
|
||||||
* 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_FILTER_H__
|
|
||||||
#define __GST_FILTER_H__
|
|
||||||
|
|
||||||
#include <gst/gstelement.h>
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_FILTER \
|
|
||||||
(gst_filter_get_type())
|
|
||||||
#define GST_FILTER(obj) \
|
|
||||||
(GTK_CHECK_CAST((obj),GST_TYPE_FILTER,GstFilter))
|
|
||||||
#define GST_FILTER_CLASS(klass) \
|
|
||||||
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_FILTER,GstFilterClass))
|
|
||||||
#define GST_IS_FILTER(obj) \
|
|
||||||
(GTK_CHECK_TYPE((obj),GST_TYPE_FILTER))
|
|
||||||
#define GST_IS_FILTER_CLASS(obj) \
|
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FILTER))
|
|
||||||
|
|
||||||
typedef struct _GstFilter GstFilter;
|
|
||||||
typedef struct _GstFilterClass GstFilterClass;
|
|
||||||
|
|
||||||
#define GST_FILTER_FLAG_LAST GST_ELEMENT_FLAG_LAST
|
|
||||||
|
|
||||||
struct _GstFilter {
|
|
||||||
GstElement element;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GstFilterClass {
|
|
||||||
GstElementClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GtkType gst_filter_get_type (void);
|
|
||||||
GstElement* gst_filter_new (gchar *name);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_FILTER_H__ */
|
|
|
@ -25,7 +25,6 @@
|
||||||
|
|
||||||
#include "gstpipeline.h"
|
#include "gstpipeline.h"
|
||||||
#include "gstthread.h"
|
#include "gstthread.h"
|
||||||
#include "gstsink.h"
|
|
||||||
#include "gstutils.h"
|
#include "gstutils.h"
|
||||||
#include "gsttype.h"
|
#include "gsttype.h"
|
||||||
#include "gstautoplug.h"
|
#include "gstautoplug.h"
|
||||||
|
@ -60,7 +59,7 @@ static GstElementStateReturn gst_pipeline_change_state (GstElement *element);
|
||||||
|
|
||||||
static void gst_pipeline_prepare (GstPipeline *pipeline);
|
static void gst_pipeline_prepare (GstPipeline *pipeline);
|
||||||
|
|
||||||
static void gst_pipeline_have_type (GstSink *sink, GstSink *sink2, gpointer data);
|
static void gst_pipeline_have_type (GstElement *sink, GstElement *sink2, gpointer data);
|
||||||
static void gst_pipeline_pads_autoplug (GstElement *src, GstElement *sink);
|
static void gst_pipeline_pads_autoplug (GstElement *src, GstElement *sink);
|
||||||
|
|
||||||
static GstBinClass *parent_class = NULL;
|
static GstBinClass *parent_class = NULL;
|
||||||
|
@ -131,7 +130,7 @@ gst_pipeline_prepare (GstPipeline *pipeline)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_pipeline_have_type (GstSink *sink, GstSink *sink2, gpointer data)
|
gst_pipeline_have_type (GstElement *sink, GstElement *sink2, gpointer data)
|
||||||
{
|
{
|
||||||
DEBUG("GstPipeline: pipeline have type %p\n", (gboolean *)data);
|
DEBUG("GstPipeline: pipeline have type %p\n", (gboolean *)data);
|
||||||
|
|
||||||
|
|
|
@ -1,98 +0,0 @@
|
||||||
/* GStreamer
|
|
||||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
||||||
* 2000 Wim Taymans <wtay@chello.be>
|
|
||||||
*
|
|
||||||
* gstsink.c: GstSink object (depracated)
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
#include "gstsink.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* Sink signals and args */
|
|
||||||
enum {
|
|
||||||
/* FILL ME */
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
ARG_0,
|
|
||||||
/* FILL ME */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void gst_sink_class_init (GstSinkClass *klass);
|
|
||||||
static void gst_sink_init (GstSink *sink);
|
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
|
||||||
//static guint gst_sink_signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
GtkType
|
|
||||||
gst_sink_get_type (void)
|
|
||||||
{
|
|
||||||
static GtkType sink_type = 0;
|
|
||||||
|
|
||||||
if (!sink_type) {
|
|
||||||
static const GtkTypeInfo sink_info = {
|
|
||||||
"GstSink",
|
|
||||||
sizeof(GstSink),
|
|
||||||
sizeof(GstSinkClass),
|
|
||||||
(GtkClassInitFunc)gst_sink_class_init,
|
|
||||||
(GtkObjectInitFunc)gst_sink_init,
|
|
||||||
(GtkArgSetFunc)NULL,
|
|
||||||
(GtkArgGetFunc)NULL,
|
|
||||||
(GtkClassInitFunc)NULL,
|
|
||||||
};
|
|
||||||
sink_type = gtk_type_unique (GST_TYPE_ELEMENT, &sink_info);
|
|
||||||
}
|
|
||||||
return sink_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_sink_class_init (GstSinkClass *klass)
|
|
||||||
{
|
|
||||||
GtkObjectClass *gtkobject_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_sink_init (GstSink *sink)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_sink_new:
|
|
||||||
* @name: name of new sink
|
|
||||||
*
|
|
||||||
* Create a new sink with given name.
|
|
||||||
*
|
|
||||||
* Returns: new sink
|
|
||||||
*/
|
|
||||||
|
|
||||||
GstObject*
|
|
||||||
gst_sink_new (gchar *name)
|
|
||||||
{
|
|
||||||
GstObject *sink = GST_OBJECT (gtk_type_new (GST_TYPE_SINK));
|
|
||||||
gst_element_set_name (GST_ELEMENT (sink), name);
|
|
||||||
|
|
||||||
return sink;
|
|
||||||
}
|
|
|
@ -1,68 +0,0 @@
|
||||||
/* GStreamer
|
|
||||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
||||||
* 2000 Wim Taymans <wtay@chello.be>
|
|
||||||
*
|
|
||||||
* gstsink.h: Header for GstSink element (depracated)
|
|
||||||
*
|
|
||||||
* 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_SINK_H__
|
|
||||||
#define __GST_SINK_H__
|
|
||||||
|
|
||||||
#include <gst/gstelement.h>
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_SINK \
|
|
||||||
(gst_sink_get_type())
|
|
||||||
#define GST_SINK(obj) \
|
|
||||||
(GTK_CHECK_CAST((obj),GST_TYPE_SINK,GstSink))
|
|
||||||
#define GST_SINK_CLASS(klass) \
|
|
||||||
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_SINK,GstSinkClass))
|
|
||||||
#define GST_IS_SINK(obj) \
|
|
||||||
(GTK_CHECK_TYPE((obj),GST_TYPE_SINK))
|
|
||||||
#define GST_IS_SINK_CLASS(obj) \
|
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SINK))
|
|
||||||
|
|
||||||
typedef struct _GstSink GstSink;
|
|
||||||
typedef struct _GstSinkClass GstSinkClass;
|
|
||||||
|
|
||||||
#define GST_SINK_FLAG_LAST GST_ELEMENT_FLAG_LAST
|
|
||||||
|
|
||||||
struct _GstSink {
|
|
||||||
GstElement element;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GstSinkClass {
|
|
||||||
GstElementClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GtkType gst_sink_get_type (void);
|
|
||||||
GstObject* gst_sink_new (gchar *name);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_SINK_H__ */
|
|
103
gst/gstsrc.c
103
gst/gstsrc.c
|
@ -1,103 +0,0 @@
|
||||||
/* GStreamer
|
|
||||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
||||||
* 2000 Wim Taymans <wtay@chello.be>
|
|
||||||
*
|
|
||||||
* gstsrc.c: GstSrc object (depracated)
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
#include "gstsrc.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* Src signals and args */
|
|
||||||
enum {
|
|
||||||
EOS,
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
ARG_0,
|
|
||||||
/* FILL ME */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void gst_src_class_init(GstSrcClass *klass);
|
|
||||||
static void gst_src_init(GstSrc *src);
|
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
|
||||||
static guint gst_src_signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
GtkType
|
|
||||||
gst_src_get_type(void)
|
|
||||||
{
|
|
||||||
static GtkType src_type = 0;
|
|
||||||
|
|
||||||
if (!src_type) {
|
|
||||||
static const GtkTypeInfo src_info = {
|
|
||||||
"GstSrc",
|
|
||||||
sizeof(GstSrc),
|
|
||||||
sizeof(GstSrcClass),
|
|
||||||
(GtkClassInitFunc)gst_src_class_init,
|
|
||||||
(GtkObjectInitFunc)gst_src_init,
|
|
||||||
(GtkArgSetFunc)NULL,
|
|
||||||
(GtkArgGetFunc)NULL,
|
|
||||||
(GtkClassInitFunc)NULL,
|
|
||||||
};
|
|
||||||
src_type = gtk_type_unique (GST_TYPE_ELEMENT, &src_info);
|
|
||||||
}
|
|
||||||
return src_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_src_class_init (GstSrcClass *klass)
|
|
||||||
{
|
|
||||||
GtkObjectClass *gtkobject_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
|
||||||
|
|
||||||
gst_src_signals[EOS] =
|
|
||||||
gtk_signal_new ("eos", GTK_RUN_LAST, gtkobject_class->type,
|
|
||||||
GTK_SIGNAL_OFFSET (GstSrcClass,eos),
|
|
||||||
gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0);
|
|
||||||
|
|
||||||
gtk_object_class_add_signals (gtkobject_class, gst_src_signals, LAST_SIGNAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_src_init (GstSrc *src)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_src_signal_eos:
|
|
||||||
* @src: source to trigger the eos signal of
|
|
||||||
*
|
|
||||||
* singals the eos signal to indicate that the end of the stream
|
|
||||||
* is reached.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gst_src_signal_eos (GstSrc *src)
|
|
||||||
{
|
|
||||||
g_return_if_fail (src != NULL);
|
|
||||||
g_return_if_fail (GST_IS_SRC (src));
|
|
||||||
|
|
||||||
gtk_signal_emit (GTK_OBJECT (src), gst_src_signals[EOS]);
|
|
||||||
}
|
|
77
gst/gstsrc.h
77
gst/gstsrc.h
|
@ -1,77 +0,0 @@
|
||||||
/* GStreamer
|
|
||||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
||||||
* 2000 Wim Taymans <wtay@chello.be>
|
|
||||||
*
|
|
||||||
* gstsrc.h: Header for GstSrc element (depracated)
|
|
||||||
*
|
|
||||||
* 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_SRC_H__
|
|
||||||
#define __GST_SRC_H__
|
|
||||||
|
|
||||||
#include <gst/gstelement.h>
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_SRC \
|
|
||||||
(gst_src_get_type())
|
|
||||||
#define GST_SRC(obj) \
|
|
||||||
(GTK_CHECK_CAST((obj),GST_TYPE_SRC,GstSrc))
|
|
||||||
#define GST_SRC_CLASS(klass) \
|
|
||||||
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_SRC,GstSrcClass))
|
|
||||||
#define GST_IS_SRC(obj) \
|
|
||||||
(GTK_CHECK_TYPE((obj),GST_TYPE_SRC))
|
|
||||||
#define GST_IS_SRC_CLASS(obj) \
|
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SRC))
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
GST_SRC_ASYNC = GST_ELEMENT_FLAG_LAST,
|
|
||||||
|
|
||||||
GST_SRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST +2,
|
|
||||||
} GstSrcFlags;
|
|
||||||
|
|
||||||
typedef struct _GstSrc GstSrc;
|
|
||||||
typedef struct _GstSrcClass GstSrcClass;
|
|
||||||
|
|
||||||
#define GST_SRC_IS_ASYNC(obj) (GST_FLAG_IS_SET(obj,GST_SRC_ASYNC))
|
|
||||||
|
|
||||||
struct _GstSrc {
|
|
||||||
GstElement element;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GstSrcClass {
|
|
||||||
GstElementClass parent_class;
|
|
||||||
|
|
||||||
/* signals */
|
|
||||||
void (*eos) (GstSrc *src);
|
|
||||||
};
|
|
||||||
|
|
||||||
GtkType gst_src_get_type (void);
|
|
||||||
|
|
||||||
void gst_src_signal_eos (GstSrc *src);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_SRC_H__ */
|
|
10
gst/gsttee.c
10
gst/gsttee.c
|
@ -51,7 +51,7 @@ static void gst_tee_init(GstTee *tee);
|
||||||
|
|
||||||
//static xmlNodePtr gst_tee_save_thyself(GstElement *element,xmlNodePtr parent);
|
//static xmlNodePtr gst_tee_save_thyself(GstElement *element,xmlNodePtr parent);
|
||||||
|
|
||||||
static GstFilterClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_tee_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_tee_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -69,18 +69,18 @@ gst_tee_get_type(void) {
|
||||||
(GtkArgGetFunc)NULL,
|
(GtkArgGetFunc)NULL,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
tee_type = gtk_type_unique(GST_TYPE_FILTER,&tee_info);
|
tee_type = gtk_type_unique(GST_TYPE_ELEMENT,&tee_info);
|
||||||
}
|
}
|
||||||
return tee_type;
|
return tee_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_tee_class_init(GstTeeClass *klass) {
|
gst_tee_class_init(GstTeeClass *klass) {
|
||||||
GstFilterClass *gstfilter_class;
|
GstElementClass *gstelement_class;
|
||||||
|
|
||||||
gstfilter_class = (GstFilterClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class(GST_TYPE_FILTER);
|
parent_class = gtk_type_class(GST_TYPE_ELEMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gst_tee_init(GstTee *tee) {
|
static void gst_tee_init(GstTee *tee) {
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#ifndef __GST_TEE_H__
|
#ifndef __GST_TEE_H__
|
||||||
#define __GST_TEE_H__
|
#define __GST_TEE_H__
|
||||||
|
|
||||||
#include <gst/gstfilter.h>
|
#include "gstelement.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -47,7 +47,7 @@ typedef struct _GstTee GstTee;
|
||||||
typedef struct _GstTeeClass GstTeeClass;
|
typedef struct _GstTeeClass GstTeeClass;
|
||||||
|
|
||||||
struct _GstTee {
|
struct _GstTee {
|
||||||
GstFilter filter;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ struct _GstTee {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstTeeClass {
|
struct _GstTeeClass {
|
||||||
GstFilterClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_tee_get_type (void);
|
GtkType gst_tee_get_type (void);
|
||||||
|
|
|
@ -63,7 +63,7 @@ static GstBuffer * gst_asyncdisksrc_get_region (GstPad *pad, gulong offset, gul
|
||||||
static GstElementStateReturn gst_asyncdisksrc_change_state (GstElement *element);
|
static GstElementStateReturn gst_asyncdisksrc_change_state (GstElement *element);
|
||||||
|
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_asyncdisksrc_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_asyncdisksrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -82,7 +82,7 @@ gst_asyncdisksrc_get_type(void)
|
||||||
(GtkArgGetFunc)gst_asyncdisksrc_get_arg,
|
(GtkArgGetFunc)gst_asyncdisksrc_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
asyncdisksrc_type = gtk_type_unique (GST_TYPE_SRC, &asyncdisksrc_info);
|
asyncdisksrc_type = gtk_type_unique (GST_TYPE_ELEMENT, &asyncdisksrc_info);
|
||||||
}
|
}
|
||||||
return asyncdisksrc_type;
|
return asyncdisksrc_type;
|
||||||
}
|
}
|
||||||
|
@ -92,13 +92,11 @@ gst_asyncdisksrc_class_init (GstAsyncDiskSrcClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SRC);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstAsyncDiskSrc::location", GST_TYPE_FILENAME,
|
gtk_object_add_arg_type ("GstAsyncDiskSrc::location", GST_TYPE_FILENAME,
|
||||||
GTK_ARG_READWRITE, ARG_LOCATION);
|
GTK_ARG_READWRITE, ARG_LOCATION);
|
||||||
|
@ -118,7 +116,7 @@ gst_asyncdisksrc_class_init (GstAsyncDiskSrcClass *klass)
|
||||||
static void
|
static void
|
||||||
gst_asyncdisksrc_init (GstAsyncDiskSrc *asyncdisksrc)
|
gst_asyncdisksrc_init (GstAsyncDiskSrc *asyncdisksrc)
|
||||||
{
|
{
|
||||||
GST_FLAG_SET (asyncdisksrc, GST_SRC_ASYNC);
|
// GST_FLAG_SET (asyncdisksrc, GST_SRC_ASYNC);
|
||||||
|
|
||||||
g_print("init\n");
|
g_print("init\n");
|
||||||
asyncdisksrc->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
asyncdisksrc->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||||
|
@ -221,7 +219,7 @@ gst_asyncdisksrc_get (GstPad *pad)
|
||||||
|
|
||||||
/* deal with EOF state */
|
/* deal with EOF state */
|
||||||
if (src->curoffset >= src->size) {
|
if (src->curoffset >= src->size) {
|
||||||
gst_src_signal_eos (GST_SRC (src));
|
gst_element_signal_eos (GST_ELEMENT (src));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,7 +274,7 @@ gst_asyncdisksrc_get_region (GstPad *pad, gulong offset, gulong size)
|
||||||
|
|
||||||
/* deal with EOF state */
|
/* deal with EOF state */
|
||||||
if (offset >= src->size) {
|
if (offset >= src->size) {
|
||||||
gst_src_signal_eos (GST_SRC (src));
|
gst_element_signal_eos (GST_ELEMENT (src));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,16 +44,16 @@ GstElementDetails gst_asyncdisksrc_details;
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ASYNCDISKSRC))
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ASYNCDISKSRC))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_ASYNCDISKSRC_OPEN = GST_SRC_FLAG_LAST,
|
GST_ASYNCDISKSRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_ASYNCDISKSRC_FLAG_LAST = GST_SRC_FLAG_LAST + 2,
|
GST_ASYNCDISKSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
|
||||||
} GstAsyncDiskSrcFlags;
|
} GstAsyncDiskSrcFlags;
|
||||||
|
|
||||||
typedef struct _GstAsyncDiskSrc GstAsyncDiskSrc;
|
typedef struct _GstAsyncDiskSrc GstAsyncDiskSrc;
|
||||||
typedef struct _GstAsyncDiskSrcClass GstAsyncDiskSrcClass;
|
typedef struct _GstAsyncDiskSrcClass GstAsyncDiskSrcClass;
|
||||||
|
|
||||||
struct _GstAsyncDiskSrc {
|
struct _GstAsyncDiskSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ struct _GstAsyncDiskSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstAsyncDiskSrcClass {
|
struct _GstAsyncDiskSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_asyncdisksrc_get_type(void);
|
GtkType gst_asyncdisksrc_get_type(void);
|
||||||
|
|
|
@ -115,7 +115,7 @@ gst_audiosink_channels_get_type(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static GstSinkClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
static guint gst_audiosink_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_audiosink_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
static GstPadTemplate *gst_audiosink_sink_template;
|
static GstPadTemplate *gst_audiosink_sink_template;
|
||||||
|
@ -136,7 +136,7 @@ gst_audiosink_get_type (void)
|
||||||
(GtkArgGetFunc)NULL,
|
(GtkArgGetFunc)NULL,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
audiosink_type = gtk_type_unique (GST_TYPE_SINK, &audiosink_info);
|
audiosink_type = gtk_type_unique (GST_TYPE_ELEMENT, &audiosink_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
return audiosink_type;
|
return audiosink_type;
|
||||||
|
@ -151,7 +151,7 @@ gst_audiosink_class_init (GstAudioSinkClass *klass)
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class(GST_TYPE_FILTER);
|
parent_class = gtk_type_class(GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstAudioSink::mute", GTK_TYPE_BOOL,
|
gtk_object_add_arg_type ("GstAudioSink::mute", GTK_TYPE_BOOL,
|
||||||
GTK_ARG_READWRITE, ARG_MUTE);
|
GTK_ARG_READWRITE, ARG_MUTE);
|
||||||
|
|
|
@ -46,16 +46,16 @@ GstElementDetails gst_audiosink_details;
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSINK))
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSINK))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_AUDIOSINK_OPEN = GST_SINK_FLAG_LAST,
|
GST_AUDIOSINK_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_AUDIOSINK_FLAG_LAST = GST_SINK_FLAG_LAST+2,
|
GST_AUDIOSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
|
||||||
} GstAudioSinkFlags;
|
} GstAudioSinkFlags;
|
||||||
|
|
||||||
typedef struct _GstAudioSink GstAudioSink;
|
typedef struct _GstAudioSink GstAudioSink;
|
||||||
typedef struct _GstAudioSinkClass GstAudioSinkClass;
|
typedef struct _GstAudioSinkClass GstAudioSinkClass;
|
||||||
|
|
||||||
struct _GstAudioSink {
|
struct _GstAudioSink {
|
||||||
GstSink sink;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ struct _GstAudioSink {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstAudioSinkClass {
|
struct _GstAudioSinkClass {
|
||||||
GstSinkClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*handoff) (GstElement *element,GstPad *pad);
|
void (*handoff) (GstElement *element,GstPad *pad);
|
||||||
|
|
|
@ -66,7 +66,7 @@ static void gst_audiosrc_sync_parms (GstAudioSrc *audiosrc);
|
||||||
|
|
||||||
static GstBuffer * gst_audiosrc_get (GstPad *pad);
|
static GstBuffer * gst_audiosrc_get (GstPad *pad);
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_audiosrc_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_audiosrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -85,7 +85,7 @@ gst_audiosrc_get_type (void)
|
||||||
(GtkArgGetFunc)gst_audiosrc_get_arg,
|
(GtkArgGetFunc)gst_audiosrc_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
audiosrc_type = gtk_type_unique (GST_TYPE_SRC, &audiosrc_info);
|
audiosrc_type = gtk_type_unique (GST_TYPE_ELEMENT, &audiosrc_info);
|
||||||
}
|
}
|
||||||
return audiosrc_type;
|
return audiosrc_type;
|
||||||
}
|
}
|
||||||
|
@ -95,13 +95,11 @@ gst_audiosrc_class_init (GstAudioSrcClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SRC);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstAudioSrc::bytes_per_read", GTK_TYPE_ULONG,
|
gtk_object_add_arg_type ("GstAudioSrc::bytes_per_read", GTK_TYPE_ULONG,
|
||||||
GTK_ARG_READWRITE, ARG_BYTESPERREAD);
|
GTK_ARG_READWRITE, ARG_BYTESPERREAD);
|
||||||
|
@ -161,7 +159,7 @@ gst_audiosrc_get (GstPad *pad)
|
||||||
src->bytes_per_read);
|
src->bytes_per_read);
|
||||||
|
|
||||||
if (readbytes == 0) {
|
if (readbytes == 0) {
|
||||||
gst_src_signal_eos (GST_SRC (src));
|
gst_element_signal_eos (GST_ELEMENT (src));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,16 +47,16 @@ GstElementDetails gst_audiosrc_details;
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSRC))
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSRC))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_AUDIOSRC_OPEN = GST_SRC_FLAG_LAST,
|
GST_AUDIOSRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_AUDIOSRC_FLAG_LAST = GST_SRC_FLAG_LAST+2,
|
GST_AUDIOSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
|
||||||
} GstAudioSrcFlags;
|
} GstAudioSrcFlags;
|
||||||
|
|
||||||
typedef struct _GstAudioSrc GstAudioSrc;
|
typedef struct _GstAudioSrc GstAudioSrc;
|
||||||
typedef struct _GstAudioSrcClass GstAudioSrcClass;
|
typedef struct _GstAudioSrcClass GstAudioSrcClass;
|
||||||
|
|
||||||
struct _GstAudioSrc {
|
struct _GstAudioSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
|
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
@ -79,7 +79,7 @@ struct _GstAudioSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstAudioSrcClass {
|
struct _GstAudioSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_audiosrc_get_type(void);
|
GtkType gst_audiosrc_get_type(void);
|
||||||
|
|
|
@ -63,7 +63,7 @@ static GstBuffer * gst_disksrc_get (GstPad *pad);
|
||||||
static GstElementStateReturn gst_disksrc_change_state (GstElement *element);
|
static GstElementStateReturn gst_disksrc_change_state (GstElement *element);
|
||||||
|
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_disksrc_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_disksrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -81,7 +81,7 @@ gst_disksrc_get_type(void) {
|
||||||
(GtkArgGetFunc)gst_disksrc_get_arg,
|
(GtkArgGetFunc)gst_disksrc_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
disksrc_type = gtk_type_unique(GST_TYPE_SRC,&disksrc_info);
|
disksrc_type = gtk_type_unique(GST_TYPE_ELEMENT,&disksrc_info);
|
||||||
}
|
}
|
||||||
return disksrc_type;
|
return disksrc_type;
|
||||||
}
|
}
|
||||||
|
@ -91,13 +91,11 @@ gst_disksrc_class_init (GstDiskSrcClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SRC);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstDiskSrc::location", GST_TYPE_FILENAME,
|
gtk_object_add_arg_type ("GstDiskSrc::location", GST_TYPE_FILENAME,
|
||||||
GTK_ARG_READWRITE, ARG_LOCATION);
|
GTK_ARG_READWRITE, ARG_LOCATION);
|
||||||
|
@ -227,7 +225,7 @@ gst_disksrc_get (GstPad *pad)
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
} else if (readbytes == 0) {
|
} else if (readbytes == 0) {
|
||||||
gst_src_signal_eos (GST_SRC (src));
|
gst_element_signal_eos (GST_ELEMENT (src));
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,16 +46,16 @@ extern GstElementDetails gst_disksrc_details;
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_DISKSRC))
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_DISKSRC))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_DISKSRC_OPEN = GST_SRC_FLAG_LAST,
|
GST_DISKSRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_DISKSRC_FLAG_LAST = GST_SRC_FLAG_LAST+2,
|
GST_DISKSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
|
||||||
} GstDiskSrcFlags;
|
} GstDiskSrcFlags;
|
||||||
|
|
||||||
typedef struct _GstDiskSrc GstDiskSrc;
|
typedef struct _GstDiskSrc GstDiskSrc;
|
||||||
typedef struct _GstDiskSrcClass GstDiskSrcClass;
|
typedef struct _GstDiskSrcClass GstDiskSrcClass;
|
||||||
|
|
||||||
struct _GstDiskSrc {
|
struct _GstDiskSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ struct _GstDiskSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstDiskSrcClass {
|
struct _GstDiskSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_disksrc_get_type(void);
|
GtkType gst_disksrc_get_type(void);
|
||||||
|
|
|
@ -29,14 +29,15 @@
|
||||||
#include <gstfakesrc.h>
|
#include <gstfakesrc.h>
|
||||||
#include <gstfdsink.h>
|
#include <gstfdsink.h>
|
||||||
#include <gstfdsrc.h>
|
#include <gstfdsrc.h>
|
||||||
#if HAVE_LIBGHTTP
|
|
||||||
#include <gsthttpsrc.h>
|
|
||||||
#endif /* HAVE_LIBGHTTP */
|
|
||||||
#include <gstpipefilter.h>
|
#include <gstpipefilter.h>
|
||||||
#include <gstqueue.h>
|
#include <gstqueue.h>
|
||||||
#include <gstsinesrc.h>
|
#include <gstsinesrc.h>
|
||||||
#include <gsttypefind.h>
|
#include <gsttypefind.h>
|
||||||
|
|
||||||
|
#if HAVE_LIBGHTTP
|
||||||
|
#include <gsthttpsrc.h>
|
||||||
|
#endif /* HAVE_LIBGHTTP */
|
||||||
|
|
||||||
|
|
||||||
struct _elements_entry {
|
struct _elements_entry {
|
||||||
gchar *name;
|
gchar *name;
|
||||||
|
@ -55,13 +56,14 @@ static struct _elements_entry _elements[] = {
|
||||||
{ "identity", gst_identity_get_type, &gst_identity_details, NULL },
|
{ "identity", gst_identity_get_type, &gst_identity_details, NULL },
|
||||||
{ "fdsink", gst_fdsink_get_type, &gst_fdsink_details, NULL },
|
{ "fdsink", gst_fdsink_get_type, &gst_fdsink_details, NULL },
|
||||||
{ "fdsrc", gst_fdsrc_get_type, &gst_fdsrc_details, NULL },
|
{ "fdsrc", gst_fdsrc_get_type, &gst_fdsrc_details, NULL },
|
||||||
#if HAVE_LIBGHTTP
|
|
||||||
{ "httpsrc", gst_httpsrc_get_type, &gst_httpsrc_details, NULL },
|
|
||||||
#endif /* HAVE_LIBGHTTP */
|
|
||||||
{ "pipefilter", gst_pipefilter_get_type, &gst_pipefilter_details, NULL },
|
{ "pipefilter", gst_pipefilter_get_type, &gst_pipefilter_details, NULL },
|
||||||
{ "queue", gst_queue_get_type, &gst_queue_details, NULL },
|
{ "queue", gst_queue_get_type, &gst_queue_details, NULL },
|
||||||
{ "sinesrc", gst_sinesrc_get_type, &gst_sinesrc_details, NULL },
|
{ "sinesrc", gst_sinesrc_get_type, &gst_sinesrc_details, NULL },
|
||||||
{ "typefind", gst_typefind_get_type, &gst_typefind_details, NULL },
|
{ "typefind", gst_typefind_get_type, &gst_typefind_details, NULL },
|
||||||
|
|
||||||
|
#if HAVE_LIBGHTTP
|
||||||
|
{ "httpsrc", gst_httpsrc_get_type, &gst_httpsrc_details, NULL },
|
||||||
|
#endif /* HAVE_LIBGHTTP */
|
||||||
|
|
||||||
{ NULL, 0 },
|
{ NULL, 0 },
|
||||||
};
|
};
|
||||||
|
|
|
@ -49,7 +49,7 @@ static void gst_fakesink_init(GstFakeSink *fakesink);
|
||||||
|
|
||||||
static void gst_fakesink_chain(GstPad *pad,GstBuffer *buf);
|
static void gst_fakesink_chain(GstPad *pad,GstBuffer *buf);
|
||||||
|
|
||||||
static GstSinkClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
static guint gst_fakesink_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_fakesink_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -68,7 +68,7 @@ gst_fakesink_get_type (void)
|
||||||
(GtkArgGetFunc)NULL,
|
(GtkArgGetFunc)NULL,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
fakesink_type = gtk_type_unique (GST_TYPE_SINK, &fakesink_info);
|
fakesink_type = gtk_type_unique (GST_TYPE_ELEMENT, &fakesink_info);
|
||||||
}
|
}
|
||||||
return fakesink_type;
|
return fakesink_type;
|
||||||
}
|
}
|
||||||
|
@ -77,10 +77,8 @@ static void
|
||||||
gst_fakesink_class_init (GstFakeSinkClass *klass)
|
gst_fakesink_class_init (GstFakeSinkClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstSinkClass *gstsink_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstsink_class = (GstSinkClass*)klass;
|
|
||||||
|
|
||||||
gst_fakesink_signals[SIGNAL_HANDOFF] =
|
gst_fakesink_signals[SIGNAL_HANDOFF] =
|
||||||
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
|
gtk_signal_new ("handoff", GTK_RUN_LAST, gtkobject_class->type,
|
||||||
|
@ -90,7 +88,7 @@ gst_fakesink_class_init (GstFakeSinkClass *klass)
|
||||||
gtk_object_class_add_signals (gtkobject_class, gst_fakesink_signals,
|
gtk_object_class_add_signals (gtkobject_class, gst_fakesink_signals,
|
||||||
LAST_SIGNAL);
|
LAST_SIGNAL);
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SINK);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -49,13 +49,13 @@ typedef struct _GstFakeSink GstFakeSink;
|
||||||
typedef struct _GstFakeSinkClass GstFakeSinkClass;
|
typedef struct _GstFakeSinkClass GstFakeSinkClass;
|
||||||
|
|
||||||
struct _GstFakeSink {
|
struct _GstFakeSink {
|
||||||
GstSink sink;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFakeSinkClass {
|
struct _GstFakeSinkClass {
|
||||||
GstSinkClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*handoff) (GstElement *element,GstPad *pad);
|
void (*handoff) (GstElement *element,GstPad *pad);
|
||||||
|
|
|
@ -76,7 +76,7 @@ static void gst_fakesrc_get_arg (GtkObject *object, GtkArg *arg, guint id);
|
||||||
static GstBuffer* gst_fakesrc_get (GstPad *pad);
|
static GstBuffer* gst_fakesrc_get (GstPad *pad);
|
||||||
static void gst_fakesrc_loop (GstElement *element);
|
static void gst_fakesrc_loop (GstElement *element);
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
static guint gst_fakesrc_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_fakesrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -95,7 +95,7 @@ gst_fakesrc_get_type (void)
|
||||||
(GtkArgGetFunc)NULL,
|
(GtkArgGetFunc)NULL,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
fakesrc_type = gtk_type_unique (GST_TYPE_SRC, &fakesrc_info);
|
fakesrc_type = gtk_type_unique (GST_TYPE_ELEMENT, &fakesrc_info);
|
||||||
}
|
}
|
||||||
return fakesrc_type;
|
return fakesrc_type;
|
||||||
}
|
}
|
||||||
|
@ -104,12 +104,10 @@ static void
|
||||||
gst_fakesrc_class_init (GstFakeSrcClass *klass)
|
gst_fakesrc_class_init (GstFakeSrcClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SRC);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstFakeSrc::num_sources", GTK_TYPE_INT,
|
gtk_object_add_arg_type ("GstFakeSrc::num_sources", GTK_TYPE_INT,
|
||||||
GTK_ARG_READWRITE, ARG_NUM_SOURCES);
|
GTK_ARG_READWRITE, ARG_NUM_SOURCES);
|
||||||
|
|
|
@ -59,7 +59,7 @@ typedef struct _GstFakeSrc GstFakeSrc;
|
||||||
typedef struct _GstFakeSrcClass GstFakeSrcClass;
|
typedef struct _GstFakeSrcClass GstFakeSrcClass;
|
||||||
|
|
||||||
struct _GstFakeSrc {
|
struct _GstFakeSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
|
|
||||||
gboolean loop_based;
|
gboolean loop_based;
|
||||||
gint numsrcpads;
|
gint numsrcpads;
|
||||||
|
@ -70,7 +70,7 @@ struct _GstFakeSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFakeSrcClass {
|
struct _GstFakeSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*handoff) (GstElement *element,GstPad *pad);
|
void (*handoff) (GstElement *element,GstPad *pad);
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void gst_fdsink_get_arg (GtkObject *object, GtkArg *arg, guint id);
|
||||||
|
|
||||||
static void gst_fdsink_chain (GstPad *pad,GstBuffer *buf);
|
static void gst_fdsink_chain (GstPad *pad,GstBuffer *buf);
|
||||||
|
|
||||||
static GstSinkClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_fdsink_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_fdsink_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -70,7 +70,7 @@ gst_fdsink_get_type (void)
|
||||||
(GtkArgGetFunc)gst_fdsink_get_arg,
|
(GtkArgGetFunc)gst_fdsink_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
fdsink_type = gtk_type_unique (GST_TYPE_SINK, &fdsink_info);
|
fdsink_type = gtk_type_unique (GST_TYPE_ELEMENT, &fdsink_info);
|
||||||
}
|
}
|
||||||
return fdsink_type;
|
return fdsink_type;
|
||||||
}
|
}
|
||||||
|
@ -79,12 +79,10 @@ static void
|
||||||
gst_fdsink_class_init (GstFdSinkClass *klass)
|
gst_fdsink_class_init (GstFdSinkClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstSinkClass *gstsink_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstsink_class = (GstSinkClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SINK);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstFdSink::fd", GTK_TYPE_INT,
|
gtk_object_add_arg_type ("GstFdSink::fd", GTK_TYPE_INT,
|
||||||
GTK_ARG_READWRITE, ARG_FD);
|
GTK_ARG_READWRITE, ARG_FD);
|
||||||
|
|
|
@ -49,7 +49,7 @@ typedef struct _GstFdSink GstFdSink;
|
||||||
typedef struct _GstFdSinkClass GstFdSinkClass;
|
typedef struct _GstFdSinkClass GstFdSinkClass;
|
||||||
|
|
||||||
struct _GstFdSink {
|
struct _GstFdSink {
|
||||||
GstSink sink;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ struct _GstFdSink {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFdSinkClass {
|
struct _GstFdSinkClass {
|
||||||
GstSinkClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_fdsink_get_type(void);
|
GtkType gst_fdsink_get_type(void);
|
||||||
|
|
|
@ -60,7 +60,7 @@ static void gst_fdsrc_get_arg (GtkObject *object, GtkArg *arg, guint id);
|
||||||
static GstBuffer * gst_fdsrc_get (GstPad *pad);
|
static GstBuffer * gst_fdsrc_get (GstPad *pad);
|
||||||
|
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_fdsrc_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_fdsrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -79,7 +79,7 @@ gst_fdsrc_get_type (void)
|
||||||
(GtkArgGetFunc)gst_fdsrc_get_arg,
|
(GtkArgGetFunc)gst_fdsrc_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
fdsrc_type = gtk_type_unique (GST_TYPE_SRC, &fdsrc_info);
|
fdsrc_type = gtk_type_unique (GST_TYPE_ELEMENT, &fdsrc_info);
|
||||||
}
|
}
|
||||||
return fdsrc_type;
|
return fdsrc_type;
|
||||||
}
|
}
|
||||||
|
@ -88,12 +88,10 @@ static void
|
||||||
gst_fdsrc_class_init (GstFdSrcClass *klass)
|
gst_fdsrc_class_init (GstFdSrcClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class(GST_TYPE_SRC);
|
parent_class = gtk_type_class(GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstFdSrc::location", GST_TYPE_FILENAME,
|
gtk_object_add_arg_type ("GstFdSrc::location", GST_TYPE_FILENAME,
|
||||||
GTK_ARG_WRITABLE, ARG_LOCATION);
|
GTK_ARG_WRITABLE, ARG_LOCATION);
|
||||||
|
@ -197,7 +195,7 @@ gst_fdsrc_get(GstPad *pad)
|
||||||
/* read it in from the file */
|
/* read it in from the file */
|
||||||
readbytes = read(src->fd,GST_BUFFER_DATA(buf),src->bytes_per_read);
|
readbytes = read(src->fd,GST_BUFFER_DATA(buf),src->bytes_per_read);
|
||||||
if (readbytes == 0) {
|
if (readbytes == 0) {
|
||||||
gst_src_signal_eos(GST_SRC(src));
|
gst_element_signal_eos(GST_ELEMENT(src));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ typedef struct _GstFdSrc GstFdSrc;
|
||||||
typedef struct _GstFdSrcClass GstFdSrcClass;
|
typedef struct _GstFdSrcClass GstFdSrcClass;
|
||||||
|
|
||||||
struct _GstFdSrc {
|
struct _GstFdSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ struct _GstFdSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFdSrcClass {
|
struct _GstFdSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_fdsrc_get_type(void);
|
GtkType gst_fdsrc_get_type(void);
|
||||||
|
|
|
@ -61,7 +61,7 @@ static gboolean gst_httpsrc_open_url (GstHttpSrc *src);
|
||||||
static void gst_httpsrc_close_url (GstHttpSrc *src);
|
static void gst_httpsrc_close_url (GstHttpSrc *src);
|
||||||
|
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_httpsrc_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_httpsrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -80,7 +80,7 @@ gst_httpsrc_get_type (void)
|
||||||
(GtkArgGetFunc)gst_httpsrc_get_arg,
|
(GtkArgGetFunc)gst_httpsrc_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
httpsrc_type = gtk_type_unique (GST_TYPE_SRC, &httpsrc_info);
|
httpsrc_type = gtk_type_unique (GST_TYPE_ELEMENT, &httpsrc_info);
|
||||||
}
|
}
|
||||||
return httpsrc_type;
|
return httpsrc_type;
|
||||||
}
|
}
|
||||||
|
@ -90,13 +90,11 @@ gst_httpsrc_class_init (GstHttpSrcClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_SRC);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstHttpSrc::location", GTK_TYPE_STRING,
|
gtk_object_add_arg_type ("GstHttpSrc::location", GTK_TYPE_STRING,
|
||||||
|
@ -137,7 +135,7 @@ gst_httpsrc_get(GstPad *pad)
|
||||||
readbytes = read(src->fd,GST_BUFFER_DATA(buf),src->bytes_per_read);
|
readbytes = read(src->fd,GST_BUFFER_DATA(buf),src->bytes_per_read);
|
||||||
|
|
||||||
if (readbytes == 0) {
|
if (readbytes == 0) {
|
||||||
gst_src_signal_eos(GST_SRC(src));
|
gst_element_signal_eos(GST_ELEMENT(src));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,16 +48,16 @@ GstElementDetails gst_httpsrc_details;
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_HTTPSRC))
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_HTTPSRC))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_HTTPSRC_OPEN = GST_SRC_FLAG_LAST,
|
GST_HTTPSRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_HTTPSRC_FLAG_LAST = GST_SRC_FLAG_LAST+2,
|
GST_HTTPSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
|
||||||
} GstHttpSrcFlags;
|
} GstHttpSrcFlags;
|
||||||
|
|
||||||
typedef struct _GstHttpSrc GstHttpSrc;
|
typedef struct _GstHttpSrc GstHttpSrc;
|
||||||
typedef struct _GstHttpSrcClass GstHttpSrcClass;
|
typedef struct _GstHttpSrcClass GstHttpSrcClass;
|
||||||
|
|
||||||
struct _GstHttpSrc {
|
struct _GstHttpSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ struct _GstHttpSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstHttpSrcClass {
|
struct _GstHttpSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_httpsrc_get_type(void);
|
GtkType gst_httpsrc_get_type(void);
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void gst_identity_get_arg (GtkObject *object, GtkArg *arg, guint id);
|
||||||
|
|
||||||
static void gst_identity_chain (GstPad *pad, GstBuffer *buf);
|
static void gst_identity_chain (GstPad *pad, GstBuffer *buf);
|
||||||
|
|
||||||
static GstFilterClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_identity_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_identity_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -70,7 +70,7 @@ gst_identity_get_type (void)
|
||||||
(GtkArgGetFunc)gst_identity_get_arg,
|
(GtkArgGetFunc)gst_identity_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
identity_type = gtk_type_unique (GST_TYPE_FILTER, &identity_info);
|
identity_type = gtk_type_unique (GST_TYPE_ELEMENT, &identity_info);
|
||||||
}
|
}
|
||||||
return identity_type;
|
return identity_type;
|
||||||
}
|
}
|
||||||
|
@ -79,12 +79,10 @@ static void
|
||||||
gst_identity_class_init (GstIdentityClass *klass)
|
gst_identity_class_init (GstIdentityClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstFilterClass *gstfilter_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstfilter_class = (GstFilterClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_FILTER);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstIdentity::loop_based", GTK_TYPE_BOOL,
|
gtk_object_add_arg_type ("GstIdentity::loop_based", GTK_TYPE_BOOL,
|
||||||
GTK_ARG_READWRITE, ARG_LOOP_BASED);
|
GTK_ARG_READWRITE, ARG_LOOP_BASED);
|
||||||
|
|
|
@ -49,7 +49,7 @@ typedef struct _GstIdentity GstIdentity;
|
||||||
typedef struct _GstIdentityClass GstIdentityClass;
|
typedef struct _GstIdentityClass GstIdentityClass;
|
||||||
|
|
||||||
struct _GstIdentity {
|
struct _GstIdentity {
|
||||||
GstFilter filter;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
@ -58,7 +58,7 @@ struct _GstIdentity {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstIdentityClass {
|
struct _GstIdentityClass {
|
||||||
GstFilterClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_identity_get_type(void);
|
GtkType gst_identity_get_type(void);
|
||||||
|
|
|
@ -61,7 +61,7 @@ void gst_pipefilter_chain(GstPad *pad,GstBuffer *buf);
|
||||||
|
|
||||||
static GstElementStateReturn gst_pipefilter_change_state(GstElement *element);
|
static GstElementStateReturn gst_pipefilter_change_state(GstElement *element);
|
||||||
|
|
||||||
static GstFilterClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_pipefilter_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_pipefilter_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -79,21 +79,19 @@ gst_pipefilter_get_type(void) {
|
||||||
(GtkArgGetFunc)gst_pipefilter_get_arg,
|
(GtkArgGetFunc)gst_pipefilter_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
pipefilter_type = gtk_type_unique(GST_TYPE_FILTER,&pipefilter_info);
|
pipefilter_type = gtk_type_unique(GST_TYPE_ELEMENT,&pipefilter_info);
|
||||||
}
|
}
|
||||||
return pipefilter_type;
|
return pipefilter_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gst_pipefilter_class_init(GstPipefilterClass *klass) {
|
static void gst_pipefilter_class_init(GstPipefilterClass *klass) {
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstFilterClass *gstfilter_class;
|
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstfilter_class = (GstFilterClass*)klass;
|
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class(GST_TYPE_FILTER);
|
parent_class = gtk_type_class(GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gstelement_class->change_state = gst_pipefilter_change_state;
|
gstelement_class->change_state = gst_pipefilter_change_state;
|
||||||
|
|
||||||
|
|
|
@ -45,16 +45,16 @@ GstElementDetails gst_pipefilter_details;
|
||||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEFILTER))
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEFILTER))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_PIPEFILTER_OPEN = GST_FILTER_FLAG_LAST,
|
GST_PIPEFILTER_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||||
|
|
||||||
GST_PIPEFILTER_FLAG_LAST = GST_FILTER_FLAG_LAST,
|
GST_PIPEFILTER_FLAG_LAST = GST_ELEMENT_FLAG_LAST,
|
||||||
} GstPipeFilterFlags;
|
} GstPipeFilterFlags;
|
||||||
|
|
||||||
typedef struct _GstPipefilter GstPipefilter;
|
typedef struct _GstPipefilter GstPipefilter;
|
||||||
typedef struct _GstPipefilterClass GstPipefilterClass;
|
typedef struct _GstPipefilterClass GstPipefilterClass;
|
||||||
|
|
||||||
struct _GstPipefilter {
|
struct _GstPipefilter {
|
||||||
GstFilter filter;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
@ -74,7 +74,7 @@ struct _GstPipefilter {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPipefilterClass {
|
struct _GstPipefilterClass {
|
||||||
GstFilterClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_pipefilter_get_type(void);
|
GtkType gst_pipefilter_get_type(void);
|
||||||
|
|
|
@ -67,7 +67,7 @@ static void gst_queue_flush (GstQueue *queue);
|
||||||
static GstElementStateReturn gst_queue_change_state (GstElement *element);
|
static GstElementStateReturn gst_queue_change_state (GstElement *element);
|
||||||
|
|
||||||
|
|
||||||
static GstConnectionClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_queue_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_queue_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -85,7 +85,7 @@ gst_queue_get_type(void) {
|
||||||
(GtkArgGetFunc)gst_queue_get_arg,
|
(GtkArgGetFunc)gst_queue_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
queue_type = gtk_type_unique (GST_TYPE_CONNECTION, &queue_info);
|
queue_type = gtk_type_unique (GST_TYPE_ELEMENT, &queue_info);
|
||||||
}
|
}
|
||||||
return queue_type;
|
return queue_type;
|
||||||
}
|
}
|
||||||
|
@ -95,13 +95,11 @@ gst_queue_class_init (GstQueueClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
GstConnectionClass *gstconnection_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
gstconnection_class = (GstConnectionClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GST_TYPE_CONNECTION);
|
parent_class = gtk_type_class (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GstQueue::level", GTK_TYPE_INT,
|
gtk_object_add_arg_type ("GstQueue::level", GTK_TYPE_INT,
|
||||||
GTK_ARG_READABLE, ARG_LEVEL);
|
GTK_ARG_READABLE, ARG_LEVEL);
|
||||||
|
|
|
@ -49,7 +49,7 @@ typedef struct _GstQueue GstQueue;
|
||||||
typedef struct _GstQueueClass GstQueueClass;
|
typedef struct _GstQueueClass GstQueueClass;
|
||||||
|
|
||||||
struct _GstQueue {
|
struct _GstQueue {
|
||||||
GstConnection Connection;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
@ -71,7 +71,7 @@ struct _GstQueue {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstQueueClass {
|
struct _GstQueueClass {
|
||||||
GstConnectionClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_queue_get_type (void);
|
GtkType gst_queue_get_type (void);
|
||||||
|
|
|
@ -64,7 +64,7 @@ void gst_sinesrc_sync_parms(GstSineSrc *sinesrc);
|
||||||
|
|
||||||
static GstBuffer * gst_sinesrc_get(GstPad *pad);
|
static GstBuffer * gst_sinesrc_get(GstPad *pad);
|
||||||
|
|
||||||
static GstSrcClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
//static guint gst_sinesrc_signals[LAST_SIGNAL] = { 0 };
|
//static guint gst_sinesrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -82,7 +82,7 @@ gst_sinesrc_get_type(void) {
|
||||||
(GtkArgGetFunc)gst_sinesrc_get_arg,
|
(GtkArgGetFunc)gst_sinesrc_get_arg,
|
||||||
(GtkClassInitFunc)NULL,
|
(GtkClassInitFunc)NULL,
|
||||||
};
|
};
|
||||||
sinesrc_type = gtk_type_unique(GST_TYPE_SRC,&sinesrc_info);
|
sinesrc_type = gtk_type_unique(GST_TYPE_ELEMENT,&sinesrc_info);
|
||||||
}
|
}
|
||||||
return sinesrc_type;
|
return sinesrc_type;
|
||||||
}
|
}
|
||||||
|
@ -91,13 +91,11 @@ static void
|
||||||
gst_sinesrc_class_init(GstSineSrcClass *klass) {
|
gst_sinesrc_class_init(GstSineSrcClass *klass) {
|
||||||
GtkObjectClass *gtkobject_class;
|
GtkObjectClass *gtkobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
GstSrcClass *gstsrc_class;
|
|
||||||
|
|
||||||
gtkobject_class = (GtkObjectClass*)klass;
|
gtkobject_class = (GtkObjectClass*)klass;
|
||||||
gstelement_class = (GstElementClass*)klass;
|
gstelement_class = (GstElementClass*)klass;
|
||||||
gstsrc_class = (GstSrcClass*)klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class(GST_TYPE_SRC);
|
parent_class = gtk_type_class(GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gtk_object_add_arg_type("GstSineSrc::volume", GTK_TYPE_DOUBLE,
|
gtk_object_add_arg_type("GstSineSrc::volume", GTK_TYPE_DOUBLE,
|
||||||
GTK_ARG_READWRITE, ARG_VOLUME);
|
GTK_ARG_READWRITE, ARG_VOLUME);
|
||||||
|
|
|
@ -50,7 +50,7 @@ typedef struct _GstSineSrc GstSineSrc;
|
||||||
typedef struct _GstSineSrcClass GstSineSrcClass;
|
typedef struct _GstSineSrcClass GstSineSrcClass;
|
||||||
|
|
||||||
struct _GstSineSrc {
|
struct _GstSineSrc {
|
||||||
GstSrc src;
|
GstElement element;
|
||||||
|
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
@ -71,7 +71,7 @@ struct _GstSineSrc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstSineSrcClass {
|
struct _GstSineSrcClass {
|
||||||
GstSrcClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkType gst_sinesrc_get_type(void);
|
GtkType gst_sinesrc_get_type(void);
|
||||||
|
|
Loading…
Reference in a new issue