diff --git a/gst/Makefile.am b/gst/Makefile.am index 7da2d802c3..fa3d6cbe2e 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -33,10 +33,6 @@ libgst_la_SOURCES = \ gstbin.c \ gstpipeline.c \ gstthread.c \ - gstsrc.c \ - gstfilter.c \ - gstsink.c \ - gstconnection.c \ gsttype.c \ gstcaps.c \ gstprops.c \ @@ -65,10 +61,6 @@ libgstinclude_HEADERS = \ gstbin.h \ gstpipeline.h \ gstthread.h \ - gstsrc.h \ - gstfilter.h \ - gstsink.h \ - gstconnection.h \ gsttype.h \ gstcaps.h \ gstprops.h \ diff --git a/gst/elements/gstasyncdisksrc.c b/gst/elements/gstasyncdisksrc.c index 11d6aed538..04504c2eed 100644 --- a/gst/elements/gstasyncdisksrc.c +++ b/gst/elements/gstasyncdisksrc.c @@ -63,7 +63,7 @@ static GstBuffer * gst_asyncdisksrc_get_region (GstPad *pad, gulong offset, gul 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 }; GtkType @@ -82,7 +82,7 @@ gst_asyncdisksrc_get_type(void) (GtkArgGetFunc)gst_asyncdisksrc_get_arg, (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; } @@ -92,13 +92,11 @@ gst_asyncdisksrc_class_init (GstAsyncDiskSrcClass *klass) { GtkObjectClass *gtkobject_class; GstElementClass *gstelement_class; - GstSrcClass *gstsrc_class; gtkobject_class = (GtkObjectClass*)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_ARG_READWRITE, ARG_LOCATION); @@ -118,7 +116,7 @@ gst_asyncdisksrc_class_init (GstAsyncDiskSrcClass *klass) static void gst_asyncdisksrc_init (GstAsyncDiskSrc *asyncdisksrc) { - GST_FLAG_SET (asyncdisksrc, GST_SRC_ASYNC); +// GST_FLAG_SET (asyncdisksrc, GST_SRC_ASYNC); g_print("init\n"); asyncdisksrc->srcpad = gst_pad_new ("src", GST_PAD_SRC); @@ -221,7 +219,7 @@ gst_asyncdisksrc_get (GstPad *pad) /* deal with EOF state */ if (src->curoffset >= src->size) { - gst_src_signal_eos (GST_SRC (src)); + gst_element_signal_eos (GST_ELEMENT (src)); return NULL; } @@ -276,7 +274,7 @@ gst_asyncdisksrc_get_region (GstPad *pad, gulong offset, gulong size) /* deal with EOF state */ if (offset >= src->size) { - gst_src_signal_eos (GST_SRC (src)); + gst_element_signal_eos (GST_ELEMENT (src)); return NULL; } diff --git a/gst/elements/gstasyncdisksrc.h b/gst/elements/gstasyncdisksrc.h index cc46ec4739..c1f5d0a5a3 100644 --- a/gst/elements/gstasyncdisksrc.h +++ b/gst/elements/gstasyncdisksrc.h @@ -44,16 +44,16 @@ GstElementDetails gst_asyncdisksrc_details; (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ASYNCDISKSRC)) 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; typedef struct _GstAsyncDiskSrc GstAsyncDiskSrc; typedef struct _GstAsyncDiskSrcClass GstAsyncDiskSrcClass; struct _GstAsyncDiskSrc { - GstSrc src; + GstElement element; /* pads */ GstPad *srcpad; @@ -75,7 +75,7 @@ struct _GstAsyncDiskSrc { }; struct _GstAsyncDiskSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; }; GtkType gst_asyncdisksrc_get_type(void); diff --git a/gst/elements/gstaudiosink.c b/gst/elements/gstaudiosink.c index 73c25cd5f0..a633f6ac67 100644 --- a/gst/elements/gstaudiosink.c +++ b/gst/elements/gstaudiosink.c @@ -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 GstPadTemplate *gst_audiosink_sink_template; @@ -136,7 +136,7 @@ gst_audiosink_get_type (void) (GtkArgGetFunc)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; @@ -151,7 +151,7 @@ gst_audiosink_class_init (GstAudioSinkClass *klass) gtkobject_class = (GtkObjectClass*)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_ARG_READWRITE, ARG_MUTE); diff --git a/gst/elements/gstaudiosink.h b/gst/elements/gstaudiosink.h index 76e3a4c123..a7f1e964ae 100644 --- a/gst/elements/gstaudiosink.h +++ b/gst/elements/gstaudiosink.h @@ -46,16 +46,16 @@ GstElementDetails gst_audiosink_details; (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSINK)) 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; typedef struct _GstAudioSink GstAudioSink; typedef struct _GstAudioSinkClass GstAudioSinkClass; struct _GstAudioSink { - GstSink sink; + GstElement element; GstPad *sinkpad; @@ -71,7 +71,7 @@ struct _GstAudioSink { }; struct _GstAudioSinkClass { - GstSinkClass parent_class; + GstElementClass parent_class; /* signals */ void (*handoff) (GstElement *element,GstPad *pad); diff --git a/gst/elements/gstaudiosrc.c b/gst/elements/gstaudiosrc.c index 1cae833421..02d6f8b955 100644 --- a/gst/elements/gstaudiosrc.c +++ b/gst/elements/gstaudiosrc.c @@ -66,7 +66,7 @@ static void gst_audiosrc_sync_parms (GstAudioSrc *audiosrc); 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 }; GtkType @@ -85,7 +85,7 @@ gst_audiosrc_get_type (void) (GtkArgGetFunc)gst_audiosrc_get_arg, (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; } @@ -95,13 +95,11 @@ gst_audiosrc_class_init (GstAudioSrcClass *klass) { GtkObjectClass *gtkobject_class; GstElementClass *gstelement_class; - GstSrcClass *gstsrc_class; gtkobject_class = (GtkObjectClass*)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_ARG_READWRITE, ARG_BYTESPERREAD); @@ -161,7 +159,7 @@ gst_audiosrc_get (GstPad *pad) src->bytes_per_read); if (readbytes == 0) { - gst_src_signal_eos (GST_SRC (src)); + gst_element_signal_eos (GST_ELEMENT (src)); return NULL; } diff --git a/gst/elements/gstaudiosrc.h b/gst/elements/gstaudiosrc.h index a2b3c69f82..cc3804f919 100644 --- a/gst/elements/gstaudiosrc.h +++ b/gst/elements/gstaudiosrc.h @@ -47,16 +47,16 @@ GstElementDetails gst_audiosrc_details; (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSRC)) 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; typedef struct _GstAudioSrc GstAudioSrc; typedef struct _GstAudioSrcClass GstAudioSrcClass; struct _GstAudioSrc { - GstSrc src; + GstElement element; /* pads */ GstPad *srcpad; @@ -79,7 +79,7 @@ struct _GstAudioSrc { }; struct _GstAudioSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; }; GtkType gst_audiosrc_get_type(void); diff --git a/gst/elements/gstdisksrc.c b/gst/elements/gstdisksrc.c index c893ce084a..7b2f6d855f 100644 --- a/gst/elements/gstdisksrc.c +++ b/gst/elements/gstdisksrc.c @@ -63,7 +63,7 @@ static GstBuffer * gst_disksrc_get (GstPad *pad); 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 }; GtkType @@ -81,7 +81,7 @@ gst_disksrc_get_type(void) { (GtkArgGetFunc)gst_disksrc_get_arg, (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; } @@ -91,13 +91,11 @@ gst_disksrc_class_init (GstDiskSrcClass *klass) { GtkObjectClass *gtkobject_class; GstElementClass *gstelement_class; - GstSrcClass *gstsrc_class; gtkobject_class = (GtkObjectClass*)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_ARG_READWRITE, ARG_LOCATION); @@ -227,7 +225,7 @@ gst_disksrc_get (GstPad *pad) gst_buffer_unref (buf); return NULL; } else if (readbytes == 0) { - gst_src_signal_eos (GST_SRC (src)); + gst_element_signal_eos (GST_ELEMENT (src)); gst_buffer_unref (buf); return NULL; } diff --git a/gst/elements/gstdisksrc.h b/gst/elements/gstdisksrc.h index 71e8e96813..8f9d0ede0a 100644 --- a/gst/elements/gstdisksrc.h +++ b/gst/elements/gstdisksrc.h @@ -46,16 +46,16 @@ extern GstElementDetails gst_disksrc_details; (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_DISKSRC)) 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; typedef struct _GstDiskSrc GstDiskSrc; typedef struct _GstDiskSrcClass GstDiskSrcClass; struct _GstDiskSrc { - GstSrc src; + GstElement element; /* pads */ GstPad *srcpad; @@ -72,7 +72,7 @@ struct _GstDiskSrc { }; struct _GstDiskSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; }; GtkType gst_disksrc_get_type(void); diff --git a/gst/elements/gstelements.c b/gst/elements/gstelements.c index 5e5bb6229b..b016d07908 100644 --- a/gst/elements/gstelements.c +++ b/gst/elements/gstelements.c @@ -29,14 +29,15 @@ #include #include #include -#if HAVE_LIBGHTTP -#include -#endif /* HAVE_LIBGHTTP */ #include #include #include #include +#if HAVE_LIBGHTTP +#include +#endif /* HAVE_LIBGHTTP */ + struct _elements_entry { gchar *name; @@ -55,13 +56,14 @@ static struct _elements_entry _elements[] = { { "identity", gst_identity_get_type, &gst_identity_details, NULL }, { "fdsink", gst_fdsink_get_type, &gst_fdsink_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 }, { "queue", gst_queue_get_type, &gst_queue_details, NULL }, { "sinesrc", gst_sinesrc_get_type, &gst_sinesrc_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 }, }; diff --git a/gst/elements/gstfakesink.c b/gst/elements/gstfakesink.c index a87f4b2cff..ef60da8ce2 100644 --- a/gst/elements/gstfakesink.c +++ b/gst/elements/gstfakesink.c @@ -49,7 +49,7 @@ static void gst_fakesink_init(GstFakeSink *fakesink); 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 }; GtkType @@ -68,7 +68,7 @@ gst_fakesink_get_type (void) (GtkArgGetFunc)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; } @@ -77,10 +77,8 @@ static void gst_fakesink_class_init (GstFakeSinkClass *klass) { GtkObjectClass *gtkobject_class; - GstSinkClass *gstsink_class; gtkobject_class = (GtkObjectClass*)klass; - gstsink_class = (GstSinkClass*)klass; gst_fakesink_signals[SIGNAL_HANDOFF] = 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, LAST_SIGNAL); - parent_class = gtk_type_class (GST_TYPE_SINK); + parent_class = gtk_type_class (GST_TYPE_ELEMENT); } static void diff --git a/gst/elements/gstfakesink.h b/gst/elements/gstfakesink.h index f8bca9ca8f..87ad6eb7d0 100644 --- a/gst/elements/gstfakesink.h +++ b/gst/elements/gstfakesink.h @@ -49,13 +49,13 @@ typedef struct _GstFakeSink GstFakeSink; typedef struct _GstFakeSinkClass GstFakeSinkClass; struct _GstFakeSink { - GstSink sink; + GstElement element; GstPad *sinkpad; }; struct _GstFakeSinkClass { - GstSinkClass parent_class; + GstElementClass parent_class; /* signals */ void (*handoff) (GstElement *element,GstPad *pad); diff --git a/gst/elements/gstfakesrc.c b/gst/elements/gstfakesrc.c index 0fc0afbf9c..174c4f831c 100644 --- a/gst/elements/gstfakesrc.c +++ b/gst/elements/gstfakesrc.c @@ -76,7 +76,7 @@ static void gst_fakesrc_get_arg (GtkObject *object, GtkArg *arg, guint id); static GstBuffer* gst_fakesrc_get (GstPad *pad); 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 }; GtkType @@ -95,7 +95,7 @@ gst_fakesrc_get_type (void) (GtkArgGetFunc)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; } @@ -104,12 +104,10 @@ static void gst_fakesrc_class_init (GstFakeSrcClass *klass) { GtkObjectClass *gtkobject_class; - GstSrcClass *gstsrc_class; 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_ARG_READWRITE, ARG_NUM_SOURCES); diff --git a/gst/elements/gstfakesrc.h b/gst/elements/gstfakesrc.h index a4958f7d62..7f30f98f2d 100644 --- a/gst/elements/gstfakesrc.h +++ b/gst/elements/gstfakesrc.h @@ -59,7 +59,7 @@ typedef struct _GstFakeSrc GstFakeSrc; typedef struct _GstFakeSrcClass GstFakeSrcClass; struct _GstFakeSrc { - GstSrc src; + GstElement element; gboolean loop_based; gint numsrcpads; @@ -70,7 +70,7 @@ struct _GstFakeSrc { }; struct _GstFakeSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; /* signals */ void (*handoff) (GstElement *element,GstPad *pad); diff --git a/gst/elements/gstfdsink.c b/gst/elements/gstfdsink.c index 389b344e83..cf4a45322f 100644 --- a/gst/elements/gstfdsink.c +++ b/gst/elements/gstfdsink.c @@ -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 GstSinkClass *parent_class = NULL; +static GstElementClass *parent_class = NULL; //static guint gst_fdsink_signals[LAST_SIGNAL] = { 0 }; GtkType @@ -70,7 +70,7 @@ gst_fdsink_get_type (void) (GtkArgGetFunc)gst_fdsink_get_arg, (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; } @@ -79,12 +79,10 @@ static void gst_fdsink_class_init (GstFdSinkClass *klass) { GtkObjectClass *gtkobject_class; - GstSinkClass *gstsink_class; 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_ARG_READWRITE, ARG_FD); diff --git a/gst/elements/gstfdsink.h b/gst/elements/gstfdsink.h index f92b7825a8..047af826ec 100644 --- a/gst/elements/gstfdsink.h +++ b/gst/elements/gstfdsink.h @@ -49,7 +49,7 @@ typedef struct _GstFdSink GstFdSink; typedef struct _GstFdSinkClass GstFdSinkClass; struct _GstFdSink { - GstSink sink; + GstElement element; GstPad *sinkpad; @@ -57,7 +57,7 @@ struct _GstFdSink { }; struct _GstFdSinkClass { - GstSinkClass parent_class; + GstElementClass parent_class; }; GtkType gst_fdsink_get_type(void); diff --git a/gst/elements/gstfdsrc.c b/gst/elements/gstfdsrc.c index e3df978262..134a63c1ec 100644 --- a/gst/elements/gstfdsrc.c +++ b/gst/elements/gstfdsrc.c @@ -60,7 +60,7 @@ static void gst_fdsrc_get_arg (GtkObject *object, GtkArg *arg, guint id); 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 }; GtkType @@ -79,7 +79,7 @@ gst_fdsrc_get_type (void) (GtkArgGetFunc)gst_fdsrc_get_arg, (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; } @@ -88,12 +88,10 @@ static void gst_fdsrc_class_init (GstFdSrcClass *klass) { GtkObjectClass *gtkobject_class; - GstSrcClass *gstsrc_class; 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_ARG_WRITABLE, ARG_LOCATION); @@ -197,7 +195,7 @@ gst_fdsrc_get(GstPad *pad) /* read it in from the file */ readbytes = read(src->fd,GST_BUFFER_DATA(buf),src->bytes_per_read); if (readbytes == 0) { - gst_src_signal_eos(GST_SRC(src)); + gst_element_signal_eos(GST_ELEMENT(src)); return NULL; } diff --git a/gst/elements/gstfdsrc.h b/gst/elements/gstfdsrc.h index 6f925216b0..97b499730c 100644 --- a/gst/elements/gstfdsrc.h +++ b/gst/elements/gstfdsrc.h @@ -50,7 +50,7 @@ typedef struct _GstFdSrc GstFdSrc; typedef struct _GstFdSrcClass GstFdSrcClass; struct _GstFdSrc { - GstSrc src; + GstElement element; /* pads */ GstPad *srcpad; @@ -64,7 +64,7 @@ struct _GstFdSrc { }; struct _GstFdSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; }; GtkType gst_fdsrc_get_type(void); diff --git a/gst/elements/gsthttpsrc.c b/gst/elements/gsthttpsrc.c index 0559e39f55..7ebfca315e 100644 --- a/gst/elements/gsthttpsrc.c +++ b/gst/elements/gsthttpsrc.c @@ -61,7 +61,7 @@ static gboolean gst_httpsrc_open_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 }; GtkType @@ -80,7 +80,7 @@ gst_httpsrc_get_type (void) (GtkArgGetFunc)gst_httpsrc_get_arg, (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; } @@ -90,13 +90,11 @@ gst_httpsrc_class_init (GstHttpSrcClass *klass) { GtkObjectClass *gtkobject_class; GstElementClass *gstelement_class; - GstSrcClass *gstsrc_class; gtkobject_class = (GtkObjectClass*)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, @@ -137,7 +135,7 @@ gst_httpsrc_get(GstPad *pad) readbytes = read(src->fd,GST_BUFFER_DATA(buf),src->bytes_per_read); if (readbytes == 0) { - gst_src_signal_eos(GST_SRC(src)); + gst_element_signal_eos(GST_ELEMENT(src)); return NULL; } diff --git a/gst/elements/gsthttpsrc.h b/gst/elements/gsthttpsrc.h index bdaa08a52d..cde6191a1e 100644 --- a/gst/elements/gsthttpsrc.h +++ b/gst/elements/gsthttpsrc.h @@ -48,16 +48,16 @@ GstElementDetails gst_httpsrc_details; (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_HTTPSRC)) 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; typedef struct _GstHttpSrc GstHttpSrc; typedef struct _GstHttpSrcClass GstHttpSrcClass; struct _GstHttpSrc { - GstSrc src; + GstElement element; /* pads */ GstPad *srcpad; @@ -70,7 +70,7 @@ struct _GstHttpSrc { }; struct _GstHttpSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; }; GtkType gst_httpsrc_get_type(void); diff --git a/gst/elements/gstidentity.c b/gst/elements/gstidentity.c index 17e4f38a3b..1f8e9851f1 100644 --- a/gst/elements/gstidentity.c +++ b/gst/elements/gstidentity.c @@ -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 GstFilterClass *parent_class = NULL; +static GstElementClass *parent_class = NULL; //static guint gst_identity_signals[LAST_SIGNAL] = { 0 }; GtkType @@ -70,7 +70,7 @@ gst_identity_get_type (void) (GtkArgGetFunc)gst_identity_get_arg, (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; } @@ -79,12 +79,10 @@ static void gst_identity_class_init (GstIdentityClass *klass) { GtkObjectClass *gtkobject_class; - GstFilterClass *gstfilter_class; 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_ARG_READWRITE, ARG_LOOP_BASED); diff --git a/gst/elements/gstidentity.h b/gst/elements/gstidentity.h index a60c3c023c..f4b6d84dc1 100644 --- a/gst/elements/gstidentity.h +++ b/gst/elements/gstidentity.h @@ -49,7 +49,7 @@ typedef struct _GstIdentity GstIdentity; typedef struct _GstIdentityClass GstIdentityClass; struct _GstIdentity { - GstFilter filter; + GstElement element; GstPad *sinkpad; GstPad *srcpad; @@ -58,7 +58,7 @@ struct _GstIdentity { }; struct _GstIdentityClass { - GstFilterClass parent_class; + GstElementClass parent_class; }; GtkType gst_identity_get_type(void); diff --git a/gst/elements/gstpipefilter.c b/gst/elements/gstpipefilter.c index 9405385165..36752aad1b 100644 --- a/gst/elements/gstpipefilter.c +++ b/gst/elements/gstpipefilter.c @@ -61,7 +61,7 @@ void gst_pipefilter_chain(GstPad *pad,GstBuffer *buf); 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 }; GtkType @@ -79,21 +79,19 @@ gst_pipefilter_get_type(void) { (GtkArgGetFunc)gst_pipefilter_get_arg, (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; } static void gst_pipefilter_class_init(GstPipefilterClass *klass) { GtkObjectClass *gtkobject_class; - GstFilterClass *gstfilter_class; GstElementClass *gstelement_class; gtkobject_class = (GtkObjectClass*)klass; - gstfilter_class = (GstFilterClass*)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; diff --git a/gst/elements/gstpipefilter.h b/gst/elements/gstpipefilter.h index 34997495ed..32160b921f 100644 --- a/gst/elements/gstpipefilter.h +++ b/gst/elements/gstpipefilter.h @@ -45,16 +45,16 @@ GstElementDetails gst_pipefilter_details; (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEFILTER)) 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; typedef struct _GstPipefilter GstPipefilter; typedef struct _GstPipefilterClass GstPipefilterClass; struct _GstPipefilter { - GstFilter filter; + GstElement element; GstPad *sinkpad; GstPad *srcpad; @@ -74,7 +74,7 @@ struct _GstPipefilter { }; struct _GstPipefilterClass { - GstFilterClass parent_class; + GstElementClass parent_class; }; GtkType gst_pipefilter_get_type(void); diff --git a/gst/elements/gstqueue.c b/gst/elements/gstqueue.c index 19fd6a0861..e08654e30c 100644 --- a/gst/elements/gstqueue.c +++ b/gst/elements/gstqueue.c @@ -67,7 +67,7 @@ static void gst_queue_flush (GstQueue *queue); 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 }; GtkType @@ -85,7 +85,7 @@ gst_queue_get_type(void) { (GtkArgGetFunc)gst_queue_get_arg, (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; } @@ -95,13 +95,11 @@ gst_queue_class_init (GstQueueClass *klass) { GtkObjectClass *gtkobject_class; GstElementClass *gstelement_class; - GstConnectionClass *gstconnection_class; gtkobject_class = (GtkObjectClass*)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_ARG_READABLE, ARG_LEVEL); diff --git a/gst/elements/gstqueue.h b/gst/elements/gstqueue.h index 0274d890a7..01188bed5d 100644 --- a/gst/elements/gstqueue.h +++ b/gst/elements/gstqueue.h @@ -49,7 +49,7 @@ typedef struct _GstQueue GstQueue; typedef struct _GstQueueClass GstQueueClass; struct _GstQueue { - GstConnection Connection; + GstElement element; GstPad *sinkpad; GstPad *srcpad; @@ -71,7 +71,7 @@ struct _GstQueue { }; struct _GstQueueClass { - GstConnectionClass parent_class; + GstElementClass parent_class; }; GtkType gst_queue_get_type (void); diff --git a/gst/elements/gstsinesrc.c b/gst/elements/gstsinesrc.c index 5527847dd9..9e76c40c1b 100644 --- a/gst/elements/gstsinesrc.c +++ b/gst/elements/gstsinesrc.c @@ -64,7 +64,7 @@ void gst_sinesrc_sync_parms(GstSineSrc *sinesrc); 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 }; GtkType @@ -82,7 +82,7 @@ gst_sinesrc_get_type(void) { (GtkArgGetFunc)gst_sinesrc_get_arg, (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; } @@ -91,13 +91,11 @@ static void gst_sinesrc_class_init(GstSineSrcClass *klass) { GtkObjectClass *gtkobject_class; GstElementClass *gstelement_class; - GstSrcClass *gstsrc_class; gtkobject_class = (GtkObjectClass*)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_ARG_READWRITE, ARG_VOLUME); diff --git a/gst/elements/gstsinesrc.h b/gst/elements/gstsinesrc.h index 626e574806..7b705776aa 100644 --- a/gst/elements/gstsinesrc.h +++ b/gst/elements/gstsinesrc.h @@ -50,7 +50,7 @@ typedef struct _GstSineSrc GstSineSrc; typedef struct _GstSineSrcClass GstSineSrcClass; struct _GstSineSrc { - GstSrc src; + GstElement element; /* pads */ GstPad *srcpad; @@ -71,7 +71,7 @@ struct _GstSineSrc { }; struct _GstSineSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; }; GtkType gst_sinesrc_get_type(void); diff --git a/gst/gst.h b/gst/gst.h index 4d06e26c50..5c37899725 100644 --- a/gst/gst.h +++ b/gst/gst.h @@ -36,10 +36,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include diff --git a/gst/gstbin.c b/gst/gstbin.c index 68b5a4b9d1..6e766a066f 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -24,8 +24,6 @@ #include "gst_private.h" #include "gstbin.h" -#include "gstsrc.h" -#include "gstconnection.h" #include "gstscheduler.h" @@ -729,7 +727,9 @@ gst_bin_iterate_func (GstBin *bin) 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; while (pads) { pad = GST_PAD (pads->data); @@ -743,13 +743,6 @@ gst_bin_iterate_func (GstBin *bin) } 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 (); } } } diff --git a/gst/gstclock.c b/gst/gstclock.c index b103655b9f..f223e134d8 100644 --- a/gst/gstclock.c +++ b/gst/gstclock.c @@ -25,8 +25,8 @@ //#define GST_DEBUG_ENABLED #include "gst_private.h" +#include "gstelement.h" #include "gstclock.h" -#include "gstsink.h" static GstClock *the_system_clock = NULL; @@ -70,7 +70,7 @@ gst_clock_get_system(void) void 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); clock->sinkobjects = g_list_append (clock->sinkobjects, obj); clock->num++; diff --git a/gst/gstconnection.c b/gst/gstconnection.c deleted file mode 100644 index 50a8bd5ba3..0000000000 --- a/gst/gstconnection.c +++ /dev/null @@ -1,98 +0,0 @@ -/* GStreamer - * Copyright (C) 1999,2000 Erik Walthinsen - * 2000 Wim Taymans - * - * 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; -} diff --git a/gst/gstconnection.h b/gst/gstconnection.h deleted file mode 100644 index 751fcab708..0000000000 --- a/gst/gstconnection.h +++ /dev/null @@ -1,66 +0,0 @@ -/* GStreamer - * Copyright (C) 1999,2000 Erik Walthinsen - * 2000 Wim Taymans - * - * 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 - - -#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__ */ diff --git a/gst/gstelement.c b/gst/gstelement.c index 442f9896a5..a9156e2078 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -33,6 +33,7 @@ enum { NEW_PAD, NEW_GHOST_PAD, ERROR, + EOS, LAST_SIGNAL }; @@ -100,6 +101,10 @@ gst_element_class_init (GstElementClass *klass) GTK_SIGNAL_OFFSET (GstElementClass, error), gtk_marshal_NONE__STRING, GTK_TYPE_NONE,1, 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); @@ -825,3 +830,19 @@ gst_element_set_loop_function(GstElement *element, /* set the NEW_LOOPFUNC flag so everyone knows to go try again */ 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]); +} diff --git a/gst/gstelement.h b/gst/gstelement.h index b8b6801ada..442e86a1d1 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -148,6 +148,7 @@ struct _GstElementClass { void (*new_pad) (GstElement *element,GstPad *pad); void (*new_ghost_pad) (GstElement *element,GstPad *pad); void (*error) (GstElement *element,gchar *error); + void (*eos) (GstElement *element); /* change the element state */ 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, GstElement *dest, gchar *destpadname); +void gst_element_signal_eos (GstElement *element); + + /* called by the app to set the state of the element */ gint gst_element_set_state (GstElement *element, GstElementState state); diff --git a/gst/gstfilter.c b/gst/gstfilter.c deleted file mode 100644 index 2fe81b1b97..0000000000 --- a/gst/gstfilter.c +++ /dev/null @@ -1,97 +0,0 @@ -/* GStreamer - * Copyright (C) 1999,2000 Erik Walthinsen - * 2000 Wim Taymans - * - * 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; -} diff --git a/gst/gstfilter.h b/gst/gstfilter.h deleted file mode 100644 index 67ffd30a7a..0000000000 --- a/gst/gstfilter.h +++ /dev/null @@ -1,67 +0,0 @@ -/* GStreamer - * Copyright (C) 1999,2000 Erik Walthinsen - * 2000 Wim Taymans - * - * 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 - - -#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__ */ diff --git a/gst/gstpipeline.c b/gst/gstpipeline.c index af34e1eddb..b6a44161c6 100644 --- a/gst/gstpipeline.c +++ b/gst/gstpipeline.c @@ -25,7 +25,6 @@ #include "gstpipeline.h" #include "gstthread.h" -#include "gstsink.h" #include "gstutils.h" #include "gsttype.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_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 GstBinClass *parent_class = NULL; @@ -131,7 +130,7 @@ gst_pipeline_prepare (GstPipeline *pipeline) } 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); diff --git a/gst/gstsink.c b/gst/gstsink.c deleted file mode 100644 index 046ca1aee8..0000000000 --- a/gst/gstsink.c +++ /dev/null @@ -1,98 +0,0 @@ -/* GStreamer - * Copyright (C) 1999,2000 Erik Walthinsen - * 2000 Wim Taymans - * - * 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; -} diff --git a/gst/gstsink.h b/gst/gstsink.h deleted file mode 100644 index a049a34f78..0000000000 --- a/gst/gstsink.h +++ /dev/null @@ -1,68 +0,0 @@ -/* GStreamer - * Copyright (C) 1999,2000 Erik Walthinsen - * 2000 Wim Taymans - * - * 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 - - -#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__ */ diff --git a/gst/gstsrc.c b/gst/gstsrc.c deleted file mode 100644 index 6353488409..0000000000 --- a/gst/gstsrc.c +++ /dev/null @@ -1,103 +0,0 @@ -/* GStreamer - * Copyright (C) 1999,2000 Erik Walthinsen - * 2000 Wim Taymans - * - * 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]); -} diff --git a/gst/gstsrc.h b/gst/gstsrc.h deleted file mode 100644 index 75cdd5baeb..0000000000 --- a/gst/gstsrc.h +++ /dev/null @@ -1,77 +0,0 @@ -/* GStreamer - * Copyright (C) 1999,2000 Erik Walthinsen - * 2000 Wim Taymans - * - * 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 - - -#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__ */ diff --git a/gst/gsttee.c b/gst/gsttee.c index c59b878093..13edfb1b51 100644 --- a/gst/gsttee.c +++ b/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 GstFilterClass *parent_class = NULL; +static GstElementClass *parent_class = NULL; //static guint gst_tee_signals[LAST_SIGNAL] = { 0 }; GtkType @@ -69,18 +69,18 @@ gst_tee_get_type(void) { (GtkArgGetFunc)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; } static void 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) { diff --git a/gst/gsttee.h b/gst/gsttee.h index 79c558cdad..762b8672a3 100644 --- a/gst/gsttee.h +++ b/gst/gsttee.h @@ -24,7 +24,7 @@ #ifndef __GST_TEE_H__ #define __GST_TEE_H__ -#include +#include "gstelement.h" #ifdef __cplusplus @@ -47,7 +47,7 @@ typedef struct _GstTee GstTee; typedef struct _GstTeeClass GstTeeClass; struct _GstTee { - GstFilter filter; + GstElement element; GstPad *sinkpad; @@ -56,7 +56,7 @@ struct _GstTee { }; struct _GstTeeClass { - GstFilterClass parent_class; + GstElementClass parent_class; }; GtkType gst_tee_get_type (void); diff --git a/plugins/elements/gstasyncdisksrc.c b/plugins/elements/gstasyncdisksrc.c index 11d6aed538..04504c2eed 100644 --- a/plugins/elements/gstasyncdisksrc.c +++ b/plugins/elements/gstasyncdisksrc.c @@ -63,7 +63,7 @@ static GstBuffer * gst_asyncdisksrc_get_region (GstPad *pad, gulong offset, gul 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 }; GtkType @@ -82,7 +82,7 @@ gst_asyncdisksrc_get_type(void) (GtkArgGetFunc)gst_asyncdisksrc_get_arg, (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; } @@ -92,13 +92,11 @@ gst_asyncdisksrc_class_init (GstAsyncDiskSrcClass *klass) { GtkObjectClass *gtkobject_class; GstElementClass *gstelement_class; - GstSrcClass *gstsrc_class; gtkobject_class = (GtkObjectClass*)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_ARG_READWRITE, ARG_LOCATION); @@ -118,7 +116,7 @@ gst_asyncdisksrc_class_init (GstAsyncDiskSrcClass *klass) static void gst_asyncdisksrc_init (GstAsyncDiskSrc *asyncdisksrc) { - GST_FLAG_SET (asyncdisksrc, GST_SRC_ASYNC); +// GST_FLAG_SET (asyncdisksrc, GST_SRC_ASYNC); g_print("init\n"); asyncdisksrc->srcpad = gst_pad_new ("src", GST_PAD_SRC); @@ -221,7 +219,7 @@ gst_asyncdisksrc_get (GstPad *pad) /* deal with EOF state */ if (src->curoffset >= src->size) { - gst_src_signal_eos (GST_SRC (src)); + gst_element_signal_eos (GST_ELEMENT (src)); return NULL; } @@ -276,7 +274,7 @@ gst_asyncdisksrc_get_region (GstPad *pad, gulong offset, gulong size) /* deal with EOF state */ if (offset >= src->size) { - gst_src_signal_eos (GST_SRC (src)); + gst_element_signal_eos (GST_ELEMENT (src)); return NULL; } diff --git a/plugins/elements/gstasyncdisksrc.h b/plugins/elements/gstasyncdisksrc.h index cc46ec4739..c1f5d0a5a3 100644 --- a/plugins/elements/gstasyncdisksrc.h +++ b/plugins/elements/gstasyncdisksrc.h @@ -44,16 +44,16 @@ GstElementDetails gst_asyncdisksrc_details; (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ASYNCDISKSRC)) 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; typedef struct _GstAsyncDiskSrc GstAsyncDiskSrc; typedef struct _GstAsyncDiskSrcClass GstAsyncDiskSrcClass; struct _GstAsyncDiskSrc { - GstSrc src; + GstElement element; /* pads */ GstPad *srcpad; @@ -75,7 +75,7 @@ struct _GstAsyncDiskSrc { }; struct _GstAsyncDiskSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; }; GtkType gst_asyncdisksrc_get_type(void); diff --git a/plugins/elements/gstaudiosink.c b/plugins/elements/gstaudiosink.c index 73c25cd5f0..a633f6ac67 100644 --- a/plugins/elements/gstaudiosink.c +++ b/plugins/elements/gstaudiosink.c @@ -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 GstPadTemplate *gst_audiosink_sink_template; @@ -136,7 +136,7 @@ gst_audiosink_get_type (void) (GtkArgGetFunc)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; @@ -151,7 +151,7 @@ gst_audiosink_class_init (GstAudioSinkClass *klass) gtkobject_class = (GtkObjectClass*)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_ARG_READWRITE, ARG_MUTE); diff --git a/plugins/elements/gstaudiosink.h b/plugins/elements/gstaudiosink.h index 76e3a4c123..a7f1e964ae 100644 --- a/plugins/elements/gstaudiosink.h +++ b/plugins/elements/gstaudiosink.h @@ -46,16 +46,16 @@ GstElementDetails gst_audiosink_details; (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSINK)) 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; typedef struct _GstAudioSink GstAudioSink; typedef struct _GstAudioSinkClass GstAudioSinkClass; struct _GstAudioSink { - GstSink sink; + GstElement element; GstPad *sinkpad; @@ -71,7 +71,7 @@ struct _GstAudioSink { }; struct _GstAudioSinkClass { - GstSinkClass parent_class; + GstElementClass parent_class; /* signals */ void (*handoff) (GstElement *element,GstPad *pad); diff --git a/plugins/elements/gstaudiosrc.c b/plugins/elements/gstaudiosrc.c index 1cae833421..02d6f8b955 100644 --- a/plugins/elements/gstaudiosrc.c +++ b/plugins/elements/gstaudiosrc.c @@ -66,7 +66,7 @@ static void gst_audiosrc_sync_parms (GstAudioSrc *audiosrc); 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 }; GtkType @@ -85,7 +85,7 @@ gst_audiosrc_get_type (void) (GtkArgGetFunc)gst_audiosrc_get_arg, (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; } @@ -95,13 +95,11 @@ gst_audiosrc_class_init (GstAudioSrcClass *klass) { GtkObjectClass *gtkobject_class; GstElementClass *gstelement_class; - GstSrcClass *gstsrc_class; gtkobject_class = (GtkObjectClass*)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_ARG_READWRITE, ARG_BYTESPERREAD); @@ -161,7 +159,7 @@ gst_audiosrc_get (GstPad *pad) src->bytes_per_read); if (readbytes == 0) { - gst_src_signal_eos (GST_SRC (src)); + gst_element_signal_eos (GST_ELEMENT (src)); return NULL; } diff --git a/plugins/elements/gstaudiosrc.h b/plugins/elements/gstaudiosrc.h index a2b3c69f82..cc3804f919 100644 --- a/plugins/elements/gstaudiosrc.h +++ b/plugins/elements/gstaudiosrc.h @@ -47,16 +47,16 @@ GstElementDetails gst_audiosrc_details; (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSRC)) 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; typedef struct _GstAudioSrc GstAudioSrc; typedef struct _GstAudioSrcClass GstAudioSrcClass; struct _GstAudioSrc { - GstSrc src; + GstElement element; /* pads */ GstPad *srcpad; @@ -79,7 +79,7 @@ struct _GstAudioSrc { }; struct _GstAudioSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; }; GtkType gst_audiosrc_get_type(void); diff --git a/plugins/elements/gstdisksrc.c b/plugins/elements/gstdisksrc.c index c893ce084a..7b2f6d855f 100644 --- a/plugins/elements/gstdisksrc.c +++ b/plugins/elements/gstdisksrc.c @@ -63,7 +63,7 @@ static GstBuffer * gst_disksrc_get (GstPad *pad); 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 }; GtkType @@ -81,7 +81,7 @@ gst_disksrc_get_type(void) { (GtkArgGetFunc)gst_disksrc_get_arg, (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; } @@ -91,13 +91,11 @@ gst_disksrc_class_init (GstDiskSrcClass *klass) { GtkObjectClass *gtkobject_class; GstElementClass *gstelement_class; - GstSrcClass *gstsrc_class; gtkobject_class = (GtkObjectClass*)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_ARG_READWRITE, ARG_LOCATION); @@ -227,7 +225,7 @@ gst_disksrc_get (GstPad *pad) gst_buffer_unref (buf); return NULL; } else if (readbytes == 0) { - gst_src_signal_eos (GST_SRC (src)); + gst_element_signal_eos (GST_ELEMENT (src)); gst_buffer_unref (buf); return NULL; } diff --git a/plugins/elements/gstdisksrc.h b/plugins/elements/gstdisksrc.h index 71e8e96813..8f9d0ede0a 100644 --- a/plugins/elements/gstdisksrc.h +++ b/plugins/elements/gstdisksrc.h @@ -46,16 +46,16 @@ extern GstElementDetails gst_disksrc_details; (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_DISKSRC)) 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; typedef struct _GstDiskSrc GstDiskSrc; typedef struct _GstDiskSrcClass GstDiskSrcClass; struct _GstDiskSrc { - GstSrc src; + GstElement element; /* pads */ GstPad *srcpad; @@ -72,7 +72,7 @@ struct _GstDiskSrc { }; struct _GstDiskSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; }; GtkType gst_disksrc_get_type(void); diff --git a/plugins/elements/gstelements.c b/plugins/elements/gstelements.c index 5e5bb6229b..b016d07908 100644 --- a/plugins/elements/gstelements.c +++ b/plugins/elements/gstelements.c @@ -29,14 +29,15 @@ #include #include #include -#if HAVE_LIBGHTTP -#include -#endif /* HAVE_LIBGHTTP */ #include #include #include #include +#if HAVE_LIBGHTTP +#include +#endif /* HAVE_LIBGHTTP */ + struct _elements_entry { gchar *name; @@ -55,13 +56,14 @@ static struct _elements_entry _elements[] = { { "identity", gst_identity_get_type, &gst_identity_details, NULL }, { "fdsink", gst_fdsink_get_type, &gst_fdsink_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 }, { "queue", gst_queue_get_type, &gst_queue_details, NULL }, { "sinesrc", gst_sinesrc_get_type, &gst_sinesrc_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 }, }; diff --git a/plugins/elements/gstfakesink.c b/plugins/elements/gstfakesink.c index a87f4b2cff..ef60da8ce2 100644 --- a/plugins/elements/gstfakesink.c +++ b/plugins/elements/gstfakesink.c @@ -49,7 +49,7 @@ static void gst_fakesink_init(GstFakeSink *fakesink); 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 }; GtkType @@ -68,7 +68,7 @@ gst_fakesink_get_type (void) (GtkArgGetFunc)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; } @@ -77,10 +77,8 @@ static void gst_fakesink_class_init (GstFakeSinkClass *klass) { GtkObjectClass *gtkobject_class; - GstSinkClass *gstsink_class; gtkobject_class = (GtkObjectClass*)klass; - gstsink_class = (GstSinkClass*)klass; gst_fakesink_signals[SIGNAL_HANDOFF] = 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, LAST_SIGNAL); - parent_class = gtk_type_class (GST_TYPE_SINK); + parent_class = gtk_type_class (GST_TYPE_ELEMENT); } static void diff --git a/plugins/elements/gstfakesink.h b/plugins/elements/gstfakesink.h index f8bca9ca8f..87ad6eb7d0 100644 --- a/plugins/elements/gstfakesink.h +++ b/plugins/elements/gstfakesink.h @@ -49,13 +49,13 @@ typedef struct _GstFakeSink GstFakeSink; typedef struct _GstFakeSinkClass GstFakeSinkClass; struct _GstFakeSink { - GstSink sink; + GstElement element; GstPad *sinkpad; }; struct _GstFakeSinkClass { - GstSinkClass parent_class; + GstElementClass parent_class; /* signals */ void (*handoff) (GstElement *element,GstPad *pad); diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index 0fc0afbf9c..174c4f831c 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -76,7 +76,7 @@ static void gst_fakesrc_get_arg (GtkObject *object, GtkArg *arg, guint id); static GstBuffer* gst_fakesrc_get (GstPad *pad); 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 }; GtkType @@ -95,7 +95,7 @@ gst_fakesrc_get_type (void) (GtkArgGetFunc)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; } @@ -104,12 +104,10 @@ static void gst_fakesrc_class_init (GstFakeSrcClass *klass) { GtkObjectClass *gtkobject_class; - GstSrcClass *gstsrc_class; 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_ARG_READWRITE, ARG_NUM_SOURCES); diff --git a/plugins/elements/gstfakesrc.h b/plugins/elements/gstfakesrc.h index a4958f7d62..7f30f98f2d 100644 --- a/plugins/elements/gstfakesrc.h +++ b/plugins/elements/gstfakesrc.h @@ -59,7 +59,7 @@ typedef struct _GstFakeSrc GstFakeSrc; typedef struct _GstFakeSrcClass GstFakeSrcClass; struct _GstFakeSrc { - GstSrc src; + GstElement element; gboolean loop_based; gint numsrcpads; @@ -70,7 +70,7 @@ struct _GstFakeSrc { }; struct _GstFakeSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; /* signals */ void (*handoff) (GstElement *element,GstPad *pad); diff --git a/plugins/elements/gstfdsink.c b/plugins/elements/gstfdsink.c index 389b344e83..cf4a45322f 100644 --- a/plugins/elements/gstfdsink.c +++ b/plugins/elements/gstfdsink.c @@ -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 GstSinkClass *parent_class = NULL; +static GstElementClass *parent_class = NULL; //static guint gst_fdsink_signals[LAST_SIGNAL] = { 0 }; GtkType @@ -70,7 +70,7 @@ gst_fdsink_get_type (void) (GtkArgGetFunc)gst_fdsink_get_arg, (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; } @@ -79,12 +79,10 @@ static void gst_fdsink_class_init (GstFdSinkClass *klass) { GtkObjectClass *gtkobject_class; - GstSinkClass *gstsink_class; 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_ARG_READWRITE, ARG_FD); diff --git a/plugins/elements/gstfdsink.h b/plugins/elements/gstfdsink.h index f92b7825a8..047af826ec 100644 --- a/plugins/elements/gstfdsink.h +++ b/plugins/elements/gstfdsink.h @@ -49,7 +49,7 @@ typedef struct _GstFdSink GstFdSink; typedef struct _GstFdSinkClass GstFdSinkClass; struct _GstFdSink { - GstSink sink; + GstElement element; GstPad *sinkpad; @@ -57,7 +57,7 @@ struct _GstFdSink { }; struct _GstFdSinkClass { - GstSinkClass parent_class; + GstElementClass parent_class; }; GtkType gst_fdsink_get_type(void); diff --git a/plugins/elements/gstfdsrc.c b/plugins/elements/gstfdsrc.c index e3df978262..134a63c1ec 100644 --- a/plugins/elements/gstfdsrc.c +++ b/plugins/elements/gstfdsrc.c @@ -60,7 +60,7 @@ static void gst_fdsrc_get_arg (GtkObject *object, GtkArg *arg, guint id); 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 }; GtkType @@ -79,7 +79,7 @@ gst_fdsrc_get_type (void) (GtkArgGetFunc)gst_fdsrc_get_arg, (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; } @@ -88,12 +88,10 @@ static void gst_fdsrc_class_init (GstFdSrcClass *klass) { GtkObjectClass *gtkobject_class; - GstSrcClass *gstsrc_class; 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_ARG_WRITABLE, ARG_LOCATION); @@ -197,7 +195,7 @@ gst_fdsrc_get(GstPad *pad) /* read it in from the file */ readbytes = read(src->fd,GST_BUFFER_DATA(buf),src->bytes_per_read); if (readbytes == 0) { - gst_src_signal_eos(GST_SRC(src)); + gst_element_signal_eos(GST_ELEMENT(src)); return NULL; } diff --git a/plugins/elements/gstfdsrc.h b/plugins/elements/gstfdsrc.h index 6f925216b0..97b499730c 100644 --- a/plugins/elements/gstfdsrc.h +++ b/plugins/elements/gstfdsrc.h @@ -50,7 +50,7 @@ typedef struct _GstFdSrc GstFdSrc; typedef struct _GstFdSrcClass GstFdSrcClass; struct _GstFdSrc { - GstSrc src; + GstElement element; /* pads */ GstPad *srcpad; @@ -64,7 +64,7 @@ struct _GstFdSrc { }; struct _GstFdSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; }; GtkType gst_fdsrc_get_type(void); diff --git a/plugins/elements/gsthttpsrc.c b/plugins/elements/gsthttpsrc.c index 0559e39f55..7ebfca315e 100644 --- a/plugins/elements/gsthttpsrc.c +++ b/plugins/elements/gsthttpsrc.c @@ -61,7 +61,7 @@ static gboolean gst_httpsrc_open_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 }; GtkType @@ -80,7 +80,7 @@ gst_httpsrc_get_type (void) (GtkArgGetFunc)gst_httpsrc_get_arg, (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; } @@ -90,13 +90,11 @@ gst_httpsrc_class_init (GstHttpSrcClass *klass) { GtkObjectClass *gtkobject_class; GstElementClass *gstelement_class; - GstSrcClass *gstsrc_class; gtkobject_class = (GtkObjectClass*)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, @@ -137,7 +135,7 @@ gst_httpsrc_get(GstPad *pad) readbytes = read(src->fd,GST_BUFFER_DATA(buf),src->bytes_per_read); if (readbytes == 0) { - gst_src_signal_eos(GST_SRC(src)); + gst_element_signal_eos(GST_ELEMENT(src)); return NULL; } diff --git a/plugins/elements/gsthttpsrc.h b/plugins/elements/gsthttpsrc.h index bdaa08a52d..cde6191a1e 100644 --- a/plugins/elements/gsthttpsrc.h +++ b/plugins/elements/gsthttpsrc.h @@ -48,16 +48,16 @@ GstElementDetails gst_httpsrc_details; (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_HTTPSRC)) 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; typedef struct _GstHttpSrc GstHttpSrc; typedef struct _GstHttpSrcClass GstHttpSrcClass; struct _GstHttpSrc { - GstSrc src; + GstElement element; /* pads */ GstPad *srcpad; @@ -70,7 +70,7 @@ struct _GstHttpSrc { }; struct _GstHttpSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; }; GtkType gst_httpsrc_get_type(void); diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index 17e4f38a3b..1f8e9851f1 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -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 GstFilterClass *parent_class = NULL; +static GstElementClass *parent_class = NULL; //static guint gst_identity_signals[LAST_SIGNAL] = { 0 }; GtkType @@ -70,7 +70,7 @@ gst_identity_get_type (void) (GtkArgGetFunc)gst_identity_get_arg, (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; } @@ -79,12 +79,10 @@ static void gst_identity_class_init (GstIdentityClass *klass) { GtkObjectClass *gtkobject_class; - GstFilterClass *gstfilter_class; 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_ARG_READWRITE, ARG_LOOP_BASED); diff --git a/plugins/elements/gstidentity.h b/plugins/elements/gstidentity.h index a60c3c023c..f4b6d84dc1 100644 --- a/plugins/elements/gstidentity.h +++ b/plugins/elements/gstidentity.h @@ -49,7 +49,7 @@ typedef struct _GstIdentity GstIdentity; typedef struct _GstIdentityClass GstIdentityClass; struct _GstIdentity { - GstFilter filter; + GstElement element; GstPad *sinkpad; GstPad *srcpad; @@ -58,7 +58,7 @@ struct _GstIdentity { }; struct _GstIdentityClass { - GstFilterClass parent_class; + GstElementClass parent_class; }; GtkType gst_identity_get_type(void); diff --git a/plugins/elements/gstpipefilter.c b/plugins/elements/gstpipefilter.c index 9405385165..36752aad1b 100644 --- a/plugins/elements/gstpipefilter.c +++ b/plugins/elements/gstpipefilter.c @@ -61,7 +61,7 @@ void gst_pipefilter_chain(GstPad *pad,GstBuffer *buf); 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 }; GtkType @@ -79,21 +79,19 @@ gst_pipefilter_get_type(void) { (GtkArgGetFunc)gst_pipefilter_get_arg, (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; } static void gst_pipefilter_class_init(GstPipefilterClass *klass) { GtkObjectClass *gtkobject_class; - GstFilterClass *gstfilter_class; GstElementClass *gstelement_class; gtkobject_class = (GtkObjectClass*)klass; - gstfilter_class = (GstFilterClass*)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; diff --git a/plugins/elements/gstpipefilter.h b/plugins/elements/gstpipefilter.h index 34997495ed..32160b921f 100644 --- a/plugins/elements/gstpipefilter.h +++ b/plugins/elements/gstpipefilter.h @@ -45,16 +45,16 @@ GstElementDetails gst_pipefilter_details; (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEFILTER)) 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; typedef struct _GstPipefilter GstPipefilter; typedef struct _GstPipefilterClass GstPipefilterClass; struct _GstPipefilter { - GstFilter filter; + GstElement element; GstPad *sinkpad; GstPad *srcpad; @@ -74,7 +74,7 @@ struct _GstPipefilter { }; struct _GstPipefilterClass { - GstFilterClass parent_class; + GstElementClass parent_class; }; GtkType gst_pipefilter_get_type(void); diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index 19fd6a0861..e08654e30c 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -67,7 +67,7 @@ static void gst_queue_flush (GstQueue *queue); 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 }; GtkType @@ -85,7 +85,7 @@ gst_queue_get_type(void) { (GtkArgGetFunc)gst_queue_get_arg, (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; } @@ -95,13 +95,11 @@ gst_queue_class_init (GstQueueClass *klass) { GtkObjectClass *gtkobject_class; GstElementClass *gstelement_class; - GstConnectionClass *gstconnection_class; gtkobject_class = (GtkObjectClass*)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_ARG_READABLE, ARG_LEVEL); diff --git a/plugins/elements/gstqueue.h b/plugins/elements/gstqueue.h index 0274d890a7..01188bed5d 100644 --- a/plugins/elements/gstqueue.h +++ b/plugins/elements/gstqueue.h @@ -49,7 +49,7 @@ typedef struct _GstQueue GstQueue; typedef struct _GstQueueClass GstQueueClass; struct _GstQueue { - GstConnection Connection; + GstElement element; GstPad *sinkpad; GstPad *srcpad; @@ -71,7 +71,7 @@ struct _GstQueue { }; struct _GstQueueClass { - GstConnectionClass parent_class; + GstElementClass parent_class; }; GtkType gst_queue_get_type (void); diff --git a/plugins/elements/gstsinesrc.c b/plugins/elements/gstsinesrc.c index 5527847dd9..9e76c40c1b 100644 --- a/plugins/elements/gstsinesrc.c +++ b/plugins/elements/gstsinesrc.c @@ -64,7 +64,7 @@ void gst_sinesrc_sync_parms(GstSineSrc *sinesrc); 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 }; GtkType @@ -82,7 +82,7 @@ gst_sinesrc_get_type(void) { (GtkArgGetFunc)gst_sinesrc_get_arg, (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; } @@ -91,13 +91,11 @@ static void gst_sinesrc_class_init(GstSineSrcClass *klass) { GtkObjectClass *gtkobject_class; GstElementClass *gstelement_class; - GstSrcClass *gstsrc_class; gtkobject_class = (GtkObjectClass*)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_ARG_READWRITE, ARG_VOLUME); diff --git a/plugins/elements/gstsinesrc.h b/plugins/elements/gstsinesrc.h index 626e574806..7b705776aa 100644 --- a/plugins/elements/gstsinesrc.h +++ b/plugins/elements/gstsinesrc.h @@ -50,7 +50,7 @@ typedef struct _GstSineSrc GstSineSrc; typedef struct _GstSineSrcClass GstSineSrcClass; struct _GstSineSrc { - GstSrc src; + GstElement element; /* pads */ GstPad *srcpad; @@ -71,7 +71,7 @@ struct _GstSineSrc { }; struct _GstSineSrcClass { - GstSrcClass parent_class; + GstElementClass parent_class; }; GtkType gst_sinesrc_get_type(void);