include parser.h instead of gnome-xml/parser.h untill xml-config is fixed...

Original commit message from CVS:
include parser.h instead of gnome-xml/parser.h untill xml-config is
fixed...
This commit is contained in:
Wim Taymans 2001-01-13 13:51:08 +00:00
parent 112ca8f1e1
commit 22c9d0f1a6
10 changed files with 76 additions and 10 deletions

View file

@ -131,6 +131,7 @@ gst_bin_init (GstBin *bin)
bin->numchildren = 0;
bin->children = NULL;
bin->eos_providers = NULL;
bin->chains = NULL;
// FIXME temporary testing measure
// bin->use_cothreads = TRUE;
@ -768,3 +769,31 @@ gst_bin_iterate_func (GstBin *bin)
GST_DEBUG_LEAVE("(%s)", gst_element_get_name (GST_ELEMENT (bin)));
}
static void
gst_bin_eos_func (GstBin *bin, GstElement *element)
{
g_print ("eos in bin \"%s\"\n", gst_element_get_name (GST_ELEMENT (bin)));
gst_element_signal_eos (GST_ELEMENT (bin));
}
void
gst_bin_add_eos_provider (GstBin *bin, GstElement *element)
{
g_return_if_fail (bin != NULL);
g_return_if_fail (GST_IS_BIN (bin));
bin->eos_providers = g_list_prepend (bin->eos_providers, element);
gtk_signal_connect_object (GTK_OBJECT (element), "eos", gst_bin_eos_func, GTK_OBJECT (bin));
}
void
gst_bin_remove_eos_provider (GstBin *bin, GstElement *element)
{
g_return_if_fail (bin != NULL);
g_return_if_fail (GST_IS_BIN (bin));
bin->eos_providers = g_list_remove (bin->eos_providers, element);
}

View file

@ -65,6 +65,8 @@ struct _GstBin {
/* our children */
gint numchildren;
GList *children;
gint num_eos_providers;
GList *eos_providers;
/* iteration state */
gboolean need_cothreads;
@ -118,6 +120,11 @@ void gst_bin_add (GstBin *bin,
void gst_bin_remove (GstBin *bin,
GstElement *element);
void gst_bin_add_eos_provider (GstBin *bin,
GstElement *element);
void gst_bin_remove_eos_provider (GstBin *bin,
GstElement *element);
/* retrieve a single element or the list of children */
GstElement* gst_bin_get_by_name (GstBin *bin,
const gchar *name);

View file

@ -24,7 +24,8 @@
#ifndef __GST_CAPS_H__
#define __GST_CAPS_H__
#include <gnome-xml/parser.h>
//#include <gnome-xml/parser.h>
#include <parser.h>
#include <gst/gstprops.h>
typedef struct _GstCaps GstCaps;

View file

@ -25,6 +25,7 @@
#include "gstelement.h"
#include "gstextratypes.h"
#include "gstbin.h"
/* Element signals and args */
@ -917,3 +918,20 @@ gst_element_signal_eos (GstElement *element)
gtk_signal_emit (GTK_OBJECT (element), gst_element_signals[EOS]);
}
void
gst_element_announce_eos (GstElement *element, gboolean success)
{
g_return_if_fail (element != NULL);
g_return_if_fail (GST_IS_ELEMENT (element));
GST_DEBUG(GST_CAT_ELEMENT_PADS,"element '%s' announce eos\n", gst_element_get_name (element));
if (success) {
gst_bin_add_eos_provider (GST_BIN (gst_element_get_manager (element)), element);
}
else {
gst_bin_remove_eos_provider (GST_BIN (gst_element_get_manager (element)), element);
}
}

View file

@ -24,7 +24,8 @@
#ifndef __GST_ELEMENT_H__
#define __GST_ELEMENT_H__
#include <gnome-xml/parser.h>
//#include <gnome-xml/parser.h>
#include <parser.h>
#include <gst/gstobject.h>
#include <gst/gstpad.h>
@ -201,6 +202,7 @@ void gst_element_connect (GstElement *src, const gchar *srcpadname,
void gst_element_disconnect (GstElement *src, const gchar *srcpadname,
GstElement *dest, const gchar *destpadname);
void gst_element_announce_eos (GstElement *element, gboolean success);
void gst_element_signal_eos (GstElement *element);

View file

@ -1098,7 +1098,12 @@ gst_pad_set_eos(GstPad *pad)
GST_INFO (GST_CAT_PADS,"attempting to set EOS on src pad %s:%s",GST_DEBUG_PAD_NAME(pad));
if (!gst_pad_eos(pad)) return FALSE;
gst_element_announce_eos (GST_ELEMENT (pad->parent), TRUE);
if (!gst_pad_eos(pad)) {
gst_element_announce_eos (GST_ELEMENT (pad->parent), FALSE);
return FALSE;
}
GST_INFO (GST_CAT_PADS,"set EOS on src pad %s:%s",GST_DEBUG_PAD_NAME(pad));
GST_FLAG_SET (pad, GST_PAD_EOS);
@ -1126,9 +1131,9 @@ gst_pad_select(GstPad *nextpad, ...) {
void
gst_pad_set_element_private (GstPad *pad, gpointer private)
gst_pad_set_element_private (GstPad *pad, gpointer priv)
{
pad->element_private = private;
pad->element_private = priv;
}
gpointer

View file

@ -24,7 +24,8 @@
#ifndef __GST_PAD_H__
#define __GST_PAD_H__
#include <gnome-xml/parser.h>
//#include <gnome-xml/parser.h>
#include <parser.h>
#include <gst/gstobject.h>
#include <gst/gstbuffer.h>
@ -183,7 +184,7 @@ gboolean gst_pad_check_compatibility (GstPad *srcpad, GstPad *sinkpad);
void gst_pad_set_name (GstPad *pad, const gchar *name);
const gchar* gst_pad_get_name (GstPad *pad);
void gst_pad_set_element_private (GstPad *pad, gpointer private);
void gst_pad_set_element_private (GstPad *pad, gpointer priv);
gpointer gst_pad_get_element_private (GstPad *pad);
void gst_pad_set_parent (GstPad *pad, GstObject *parent);

View file

@ -25,7 +25,8 @@
#define __GST_PLUGIN_H__
#include <gmodule.h>
#include <gnome-xml/parser.h>
//#include <gnome-xml/parser.h>
#include <parser.h>
#include <gst/gsttype.h>
#include <gst/gstelement.h>

View file

@ -25,7 +25,8 @@
#define __GST_PROPS_H__
#include <glib.h>
#include <gnome-xml/parser.h>
//#include <gnome-xml/parser.h>
#include <parser.h>
typedef struct _GstProps GstProps;

View file

@ -23,7 +23,8 @@
#ifndef __GST_XML_H__
#define __GST_XML_H__
#include <gnome-xml/parser.h>
//#include <gnome-xml/parser.h>
#include <parser.h>
#include <gst/gstelement.h>