mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
Small cleanups, backports from HEAD.
Original commit message from CVS: Small cleanups, backports from HEAD.
This commit is contained in:
parent
6c611baadf
commit
81f1e2e671
41 changed files with 137 additions and 120 deletions
40
ChangeLog
40
ChangeLog
|
@ -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>
|
2005-03-10 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/base/gstbasesink.c: (gst_basesink_change_state):
|
* gst/base/gstbasesink.c: (gst_basesink_change_state):
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit b2638c100721f67b280c3b43b21f1ce1c9b5e316
|
Subproject commit 131c2632127e6f061b5270d8f80651782a4fdd13
|
|
@ -187,6 +187,7 @@ gst_headers = \
|
||||||
gstsystemclock.h \
|
gstsystemclock.h \
|
||||||
gsttag.h \
|
gsttag.h \
|
||||||
gsttaginterface.h \
|
gsttaginterface.h \
|
||||||
|
gsttask.h \
|
||||||
gsttrace.h \
|
gsttrace.h \
|
||||||
gsttrashstack.h \
|
gsttrashstack.h \
|
||||||
gsttypefind.h \
|
gsttypefind.h \
|
||||||
|
@ -198,8 +199,7 @@ gst_headers = \
|
||||||
gstregistry.h \
|
gstregistry.h \
|
||||||
gstregistrypool.h \
|
gstregistrypool.h \
|
||||||
gstparse.h \
|
gstparse.h \
|
||||||
gstxml.h \
|
gstxml.h
|
||||||
gsttask.h
|
|
||||||
|
|
||||||
libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
|
libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
|
||||||
nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
|
nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
|
||||||
|
@ -215,15 +215,6 @@ noinst_HEADERS = \
|
||||||
gstarch.h \
|
gstarch.h \
|
||||||
cothreads.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
|
gstmarshal.h: gstmarshal.list
|
||||||
glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
|
glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
|
||||||
mv gstmarshal.h.tmp gstmarshal.h
|
mv gstmarshal.h.tmp gstmarshal.h
|
||||||
|
|
|
@ -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 the caps can't link, there is no intersection */
|
||||||
if (gst_caps_is_empty (caps)) {
|
if (gst_caps_is_empty (caps)) {
|
||||||
gst_caps_free (caps);
|
gst_caps_unref (caps);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hurrah, we can link, now remove the intersection */
|
/* hurrah, we can link, now remove the intersection */
|
||||||
gst_caps_free (caps);
|
gst_caps_unref (caps);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -464,11 +464,11 @@ gst_spider_identity_plug (GstSpiderIdentity * ident)
|
||||||
|
|
||||||
GST_ELEMENT_ERROR (spider, STREAM, CODEC_NOT_FOUND,
|
GST_ELEMENT_ERROR (spider, STREAM, CODEC_NOT_FOUND,
|
||||||
(_("There is no element present to handle the stream's mime type %s."), mime), (NULL));
|
(_("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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gst_caps_free (src_caps);
|
gst_caps_unref (src_caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the direction of our ident */
|
/* 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 */
|
/* 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) {
|
for (; padlist; padlist = padlist->next) {
|
||||||
GstPad *otherpad;
|
GstPad *otherpad;
|
||||||
GstSpiderIdentity *peer;
|
GstSpiderIdentity *peer;
|
||||||
|
@ -697,8 +697,8 @@ gst_spider_plug_from_srcpad (GstSpiderConnection * conn, GstPad * srcpad)
|
||||||
caps1 = gst_pad_get_caps (srcpad);
|
caps1 = gst_pad_get_caps (srcpad);
|
||||||
caps2 = gst_pad_get_caps (conn->src->sink);
|
caps2 = gst_pad_get_caps (conn->src->sink);
|
||||||
plugpath = gst_autoplug_sp (caps1, caps2, spider->factories);
|
plugpath = gst_autoplug_sp (caps1, caps2, spider->factories);
|
||||||
gst_caps_free (caps1);
|
gst_caps_unref (caps1);
|
||||||
gst_caps_free (caps2);
|
gst_caps_unref (caps2);
|
||||||
|
|
||||||
/* prints out the path that was found for plugging */
|
/* 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));
|
/* g_print ("found path from %s to %s:\n", GST_ELEMENT_NAME (conn->current), GST_ELEMENT_NAME (conn->src));
|
||||||
|
|
|
@ -224,6 +224,7 @@ gst_spider_identity_chain (GstPad * pad, GstBuffer * buf)
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GstSpiderIdentity *
|
GstSpiderIdentity *
|
||||||
gst_spider_identity_new_src (gchar * name)
|
gst_spider_identity_new_src (gchar * name)
|
||||||
{
|
{
|
||||||
|
@ -288,7 +289,7 @@ gst_spider_identity_getcaps (GstPad * pad)
|
||||||
if (ident->caps) {
|
if (ident->caps) {
|
||||||
GstCaps *ret2 = gst_caps_intersect (ident->caps, ret);
|
GstCaps *ret2 = gst_caps_intersect (ident->caps, ret);
|
||||||
|
|
||||||
gst_caps_free (ret);
|
gst_caps_unref (ret);
|
||||||
ret = ret2;
|
ret = ret2;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -387,12 +388,12 @@ gst_spider_identity_change_state (GstElement * element)
|
||||||
gst_pad_get_caps ((GstPad *) GST_PAD_PEER (ident->sink));
|
gst_pad_get_caps ((GstPad *) GST_PAD_PEER (ident->sink));
|
||||||
if (gst_caps_is_any (caps) || gst_caps_is_empty (caps)) {
|
if (gst_caps_is_any (caps) || gst_caps_is_empty (caps)) {
|
||||||
gst_spider_identity_start_type_finding (ident);
|
gst_spider_identity_start_type_finding (ident);
|
||||||
gst_caps_free (caps);
|
gst_caps_unref (caps);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
gst_spider_identity_plug (ident);
|
gst_spider_identity_plug (ident);
|
||||||
}
|
}
|
||||||
gst_caps_free (caps);
|
gst_caps_unref (caps);
|
||||||
}
|
}
|
||||||
/* autoplug on src */
|
/* autoplug on src */
|
||||||
if ((GST_RPAD_PEER (ident->src) != NULL)
|
if ((GST_RPAD_PEER (ident->src) != NULL)
|
||||||
|
@ -478,7 +479,7 @@ typedef struct
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
}
|
}
|
||||||
SpiderTypeFind;
|
SpiderTypeFind;
|
||||||
guint8 *
|
static guint8 *
|
||||||
spider_find_peek (gpointer data, gint64 offset, guint size)
|
spider_find_peek (gpointer data, gint64 offset, guint size)
|
||||||
{
|
{
|
||||||
SpiderTypeFind *find = (SpiderTypeFind *) data;
|
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)) {
|
if (!gst_caps_is_empty (find.caps) && !gst_caps_is_any (find.caps)) {
|
||||||
goto plug;
|
goto plug;
|
||||||
} else {
|
} else {
|
||||||
gst_caps_free (find.caps);
|
gst_caps_unref (find.caps);
|
||||||
find.caps = NULL;
|
find.caps = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,9 @@ gst_aggregator_class_init (GstAggregatorClass * klass)
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = (GObjectClass *) klass;
|
||||||
gstelement_class = (GstElementClass *) 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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_PADS,
|
||||||
g_param_spec_int ("num_pads", "Num pads", "The number of source pads",
|
g_param_spec_int ("num_pads", "Num pads", "The number of source pads",
|
||||||
0, G_MAXINT, 0, G_PARAM_READABLE));
|
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));
|
"The current state of the element", NULL, G_PARAM_READABLE));
|
||||||
|
|
||||||
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_aggregator_finalize);
|
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 =
|
gstelement_class->request_new_pad =
|
||||||
GST_DEBUG_FUNCPTR (gst_aggregator_request_new_pad);
|
GST_DEBUG_FUNCPTR (gst_aggregator_request_new_pad);
|
||||||
|
|
|
@ -408,7 +408,7 @@ gst_fakesrc_event_handler (GstPad * pad, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstFakeSrc *src;
|
GstFakeSrc *src;
|
||||||
|
|
||||||
src = GST_FAKESRC (gst_object_get_parent (GST_OBJECT (pad)));
|
src = GST_FAKESRC (GST_PAD_PARENT (pad));
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_SEEK:
|
case GST_EVENT_SEEK:
|
||||||
|
@ -914,7 +914,7 @@ gst_fakesrc_loop (GstPad * pad)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pause:
|
pause:
|
||||||
gst_task_pause (src->task);
|
gst_task_pause (GST_RPAD_TASK (pad));
|
||||||
GST_STREAM_UNLOCK (pad);
|
GST_STREAM_UNLOCK (pad);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -933,11 +933,11 @@ gst_fakesrc_activate (GstPad * pad, GstActivateMode mode)
|
||||||
g_return_val_if_fail (fakesrc->has_loop, FALSE);
|
g_return_val_if_fail (fakesrc->has_loop, FALSE);
|
||||||
if (GST_ELEMENT_SCHEDULER (fakesrc)) {
|
if (GST_ELEMENT_SCHEDULER (fakesrc)) {
|
||||||
GST_STREAM_LOCK (pad);
|
GST_STREAM_LOCK (pad);
|
||||||
fakesrc->task =
|
GST_RPAD_TASK (pad) =
|
||||||
gst_scheduler_create_task (GST_ELEMENT_SCHEDULER (fakesrc),
|
gst_scheduler_create_task (GST_ELEMENT_SCHEDULER (fakesrc),
|
||||||
(GstTaskFunction) gst_fakesrc_loop, pad);
|
(GstTaskFunction) gst_fakesrc_loop, pad);
|
||||||
|
|
||||||
gst_task_start (fakesrc->task);
|
gst_task_start (GST_RPAD_TASK (pad));
|
||||||
GST_STREAM_UNLOCK (pad);
|
GST_STREAM_UNLOCK (pad);
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -952,10 +952,10 @@ gst_fakesrc_activate (GstPad * pad, GstActivateMode mode)
|
||||||
/* step 2, make sure streaming finishes */
|
/* step 2, make sure streaming finishes */
|
||||||
GST_STREAM_LOCK (pad);
|
GST_STREAM_LOCK (pad);
|
||||||
/* step 3, stop the task */
|
/* step 3, stop the task */
|
||||||
if (fakesrc->task) {
|
if (GST_RPAD_TASK (pad)) {
|
||||||
gst_task_stop (fakesrc->task);
|
gst_task_stop (GST_RPAD_TASK (pad));
|
||||||
gst_object_unref (GST_OBJECT (fakesrc->task));
|
gst_object_unref (GST_OBJECT (GST_RPAD_TASK (pad)));
|
||||||
fakesrc->task = NULL;
|
GST_RPAD_TASK (pad) = NULL;
|
||||||
}
|
}
|
||||||
GST_STREAM_UNLOCK (pad);
|
GST_STREAM_UNLOCK (pad);
|
||||||
|
|
||||||
|
|
|
@ -80,8 +80,6 @@ struct _GstFakeSrc {
|
||||||
gboolean has_getrange;
|
gboolean has_getrange;
|
||||||
gboolean eos;
|
gboolean eos;
|
||||||
|
|
||||||
GstTask *task;
|
|
||||||
|
|
||||||
GstFakeSrcOutputType output;
|
GstFakeSrcOutputType output;
|
||||||
GstFakeSrcDataType data;
|
GstFakeSrcDataType data;
|
||||||
GstFakeSrcSizeType sizetype;
|
GstFakeSrcSizeType sizetype;
|
||||||
|
|
|
@ -88,13 +88,12 @@ gst_fdsink_class_init (GstFdSinkClass * klass)
|
||||||
|
|
||||||
gobject_class = G_OBJECT_CLASS (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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FD,
|
||||||
g_param_spec_int ("fd", "fd", "An open file descriptor to write to",
|
g_param_spec_int ("fd", "fd", "An open file descriptor to write to",
|
||||||
0, G_MAXINT, 1, G_PARAM_READWRITE));
|
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
|
static void
|
||||||
|
|
|
@ -103,6 +103,9 @@ gst_fdsrc_class_init (GstFdSrcClass * klass)
|
||||||
|
|
||||||
gobject_class = G_OBJECT_CLASS (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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FD,
|
||||||
g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
|
g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
|
||||||
0, G_MAXINT, 0, G_PARAM_READWRITE));
|
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_STRUCT_OFFSET (GstFdSrcClass, timeout), NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
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;
|
gstelement_class->change_state = gst_fdsrc_change_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,6 +145,8 @@ gst_filesink_class_init (GstFileSinkClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOCATION,
|
||||||
g_param_spec_string ("location", "File 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_STRUCT_OFFSET (GstFileSinkClass, handoff), NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
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;
|
gobject_class->dispose = gst_filesink_dispose;
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
|
@ -363,6 +363,7 @@ gst_filesink_handle_event (GstPad * pad, GstEvent * event)
|
||||||
GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE,
|
GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE,
|
||||||
(_("Error while writing to file \"%s\"."), filesink->filename),
|
(_("Error while writing to file \"%s\"."), filesink->filename),
|
||||||
GST_ERROR_SYSTEM);
|
GST_ERROR_SYSTEM);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -392,7 +392,6 @@ gst_md5sink_class_init (GstMD5SinkClass * klass)
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = (GObjectClass *) klass;
|
||||||
gstelement_class = (GstElementClass *) klass;
|
gstelement_class = (GstElementClass *) klass;
|
||||||
|
|
||||||
|
|
||||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_md5sink_get_property);
|
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_md5sink_get_property);
|
||||||
|
|
||||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MD5,
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MD5,
|
||||||
|
|
|
@ -107,6 +107,8 @@ gst_multifilesrc_class_init (GstMultiFileSrcClass * klass)
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = (GObjectClass *) klass;
|
||||||
gstelement_class = (GstElementClass *) 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] =
|
gst_multifilesrc_signals[NEW_FILE] =
|
||||||
g_signal_new ("new-file", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
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_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_LOCATIONS, g_param_spec_pointer ("locations", "locations", "locations", G_PARAM_READWRITE)); /* CHECKME */
|
||||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HAVENEWMEDIA,
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HAVENEWMEDIA,
|
||||||
g_param_spec_boolean ("newmedia", "newmedia",
|
g_param_spec_boolean ("newmedia", "newmedia",
|
||||||
"generate new media events?", FALSE, G_PARAM_READWRITE));
|
"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;
|
gstelement_class->change_state = gst_multifilesrc_change_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,8 @@ gst_shaper_class_init (GstShaperClass * klass)
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = (GObjectClass *) klass;
|
||||||
gstelement_class = (GstElementClass *) 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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_POLICY,
|
||||||
g_param_spec_enum ("policy", "Policy", "Shaper 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",
|
g_param_spec_string ("last-message", "last-message", "last-message",
|
||||||
NULL, G_PARAM_READABLE));
|
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 =
|
gstelement_class->request_new_pad =
|
||||||
GST_DEBUG_FUNCPTR (gst_shaper_request_new_pad);
|
GST_DEBUG_FUNCPTR (gst_shaper_request_new_pad);
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,6 +124,8 @@ gst_statistics_class_init (GstStatisticsClass * klass)
|
||||||
|
|
||||||
gobject_class = G_OBJECT_CLASS (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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BUFFERS,
|
||||||
g_param_spec_int64 ("buffers", "buffers", "total buffers count",
|
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);
|
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
||||||
|
|
||||||
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_statistics_finalize);
|
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
|
static void
|
||||||
|
|
|
@ -350,7 +350,7 @@ free_entry (TypeFindEntry * entry)
|
||||||
free_entry_buffers (entry);
|
free_entry_buffers (entry);
|
||||||
|
|
||||||
if (entry->caps)
|
if (entry->caps)
|
||||||
gst_caps_free (entry->caps);
|
gst_caps_unref (entry->caps);
|
||||||
g_free (entry);
|
g_free (entry);
|
||||||
}
|
}
|
||||||
static void
|
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],
|
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE],
|
||||||
0, entry->probability, entry->caps);
|
0, entry->probability, entry->caps);
|
||||||
stop_typefinding (typefind);
|
stop_typefinding (typefind);
|
||||||
|
push_buffer_store (typefind);
|
||||||
gst_pad_event_default (pad, event);
|
gst_pad_event_default (pad, event);
|
||||||
} else {
|
} else {
|
||||||
gst_pad_event_default (pad, event);
|
gst_pad_event_default (pad, event);
|
||||||
|
|
19
gst/gstbin.c
19
gst/gstbin.c
|
@ -346,8 +346,8 @@ gst_bin_add_func (GstBin * bin, GstElement * element)
|
||||||
goto duplicate_name;
|
goto duplicate_name;
|
||||||
|
|
||||||
/* set the element's parent and add the element to the bin's list of children */
|
/* 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),
|
if (G_UNLIKELY (!gst_object_set_parent (GST_OBJECT_CAST (element),
|
||||||
GST_OBJECT (bin))))
|
GST_OBJECT_CAST (bin))))
|
||||||
goto had_parent;
|
goto had_parent;
|
||||||
|
|
||||||
bin->children = g_list_prepend (bin->children, element);
|
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
|
/* we ref here because after the _unparent() the element can be disposed
|
||||||
* and we still need it to fire a signal. */
|
* and we still need it to fire a signal. */
|
||||||
gst_object_ref (GST_OBJECT (element));
|
gst_object_ref (GST_OBJECT_CAST (element));
|
||||||
gst_object_unparent (GST_OBJECT (element));
|
gst_object_unparent (GST_OBJECT_CAST (element));
|
||||||
|
|
||||||
g_signal_emit (G_OBJECT (bin), gst_bin_signals[ELEMENT_REMOVED], 0, element);
|
g_signal_emit (G_OBJECT (bin), gst_bin_signals[ELEMENT_REMOVED], 0, element);
|
||||||
/* element is really out of our control now */
|
/* element is really out of our control now */
|
||||||
gst_object_unref (GST_OBJECT (element));
|
gst_object_unref (GST_OBJECT_CAST (element));
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
@ -629,12 +629,6 @@ gst_bin_iterate_recurse (GstBin * bin)
|
||||||
return result;
|
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
|
/* returns 0 if the element is a sink, this is made so that
|
||||||
* we can use this function as a filter
|
* 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
|
* Each element will have its refcount increased, so unref
|
||||||
* after usage.
|
* after usage.
|
||||||
*
|
*
|
||||||
|
* The sink elements are those without any linked srcpads.
|
||||||
|
*
|
||||||
* Returns: a #GstIterator of #GstElements. gst_iterator_free after use.
|
* Returns: a #GstIterator of #GstElements. gst_iterator_free after use.
|
||||||
*
|
*
|
||||||
* MT safe.
|
* 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.
|
* Returns: An iterator for the elements inside the bin implementing the interface.
|
||||||
*
|
*
|
||||||
|
* MT safe.
|
||||||
*/
|
*/
|
||||||
GstIterator *
|
GstIterator *
|
||||||
gst_bin_iterate_all_by_interface (GstBin * bin, GType interface)
|
gst_bin_iterate_all_by_interface (GstBin * bin, GType interface)
|
||||||
|
|
|
@ -117,7 +117,6 @@ GstElement* gst_bin_get_by_interface (GstBin *bin, GType interface);
|
||||||
/* retrieve multiple children */
|
/* retrieve multiple children */
|
||||||
GstIterator* gst_bin_iterate_elements (GstBin *bin);
|
GstIterator* gst_bin_iterate_elements (GstBin *bin);
|
||||||
GstIterator* gst_bin_iterate_recurse (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_sinks (GstBin *bin);
|
||||||
GstIterator* gst_bin_iterate_all_by_interface (GstBin *bin, GType interface);
|
GstIterator* gst_bin_iterate_all_by_interface (GstBin *bin, GType interface);
|
||||||
|
|
|
@ -271,7 +271,8 @@ gst_buffer_new_and_alloc (guint size)
|
||||||
* Returns: the #GstCaps, or NULL if there was an error or there
|
* Returns: the #GstCaps, or NULL if there was an error or there
|
||||||
* were no caps on this buffer.
|
* 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 *
|
GstCaps *
|
||||||
gst_buffer_get_caps (GstBuffer * buffer)
|
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
|
* be increased and any previous caps on the buffer will be
|
||||||
* unreffed.
|
* 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
|
void
|
||||||
gst_buffer_set_caps (GstBuffer * buffer, GstCaps * caps)
|
gst_buffer_set_caps (GstBuffer * buffer, GstCaps * caps)
|
||||||
{
|
{
|
||||||
|
|
|
@ -148,13 +148,6 @@ void gst_caps_replace (GstCaps
|
||||||
gchar * gst_caps_to_string (const GstCaps *caps);
|
gchar * gst_caps_to_string (const GstCaps *caps);
|
||||||
GstCaps * gst_caps_from_string (const gchar *string);
|
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
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_CAPS_H__ */
|
#endif /* __GST_CAPS_H__ */
|
||||||
|
|
|
@ -35,7 +35,7 @@ G_BEGIN_DECLS
|
||||||
GST_EXPORT GType _gst_event_type;
|
GST_EXPORT GType _gst_event_type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstBufferFlag:
|
* GstEventType:
|
||||||
* @GST_EVENT_UNKNOWN:
|
* @GST_EVENT_UNKNOWN:
|
||||||
* @GST_EVENT_EOS:
|
* @GST_EVENT_EOS:
|
||||||
* @GST_EVENT_FLUSH:
|
* @GST_EVENT_FLUSH:
|
||||||
|
@ -59,6 +59,7 @@ typedef enum {
|
||||||
GST_EVENT_NAVIGATION = 10,
|
GST_EVENT_NAVIGATION = 10,
|
||||||
GST_EVENT_TAG = 11
|
GST_EVENT_TAG = 11
|
||||||
} GstEventType;
|
} GstEventType;
|
||||||
|
#define GST_EVENT_ANY GST_EVENT_NAVIGATION
|
||||||
|
|
||||||
#define GST_EVENT_TRACE_NAME "GstEvent"
|
#define GST_EVENT_TRACE_NAME "GstEvent"
|
||||||
|
|
||||||
|
|
|
@ -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_loop_function (GstPad *pad, GstPadLoopFunction loop);
|
||||||
void gst_pad_set_chain_function (GstPad *pad, GstPadChainFunction chain);
|
void gst_pad_set_chain_function (GstPad *pad, GstPadChainFunction chain);
|
||||||
void gst_pad_set_getrange_function (GstPad *pad, GstPadGetRangeFunction get);
|
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_function (GstPad *pad, GstPadEventFunction event);
|
||||||
void gst_pad_set_event_mask_function (GstPad *pad, GstPadEventMaskFunction mask_func);
|
void gst_pad_set_event_mask_function (GstPad *pad, GstPadEventMaskFunction mask_func);
|
||||||
G_CONST_RETURN GstEventMask*
|
G_CONST_RETURN GstEventMask*
|
||||||
|
|
|
@ -313,7 +313,6 @@ pipeline_bus_handler (GstBus * bus, GstMessage * message,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_pipeline_new:
|
* gst_pipeline_new:
|
||||||
* @name: name of new pipeline
|
* @name: name of new pipeline
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
|
|
||||||
|
|
||||||
#include <gst/gstelement.h>
|
#include <gst/gstelement.h>
|
||||||
#include <gst/gsttask.h>
|
|
||||||
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -88,7 +86,7 @@ struct _GstQueue {
|
||||||
GCond *item_add; /* signals buffers now available for reading */
|
GCond *item_add; /* signals buffers now available for reading */
|
||||||
GCond *item_del; /* signals space now available for writing */
|
GCond *item_del; /* signals space now available for writing */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING - 1];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstQueueClass {
|
struct _GstQueueClass {
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include <gst/gstinfo.h>
|
#include <gst/gstinfo.h>
|
||||||
#include <gst/gstplugin.h>
|
#include <gst/gstplugin.h>
|
||||||
#include <gst/gstversion.h>
|
#include <gst/gstversion.h>
|
||||||
|
#include <gst/gstutils.h>
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (debug_bs);
|
GST_DEBUG_CATEGORY_STATIC (debug_bs);
|
||||||
|
|
|
@ -22,3 +22,10 @@ install-data-local: as-libtool-install-data-local
|
||||||
uninstall-local: as-libtool-uninstall-local
|
uninstall-local: as-libtool-uninstall-local
|
||||||
|
|
||||||
include $(top_srcdir)/common/as-libtool.mak
|
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)
|
||||||
|
|
|
@ -137,6 +137,9 @@ gst_aggregator_class_init (GstAggregatorClass * klass)
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = (GObjectClass *) klass;
|
||||||
gstelement_class = (GstElementClass *) 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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_PADS,
|
||||||
g_param_spec_int ("num_pads", "Num pads", "The number of source pads",
|
g_param_spec_int ("num_pads", "Num pads", "The number of source pads",
|
||||||
0, G_MAXINT, 0, G_PARAM_READABLE));
|
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));
|
"The current state of the element", NULL, G_PARAM_READABLE));
|
||||||
|
|
||||||
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_aggregator_finalize);
|
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 =
|
gstelement_class->request_new_pad =
|
||||||
GST_DEBUG_FUNCPTR (gst_aggregator_request_new_pad);
|
GST_DEBUG_FUNCPTR (gst_aggregator_request_new_pad);
|
||||||
|
|
|
@ -408,7 +408,7 @@ gst_fakesrc_event_handler (GstPad * pad, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstFakeSrc *src;
|
GstFakeSrc *src;
|
||||||
|
|
||||||
src = GST_FAKESRC (gst_object_get_parent (GST_OBJECT (pad)));
|
src = GST_FAKESRC (GST_PAD_PARENT (pad));
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_SEEK:
|
case GST_EVENT_SEEK:
|
||||||
|
@ -914,7 +914,7 @@ gst_fakesrc_loop (GstPad * pad)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pause:
|
pause:
|
||||||
gst_task_pause (src->task);
|
gst_task_pause (GST_RPAD_TASK (pad));
|
||||||
GST_STREAM_UNLOCK (pad);
|
GST_STREAM_UNLOCK (pad);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -933,11 +933,11 @@ gst_fakesrc_activate (GstPad * pad, GstActivateMode mode)
|
||||||
g_return_val_if_fail (fakesrc->has_loop, FALSE);
|
g_return_val_if_fail (fakesrc->has_loop, FALSE);
|
||||||
if (GST_ELEMENT_SCHEDULER (fakesrc)) {
|
if (GST_ELEMENT_SCHEDULER (fakesrc)) {
|
||||||
GST_STREAM_LOCK (pad);
|
GST_STREAM_LOCK (pad);
|
||||||
fakesrc->task =
|
GST_RPAD_TASK (pad) =
|
||||||
gst_scheduler_create_task (GST_ELEMENT_SCHEDULER (fakesrc),
|
gst_scheduler_create_task (GST_ELEMENT_SCHEDULER (fakesrc),
|
||||||
(GstTaskFunction) gst_fakesrc_loop, pad);
|
(GstTaskFunction) gst_fakesrc_loop, pad);
|
||||||
|
|
||||||
gst_task_start (fakesrc->task);
|
gst_task_start (GST_RPAD_TASK (pad));
|
||||||
GST_STREAM_UNLOCK (pad);
|
GST_STREAM_UNLOCK (pad);
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -952,10 +952,10 @@ gst_fakesrc_activate (GstPad * pad, GstActivateMode mode)
|
||||||
/* step 2, make sure streaming finishes */
|
/* step 2, make sure streaming finishes */
|
||||||
GST_STREAM_LOCK (pad);
|
GST_STREAM_LOCK (pad);
|
||||||
/* step 3, stop the task */
|
/* step 3, stop the task */
|
||||||
if (fakesrc->task) {
|
if (GST_RPAD_TASK (pad)) {
|
||||||
gst_task_stop (fakesrc->task);
|
gst_task_stop (GST_RPAD_TASK (pad));
|
||||||
gst_object_unref (GST_OBJECT (fakesrc->task));
|
gst_object_unref (GST_OBJECT (GST_RPAD_TASK (pad)));
|
||||||
fakesrc->task = NULL;
|
GST_RPAD_TASK (pad) = NULL;
|
||||||
}
|
}
|
||||||
GST_STREAM_UNLOCK (pad);
|
GST_STREAM_UNLOCK (pad);
|
||||||
|
|
||||||
|
|
|
@ -80,8 +80,6 @@ struct _GstFakeSrc {
|
||||||
gboolean has_getrange;
|
gboolean has_getrange;
|
||||||
gboolean eos;
|
gboolean eos;
|
||||||
|
|
||||||
GstTask *task;
|
|
||||||
|
|
||||||
GstFakeSrcOutputType output;
|
GstFakeSrcOutputType output;
|
||||||
GstFakeSrcDataType data;
|
GstFakeSrcDataType data;
|
||||||
GstFakeSrcSizeType sizetype;
|
GstFakeSrcSizeType sizetype;
|
||||||
|
|
|
@ -88,13 +88,12 @@ gst_fdsink_class_init (GstFdSinkClass * klass)
|
||||||
|
|
||||||
gobject_class = G_OBJECT_CLASS (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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FD,
|
||||||
g_param_spec_int ("fd", "fd", "An open file descriptor to write to",
|
g_param_spec_int ("fd", "fd", "An open file descriptor to write to",
|
||||||
0, G_MAXINT, 1, G_PARAM_READWRITE));
|
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
|
static void
|
||||||
|
|
|
@ -103,6 +103,9 @@ gst_fdsrc_class_init (GstFdSrcClass * klass)
|
||||||
|
|
||||||
gobject_class = G_OBJECT_CLASS (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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FD,
|
||||||
g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
|
g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
|
||||||
0, G_MAXINT, 0, G_PARAM_READWRITE));
|
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_STRUCT_OFFSET (GstFdSrcClass, timeout), NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
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;
|
gstelement_class->change_state = gst_fdsrc_change_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,6 +145,8 @@ gst_filesink_class_init (GstFileSinkClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOCATION,
|
||||||
g_param_spec_string ("location", "File 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_STRUCT_OFFSET (GstFileSinkClass, handoff), NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
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;
|
gobject_class->dispose = gst_filesink_dispose;
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
|
@ -363,6 +363,7 @@ gst_filesink_handle_event (GstPad * pad, GstEvent * event)
|
||||||
GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE,
|
GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE,
|
||||||
(_("Error while writing to file \"%s\"."), filesink->filename),
|
(_("Error while writing to file \"%s\"."), filesink->filename),
|
||||||
GST_ERROR_SYSTEM);
|
GST_ERROR_SYSTEM);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -392,7 +392,6 @@ gst_md5sink_class_init (GstMD5SinkClass * klass)
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = (GObjectClass *) klass;
|
||||||
gstelement_class = (GstElementClass *) klass;
|
gstelement_class = (GstElementClass *) klass;
|
||||||
|
|
||||||
|
|
||||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_md5sink_get_property);
|
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_md5sink_get_property);
|
||||||
|
|
||||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MD5,
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MD5,
|
||||||
|
|
|
@ -107,6 +107,8 @@ gst_multifilesrc_class_init (GstMultiFileSrcClass * klass)
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = (GObjectClass *) klass;
|
||||||
gstelement_class = (GstElementClass *) 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] =
|
gst_multifilesrc_signals[NEW_FILE] =
|
||||||
g_signal_new ("new-file", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
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_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_LOCATIONS, g_param_spec_pointer ("locations", "locations", "locations", G_PARAM_READWRITE)); /* CHECKME */
|
||||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HAVENEWMEDIA,
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HAVENEWMEDIA,
|
||||||
g_param_spec_boolean ("newmedia", "newmedia",
|
g_param_spec_boolean ("newmedia", "newmedia",
|
||||||
"generate new media events?", FALSE, G_PARAM_READWRITE));
|
"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;
|
gstelement_class->change_state = gst_multifilesrc_change_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
|
|
||||||
|
|
||||||
#include <gst/gstelement.h>
|
#include <gst/gstelement.h>
|
||||||
#include <gst/gsttask.h>
|
|
||||||
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -88,7 +86,7 @@ struct _GstQueue {
|
||||||
GCond *item_add; /* signals buffers now available for reading */
|
GCond *item_add; /* signals buffers now available for reading */
|
||||||
GCond *item_del; /* signals space now available for writing */
|
GCond *item_del; /* signals space now available for writing */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING - 1];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstQueueClass {
|
struct _GstQueueClass {
|
||||||
|
|
|
@ -127,6 +127,8 @@ gst_shaper_class_init (GstShaperClass * klass)
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = (GObjectClass *) klass;
|
||||||
gstelement_class = (GstElementClass *) 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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_POLICY,
|
||||||
g_param_spec_enum ("policy", "Policy", "Shaper 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",
|
g_param_spec_string ("last-message", "last-message", "last-message",
|
||||||
NULL, G_PARAM_READABLE));
|
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 =
|
gstelement_class->request_new_pad =
|
||||||
GST_DEBUG_FUNCPTR (gst_shaper_request_new_pad);
|
GST_DEBUG_FUNCPTR (gst_shaper_request_new_pad);
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,6 +124,8 @@ gst_statistics_class_init (GstStatisticsClass * klass)
|
||||||
|
|
||||||
gobject_class = G_OBJECT_CLASS (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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BUFFERS,
|
||||||
g_param_spec_int64 ("buffers", "buffers", "total buffers count",
|
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);
|
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
||||||
|
|
||||||
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_statistics_finalize);
|
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
|
static void
|
||||||
|
|
|
@ -350,7 +350,7 @@ free_entry (TypeFindEntry * entry)
|
||||||
free_entry_buffers (entry);
|
free_entry_buffers (entry);
|
||||||
|
|
||||||
if (entry->caps)
|
if (entry->caps)
|
||||||
gst_caps_free (entry->caps);
|
gst_caps_unref (entry->caps);
|
||||||
g_free (entry);
|
g_free (entry);
|
||||||
}
|
}
|
||||||
static void
|
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],
|
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE],
|
||||||
0, entry->probability, entry->caps);
|
0, entry->probability, entry->caps);
|
||||||
stop_typefinding (typefind);
|
stop_typefinding (typefind);
|
||||||
|
push_buffer_store (typefind);
|
||||||
gst_pad_event_default (pad, event);
|
gst_pad_event_default (pad, event);
|
||||||
} else {
|
} else {
|
||||||
gst_pad_event_default (pad, event);
|
gst_pad_event_default (pad, event);
|
||||||
|
|
|
@ -37,7 +37,7 @@ bin_PROGRAMS = \
|
||||||
$(GST_REGISTRY_SRC) $(GST_REGISTRY_SRC_V) \
|
$(GST_REGISTRY_SRC) $(GST_REGISTRY_SRC_V) \
|
||||||
$(GST_LOADSAVE_SRC) $(GST_LOADSAVE_SRC_V) \
|
$(GST_LOADSAVE_SRC) $(GST_LOADSAVE_SRC_V) \
|
||||||
$(GST_OTHER_SRC) $(GST_OTHER_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
|
# make sure each versioned tool has the right source file and flags
|
||||||
if !GST_DISABLE_REGISTRY
|
if !GST_DISABLE_REGISTRY
|
||||||
|
|
|
@ -410,7 +410,6 @@ event_loop (GstElement * pipeline, gboolean blocking)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue