Commit 22c9d0f1 authored by Wim Taymans's avatar Wim Taymans

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...
parent 112ca8f1
......@@ -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);
}
......@@ -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);
......
......@@ -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;
......
......@@ -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);
}
}
......@@ -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);
......
......@@ -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
......
......@@ -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);
......
......@@ -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>
......
......@@ -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;
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment