Small cleanups, backports from HEAD.

Original commit message from CVS:
Small cleanups, backports from HEAD.
This commit is contained in:
Wim Taymans 2005-03-21 10:49:42 +00:00
parent 6c611baadf
commit 81f1e2e671
41 changed files with 137 additions and 120 deletions

View file

@ -1,3 +1,43 @@
2005-03-21 Wim Taymans <wim@fluendo.com>
* gst/Makefile.am:
* gst/autoplug/gstsearchfuncs.c: (gst_autoplug_caps_intersect):
* gst/autoplug/gstspider.c: (gst_spider_identity_plug),
(gst_spider_plug_from_srcpad):
* gst/autoplug/gstspideridentity.c: (gst_spider_identity_getcaps),
(gst_spider_identity_change_state),
(gst_spider_identity_sink_loop_type_finding):
* gst/elements/gstaggregator.c: (gst_aggregator_class_init):
* gst/elements/gstfakesrc.c: (gst_fakesrc_event_handler),
(gst_fakesrc_loop), (gst_fakesrc_activate):
* gst/elements/gstfakesrc.h:
* gst/elements/gstfdsink.c: (gst_fdsink_class_init):
* gst/elements/gstfdsrc.c: (gst_fdsrc_class_init):
* gst/elements/gstfilesink.c: (gst_filesink_class_init),
(gst_filesink_handle_event):
* gst/elements/gstmd5sink.c: (gst_md5sink_class_init):
* gst/elements/gstmultifilesrc.c: (gst_multifilesrc_class_init):
* gst/elements/gstshaper.c: (gst_shaper_class_init):
* gst/elements/gststatistics.c: (gst_statistics_class_init):
* gst/elements/gsttypefindelement.c: (free_entry),
(gst_type_find_element_handle_event):
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove):
* gst/gstbin.h:
* gst/gstbuffer.c:
* gst/gstcaps.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state):
* gst/gstevent.h:
* gst/gstpad.h:
* gst/gstpipeline.c:
* gst/gstqueue.h:
* libs/gst/bytestream/bytestream.c:
* libs/gst/dataprotocol/Makefile.am:
* tools/Makefile.am:
* tools/gst-launch.c:
Small cleanups, backports from HEAD.
2005-03-10 Wim Taymans <wim@fluendo.com>
* gst/base/gstbasesink.c: (gst_basesink_change_state):

2
common

@ -1 +1 @@
Subproject commit b2638c100721f67b280c3b43b21f1ce1c9b5e316
Subproject commit 131c2632127e6f061b5270d8f80651782a4fdd13

View file

@ -187,6 +187,7 @@ gst_headers = \
gstsystemclock.h \
gsttag.h \
gsttaginterface.h \
gsttask.h \
gsttrace.h \
gsttrashstack.h \
gsttypefind.h \
@ -198,8 +199,7 @@ gst_headers = \
gstregistry.h \
gstregistrypool.h \
gstparse.h \
gstxml.h \
gsttask.h
gstxml.h
libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
@ -215,15 +215,6 @@ noinst_HEADERS = \
gstarch.h \
cothreads.h
#if GST_DISABLE_OMEGA_COTHREADS
#libcothreads_la_SOURCES =
#libcothreads_la_CFLAGS =
#else
#libcothreads_la_SOURCES = cothreads.c
#libcothreads_la_CFLAGS = $(libgstreamer_@GST_MAJORMINOR@_la_CFLAGS)
#endif
gstmarshal.h: gstmarshal.list
glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
mv gstmarshal.h.tmp gstmarshal.h

View file

@ -65,12 +65,12 @@ gst_autoplug_caps_intersect (const GstCaps * src, const GstCaps * sink)
/* if the caps can't link, there is no intersection */
if (gst_caps_is_empty (caps)) {
gst_caps_free (caps);
gst_caps_unref (caps);
return FALSE;
}
/* hurrah, we can link, now remove the intersection */
gst_caps_free (caps);
gst_caps_unref (caps);
return TRUE;
}

View file

@ -464,11 +464,11 @@ gst_spider_identity_plug (GstSpiderIdentity * ident)
GST_ELEMENT_ERROR (spider, STREAM, CODEC_NOT_FOUND,
(_("There is no element present to handle the stream's mime type %s."), mime), (NULL));
gst_caps_free (src_caps);
gst_caps_unref (src_caps);
return;
}
}
gst_caps_free (src_caps);
gst_caps_unref (src_caps);
}
/* get the direction of our ident */
@ -491,7 +491,7 @@ gst_spider_identity_plug (GstSpiderIdentity * ident)
}
/* now iterate all possible pads and link when needed */
padlist = gst_element_get_pad_list (GST_ELEMENT (spider));
padlist = GST_ELEMENT (spider)->pads;
for (; padlist; padlist = padlist->next) {
GstPad *otherpad;
GstSpiderIdentity *peer;
@ -697,8 +697,8 @@ gst_spider_plug_from_srcpad (GstSpiderConnection * conn, GstPad * srcpad)
caps1 = gst_pad_get_caps (srcpad);
caps2 = gst_pad_get_caps (conn->src->sink);
plugpath = gst_autoplug_sp (caps1, caps2, spider->factories);
gst_caps_free (caps1);
gst_caps_free (caps2);
gst_caps_unref (caps1);
gst_caps_unref (caps2);
/* prints out the path that was found for plugging */
/* g_print ("found path from %s to %s:\n", GST_ELEMENT_NAME (conn->current), GST_ELEMENT_NAME (conn->src));

View file

@ -224,6 +224,7 @@ gst_spider_identity_chain (GstPad * pad, GstBuffer * buf)
gst_buffer_unref (buf);
}
}
GstSpiderIdentity *
gst_spider_identity_new_src (gchar * name)
{
@ -288,7 +289,7 @@ gst_spider_identity_getcaps (GstPad * pad)
if (ident->caps) {
GstCaps *ret2 = gst_caps_intersect (ident->caps, ret);
gst_caps_free (ret);
gst_caps_unref (ret);
ret = ret2;
}
return ret;
@ -387,12 +388,12 @@ gst_spider_identity_change_state (GstElement * element)
gst_pad_get_caps ((GstPad *) GST_PAD_PEER (ident->sink));
if (gst_caps_is_any (caps) || gst_caps_is_empty (caps)) {
gst_spider_identity_start_type_finding (ident);
gst_caps_free (caps);
gst_caps_unref (caps);
break;
} else {
gst_spider_identity_plug (ident);
}
gst_caps_free (caps);
gst_caps_unref (caps);
}
/* autoplug on src */
if ((GST_RPAD_PEER (ident->src) != NULL)
@ -478,7 +479,7 @@ typedef struct
GstCaps *caps;
}
SpiderTypeFind;
guint8 *
static guint8 *
spider_find_peek (gpointer data, gint64 offset, guint size)
{
SpiderTypeFind *find = (SpiderTypeFind *) data;
@ -527,7 +528,7 @@ gst_spider_identity_sink_loop_type_finding (GstSpiderIdentity * ident)
if (!gst_caps_is_empty (find.caps) && !gst_caps_is_any (find.caps)) {
goto plug;
} else {
gst_caps_free (find.caps);
gst_caps_unref (find.caps);
find.caps = NULL;
}

View file

@ -137,6 +137,9 @@ gst_aggregator_class_init (GstAggregatorClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_aggregator_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_aggregator_get_property);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_PADS,
g_param_spec_int ("num_pads", "Num pads", "The number of source pads",
0, G_MAXINT, 0, G_PARAM_READABLE));
@ -152,8 +155,6 @@ gst_aggregator_class_init (GstAggregatorClass * klass)
"The current state of the element", NULL, G_PARAM_READABLE));
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_aggregator_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_aggregator_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_aggregator_get_property);
gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_aggregator_request_new_pad);

View file

@ -408,7 +408,7 @@ gst_fakesrc_event_handler (GstPad * pad, GstEvent * event)
{
GstFakeSrc *src;
src = GST_FAKESRC (gst_object_get_parent (GST_OBJECT (pad)));
src = GST_FAKESRC (GST_PAD_PARENT (pad));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK:
@ -914,7 +914,7 @@ gst_fakesrc_loop (GstPad * pad)
return;
pause:
gst_task_pause (src->task);
gst_task_pause (GST_RPAD_TASK (pad));
GST_STREAM_UNLOCK (pad);
return;
}
@ -933,11 +933,11 @@ gst_fakesrc_activate (GstPad * pad, GstActivateMode mode)
g_return_val_if_fail (fakesrc->has_loop, FALSE);
if (GST_ELEMENT_SCHEDULER (fakesrc)) {
GST_STREAM_LOCK (pad);
fakesrc->task =
GST_RPAD_TASK (pad) =
gst_scheduler_create_task (GST_ELEMENT_SCHEDULER (fakesrc),
(GstTaskFunction) gst_fakesrc_loop, pad);
gst_task_start (fakesrc->task);
gst_task_start (GST_RPAD_TASK (pad));
GST_STREAM_UNLOCK (pad);
result = TRUE;
}
@ -952,10 +952,10 @@ gst_fakesrc_activate (GstPad * pad, GstActivateMode mode)
/* step 2, make sure streaming finishes */
GST_STREAM_LOCK (pad);
/* step 3, stop the task */
if (fakesrc->task) {
gst_task_stop (fakesrc->task);
gst_object_unref (GST_OBJECT (fakesrc->task));
fakesrc->task = NULL;
if (GST_RPAD_TASK (pad)) {
gst_task_stop (GST_RPAD_TASK (pad));
gst_object_unref (GST_OBJECT (GST_RPAD_TASK (pad)));
GST_RPAD_TASK (pad) = NULL;
}
GST_STREAM_UNLOCK (pad);

View file

@ -80,8 +80,6 @@ struct _GstFakeSrc {
gboolean has_getrange;
gboolean eos;
GstTask *task;
GstFakeSrcOutputType output;
GstFakeSrcDataType data;
GstFakeSrcSizeType sizetype;

View file

@ -88,13 +88,12 @@ gst_fdsink_class_init (GstFdSinkClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = gst_fdsink_set_property;
gobject_class->get_property = gst_fdsink_get_property;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FD,
g_param_spec_int ("fd", "fd", "An open file descriptor to write to",
0, G_MAXINT, 1, G_PARAM_READWRITE));
gobject_class->set_property = gst_fdsink_set_property;
gobject_class->get_property = gst_fdsink_get_property;
}
static void

View file

@ -103,6 +103,9 @@ gst_fdsrc_class_init (GstFdSrcClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = gst_fdsrc_set_property;
gobject_class->get_property = gst_fdsrc_get_property;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FD,
g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
0, G_MAXINT, 0, G_PARAM_READWRITE));
@ -119,9 +122,6 @@ gst_fdsrc_class_init (GstFdSrcClass * klass)
G_STRUCT_OFFSET (GstFdSrcClass, timeout), NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
gobject_class->set_property = gst_fdsrc_set_property;
gobject_class->get_property = gst_fdsrc_get_property;
gstelement_class->change_state = gst_fdsrc_change_state;
}

View file

@ -145,6 +145,8 @@ gst_filesink_class_init (GstFileSinkClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = gst_filesink_set_property;
gobject_class->get_property = gst_filesink_get_property;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOCATION,
g_param_spec_string ("location", "File Location",
@ -155,8 +157,6 @@ gst_filesink_class_init (GstFileSinkClass * klass)
G_STRUCT_OFFSET (GstFileSinkClass, handoff), NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
gobject_class->set_property = gst_filesink_set_property;
gobject_class->get_property = gst_filesink_get_property;
gobject_class->dispose = gst_filesink_dispose;
}
static void
@ -363,6 +363,7 @@ gst_filesink_handle_event (GstPad * pad, GstEvent * event)
GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE,
(_("Error while writing to file \"%s\"."), filesink->filename),
GST_ERROR_SYSTEM);
return FALSE;
}
}

View file

@ -392,7 +392,6 @@ gst_md5sink_class_init (GstMD5SinkClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_md5sink_get_property);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MD5,

View file

@ -107,6 +107,8 @@ gst_multifilesrc_class_init (GstMultiFileSrcClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gobject_class->set_property = gst_multifilesrc_set_property;
gobject_class->get_property = gst_multifilesrc_get_property;
gst_multifilesrc_signals[NEW_FILE] =
g_signal_new ("new-file", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
@ -114,16 +116,11 @@ gst_multifilesrc_class_init (GstMultiFileSrcClass * klass)
g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOCATIONS, g_param_spec_pointer ("locations", "locations", "locations", G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HAVENEWMEDIA,
g_param_spec_boolean ("newmedia", "newmedia",
"generate new media events?", FALSE, G_PARAM_READWRITE));
gobject_class->set_property = gst_multifilesrc_set_property;
gobject_class->get_property = gst_multifilesrc_get_property;
gstelement_class->change_state = gst_multifilesrc_change_state;
}

View file

@ -127,6 +127,8 @@ gst_shaper_class_init (GstShaperClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_shaper_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_shaper_get_property);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_POLICY,
g_param_spec_enum ("policy", "Policy", "Shaper policy",
@ -138,9 +140,6 @@ gst_shaper_class_init (GstShaperClass * klass)
g_param_spec_string ("last-message", "last-message", "last-message",
NULL, G_PARAM_READABLE));
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_shaper_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_shaper_get_property);
gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_shaper_request_new_pad);
}

View file

@ -124,6 +124,8 @@ gst_statistics_class_init (GstStatisticsClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_statistics_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_statistics_get_property);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BUFFERS,
g_param_spec_int64 ("buffers", "buffers", "total buffers count",
@ -162,8 +164,6 @@ gst_statistics_class_init (GstStatisticsClass * klass)
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_statistics_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_statistics_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_statistics_get_property);
}
static void

View file

@ -350,7 +350,7 @@ free_entry (TypeFindEntry * entry)
free_entry_buffers (entry);
if (entry->caps)
gst_caps_free (entry->caps);
gst_caps_unref (entry->caps);
g_free (entry);
}
static void
@ -484,6 +484,7 @@ gst_type_find_element_handle_event (GstPad * pad, GstEvent * event)
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE],
0, entry->probability, entry->caps);
stop_typefinding (typefind);
push_buffer_store (typefind);
gst_pad_event_default (pad, event);
} else {
gst_pad_event_default (pad, event);

View file

@ -346,8 +346,8 @@ gst_bin_add_func (GstBin * bin, GstElement * element)
goto duplicate_name;
/* set the element's parent and add the element to the bin's list of children */
if (G_UNLIKELY (!gst_object_set_parent (GST_OBJECT (element),
GST_OBJECT (bin))))
if (G_UNLIKELY (!gst_object_set_parent (GST_OBJECT_CAST (element),
GST_OBJECT_CAST (bin))))
goto had_parent;
bin->children = g_list_prepend (bin->children, element);
@ -471,12 +471,12 @@ gst_bin_remove_func (GstBin * bin, GstElement * element)
/* we ref here because after the _unparent() the element can be disposed
* and we still need it to fire a signal. */
gst_object_ref (GST_OBJECT (element));
gst_object_unparent (GST_OBJECT (element));
gst_object_ref (GST_OBJECT_CAST (element));
gst_object_unparent (GST_OBJECT_CAST (element));
g_signal_emit (G_OBJECT (bin), gst_bin_signals[ELEMENT_REMOVED], 0, element);
/* element is really out of our control now */
gst_object_unref (GST_OBJECT (element));
gst_object_unref (GST_OBJECT_CAST (element));
return TRUE;
@ -629,12 +629,6 @@ gst_bin_iterate_recurse (GstBin * bin)
return result;
}
GstIterator *
gst_bin_iterate_recurse_up (GstBin * bin)
{
return NULL;
}
/* returns 0 if the element is a sink, this is made so that
* we can use this function as a filter
*
@ -718,6 +712,8 @@ bin_element_is_sink (GstElement * child, GstBin * bin)
* Each element will have its refcount increased, so unref
* after usage.
*
* The sink elements are those without any linked srcpads.
*
* Returns: a #GstIterator of #GstElements. gst_iterator_free after use.
*
* MT safe.
@ -1170,6 +1166,7 @@ gst_bin_get_by_interface (GstBin * bin, GType interface)
*
* Returns: An iterator for the elements inside the bin implementing the interface.
*
* MT safe.
*/
GstIterator *
gst_bin_iterate_all_by_interface (GstBin * bin, GType interface)

View file

@ -117,7 +117,6 @@ GstElement* gst_bin_get_by_interface (GstBin *bin, GType interface);
/* retrieve multiple children */
GstIterator* gst_bin_iterate_elements (GstBin *bin);
GstIterator* gst_bin_iterate_recurse (GstBin *bin);
GstIterator* gst_bin_iterate_recurse_up (GstBin *bin);
GstIterator* gst_bin_iterate_sinks (GstBin *bin);
GstIterator* gst_bin_iterate_all_by_interface (GstBin *bin, GType interface);

View file

@ -271,7 +271,8 @@ gst_buffer_new_and_alloc (guint size)
* Returns: the #GstCaps, or NULL if there was an error or there
* were no caps on this buffer.
*/
/* FIXME can we make this threadsafe without a lock on the buffer? */
/* FIXME can we make this threadsafe without a lock on the buffer?
* We can use compare and swap and atomic reads. */
GstCaps *
gst_buffer_get_caps (GstBuffer * buffer)
{
@ -289,7 +290,10 @@ gst_buffer_get_caps (GstBuffer * buffer)
* be increased and any previous caps on the buffer will be
* unreffed.
*/
/* FIXME can we make this threadsafe without a lock on the buffer? */
/* FIXME can we make this threadsafe without a lock on the buffer?
* We can use compare and swap and atomic reads. Another idea is to
* not attach the caps to the buffer but use an event to signal a caps
* change. */
void
gst_buffer_set_caps (GstBuffer * buffer, GstCaps * caps)
{

View file

@ -148,13 +148,6 @@ void gst_caps_replace (GstCaps
gchar * gst_caps_to_string (const GstCaps *caps);
GstCaps * gst_caps_from_string (const gchar *string);
gboolean gst_caps_structure_fixate_field_nearest_int (GstStructure *structure,
const char *field_name,
int target);
gboolean gst_caps_structure_fixate_field_nearest_double (GstStructure *structure,
const char *field_name,
double target);
G_END_DECLS
#endif /* __GST_CAPS_H__ */

View file

@ -35,7 +35,7 @@ G_BEGIN_DECLS
GST_EXPORT GType _gst_event_type;
/**
* GstBufferFlag:
* GstEventType:
* @GST_EVENT_UNKNOWN:
* @GST_EVENT_EOS:
* @GST_EVENT_FLUSH:
@ -59,6 +59,7 @@ typedef enum {
GST_EVENT_NAVIGATION = 10,
GST_EVENT_TAG = 11
} GstEventType;
#define GST_EVENT_ANY GST_EVENT_NAVIGATION
#define GST_EVENT_TRACE_NAME "GstEvent"

View file

@ -478,7 +478,6 @@ void gst_pad_set_activate_function (GstPad *pad, GstPadActivateFunction activ
void gst_pad_set_loop_function (GstPad *pad, GstPadLoopFunction loop);
void gst_pad_set_chain_function (GstPad *pad, GstPadChainFunction chain);
void gst_pad_set_getrange_function (GstPad *pad, GstPadGetRangeFunction get);
void gst_pad_set_event_function (GstPad *pad, GstPadEventFunction event);
void gst_pad_set_event_mask_function (GstPad *pad, GstPadEventMaskFunction mask_func);
G_CONST_RETURN GstEventMask*

View file

@ -313,7 +313,6 @@ pipeline_bus_handler (GstBus * bus, GstMessage * message,
return result;
}
/**
* gst_pipeline_new:
* @name: name of new pipeline

View file

@ -26,8 +26,6 @@
#include <gst/gstelement.h>
#include <gst/gsttask.h>
G_BEGIN_DECLS
@ -88,7 +86,7 @@ struct _GstQueue {
GCond *item_add; /* signals buffers now available for reading */
GCond *item_del; /* signals space now available for writing */
gpointer _gst_reserved[GST_PADDING - 1];
gpointer _gst_reserved[GST_PADDING];
};
struct _GstQueueClass {

View file

@ -30,6 +30,7 @@
#include <gst/gstinfo.h>
#include <gst/gstplugin.h>
#include <gst/gstversion.h>
#include <gst/gstutils.h>
#include "bytestream.h"
GST_DEBUG_CATEGORY_STATIC (debug_bs);

View file

@ -22,3 +22,10 @@ install-data-local: as-libtool-install-data-local
uninstall-local: as-libtool-uninstall-local
include $(top_srcdir)/common/as-libtool.mak
# regression test
check_PROGRAMS = dataprotocol-test
dataprotocol_test_SOURCES = dataprotocol-test.c dataprotocol.c
dataprotocol_test_CFLAGS = $(GST_LIB_CFLAGS) -I$(top_srcdir)/libs -DGST_ENABLE_NEW
dataprotocol_test_LDADD = $(GST_OBJ_LIBS)
TESTS = $(check_PROGRAMS)

View file

@ -137,6 +137,9 @@ gst_aggregator_class_init (GstAggregatorClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_aggregator_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_aggregator_get_property);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_PADS,
g_param_spec_int ("num_pads", "Num pads", "The number of source pads",
0, G_MAXINT, 0, G_PARAM_READABLE));
@ -152,8 +155,6 @@ gst_aggregator_class_init (GstAggregatorClass * klass)
"The current state of the element", NULL, G_PARAM_READABLE));
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_aggregator_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_aggregator_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_aggregator_get_property);
gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_aggregator_request_new_pad);

View file

@ -408,7 +408,7 @@ gst_fakesrc_event_handler (GstPad * pad, GstEvent * event)
{
GstFakeSrc *src;
src = GST_FAKESRC (gst_object_get_parent (GST_OBJECT (pad)));
src = GST_FAKESRC (GST_PAD_PARENT (pad));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK:
@ -914,7 +914,7 @@ gst_fakesrc_loop (GstPad * pad)
return;
pause:
gst_task_pause (src->task);
gst_task_pause (GST_RPAD_TASK (pad));
GST_STREAM_UNLOCK (pad);
return;
}
@ -933,11 +933,11 @@ gst_fakesrc_activate (GstPad * pad, GstActivateMode mode)
g_return_val_if_fail (fakesrc->has_loop, FALSE);
if (GST_ELEMENT_SCHEDULER (fakesrc)) {
GST_STREAM_LOCK (pad);
fakesrc->task =
GST_RPAD_TASK (pad) =
gst_scheduler_create_task (GST_ELEMENT_SCHEDULER (fakesrc),
(GstTaskFunction) gst_fakesrc_loop, pad);
gst_task_start (fakesrc->task);
gst_task_start (GST_RPAD_TASK (pad));
GST_STREAM_UNLOCK (pad);
result = TRUE;
}
@ -952,10 +952,10 @@ gst_fakesrc_activate (GstPad * pad, GstActivateMode mode)
/* step 2, make sure streaming finishes */
GST_STREAM_LOCK (pad);
/* step 3, stop the task */
if (fakesrc->task) {
gst_task_stop (fakesrc->task);
gst_object_unref (GST_OBJECT (fakesrc->task));
fakesrc->task = NULL;
if (GST_RPAD_TASK (pad)) {
gst_task_stop (GST_RPAD_TASK (pad));
gst_object_unref (GST_OBJECT (GST_RPAD_TASK (pad)));
GST_RPAD_TASK (pad) = NULL;
}
GST_STREAM_UNLOCK (pad);

View file

@ -80,8 +80,6 @@ struct _GstFakeSrc {
gboolean has_getrange;
gboolean eos;
GstTask *task;
GstFakeSrcOutputType output;
GstFakeSrcDataType data;
GstFakeSrcSizeType sizetype;

View file

@ -88,13 +88,12 @@ gst_fdsink_class_init (GstFdSinkClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = gst_fdsink_set_property;
gobject_class->get_property = gst_fdsink_get_property;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FD,
g_param_spec_int ("fd", "fd", "An open file descriptor to write to",
0, G_MAXINT, 1, G_PARAM_READWRITE));
gobject_class->set_property = gst_fdsink_set_property;
gobject_class->get_property = gst_fdsink_get_property;
}
static void

View file

@ -103,6 +103,9 @@ gst_fdsrc_class_init (GstFdSrcClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = gst_fdsrc_set_property;
gobject_class->get_property = gst_fdsrc_get_property;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FD,
g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
0, G_MAXINT, 0, G_PARAM_READWRITE));
@ -119,9 +122,6 @@ gst_fdsrc_class_init (GstFdSrcClass * klass)
G_STRUCT_OFFSET (GstFdSrcClass, timeout), NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
gobject_class->set_property = gst_fdsrc_set_property;
gobject_class->get_property = gst_fdsrc_get_property;
gstelement_class->change_state = gst_fdsrc_change_state;
}

View file

@ -145,6 +145,8 @@ gst_filesink_class_init (GstFileSinkClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = gst_filesink_set_property;
gobject_class->get_property = gst_filesink_get_property;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOCATION,
g_param_spec_string ("location", "File Location",
@ -155,8 +157,6 @@ gst_filesink_class_init (GstFileSinkClass * klass)
G_STRUCT_OFFSET (GstFileSinkClass, handoff), NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
gobject_class->set_property = gst_filesink_set_property;
gobject_class->get_property = gst_filesink_get_property;
gobject_class->dispose = gst_filesink_dispose;
}
static void
@ -363,6 +363,7 @@ gst_filesink_handle_event (GstPad * pad, GstEvent * event)
GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE,
(_("Error while writing to file \"%s\"."), filesink->filename),
GST_ERROR_SYSTEM);
return FALSE;
}
}

View file

@ -392,7 +392,6 @@ gst_md5sink_class_init (GstMD5SinkClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_md5sink_get_property);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MD5,

View file

@ -107,6 +107,8 @@ gst_multifilesrc_class_init (GstMultiFileSrcClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gobject_class->set_property = gst_multifilesrc_set_property;
gobject_class->get_property = gst_multifilesrc_get_property;
gst_multifilesrc_signals[NEW_FILE] =
g_signal_new ("new-file", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
@ -114,16 +116,11 @@ gst_multifilesrc_class_init (GstMultiFileSrcClass * klass)
g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOCATIONS, g_param_spec_pointer ("locations", "locations", "locations", G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HAVENEWMEDIA,
g_param_spec_boolean ("newmedia", "newmedia",
"generate new media events?", FALSE, G_PARAM_READWRITE));
gobject_class->set_property = gst_multifilesrc_set_property;
gobject_class->get_property = gst_multifilesrc_get_property;
gstelement_class->change_state = gst_multifilesrc_change_state;
}

View file

@ -26,8 +26,6 @@
#include <gst/gstelement.h>
#include <gst/gsttask.h>
G_BEGIN_DECLS
@ -88,7 +86,7 @@ struct _GstQueue {
GCond *item_add; /* signals buffers now available for reading */
GCond *item_del; /* signals space now available for writing */
gpointer _gst_reserved[GST_PADDING - 1];
gpointer _gst_reserved[GST_PADDING];
};
struct _GstQueueClass {

View file

@ -127,6 +127,8 @@ gst_shaper_class_init (GstShaperClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_shaper_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_shaper_get_property);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_POLICY,
g_param_spec_enum ("policy", "Policy", "Shaper policy",
@ -138,9 +140,6 @@ gst_shaper_class_init (GstShaperClass * klass)
g_param_spec_string ("last-message", "last-message", "last-message",
NULL, G_PARAM_READABLE));
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_shaper_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_shaper_get_property);
gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_shaper_request_new_pad);
}

View file

@ -124,6 +124,8 @@ gst_statistics_class_init (GstStatisticsClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_statistics_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_statistics_get_property);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BUFFERS,
g_param_spec_int64 ("buffers", "buffers", "total buffers count",
@ -162,8 +164,6 @@ gst_statistics_class_init (GstStatisticsClass * klass)
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_statistics_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_statistics_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_statistics_get_property);
}
static void

View file

@ -350,7 +350,7 @@ free_entry (TypeFindEntry * entry)
free_entry_buffers (entry);
if (entry->caps)
gst_caps_free (entry->caps);
gst_caps_unref (entry->caps);
g_free (entry);
}
static void
@ -484,6 +484,7 @@ gst_type_find_element_handle_event (GstPad * pad, GstEvent * event)
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE],
0, entry->probability, entry->caps);
stop_typefinding (typefind);
push_buffer_store (typefind);
gst_pad_event_default (pad, event);
} else {
gst_pad_event_default (pad, event);

View file

@ -37,7 +37,7 @@ bin_PROGRAMS = \
$(GST_REGISTRY_SRC) $(GST_REGISTRY_SRC_V) \
$(GST_LOADSAVE_SRC) $(GST_LOADSAVE_SRC_V) \
$(GST_OTHER_SRC) $(GST_OTHER_SRC_V)
bin_SCRIPTS =
bin_SCRIPTS = gst-feedback-@GST_MAJORMINOR@
# make sure each versioned tool has the right source file and flags
if !GST_DISABLE_REGISTRY

View file

@ -410,7 +410,6 @@ event_loop (GstElement * pipeline, gboolean blocking)
return TRUE;
}
int
main (int argc, char *argv[])
{