[gst-cvs] CVS: gstreamer/gst/elements gstaggregator.c,1.6,1.7 gstelements.c,1.32,1.33 gstfilesrc.c,1.6,1.7 gsthttpsrc.c,1.14,1.15
Wim Taymans
wtay at users.sourceforge.net
Sun Oct 21 14:59:02 PDT 2001
Update of /cvsroot/gstreamer/gstreamer/gst/elements
In directory usw-pr-cvs1:/tmp/cvs-serv21377
Modified Files:
gstaggregator.c gstelements.c gstfilesrc.c gsthttpsrc.c
Log Message:
Some compiler warning removed.
Updated the event handler in filesrc.
Index: gstaggregator.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/elements/gstaggregator.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- gstaggregator.c 2001/10/17 10:21:24 1.6
+++ gstaggregator.c 2001/10/21 21:58:29 1.7
@@ -148,6 +148,7 @@
aggregator->numsinkpads = 0;
aggregator->sinkpads = NULL;
aggregator->silent = FALSE;
+ aggregator->sched = AGGREGATOR_LOOP;
}
static GstPad*
Index: gstelements.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/elements/gstelements.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- gstelements.c 2001/10/06 12:46:50 1.32
+++ gstelements.c 2001/10/21 21:58:29 1.33
@@ -49,8 +49,7 @@
extern GType gst_filesrc_get_type(void);
-
-extern GstElementDetails *gst_filesrc_details;
+extern GstElementDetails gst_filesrc_details;
static struct _elements_entry _elements[] = {
{ "fakesrc", gst_fakesrc_get_type, &gst_fakesrc_details, gst_fakesrc_factory_init },
Index: gstfilesrc.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/elements/gstfilesrc.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- gstfilesrc.c 2001/10/17 20:57:53 1.6
+++ gstfilesrc.c 2001/10/21 21:58:29 1.7
@@ -145,14 +145,16 @@
};
-static void gst_filesrc_class_init (GstFileSrcClass *klass);
-static void gst_filesrc_init (GstFileSrc *filesrc);
+static void gst_filesrc_class_init (GstFileSrcClass *klass);
+static void gst_filesrc_init (GstFileSrc *filesrc);
-static void gst_filesrc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void gst_filesrc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
+static void gst_filesrc_set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec);
+static void gst_filesrc_get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec);
-static GstBuffer * gst_filesrc_get (GstPad *pad);
-static gboolean gst_filesrc_srcpad_event (GstPad *pad, GstEventType event, gint64 location, guint32 data);
+static GstBuffer * gst_filesrc_get (GstPad *pad);
+static gboolean gst_filesrc_srcpad_event (GstPad *pad, GstEvent *event);
static GstElementStateReturn gst_filesrc_change_state (GstElement *element);
@@ -477,13 +479,13 @@
// check for seek
if (src->seek_happened) {
src->seek_happened = FALSE;
- return gst_event_new(GST_EVENT_DISCONTINUOUS);
+ return GST_BUFFER (gst_event_new(GST_EVENT_DISCONTINUOUS));
}
// check for EOF
if (src->curoffset == src->filelen) {
- gst_element_set_state(src,GST_STATE_PAUSED);
- return gst_event_new(GST_EVENT_EOS);
+ gst_element_set_state (GST_ELEMENT (src), GST_STATE_PAUSED);
+ return GST_BUFFER (gst_event_new(GST_EVENT_EOS));
}
// calculate end pointers so we don't have to do so repeatedly later
@@ -535,7 +537,7 @@
region.offset = src->curoffset;
region.size = readsize;
map = g_tree_search (src->map_regions,
- (GCompareFunc) gst_filesrc_search_region_match,
+ (GSearchFunc) gst_filesrc_search_region_match,
®ion);
// if we found an exact match, subbuffer it
@@ -647,22 +649,19 @@
}
static gboolean
-gst_filesrc_srcpad_event(GstPad *pad, GstEventType event, gint64 location, guint32 data)
+gst_filesrc_srcpad_event (GstPad *pad, GstEvent *event)
{
GstFileSrc *src = GST_FILESRC(GST_PAD_PARENT(pad));
- if (event == GST_EVENT_SEEK) {
- if (data == SEEK_SET) {
- src->curoffset = (guint64)location;
- } else if (data == SEEK_CUR) {
- src->curoffset += (gint64)location;
- } else if (data == SEEK_END) {
- src->curoffset = src->filelen - (guint64)location;
- }
- src->seek_happened = TRUE;
- // push a discontinuous event?
- return TRUE;
+ switch (GST_EVENT_TYPE (event)) {
+ case GST_EVENT_SEEK:
+ src->curoffset = (guint64) GST_EVENT_SEEK_OFFSET (event);
+ src->seek_happened = TRUE;
+ gst_event_free (event);
+ // push a discontinuous event?
+ default:
+ break;
}
- return FALSE;
+ return TRUE;
}
Index: gsthttpsrc.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/elements/gsthttpsrc.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- gsthttpsrc.c 2001/09/10 20:11:22 1.14
+++ gsthttpsrc.c 2001/10/21 21:58:29 1.15
@@ -146,7 +146,7 @@
return NULL;
}
- g_print ("%d\n", readbytes);
+ g_print ("%ld\n", readbytes);
if (readbytes < src->bytes_per_read) {
// FIXME: set the buffer's EOF bit here
}
More information about the Gstreamer-commits
mailing list