From: Thomas V. S. <tho...@us...> - 2002-02-19 16:08:26
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Tue Feb 19 2002 08:08:25 PST Log message: documentation addition Modified files: gst : gstelementfactory.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelementfactory.c.diff?r1=1.56&r2=1.57 ====Begin Diffs==== Index: gstelementfactory.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstelementfactory.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- gstelementfactory.c 18 Feb 2002 00:40:56 -0000 1.56 +++ gstelementfactory.c 19 Feb 2002 16:08:23 -0000 1.57 @@ -270,7 +270,7 @@ * It wll be given the name supplied, since all elements require a name as * their first argument. * - * Returns: new #GstElement + * Returns: new #GstElement (or NULL if unable to create element) */ GstElement* gst_elementfactory_make (const gchar *factoryname, const gchar *name) |
From: Thomas V. S. <tho...@us...> - 2002-02-20 16:42:20
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Wed Feb 20 2002 08:42:19 PST Log message: before, entering and leaving where invisible now it's a really bleak grey anyone want to suggest a usable color ? Modified files: gst : gstinfo.h Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstinfo.h.diff?r1=1.24&r2=1.25 ====Begin Diffs==== Index: gstinfo.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstinfo.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- gstinfo.h 11 Feb 2002 01:38:55 -0000 1.24 +++ gstinfo.h 20 Feb 2002 16:42:16 -0000 1.25 @@ -165,8 +165,8 @@ "''", GST_OBJECT_NAME (pad) #ifdef GST_DEBUG_COLOR - #define GST_DEBUG_ENTER(format, args...) GST_DEBUG( 31 , format ": \033[01;37mentering\033[00m\n" , ##args ) - #define GST_DEBUG_LEAVE(format, args...) GST_DEBUG( 31 , format ": \033[01;37mleaving\033[00m\n" , ##args ) + #define GST_DEBUG_ENTER(format, args...) GST_DEBUG( 31 , format ": \033[00;37mentering\033[00m\n" , ##args ) + #define GST_DEBUG_LEAVE(format, args...) GST_DEBUG( 31 , format ": \033[00;37mleaving\033[00m\n" , ##args ) #else #define GST_DEBUG_ENTER(format, args...) GST_DEBUG( 31 , format ": entering\n" , ##args ) #define GST_DEBUG_LEAVE(format, args...) GST_DEBUG( 31 , format ": leaving\n" , ##args ) |
From: Thomas V. S. <tho...@us...> - 2002-02-20 16:44:50
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Wed Feb 20 2002 08:44:48 PST Log message: * a warning fix * a potential commenting error fix * more debug output when trying to set caps so I can actually tell from it what's going on Modified files: gst : gstinfo.c gstpad.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstinfo.c.diff?r1=1.35&r2=1.36 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstpad.c.diff?r1=1.147&r2=1.148 ====Begin Diffs==== Index: gstinfo.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstinfo.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- gstinfo.c 15 Feb 2002 21:11:46 -0000 1.35 +++ gstinfo.c 20 Feb 2002 16:44:46 -0000 1.36 @@ -333,8 +333,8 @@ #else fprintf(stderr,"INFO:%s%s %s\n", location,elementname,string); - #endif /* GST_DEBUG_COLOR */ -/* + #endif // GST_DEBUG_COLOR + #endif */ @@ -480,7 +480,7 @@ /***** DEBUG system *****/ GHashTable *__gst_function_pointers = NULL; /* FIXME make this thread specific */ -static GSList *stack_trace = NULL; +/* static GSList *stack_trace = NULL; */ gchar *_gst_debug_nameof_funcptr (void *ptr) __attribute__ ((no_instrument_function)); Index: gstpad.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstpad.c,v retrieving revision 1.147 retrieving revision 1.148 diff -u -d -r1.147 -r1.148 --- gstpad.c 19 Feb 2002 22:10:37 -0000 1.147 +++ gstpad.c 20 Feb 2002 16:44:46 -0000 1.148 @@ -1011,7 +1011,7 @@ return GST_PAD_CONNECT_REFUSED; } } - /* we can only set caps on the pad if they are ficed */ + /* we can only set caps on the pad if they are fixed */ if (GST_CAPS_IS_FIXED (caps)) { GST_INFO (GST_CAT_CAPS, "setting caps on pad %s:%s", @@ -1052,7 +1052,9 @@ /* setting non fixed caps on a pad is not allowed */ if (!GST_CAPS_IS_FIXED (caps)) { - g_warning ("trying to set non fixed caps on pad %s:%s", + GST_INFO (GST_CAT_CAPS, "trying to set unfixed caps on pad %s:%s, not allowed", + GST_DEBUG_PAD_NAME (realpad)); + g_warning ("trying to set non fixed caps on pad %s:%s, not allowed", GST_DEBUG_PAD_NAME (realpad)); gst_caps_debug (caps); return FALSE; @@ -1060,11 +1062,22 @@ /* if we have a peer try to set the caps, notifying the peerpad * if it has a connect function */ if (peer && !gst_pad_try_set_caps_func (peer, caps, TRUE)) + { + GST_INFO (GST_CAT_CAPS, "tried to set caps on peerpad %s:%s but couldn't", + GST_DEBUG_PAD_NAME (peer)); return FALSE; + } /* then try to set our own caps, we don't need to be notified */ if (!gst_pad_try_set_caps_func (realpad, caps, FALSE)) + { + GST_INFO (GST_CAT_CAPS, "tried to set own caps on pad %s:%s but couldn't", + GST_DEBUG_PAD_NAME (realpad)); return FALSE; - + } + GST_INFO (GST_CAT_CAPS, "succeeded setting caps %p on pad %s:%s", + caps, GST_DEBUG_PAD_NAME (realpad)); + gst_caps_debug (caps); + return TRUE; } |
From: Thomas V. S. <tho...@us...> - 2002-02-21 10:38:23
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Thu Feb 21 2002 02:38:20 PST Log message: * more debug output * used CONNECT_OK because otherwise functions don't get a proper result Modified files: gst : gstpad.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstpad.c.diff?r1=1.148&r2=1.149 ====Begin Diffs==== Index: gstpad.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstpad.c,v retrieving revision 1.148 retrieving revision 1.149 diff -u -d -r1.148 -r1.149 --- gstpad.c 20 Feb 2002 16:44:46 -0000 1.148 +++ gstpad.c 21 Feb 2002 10:38:18 -0000 1.149 @@ -958,10 +958,18 @@ GstCaps *oldcaps; GstElement *parent = GST_PAD_PARENT (pad); + /* thomas: FIXME: is this the right result to return ? */ + g_return_val_if_fail (pad != NULL, GST_PAD_CONNECT_REFUSED); + g_return_val_if_fail (GST_IS_PAD (pad), GST_PAD_CONNECT_REFUSED); + /* if this pad has a parent and the parent is not READY, delay the * negotiation */ if (parent && GST_STATE (parent) < GST_STATE_READY) + { + GST_DEBUG (GST_CAT_CAPS, "parent %s of pad %s:%s is not ready\n", + GST_ELEMENT_NAME (parent), GST_DEBUG_PAD_NAME (pad)); return GST_PAD_CONNECT_DELAYED; + } GST_INFO (GST_CAT_CAPS, "trying to set caps %p on pad %s:%s", caps, GST_DEBUG_PAD_NAME (pad)); @@ -1061,14 +1069,14 @@ } /* if we have a peer try to set the caps, notifying the peerpad * if it has a connect function */ - if (peer && !gst_pad_try_set_caps_func (peer, caps, TRUE)) + if (peer && (gst_pad_try_set_caps_func (peer, caps, TRUE) != GST_PAD_CONNECT_OK)) { GST_INFO (GST_CAT_CAPS, "tried to set caps on peerpad %s:%s but couldn't", GST_DEBUG_PAD_NAME (peer)); return FALSE; } /* then try to set our own caps, we don't need to be notified */ - if (!gst_pad_try_set_caps_func (realpad, caps, FALSE)) + if (gst_pad_try_set_caps_func (realpad, caps, FALSE) != GST_PAD_CONNECT_OK) { GST_INFO (GST_CAT_CAPS, "tried to set own caps on pad %s:%s but couldn't", GST_DEBUG_PAD_NAME (realpad)); @@ -1077,6 +1085,7 @@ GST_INFO (GST_CAT_CAPS, "succeeded setting caps %p on pad %s:%s", caps, GST_DEBUG_PAD_NAME (realpad)); gst_caps_debug (caps); + g_assert (GST_PAD_CAPS (pad)); return TRUE; } |
From: Thomas V. S. <tho...@us...> - 2002-03-17 13:32:32
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Sun Mar 17 2002 05:32:28 PST Log message: no newline at eof Modified files: gst : gstdata.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstdata.c.diff?r1=1.1.2.3&r2=1.1.2.4 ====Begin Diffs==== Index: gstdata.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/Attic/gstdata.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -d -r1.1.2.3 -r1.1.2.4 --- gstdata.c 17 Mar 2002 00:50:41 -0000 1.1.2.3 +++ gstdata.c 17 Mar 2002 13:32:16 -0000 1.1.2.4 @@ -100,4 +100,3 @@ gst_data_destroy (data); } } - \ No newline at end of file |
From: Thomas V. S. <tho...@us...> - 2002-03-17 13:39:58
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Sun Mar 17 2002 05:39:56 PST Log message: is this a gcc3ism ? Modified files: gst : gstpad.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstpad.c.diff?r1=1.152.4.2&r2=1.152.4.3 ====Begin Diffs==== Index: gstpad.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstpad.c,v retrieving revision 1.152.4.2 retrieving revision 1.152.4.3 diff -u -d -r1.152.4.2 -r1.152.4.3 --- gstpad.c 15 Mar 2002 23:41:18 -0000 1.152.4.2 +++ gstpad.c 17 Mar 2002 13:39:44 -0000 1.152.4.3 @@ -2334,6 +2334,7 @@ gst_pad_event_default (GstPad *pad, GstData *event) { GstElement *element; + GList *pads; gpointer ret = NULL; g_return_val_if_fail (GST_IS_PAD (pad), FALSE); @@ -2343,7 +2344,7 @@ element = GST_PAD_PARENT (pad); /* send event */ - GList *pads = element->pads; + pads = element->pads; while (pads) { GstPad *eventpad = GST_PAD (pads->data); pads = g_list_next (pads); |
From: Thomas V. S. <tho...@us...> - 2002-03-17 13:48:08
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Sun Mar 17 2002 05:48:07 PST Log message: hm, this might take some time Modified files: gst : gstqueue.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstqueue.c.diff?r1=1.34.4.3&r2=1.34.4.4 ====Begin Diffs==== Index: gstqueue.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstqueue.c,v retrieving revision 1.34.4.3 retrieving revision 1.34.4.4 diff -u -d -r1.34.4.3 -r1.34.4.4 --- gstqueue.c 17 Mar 2002 00:50:42 -0000 1.34.4.3 +++ gstqueue.c 17 Mar 2002 13:47:55 -0000 1.34.4.4 @@ -327,9 +327,9 @@ /* handle events */ if (queue->upstream_event) { + GstPad *peer = GST_PAD_PEER (pad); g_print ("handling event\n"); g_mutex_lock (queue->upstream_mutex); - GstPad *peer = GST_PAD_PEER (pad); if (peer) { |
From: Thomas V. S. <tho...@us...> - 2002-04-12 09:32:21
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Fri Apr 12 2002 02:32:17 PDT Log message: code review Modified files: gst : gstthread.c gstthread.h Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstthread.c.diff?r1=1.73&r2=1.74 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstthread.h.diff?r1=1.12&r2=1.13 ====Begin Diffs==== Index: gstthread.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstthread.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- gstthread.c 11 Apr 2002 20:35:15 -0000 1.73 +++ gstthread.c 12 Apr 2002 09:32:05 -0000 1.74 @@ -139,6 +139,7 @@ GST_DEBUG (GST_CAT_THREAD, "initializing thread"); /* we're a manager by default */ + /* CR1: the GstBin code checks these flags */ GST_FLAG_SET (thread, GST_BIN_FLAG_MANAGER); GST_FLAG_SET (thread, GST_BIN_SELF_SCHEDULABLE); @@ -434,7 +435,7 @@ * @arg: the thread to start * * The main loop of the thread. The thread will iterate - * while the state is GST_THREAD_STATE_SPINNING + * while the state is GST_THREAD_STATE_SPINNING. */ static void * gst_thread_main_loop (void *arg) @@ -467,6 +468,8 @@ /***** THREAD IS NOW IN READY STATE *****/ + /* CR1: most of this code is handshaking */ + /* do this while the thread lives */ while (!GST_FLAG_IS_SET (thread, GST_THREAD_STATE_REAPING)) { /* NOTE we hold the thread lock at this point */ /* what we do depends on what state we're in */ @@ -503,7 +506,7 @@ gst_element_statename (GST_STATE_PAUSED), gst_element_statename (GST_STATE_READY), gst_element_statename (GST_STATE_PLAYING)); - g_cond_wait (thread->cond,thread->lock); + g_cond_wait (thread->cond, thread->lock); /* this must have happened by a state change in the thread context */ if (GST_STATE_PENDING (thread) != GST_STATE_READY && @@ -568,7 +571,7 @@ break; } } - /* we need to destroy the scheduler here bacause it has mapped it's + /* we need to destroy the scheduler here because it has mapped it's * stack into the threads stack space */ gst_scheduler_reset (GST_ELEMENT_SCHED (thread)); Index: gstthread.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstthread.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- gstthread.h 4 Dec 2001 22:12:38 -0000 1.12 +++ gstthread.h 12 Apr 2002 09:32:05 -0000 1.13 @@ -67,8 +67,8 @@ pthread_t thread_id; /* id of the thread, if any */ gint pid; /* the pid of the thread */ gint ppid; /* the pid of the thread's parent process */ - GMutex *lock; /* thread lock/condititon pair... */ - GCond *cond; /* used to control the thread */ + GMutex *lock; /* thread lock/condititon pair ... */ + GCond *cond; /* .... used to control the thread */ gint transition; /* the current state transition */ }; |
From: Thomas V. S. <tho...@us...> - 2002-04-12 09:33:09
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Fri Apr 12 2002 02:33:07 PDT Log message: code review Modified files: gst : gstobject.h gstpad.h Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstobject.h.diff?r1=1.23&r2=1.24 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstpad.h.diff?r1=1.82&r2=1.83 ====Begin Diffs==== Index: gstobject.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstobject.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- gstobject.h 31 Mar 2002 14:04:50 -0000 1.23 +++ gstobject.h 12 Apr 2002 09:32:54 -0000 1.24 @@ -90,6 +90,7 @@ guint32 flags; }; +/* signal_object is used to signal to the whole class */ struct _GstObjectClass { GObjectClass parent_class; @@ -123,7 +124,7 @@ #define GST_OBJECT_DESTROYED(obj) (GST_FLAG_IS_SET (obj, GST_DESTROYED)) #define GST_OBJECT_FLOATING(obj) (GST_FLAG_IS_SET (obj, GST_FLOATING)) -/* object locking */ +/* CR1: object locking - GObject 2.0 doesn't have threadsafe locking */ #define GST_LOCK(obj) (g_mutex_lock(GST_OBJECT_CAST(obj)->lock)) #define GST_TRYLOCK(obj) (g_mutex_trylock(GST_OBJECT_CAST(obj)->lock)) #define GST_UNLOCK(obj) (g_mutex_unlock(GST_OBJECT_CAST(obj)->lock)) Index: gstpad.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstpad.h,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- gstpad.h 11 Apr 2002 20:35:15 -0000 1.82 +++ gstpad.h 12 Apr 2002 09:32:54 -0000 1.83 @@ -178,6 +178,7 @@ GstRealPad *peer; GstBuffer *bufpen; + //CR1: FIXME: regiontype should go away GstRegionType regiontype; guint64 offset; guint64 len; @@ -311,6 +312,7 @@ void (*pad_created) (GstPadTemplate *templ, GstPad *pad); }; +/* CR1: the space after 'a' is necessary because of preprocessing in gcc */ #define GST_PAD_TEMPLATE_NEW(padname, dir, pres, a...) \ gst_pad_template_new ( \ padname, \ |
From: Thomas V. S. <tho...@us...> - 2002-04-12 09:37:07
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Fri Apr 12 2002 02:37:05 PDT Log message: code review Modified files: gst : gstbuffer.h gstcaps.h gstobject.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstbuffer.h.diff?r1=1.33&r2=1.34 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstcaps.h.diff?r1=1.35&r2=1.36 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstobject.c.diff?r1=1.41&r2=1.42 ====Begin Diffs==== Index: gstbuffer.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstbuffer.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- gstbuffer.h 2 Feb 2002 13:32:32 -0000 1.33 +++ gstbuffer.h 12 Apr 2002 09:36:52 -0000 1.34 @@ -113,7 +113,7 @@ #endif /* flags */ - guint16 flags; + guint16 flags; /* boolean properties of buffer */ /* pointer to data, its size, and offset in original source if known */ guchar *data; @@ -122,8 +122,8 @@ guint32 offset; /* timestamp */ - gint64 timestamp; - gint64 maxage; + gint64 timestamp; /* nanoseconds since zero */ + gint64 maxage; /* FIXME: not used yet */ /* subbuffer support, who's my parent? */ GstBuffer *parent; @@ -132,7 +132,7 @@ GstBufferPool *pool; gpointer pool_private; - /* utility function pointers */ + /* utility function pointers, can override default */ GstBufferFreeFunc free; /* free the data associated with the buffer */ GstBufferCopyFunc copy; /* copy the data from one buffer to another */ }; Index: gstcaps.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstcaps.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- gstcaps.h 6 Apr 2002 18:59:38 -0000 1.35 +++ gstcaps.h 12 Apr 2002 09:36:52 -0000 1.36 @@ -45,18 +45,23 @@ #define GST_CAPS_IS_FIXED(caps) ((caps)->fixed) #define GST_CAPS_IS_CHAINED(caps) ((caps)->next) +/* CR1: id is an int corresponding to the quark for the mime type because + * it's really fast when doing a first-pass check for caps compatibility */ struct _GstCaps { gchar *name; /* the name of this caps */ - guint16 id; /* type id (major type) */ + guint16 id; /* type id (major type) representing + the mime type */ guint refcount; gboolean fixed; /* this caps doesn't contain variable properties */ GstProps *properties; /* properties for this capability */ - GstCaps *next; + GstCaps *next; /* not with a GList for efficiency */ }; +/* factory macros which make it easier for plugins to instantiate */ + #define GST_CAPS_NEW(name, type, a...) \ gst_caps_new ( \ name, \ @@ -92,7 +97,7 @@ void gst_caps_debug (GstCaps *caps, const gchar *label); GstCaps* gst_caps_copy (GstCaps *caps); -GstCaps* gst_caps_copy_1 (GstCaps *caps); +GstCaps* gst_caps_copy_first (GstCaps *caps); GstCaps* gst_caps_copy_on_write (GstCaps *caps); const gchar* gst_caps_get_name (GstCaps *caps); Index: gstobject.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstobject.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- gstobject.c 24 Mar 2002 22:07:06 -0000 1.41 +++ gstobject.c 12 Apr 2002 09:36:52 -0000 1.42 @@ -109,6 +109,9 @@ gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_object_set_property); gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_object_get_property); + + /* CR1: we override the signal property so that an object can propagate the + * signal to the parent object */ gobject_class->dispatch_properties_changed = GST_DEBUG_FUNCPTR (gst_object_dispatch_properties_changed); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NAME, @@ -202,6 +205,7 @@ * Removes floating reference on an object. Any newly created object has * a refcount of 1 and is FLOATING. This function should be used when * creating a new object to symbolically 'take ownership of' the object. + * Use #gst_object_set_parent to have this done for you. */ void gst_object_sink (GstObject *object) @@ -222,6 +226,7 @@ * @object: GstObject to destroy * * Destroy the object. + * */ void gst_object_destroy (GstObject *object) @@ -330,7 +335,8 @@ const gchar* gst_object_get_name (GstObject *object) { - g_return_val_if_fail (object != NULL, NULL); + /* CR1: GLib checks for NULL */ + //FIXME: _REDUNDANT g_return_val_if_fail (object != NULL, NULL); g_return_val_if_fail (GST_IS_OBJECT (object), NULL); return object->name; @@ -503,9 +509,9 @@ while (list) { GstObject *child = GST_OBJECT (list->data); - list = g_list_next(list); + list = g_list_next (list); - if (strcmp(GST_OBJECT_NAME(child), name) == 0) + if (strcmp (GST_OBJECT_NAME (child), name) == 0) return FALSE; } @@ -615,6 +621,10 @@ break; } } + +/* CR1: the GObject changing a property emits signals to it's parents + * so that the app can connect a listener to the top-level bin */ + static void gst_object_dispatch_properties_changed (GObject *object, guint n_pspecs, @@ -644,7 +654,7 @@ * @object: GstObject to get the path from * * Generates a string describing the path of the object in - * the object hierarchy. Usefull for debugging + * the object hierarchy. Only useful (or used) for debugging * * Returns: a string describing the path of the object */ |
From: Thomas V. S. <tho...@us...> - 2002-04-12 09:39:01
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Fri Apr 12 2002 02:38:59 PDT Log message: code review Modified files: gst : gstbuffer.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstbuffer.c.diff?r1=1.46&r2=1.47 ====Begin Diffs==== Index: gstbuffer.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstbuffer.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- gstbuffer.c 4 Feb 2002 22:40:30 -0000 1.46 +++ gstbuffer.c 12 Apr 2002 09:38:47 -0000 1.47 @@ -439,7 +439,8 @@ * @buf1: first source buffer * @buf2: second source buffer * - * Determines whether a gst_buffer_span is free, or requires a memcpy. + * Determines whether a gst_buffer_span is free (as in free beer), + * or requires a memcpy. * * Returns: TRUE if the buffers are contiguous, FALSE if a copy would be required. */ |
From: Thomas V. S. <tho...@us...> - 2002-04-12 13:47:16
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Fri Apr 12 2002 06:47:11 PDT Log message: add clocking stuff to gst.h Modified files: gst : gst.h Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.h.diff?r1=1.33&r2=1.34 ====Begin Diffs==== Index: gst.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gst.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- gst.h 12 Apr 2002 09:53:00 -0000 1.33 +++ gst.h 12 Apr 2002 13:46:59 -0000 1.34 @@ -50,6 +50,8 @@ #include <gst/gstscheduler.h> #include <gst/gsttimecache.h> #include <gst/gstevent.h> +#include <gst/gstclock.h> +#include <gst/gstsystemclock.h> #include <gst/gstparse.h> #include <gst/gstregistry.h> |
From: Thomas V. S. <tho...@us...> - 2002-04-12 18:26:38
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Fri Apr 12 2002 11:26:29 PDT Log message: * reg.xml to registry.xml * adding spaces Modified files: gst : gstelementfactory.c gstregistry.h Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelementfactory.c.diff?r1=1.61&r2=1.62 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstregistry.h.diff?r1=1.1&r2=1.2 ====Begin Diffs==== Index: gstelementfactory.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstelementfactory.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- gstelementfactory.c 11 Apr 2002 20:35:14 -0000 1.61 +++ gstelementfactory.c 12 Apr 2002 18:26:17 -0000 1.62 @@ -101,7 +101,7 @@ * gst_element_factory_find: * @name: name of factory to find * - * Search for an elementfactory of the given name. + * Search for an element factory of the given name. * * Returns: #GstElementFactory if found, NULL otherwise */ @@ -129,7 +129,7 @@ /** * gst_element_factory_get_list: * - * Get the global list of elementfactories. + * Get the global list of element factories. * * Returns: GList of type #GstElementFactory */ Index: gstregistry.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstregistry.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gstregistry.h 12 Apr 2002 09:53:00 -0000 1.1 +++ gstregistry.h 12 Apr 2002 18:26:17 -0000 1.2 @@ -25,12 +25,12 @@ #define __GST_REGISTRY_H__ #define GLOBAL_REGISTRY_DIR GST_CONFIG_DIR -#define GLOBAL_REGISTRY_FILE GLOBAL_REGISTRY_DIR"/reg.xml" -#define GLOBAL_REGISTRY_FILE_TMP GLOBAL_REGISTRY_DIR"/.reg.xml.tmp" +#define GLOBAL_REGISTRY_FILE GLOBAL_REGISTRY_DIR"/registry.xml" +#define GLOBAL_REGISTRY_FILE_TMP GLOBAL_REGISTRY_DIR"/.registry.xml.tmp" #define LOCAL_REGISTRY_DIR ".gstreamer" -#define LOCAL_REGISTRY_FILE LOCAL_REGISTRY_DIR"/reg.xml" -#define LOCAL_REGISTRY_FILE_TMP LOCAL_REGISTRY_DIR"/.reg.xml.tmp" +#define LOCAL_REGISTRY_FILE LOCAL_REGISTRY_DIR"/registry.xml" +#define LOCAL_REGISTRY_FILE_TMP LOCAL_REGISTRY_DIR"/.registry.xml.tmp" #define REGISTRY_DIR_PERMS (S_ISGID | \ S_IRUSR | S_IWUSR | S_IXUSR | \ |
From: Thomas V. S. <tho...@us...> - 2002-04-12 18:55:32
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Fri Apr 12 2002 11:55:28 PDT Log message: silly me Modified files: gst : gstplugin.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstplugin.c.diff?r1=1.82&r2=1.83 ====Begin Diffs==== Index: gstplugin.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstplugin.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- gstplugin.c 12 Apr 2002 18:50:48 -0000 1.82 +++ gstplugin.c 12 Apr 2002 18:55:16 -0000 1.83 @@ -116,7 +116,7 @@ } else { - GST_INFO (GST_CAT_PLUGIN_LOADING, " Not reading registry", gst_registry); + GST_INFO (GST_CAT_PLUGIN_LOADING, " Not reading registry"); doc = NULL; } |
From: Thomas V. S. <tho...@us...> - 2002-04-14 10:09:28
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Sun Apr 14 2002 03:09:27 PDT Branch: BRANCH-RELEASE-0_3_4 Log message: these were the culprits for avifile not working properly Modified files: gst : gst.h Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.h.diff?r1=1.35&r2=1.35.2.1 ====Begin Diffs==== Index: gst.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gst.h,v retrieving revision 1.35 retrieving revision 1.35.2.1 diff -u -d -r1.35 -r1.35.2.1 --- gst.h 12 Apr 2002 17:08:48 -0000 1.35 +++ gst.h 14 Apr 2002 10:09:14 -0000 1.35.2.1 @@ -52,8 +52,6 @@ #include <gst/gstevent.h> #include <gst/gstclock.h> #include <gst/gstsystemclock.h> -#include <gst/gstqueue.h> -#include <gst/gsttypefind.h> #include <gst/gstparse.h> #include <gst/gstregistry.h> |
From: Thomas V. S. <tho...@us...> - 2002-04-14 12:10:05
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Sun Apr 14 2002 05:10:01 PDT Branch: BRANCH-RELEASE-0_3_4 Log message: wtay's fix Modified files: gst : gstparse.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstparse.c.diff?r1=1.47.2.1&r2=1.47.2.2 ====Begin Diffs==== Index: gstparse.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstparse.c,v retrieving revision 1.47.2.1 retrieving revision 1.47.2.2 diff -u -d -r1.47.2.1 -r1.47.2.2 --- gstparse.c 13 Apr 2002 19:29:02 -0000 1.47.2.1 +++ gstparse.c 14 Apr 2002 12:09:49 -0000 1.47.2.2 @@ -37,7 +37,8 @@ typedef struct { gchar *srcpadname; - GstPad *target; + GstPad *target_pad; + GstElement *target_element; GstElement *pipeline; } dynamic_connection_t; @@ -56,12 +57,32 @@ dynamic_connect (GstElement * element, GstPad * newpad, gpointer data) { dynamic_connection_t *dc = (dynamic_connection_t *) data; + gboolean warn = TRUE; - if (!strcmp (gst_pad_get_name (newpad), dc->srcpadname)) { + /* do we know the exact srcpadname? */ + if (dc->srcpadname) { + /* see if this is the one */ + if (strcmp (gst_pad_get_name (newpad), dc->srcpadname)) { + return; + } + } + + /* try to find a target pad if we don't know it yet */ + if (!dc->target_pad) { + if (!GST_PAD_IS_CONNECTED (newpad)) { + dc->target_pad = gst_element_get_compatible_pad (dc->target_element, newpad); + warn = FALSE; + } + else { + return; + } + } + if (!GST_PAD_IS_CONNECTED (dc->target_pad)) { gst_element_set_state (dc->pipeline, GST_STATE_PAUSED); - if (!gst_pad_connect (newpad, dc->target)) + if (!gst_pad_connect (newpad, dc->target_pad) && warn) { g_warning ("could not connect %s:%s to %s:%s", GST_DEBUG_PAD_NAME (newpad), - GST_DEBUG_PAD_NAME (dc->target)); + GST_DEBUG_PAD_NAME (dc->target_pad)); + } gst_element_set_state (dc->pipeline, GST_STATE_PLAYING); } } @@ -249,7 +270,8 @@ pt1->presence == GST_PAD_SOMETIMES) { dc = g_new0 (dynamic_connection_t, 1); dc->srcpadname = (gchar*)a->data; - dc->target = p2; + dc->target_pad = p2; + dc->target_element = sink; dc->pipeline = g->bin; GST_DEBUG (GST_CAT_PIPELINE, "setting up dynamic connection %s:%s and %s:%s", @@ -277,7 +299,8 @@ // g_print ("got the pad\n"); dc = g_new0 (dynamic_connection_t, 1); dc->srcpadname = (gchar*)a->data; - dc->target = p2; + dc->target_pad = p2; + dc->target_element = NULL; dc->pipeline = g->bin; GST_DEBUG (GST_CAT_PIPELINE, "setting up dynamic connection %s:%s and %s:%s", @@ -285,17 +308,29 @@ (gchar*)a->data, GST_DEBUG_PAD_NAME (p2)); g_signal_connect (G_OBJECT (src), "new_pad", G_CALLBACK (dynamic_connect), dc); + goto next; } else { /* both pt1 and pt2 are sometimes templates. sheesh. */ goto both_templates_have_sometimes_presence; } } else { - goto could_not_get_compatible_to_a; + /* if the target pad has no padtemplate we will figure out a target + * pad later on */ + dc = g_new0 (dynamic_connection_t, 1); + dc->srcpadname = NULL; + dc->target_pad = NULL; + dc->target_element = sink; + dc->pipeline = g->bin; + + GST_DEBUG (GST_CAT_PIPELINE, "setting up dynamic connection %s:%s, and some pad in %s", + GST_OBJECT_NAME (GST_OBJECT (src)), + (gchar*)a->data, GST_OBJECT_NAME (sink)); + + g_signal_connect (G_OBJECT (src), "new_pad", G_CALLBACK (dynamic_connect), dc); + goto next; } } else { - if (!(p2 = gst_element_get_compatible_pad (sink, p1))) { - goto could_not_get_compatible_to_a; - } + goto could_not_get_compatible_to_a; } } else { goto could_not_get_pad_a; @@ -323,6 +358,7 @@ goto could_not_connect_elements; } } +next: l = g_list_next (l); } |
From: Thomas V. S. <tho...@us...> - 2002-04-14 13:57:18
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Sun Apr 14 2002 06:57:16 PDT Branch: BRANCH-RELEASE-0_3_4 Log message: wtay's fixes Modified files: gst : gstparse.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstparse.c.diff?r1=1.47.2.2&r2=1.47.2.3 ====Begin Diffs==== Index: gstparse.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstparse.c,v retrieving revision 1.47.2.2 retrieving revision 1.47.2.3 diff -u -d -r1.47.2.2 -r1.47.2.3 --- gstparse.c 14 Apr 2002 12:09:49 -0000 1.47.2.2 +++ gstparse.c 14 Apr 2002 13:57:03 -0000 1.47.2.3 @@ -77,7 +77,7 @@ return; } } - if (!GST_PAD_IS_CONNECTED (dc->target_pad)) { + if (!GST_PAD_IS_CONNECTED (dc->target_pad) && !GST_PAD_IS_CONNECTED (newpad)) { gst_element_set_state (dc->pipeline, GST_STATE_PAUSED); if (!gst_pad_connect (newpad, dc->target_pad) && warn) { g_warning ("could not connect %s:%s to %s:%s", GST_DEBUG_PAD_NAME (newpad), |
From: Thomas V. S. <tho...@us...> - 2002-04-17 15:20:12
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Wed Apr 17 2002 08:20:08 PDT Log message: more doc fixes Modified files: gst : gstbuffer.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstbuffer.c.diff?r1=1.47&r2=1.48 ====Begin Diffs==== Index: gstbuffer.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstbuffer.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- gstbuffer.c 12 Apr 2002 09:38:47 -0000 1.47 +++ gstbuffer.c 17 Apr 2002 15:19:56 -0000 1.48 @@ -66,7 +66,7 @@ /** * gst_buffer_print_stats: * - * Print statistics about live buffers. + * Logs statistics about live buffers (using g_log). */ void gst_buffer_print_stats (void) @@ -78,9 +78,9 @@ /** * gst_buffer_new: * - * Create a new buffer. + * Creates a newly allocated buffer. * - * Returns: new buffer + * Returns: new #GstBuffer */ GstBuffer* gst_buffer_new (void) @@ -122,9 +122,9 @@ * @offset: the offset of the new buffer * @size: the size of the new buffer * - * Create a new buffer using the specified bufferpool, offset and size. + * Creates a newly allocated buffer using the specified bufferpool, offset and size. * - * Returns: new buffer + * Returns: new #GstBuffer */ GstBuffer* gst_buffer_new_from_pool (GstBufferPool *pool, guint32 offset, guint32 size) @@ -147,13 +147,14 @@ /** * gst_buffer_create_sub: - * @parent: parent buffer - * @offset: offset into parent buffer - * @size: size of new subbuffer + * @parent: parent #GstBuffer + * @offset: offset into parent #GstBuffer + * @size: size of new sub-buffer * * Creates a sub-buffer from the parent at a given offset. + * This sub-buffer uses the actual memory space of the parent buffer. * - * Returns: new buffer + * Returns: a new #GstBuffer */ GstBuffer* gst_buffer_create_sub (GstBuffer *parent, @@ -217,50 +218,55 @@ /* FIXME FIXME: how does this overlap with the newly-added gst_buffer_span() ??? */ /** * gst_buffer_append: - * @buffer: a buffer - * @append: the buffer to append + * @first: #GstBuffer to append to + * @second: #GstBuffer to append * - * Creates a new buffer by appending the data of append to the - * existing data of buffer. + * Creates a new buffer by appending the data of second to the + * existing data of first. This will grow first if first is unused elsewhere, + * or create a newly allocated buffer if it is in use. + * second will not be changed. * - * Returns: new buffer + * Returns: a new #GstBuffer */ GstBuffer* -gst_buffer_append (GstBuffer *buffer, - GstBuffer *append) +gst_buffer_append (GstBuffer *first, + GstBuffer *second) { guint size; - GstBuffer *newbuf; + GstBuffer *newbuf = NULL; + GstBuffer *buffer = NULL; - g_return_val_if_fail (buffer != NULL, NULL); - g_return_val_if_fail (append != NULL, NULL); - g_return_val_if_fail (buffer->pool == NULL, NULL); - g_return_val_if_fail (GST_BUFFER_REFCOUNT(buffer) > 0, NULL); - g_return_val_if_fail (GST_BUFFER_REFCOUNT(append) > 0, NULL); + g_return_val_if_fail (first != NULL, NULL); + g_return_val_if_fail (second != NULL, NULL); + g_return_val_if_fail (first->pool == NULL, NULL); + g_return_val_if_fail (GST_BUFFER_REFCOUNT (first) > 0, NULL); + g_return_val_if_fail (GST_BUFFER_REFCOUNT (second) > 0, NULL); - GST_INFO (GST_CAT_BUFFER,"appending buffers %p and %p",buffer,append); + GST_INFO (GST_CAT_BUFFER,"appending buffers %p and %p",first, second); - GST_BUFFER_LOCK (buffer); - /* the buffer is not used by anyone else */ - if (GST_BUFFER_REFCOUNT (buffer) == 1 && buffer->parent == NULL - && !GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_DONTFREE)) { - /* save the old size */ - size = buffer->size; - buffer->size += append->size; - buffer->data = g_realloc (buffer->data, buffer->size); - memcpy(buffer->data + size, append->data, append->size); - GST_BUFFER_UNLOCK (buffer); + GST_BUFFER_LOCK (first); + /* is the buffer used by anyone else ? */ + if (GST_BUFFER_REFCOUNT (first) == 1 && first->parent == NULL + && !GST_BUFFER_FLAG_IS_SET (first, GST_BUFFER_DONTFREE)) { + /* it's not, so we can realloc and expand the first buffer, + * filling it with the second's data */ + size = first->size; + first->size += second->size; + first->data = g_realloc (first->data, first->size); + memcpy(first->data + size, second->data, second->size); + GST_BUFFER_UNLOCK (first); + buffer = first; } - /* the buffer is used, create a new one */ else { + /* the buffer is used, create a new one */ newbuf = gst_buffer_new (); - newbuf->size = buffer->size+append->size; + newbuf->size = first->size + second->size; newbuf->data = g_malloc (newbuf->size); - memcpy (newbuf->data, buffer->data, buffer->size); - memcpy (newbuf->data+buffer->size, append->data, append->size); - GST_BUFFER_TIMESTAMP (newbuf) = GST_BUFFER_TIMESTAMP (buffer); - GST_BUFFER_UNLOCK (buffer); - gst_buffer_unref (buffer); + memcpy (newbuf->data, first->data, first->size); + memcpy (newbuf->data + first->size, second->data, second->size); + GST_BUFFER_TIMESTAMP (newbuf) = GST_BUFFER_TIMESTAMP (first); + GST_BUFFER_UNLOCK (first); + gst_buffer_unref (first); buffer = newbuf; } return buffer; @@ -268,9 +274,9 @@ /** * gst_buffer_destroy: - * @buffer: the GstBuffer to destroy + * @buffer: #GstBuffer to destroy * - * destroy the buffer + * Destroys the buffer. Actual data will be retained if DONTFREE is set. */ void gst_buffer_destroy (GstBuffer *buffer) @@ -315,9 +321,9 @@ /** * gst_buffer_ref: - * @buffer: the GstBuffer to reference + * @buffer: a #GstBuffer to reference * - * Increment the refcount of this buffer. + * Increments the reference count of this buffer. */ void gst_buffer_ref (GstBuffer *buffer) @@ -338,10 +344,10 @@ /** * gst_buffer_ref_by_count: - * @buffer: the GstBuffer to reference - * @count: a number + * @buffer: a #GstBuffer to reference + * @count: the number to increment the reference count by * - * Increment the refcount of this buffer by the given number. + * Increments the reference count of this buffer by the given number. */ void gst_buffer_ref_by_count (GstBuffer *buffer, gint count) @@ -362,9 +368,9 @@ /** * gst_buffer_unref: - * @buffer: the GstBuffer to unref + * @buffer: a #GstBuffer to unreference * - * Decrement the refcount of this buffer. If the refcount is + * Decrements the refcount of this buffer. If the refcount is * zero, the buffer will be destroyed. */ void @@ -394,11 +400,11 @@ /** * gst_buffer_copy: - * @buffer: the orignal GstBuffer to make a copy of + * @buffer: a #GstBuffer to make a copy of * - * Make a full copy of the give buffer, data and all. + * Make a full newly allocated copy of the given buffer, data and all. * - * Returns: new buffer + * Returns: new #GstBuffer */ GstBuffer * gst_buffer_copy (GstBuffer *buffer) @@ -458,12 +464,12 @@ /** * gst_buffer_span: - * @buf1: first source buffer to merge + * @buf1: first source #GstBuffer to merge * @offset: offset in first buffer to start new buffer - * @buf2: second source buffer to merge + * @buf2: second source #GstBuffer to merge * @len: length of new buffer * - * Create a new buffer that consists of part of buf1 and buf2. + * Creates a new buffer that consists of part of buf1 and buf2. * Logically, buf1 and buf2 are concatenated into a single larger * buffer, and a new buffer is created at the given offset inside * this space, with a given length. @@ -472,7 +478,7 @@ * and are contiguous, the new buffer will be a child of the shared * parent, and thus no copying is necessary. * - * Returns: new buffer that spans the two source buffers + * Returns: a new #GstBuffer that spans the two source buffers */ /* FIXME need to think about CoW and such... */ GstBuffer * @@ -524,8 +530,8 @@ /** * gst_buffer_merge: - * @buf1: first source buffer to merge - * @buf2: second source buffer to merge + * @buf1: first source #GstBuffer to merge + * @buf2: second source #GstBuffer to merge * * Create a new buffer that is the concatenation of the two source * buffers. The original source buffers will not be modified or @@ -534,7 +540,7 @@ * Internally is nothing more than a specialized gst_buffer_span, * so the same optimizations can occur. * - * Returns: new buffer that's the concatenation of the source buffers + * Returns: a new #GstBuffer that's the concatenation of the source buffers */ GstBuffer * gst_buffer_merge (GstBuffer *buf1, GstBuffer *buf2) |
From: Thomas V. S. <tho...@us...> - 2002-04-19 10:27:09
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Fri Apr 19 2002 03:27:08 PDT Log message: doc fixes Modified files: gst : cothreads.c gstbuffer.h Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/cothreads.c.diff?r1=1.62&r2=1.63 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstbuffer.h.diff?r1=1.34&r2=1.35 ====Begin Diffs==== Index: cothreads.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/cothreads.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- cothreads.c 31 Mar 2002 14:04:49 -0000 1.62 +++ cothreads.c 19 Apr 2002 10:26:56 -0000 1.63 @@ -341,12 +341,14 @@ GST_DEBUG_ENTER (""); thread->flags |= COTHREAD_STARTED; -/* #ifdef COTHREAD_ATOMIC +/* + * ifdef COTHREAD_ATOMIC * do something here to lock - * #else + * else * g_mutex_lock(thread->lock); - * #endif + * endif */ + while (TRUE) { thread->func (thread->argc, thread->argv); /* we do this to avoid ever returning, we just switch to 0th thread */ Index: gstbuffer.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstbuffer.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- gstbuffer.h 12 Apr 2002 09:36:52 -0000 1.34 +++ gstbuffer.h 19 Apr 2002 10:26:56 -0000 1.35 @@ -85,7 +85,7 @@ GST_BUFFER_ORIGINAL, GST_BUFFER_DONTFREE, -} GstBufferFlags; +} GstBufferFlag; typedef struct _GstBuffer GstBuffer; |
From: Thomas V. S. <tho...@us...> - 2002-04-21 13:32:49
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Sun Apr 21 2002 06:32:48 PDT Log message: makes no sense as INFO Modified files: gst : gstpad.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstpad.c.diff?r1=1.159&r2=1.160 ====Begin Diffs==== Index: gstpad.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstpad.c,v retrieving revision 1.159 retrieving revision 1.160 diff -u -d -r1.159 -r1.160 --- gstpad.c 11 Apr 2002 20:35:14 -0000 1.159 +++ gstpad.c 21 Apr 2002 13:32:35 -0000 1.160 @@ -1144,10 +1144,10 @@ } srccaps = gst_pad_get_caps (GST_PAD (realsrc)); - GST_INFO (GST_CAT_PADS, "dumping caps of pad %s:%s", GST_DEBUG_PAD_NAME (realsrc)); + GST_DEBUG (GST_CAT_PADS, "dumping caps of pad %s:%s", GST_DEBUG_PAD_NAME (realsrc)); gst_caps_debug (srccaps, "caps of src pad (pre-reconnect)"); sinkcaps = gst_pad_get_caps (GST_PAD (realsink)); - GST_INFO (GST_CAT_PADS, "dumping caps of pad %s:%s", GST_DEBUG_PAD_NAME (realsink)); + GST_DEBUG (GST_CAT_PADS, "dumping caps of pad %s:%s", GST_DEBUG_PAD_NAME (realsink)); gst_caps_debug (sinkcaps, "caps of sink pad (pre-reconnect)"); /* first take the intersection of the pad caps */ @@ -1229,10 +1229,10 @@ /* calculate the new caps here */ srccaps = gst_pad_get_caps (GST_PAD (realsrc)); - GST_INFO (GST_CAT_PADS, "dumping caps of pad %s:%s", GST_DEBUG_PAD_NAME (realsrc)); + GST_DEBUG (GST_CAT_PADS, "dumping caps of pad %s:%s", GST_DEBUG_PAD_NAME (realsrc)); gst_caps_debug (srccaps, "src caps, awaiting negotiation, after applying filter"); sinkcaps = gst_pad_get_caps (GST_PAD (realsink)); - GST_INFO (GST_CAT_PADS, "dumping caps of pad %s:%s", GST_DEBUG_PAD_NAME (realsink)); + GST_DEBUG (GST_CAT_PADS, "dumping caps of pad %s:%s", GST_DEBUG_PAD_NAME (realsink)); gst_caps_debug (sinkcaps, "sink caps, awaiting negotiation, after applying filter"); intersection = gst_caps_intersect (srccaps, sinkcaps); filtered_intersection = gst_caps_intersect (intersection, filter); |
From: Thomas V. S. <tho...@us...> - 2002-04-21 14:06:27
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Sun Apr 21 2002 07:06:26 PDT Log message: adapted docs Modified files: gst : gstelementfactory.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelementfactory.c.diff?r1=1.62&r2=1.63 ====Begin Diffs==== Index: gstelementfactory.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstelementfactory.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- gstelementfactory.c 12 Apr 2002 18:26:17 -0000 1.62 +++ gstelementfactory.c 21 Apr 2002 14:06:14 -0000 1.63 @@ -209,7 +209,7 @@ * @name: name of new element * * Create a new element of the type defined by the given elementfactory. - * It wll be given the name supplied, since all elements require a name as + * It will be given the name supplied, since all elements require a name as * their first argument. * * Returns: new #GstElement @@ -260,9 +260,10 @@ * @factoryname: a named factory to instantiate * @name: name of new element * - * Create a new element of the type defined by the given elementfactory. - * It wll be given the name supplied, since all elements require a name as - * their first argument. + * Create a new element of the type defined by the given element factory. + * If name is NULL, then the element will receive a guaranteed unique name, + * consisting of the element factory name and a number. + * If name is given, it will be given the name supplied. * * Returns: new #GstElement (or NULL if unable to create element) */ |
From: Thomas V. S. <tho...@us...> - 2002-04-21 14:16:49
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Sun Apr 21 2002 07:16:48 PDT Log message: give useful warning when not unique Modified files: gst : gstbin.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstbin.c.diff?r1=1.130&r2=1.131 ====Begin Diffs==== Index: gstbin.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstbin.c,v retrieving revision 1.130 retrieving revision 1.131 diff -u -d -r1.130 -r1.131 --- gstbin.c 20 Apr 2002 21:42:51 -0000 1.130 +++ gstbin.c 21 Apr 2002 14:16:36 -0000 1.131 @@ -352,8 +352,13 @@ g_return_if_fail (GST_ELEMENT_PARENT (element) == NULL); /* then check to see if the element's name is already taken in the bin */ - g_return_if_fail (gst_object_check_uniqueness (bin->children, GST_ELEMENT_NAME (element)) == - TRUE); + if (gst_object_check_uniqueness (bin->children, + GST_ELEMENT_NAME (element)) == FALSE) + { + g_warning ("Name %s is not unique in bin %s, not adding\n", + GST_ELEMENT_NAME (element), GST_ELEMENT_NAME (bin)); + return; + } /* set the element's parent and add the element to the bin's list of children */ gst_object_set_parent (GST_OBJECT (element), GST_OBJECT (bin)); |
From: Thomas V. S. <tho...@us...> - 2002-04-23 09:49:03
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Tue Apr 23 2002 02:49:00 PDT Log message: code cleanup Modified files: gst : gstelement.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.c.diff?r1=1.130&r2=1.131 ====Begin Diffs==== Index: gstelement.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstelement.c,v retrieving revision 1.130 retrieving revision 1.131 diff -u -d -r1.130 -r1.131 --- gstelement.c 12 Apr 2002 20:06:14 -0000 1.130 +++ gstelement.c 23 Apr 2002 09:48:48 -0000 1.131 @@ -1279,7 +1279,7 @@ * @state: new element state * * Sets the state of the element. This function will only set - * the elements pending state. + * the element's pending state. * * Returns: whether or not the state was successfully set. */ @@ -1300,19 +1300,22 @@ gst_element_statename (state)); /* loop until the final requested state is set */ - while (GST_STATE (element) != state && GST_STATE (element) != GST_STATE_VOID_PENDING) { + while (GST_STATE (element) != state + && GST_STATE (element) != GST_STATE_VOID_PENDING) { /* move the curpending state in the correct direction */ if (curpending < state) - curpending<<=1; + curpending <<= 1; else - curpending>>=1; + curpending >>= 1; /* set the pending state variable */ /* FIXME: should probably check to see that we don't already have one */ GST_STATE_PENDING (element) = curpending; if (curpending != state) { - GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "intermediate: setting state to %s", + GST_DEBUG_ELEMENT (GST_CAT_STATES, element, + "intermediate: setting state from %s to %s", + gst_element_statename (state), gst_element_statename (curpending)); } @@ -1324,11 +1327,11 @@ switch (return_val) { case GST_STATE_FAILURE: GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "have failed change_state return"); - return return_val; + break; case GST_STATE_ASYNC: GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "element will change state async"); - return return_val; - default: + break; + case GST_STATE_SUCCESS: /* Last thing we do is verify that a successful state change really * did change the state... */ if (GST_STATE (element) != curpending) { @@ -1340,6 +1343,9 @@ return GST_STATE_FAILURE; } break; + default: + /* somebody added a GST_STATE_ and forgot to do stuff here ! */ + g_assert_not_reached (); } } |
From: Thomas V. S. <tho...@us...> - 2002-04-23 10:32:41
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Tue Apr 23 2002 03:32:28 PDT Log message: doc changes Modified files: gst : gstelement.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.c.diff?r1=1.131&r2=1.132 ====Begin Diffs==== Index: gstelement.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstelement.c,v retrieving revision 1.131 retrieving revision 1.132 diff -u -d -r1.131 -r1.132 --- gstelement.c 23 Apr 2002 09:48:48 -0000 1.131 +++ gstelement.c 23 Apr 2002 10:32:16 -0000 1.132 @@ -1245,11 +1245,11 @@ /** * gst_element_get_state: - * @element: element to get state of + * @element: a #GstElement to get state of * * Gets the state of the element. * - * Returns: The element state + * Returns: The #GstElementState of the element */ GstElementState gst_element_get_state (GstElement *element) @@ -1261,9 +1261,9 @@ /** * gst_element_wait_state_change: - * @element: element wait for + * @element: a #GstElement to wait for * - * Wait and block until the element changed its state. + * Waits and blocks until the element changed its state. */ void gst_element_wait_state_change (GstElement *element) @@ -1275,13 +1275,15 @@ /** * gst_element_set_state: - * @element: element to change state of - * @state: new element state + * @element: a #GstElement to change state of + * @state: the element's new #GstElementState * - * Sets the state of the element. This function will only set - * the element's pending state. + * Sets the state of the element. This function will try to set the + * requested state by going through all the intermediary states and calling + * the class's state change function for each. * - * Returns: whether or not the state was successfully set. + * Returns: whether or not the state was successfully set + * (using #GstElementStateReturn). */ gint gst_element_set_state (GstElement *element, GstElementState state) |
From: Thomas V. S. <tho...@us...> - 2002-04-23 11:15:32
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Tue Apr 23 2002 04:15:30 PDT Log message: api renaming Modified files: gst : gstbin.c gstelement.c gstelement.h gstthread.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstbin.c.diff?r1=1.131&r2=1.132 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.c.diff?r1=1.132&r2=1.133 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.h.diff?r1=1.88&r2=1.89 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstthread.c.diff?r1=1.76&r2=1.77 ====Begin Diffs==== Index: gstbin.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstbin.c,v retrieving revision 1.131 retrieving revision 1.132 diff -u -d -r1.131 -r1.132 --- gstbin.c 21 Apr 2002 14:16:36 -0000 1.131 +++ gstbin.c 23 Apr 2002 11:15:17 -0000 1.132 @@ -459,7 +459,7 @@ GST_INFO (GST_CAT_STATES, "child %s changed state in bin %s from %s to %s", GST_ELEMENT_NAME (child), GST_ELEMENT_NAME (bin), - gst_element_statename (oldstate), gst_element_statename (newstate)); + gst_element_state_get_name (oldstate), gst_element_state_get_name (newstate)); while (oldstate >>= 1) old_idx++; while (newstate >>= 1) new_idx++; @@ -473,7 +473,7 @@ gint state = (1 << i); if (GST_STATE (bin) != state) { GST_INFO (GST_CAT_STATES, "bin %s need state change to %s", - GST_ELEMENT_NAME (bin), gst_element_statename (state)); + GST_ELEMENT_NAME (bin), gst_element_state_get_name (state)); GST_STATE_PENDING (bin) = state; GST_UNLOCK (bin); gst_bin_change_state_norecurse (bin); @@ -505,7 +505,7 @@ transition = GST_STATE_TRANSITION (element); GST_INFO_ELEMENT (GST_CAT_STATES, element, "changing childrens' state from %s to %s", - gst_element_statename (old_state), gst_element_statename (pending)); + gst_element_state_get_name (old_state), gst_element_state_get_name (pending)); if (pending == GST_STATE_VOID_PENDING) return GST_STATE_SUCCESS; @@ -520,7 +520,7 @@ case GST_STATE_FAILURE: GST_STATE_PENDING (element) = GST_STATE_VOID_PENDING; GST_DEBUG (GST_CAT_STATES, "child '%s' failed to go to state %d(%s)", - GST_ELEMENT_NAME (child), pending, gst_element_statename (pending)); + GST_ELEMENT_NAME (child), pending, gst_element_state_get_name (pending)); gst_element_set_state (child, old_state); if (GST_ELEMENT_SCHED (child) == GST_ELEMENT_SCHED (element)) { @@ -539,9 +539,9 @@ } GST_INFO_ELEMENT (GST_CAT_STATES, element, "done changing bin's state from %s to %s, now in %s", - gst_element_statename (old_state), - gst_element_statename (pending), - gst_element_statename (GST_STATE (element))); + gst_element_state_get_name (old_state), + gst_element_state_get_name (pending), + gst_element_state_get_name (GST_STATE (element))); if (have_async) ret = GST_STATE_ASYNC; Index: gstelement.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstelement.c,v retrieving revision 1.132 retrieving revision 1.133 diff -u -d -r1.132 -r1.133 --- gstelement.c 23 Apr 2002 10:32:16 -0000 1.132 +++ gstelement.c 23 Apr 2002 11:15:17 -0000 1.133 @@ -1298,8 +1298,8 @@ curpending = GST_STATE(element); GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "setting state from %s to %s", - gst_element_statename (curpending), - gst_element_statename (state)); + gst_element_state_get_name (curpending), + gst_element_state_get_name (state)); /* loop until the final requested state is set */ while (GST_STATE (element) != state @@ -1317,8 +1317,8 @@ if (curpending != state) { GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "intermediate: setting state from %s to %s", - gst_element_statename (state), - gst_element_statename (curpending)); + gst_element_state_get_name (state), + gst_element_state_get_name (curpending)); } /* call the state change function so it can set the state */ @@ -1339,9 +1339,9 @@ if (GST_STATE (element) != curpending) { GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "element claimed state-change success, but state didn't change %s, %s <-> %s", - gst_element_statename (GST_STATE (element)), - gst_element_statename (GST_STATE_PENDING (element)), - gst_element_statename (curpending)); + gst_element_state_get_name (GST_STATE (element)), + gst_element_state_get_name (GST_STATE_PENDING (element)), + gst_element_state_get_name (curpending)); return GST_STATE_FAILURE; } break; @@ -1450,8 +1450,8 @@ } GST_INFO (GST_CAT_STATES, "%s default handler sets state from %s to %s %d", GST_ELEMENT_NAME (element), - gst_element_statename (old_state), - gst_element_statename (old_pending), + gst_element_state_get_name (old_state), + gst_element_state_get_name (old_pending), GST_STATE_TRANSITION (element)); /* we set the state change early for the negotiation functions */ @@ -1806,15 +1806,15 @@ /** - * gst_element_statename: - * @state: The state to get the name of + * gst_element_state_get_name: + * @state: a #GstElementState to get the name of * * Gets a string representing the given state. * * Returns: a string with the statename. */ const gchar* -gst_element_statename (GstElementState state) +gst_element_state_get_name (GstElementState state) { switch (state) { #ifdef GST_DEBUG_COLOR Index: gstelement.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstelement.h,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- gstelement.h 12 Apr 2002 20:06:14 -0000 1.88 +++ gstelement.h 23 Apr 2002 11:15:18 -0000 1.89 @@ -241,7 +241,7 @@ void gst_element_wait_state_change (GstElement *element); -const gchar* gst_element_statename (GstElementState state); +const gchar* gst_element_state_get_name (GstElementState state); GstElementFactory* gst_element_get_factory (GstElement *element); Index: gstthread.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstthread.c,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- gstthread.c 20 Apr 2002 21:42:52 -0000 1.76 +++ gstthread.c 23 Apr 2002 11:15:18 -0000 1.77 @@ -261,8 +261,8 @@ transition = GST_STATE_TRANSITION (element); THR_INFO ("changing state from %s to %s", - gst_element_statename (GST_STATE (element)), - gst_element_statename (GST_STATE_PENDING (element))); + gst_element_state_get_name (GST_STATE (element)), + gst_element_state_get_name (GST_STATE_PENDING (element))); if (pthread_equal (self, thread->thread_id)) { GST_DEBUG (GST_CAT_THREAD, @@ -478,9 +478,9 @@ case GST_STATE_READY: /* wait to be set to either the NULL or PAUSED states */ THR_DEBUG_MAIN ("thread in %s state, waiting for either %s or %s", - gst_element_statename (GST_STATE_READY), - gst_element_statename (GST_STATE_NULL), - gst_element_statename (GST_STATE_PAUSED)); + gst_element_state_get_name (GST_STATE_READY), + gst_element_state_get_name (GST_STATE_NULL), + gst_element_state_get_name (GST_STATE_PAUSED)); g_cond_wait (thread->cond,thread->lock); /* this must have happened by a state change in the thread context */ @@ -503,9 +503,9 @@ case GST_STATE_PAUSED: /* wait to be set to either the READY or PLAYING states */ THR_DEBUG_MAIN("thread in %s state, waiting for either %s or %s", - gst_element_statename (GST_STATE_PAUSED), - gst_element_statename (GST_STATE_READY), - gst_element_statename (GST_STATE_PLAYING)); + gst_element_state_get_name (GST_STATE_PAUSED), + gst_element_state_get_name (GST_STATE_READY), + gst_element_state_get_name (GST_STATE_PLAYING)); g_cond_wait (thread->cond, thread->lock); /* this must have happened by a state change in the thread context */ @@ -551,8 +551,8 @@ case GST_STATE_PLAYING: /* wait to be set to PAUSED */ THR_DEBUG_MAIN ("thread in %s state, waiting for %s", - gst_element_statename(GST_STATE_PLAYING), - gst_element_statename(GST_STATE_PAUSED)); + gst_element_state_get_name(GST_STATE_PLAYING), + gst_element_state_get_name(GST_STATE_PAUSED)); g_cond_wait (thread->cond,thread->lock); /* been signaled, we need to state transition now and signal back */ @@ -563,7 +563,7 @@ continue; case GST_STATE_NULL: THR_DEBUG_MAIN ("thread in %s state, preparing to die", - gst_element_statename(GST_STATE_NULL)); + gst_element_state_get_name(GST_STATE_NULL)); GST_FLAG_SET (thread, GST_THREAD_STATE_REAPING); break; default: |