Various fixes for the build/install problems update to the docs/manual. Added a simpl...
authorWim Taymans <wim.taymans@gmail.com>
Fri, 18 Aug 2000 20:35:48 +0000 (20:35 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Fri, 18 Aug 2000 20:35:48 +0000 (20:35 +0000)
Original commit message from CVS:
Various fixes for the build/install problems
update to the docs/manual. Added a simple helloworld example.

28 files changed:
README
docs/gst/Makefile.am
docs/manual/gstreamer-manual.sgml
editor/editor.c
editor/gsteditorelement.c
gst/Makefile.am
gst/gstbin.c
gst/gstelement.c
gst/gstelement.h
gst/gstobject.h
gst/gstpad.c
gst/gstpipeline.c
gst/gstplugin.c
gst/gstplugin.h
gst/gsttee.c
gst/gstthread.c
gstplay/Makefile.am
gstplay/callbacks.c
gstplay/gstplay.c
gstreamer-config.in
libs/colorspace/Makefile.am
libs/getbits/Makefile.am
libs/idct/Makefile.am
libs/putbits/Makefile.am
libs/riff/Makefile.am
libs/videoscale/Makefile.am
libs/winloader/Makefile.am
tools/launch.c

diff --git a/README b/README
index b66f5df..071f7c5 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 This is gnome-streamer, a framework for streaming media in GNOME.  The
 fundamental design comes from the video pipeline at Oregon Graduate
-Institute, as well as some ideas from DirectX.  It's based on plug-ins
+Institute, as well as some ideas from DirectMedia.  It's based on plug-ins
 that will provide the various codec and other functionality.  The
 interface hopefully is generic enough for various companies (ahem, Apple)
 to release binary codecs for Linux, until such time as they get a clue and
index 9ca32f3..4245d87 100644 (file)
@@ -14,7 +14,7 @@ LDFLAGS = $(GLIB_LIBS) $(GTK_LIBS) $(top_srcdir)/gst/libgst.la $(top_srcdir)/gst
 
 EXTRA_DIST=gstreamer.types.in
 
-HTML_DIR=$(datadir)/gstreamer/gst/html
+HTML_DIR=$(datadir)/gstreamer/html
 
 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
 
index e3e1be9..635e9f7 100644 (file)
@@ -8,6 +8,8 @@
 <!ENTITY BINS SYSTEM "bins.sgml">
 <!ENTITY BUFFERS SYSTEM "buffers.sgml">
 <!ENTITY STATES SYSTEM "states.sgml">
+
+<!ENTITY HELLOWORLD SYSTEM "helloworld.sgml">
 ]>
 
 
     <partintro>
       <para>
         With the basic concepts out of the way, you're ready to start building a
-        full-scale GStreamer application. This part of the book walks you through the
-        creation of a generic application skeleton: a source tree using
-        <application>automake</application> and
-        <application>autoconf</application>, argument parsing, session
-        management, internationalization, the main window, dialogs, toolbars, and
-        menubars. Many examples in Part 2 come from a simple application called
-        "GnomeHello"; the source code for this application is included in the
-        back of the book.  </para> <para> Of course the "meat" of the application
-        is up to you; but in Part 3 of the book we'll cover a range of library
-        features you can use to develop it.  
+        full-scale GStreamer application. 
+      </para>
+      <para>
+        We assume the reader is familiar with GTK+/GNOME programming.
       </para>
     </partintro>
 
+      &HELLOWORLD;
+
   </part>
 
 <!-- ############ Advanced GStreamer - part ############# -->
index a16a0f2..6dcd806 100644 (file)
@@ -26,6 +26,8 @@
 
 #include "gsteditor.h"
 
+#include "config.h"
+
 extern gboolean _gst_plugin_spew;
 
 int main(int argc,char *argv[]) {
index d13c40f..6bad772 100644 (file)
@@ -343,7 +343,7 @@ static void gst_editor_element_realize(GstEditorElement *element) {
   /* create the title */
   element->title = gnome_canvas_item_new(element->group,
     gnome_canvas_text_get_type(),
-    "text",gst_element_get_name(GST_OBJECT(element->element)),
+    "text",gst_element_get_name(GST_ELEMENT(element->element)),
     "x",x1+1.0,"y",y1+1.0,"anchor",GTK_ANCHOR_NORTH_WEST,
     "font_gdk",gtk_widget_get_default_style()->font,
     NULL);
@@ -864,6 +864,7 @@ static void gst_editor_element_state_change(GstElement *element,
 
 //  g_print("gst_editor_element_state_change got state 0x%08x\n",state);
   // if it's an unset
+#ifdef OLD
   if (state & GST_STATE_MAX) {
     state = ~state;
     for (id=0;id<(sizeof(state)*8)-1;id++) {
@@ -882,6 +883,7 @@ static void gst_editor_element_state_change(GstElement *element,
       state /= 2;
     }
   }
+#endif
   gst_editor_element_set_state(editorelement,id,FALSE);
 }
 
index 8a36689..42ab6b5 100644 (file)
@@ -60,9 +60,6 @@ libgstinclude_HEADERS =       \
        cothreads.h
 
 CFLAGS += -O2 -Wall
-#if USE_DEBUG
-CFLAGS += -g
-#endif
 
 libgst_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS) $(XML_LIBS)
 libgst_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE)
index 42baacd..adcaaab 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <gst/gst.h>
 
+#include "config.h"
+
 GstElementDetails gst_bin_details = { 
   "Generic bin",
   "Bin",
@@ -150,23 +152,9 @@ void gst_bin_add(GstBin *bin,GstElement *element) {
   bin->numchildren++;
   gst_object_set_parent(GST_OBJECT(element),GST_OBJECT(bin));
 
-#ifdef OLDSTATE
-  /* FIXME: this isn't right, the bin should be complete whether or not
-     the children are, I think. */
-//  if (GST_STATE_IS_SET(element,GST_STATE_COMPLETE)) {
-    if (!GST_STATE_IS_SET(bin,GST_STATE_COMPLETE)) {
-      g_print("GstBin: adding complete element - ");
-      gst_bin_change_state_norecurse(GST_ELEMENT(bin));
-    }
-//  } else {
-//    g_print("GstBin: adding element - ");
-//  gst_bin_change_state_norecurse(GST_ELEMENT(bin),~GST_STATE_COMPLETE);
-//  }
-#else
   /* we know we have at least one child, we just added one... */
 //  if (GST_STATE(element) < GST_STATE_READY)
 //    gst_bin_change_state_norecurse(bin,GST_STATE_READY);
-#endif
 
   gtk_signal_emit(GTK_OBJECT(bin),gst_bin_signals[OBJECT_ADDED],element);
 }
@@ -250,7 +238,7 @@ static GstElementStateReturn gst_bin_change_state_norecurse(GstBin *bin) {
 */
 
   if (GST_ELEMENT_CLASS(parent_class)->change_state)
-    return GST_ELEMENT_CLASS(parent_class)->change_state(bin);
+    return GST_ELEMENT_CLASS(parent_class)->change_state(GST_ELEMENT(bin));
   else
     return GST_STATE_FAILURE;
 }
@@ -282,7 +270,7 @@ static gboolean gst_bin_change_state_type(GstBin *bin,
     children = g_list_next(children);
   }
   if (type == GST_TYPE_BIN)
-    gst_element_change_state(GST_ELEMENT(bin),state);
+    gst_element_set_state(GST_ELEMENT(bin),state);
 
   return TRUE;
 }
@@ -417,77 +405,6 @@ void gst_bin_create_plan(GstBin *bin) {
     (oclass->create_plan)(bin);
 }
 
-#ifdef OLD_STUFF
-static void gst_bin_create_plan_func(GstBin *bin) {
-  GList *elements;
-  GstElement *element;
-  GList *pads;
-  GstPad *pad, *peer;
-  GstElement *outside;
-
-  bin->numentries = 0;
-
-  g_print("GstBin: attempting to create a plan for bin %p\n",bin);
-
-  /* walk through all the elements to figure out all kinds of things */
-  elements = GST_BIN(bin)->children;
-  while (elements) {
-    element = GST_ELEMENT(elements->data);
-
-    // have to use cothreads if any elements use loop functions, or if any
-    // of them have nontrivial chain functions
-    if (element->loopfunc != NULL) {
-      if (bin->threadcontext == NULL) {
-        g_print("GstBin: initializing cothread context\n");
-        bin->threadcontext = cothread_init();
-      }
-      if (element->threadstate == NULL) {
-        g_print("GstBin: creating thread state for element\n");
-        element->threadstate = cothread_create(bin->threadcontext);
-        cothread_setfunc(element->threadstate,gst_element_loopfunc_wrapper, 
-                         0,element);
-      }
-    }
-
-    // we need to find all the entry points into the bin
-    if (GST_IS_SRC(element)) {
-      g_print("GstBin: element '%s' is a source entry point for the bin\n",
-              gst_element_get_name(GST_ELEMENT(element)));
-      bin->entries = g_list_prepend(bin->entries,element);
-      bin->numentries++;
-    } else {
-      // go through the list of pads to see if there's a Connection
-      pads = gst_element_get_pad_list(element);
-      while (pads) {
-        pad = GST_PAD(pads->data);
-        /* we only worry about sink pads */
-        if (gst_pad_get_direction(pad) == GST_PAD_SINK) {
-          /* get the pad's peer */
-          peer = gst_pad_get_peer(pad);
-          if (!peer) break;
-          /* get the parent of the peer of the pad */
-          outside = GST_ELEMENT(gst_pad_get_parent(peer));
-          if (!outside) break;
-          /* if it's a connection and it's not ours... */
-          if (GST_IS_CONNECTION(outside) &&
-              (gst_object_get_parent(GST_OBJECT(outside)) != GST_OBJECT(bin))) {
-            g_print("GstBin: element '%s' is the external source Connection \
-for internal element '%s'\n",
-                    gst_element_get_name(GST_ELEMENT(outside)),
-                    gst_element_get_name(GST_ELEMENT(element)));
-            bin->entries = g_list_prepend(bin->entries,outside);
-            bin->numentries++;
-          }
-        }
-        pads = g_list_next(pads);
-      }
-    }
-    elements = g_list_next(elements);
-  }
-  g_print("have %d entries into bin\n",bin->numentries);
-}
-#endif
-
 static int gst_bin_loopfunc_wrapper(int argc,char *argv[]) {
   GstElement *element = GST_ELEMENT(argv);
   GList *pads;
index 7d0ef0b..f3c366c 100644 (file)
@@ -324,18 +324,9 @@ GstElementStateReturn gst_element_change_state(GstElement *element) {
 //  g_print("gst_element_change_state(\"%s\",%d)\n",
 //          element->name,state);
 
-#ifdef OLDSTATE
-  /* deal with the inverted state */
-  //g_print("changing element state, was %08lx\n",GST_STATE(element));
-  if (state & GST_STATE_MAX)
-    GST_STATE_UNSET(element,~state);
-  else
-    GST_STATE_SET(element,state);
-//  g_print(", is now %08lx\n",GST_STATE(element));
-#else
   GST_STATE(element) = GST_STATE_PENDING(element);
   GST_STATE_PENDING(element) = GST_STATE_NONE_PENDING;
-#endif
+
   gtk_signal_emit(GTK_OBJECT(element),gst_element_signals[STATE_CHANGE],
                   GST_STATE(element));
   return TRUE;
index 95a3c6a..f7c44bb 100644 (file)
@@ -35,25 +35,6 @@ extern "C" {
 #endif /* __cplusplus */
 
 
-#ifdef OLDSTATES
-typedef enum {
-  GST_STATE_COMPLETE    = (1 << 0),
-  GST_STATE_RUNNING     = (1 << 1),
-  GST_STATE_DISCOVERY   = (1 << 2),
-  GST_STATE_PREROLL     = (1 << 3),
-
-  GST_STATE_PLAYING    = (1 << 4),
-  GST_STATE_PAUSED     = (1 << 5),
-
-  GST_STATE_MAX                = (1 << 15),
-} GstElementState;
-
-typedef enum {
-  GST_STATE_FAILURE    = 0,
-  GST_STATE_SUCCESS    = 1,
-  GST_STATE_ASYNC      = 2,
-};
-#else
 typedef enum {
   GST_STATE_NONE_PENDING       = -1,
   GST_STATE_NULL       = 0,
@@ -67,7 +48,6 @@ typedef enum {
   GST_STATE_SUCCESS    = 1,
   GST_STATE_ASYNC      = 2,
 } GstElementStateReturn;
-#endif
 
 static inline char *_gst_print_statename(int state) {
   switch (state) {
@@ -84,21 +64,6 @@ static inline char *_gst_print_statename(int state) {
 #define GST_STATE(obj)                 (GST_ELEMENT(obj)->current_state)
 #define GST_STATE_PENDING(obj)         (GST_ELEMENT(obj)->pending_state)
 
-#ifdef OLDSTATE
-#define GST_STATE_IS_SET(obj,flag)     (GST_STATE (obj) & (flag))
-#define GST_STATE_SET(obj,flag) \
-G_STMT_START{ (GST_STATE (obj) |= (flag)); \
-gst_info("GstElement: set '%s' state %d(%s)\n",gst_element_get_name(obj),flag, \
-_gst_print_statename(flag)); \
-}G_STMT_END
-#define GST_STATE_UNSET(obj,flag) \
-G_STMT_START{ (GST_STATE (obj) &= ~(flag)); \
-gst_info("GstElement: unset '%s' state %d(%s)\n",gst_element_get_name(obj),flag, \
-_gst_print_statename(flag)); \
-}G_STMT_END
-#endif
-
-
 #define GST_TYPE_ELEMENT \
   (gst_element_get_type())
 #define GST_ELEMENT(obj) \
index 7fa8d53..35e1b5a 100644 (file)
@@ -24,7 +24,9 @@
 
 #include <gtk/gtk.h>
 #include <gst/gsttrace.h>
-#include "config.h"
+//#include "config.h"
+
+#undef HAVE_ATOMIC_H
 
 #ifdef HAVE_ATOMIC_H
 #include <asm/atomic.h>
index 198b2e6..e342ecb 100644 (file)
@@ -209,20 +209,6 @@ void gst_pad_push(GstPad *pad,GstBuffer *buffer) {
     //g_print("-- gst_pad_push(): houston, we have a problem, no way of talking to peer\n");
   }
 
-#ifdef OLD_STUFF
-  // if the chain function exists for the pad, call it directly
-  if (pad->chain)
-    (pad->chain)(pad->peer,buffer);
-  // else we're likely going to have to cothread it
-  else {
-    pad->peer->bufpen = buffer;
-    g_print("GstPad: would switch to a coroutine here...\n");
-    if (!GST_IS_ELEMENT(pad->peer->parent))
-      g_print("GstPad: eek, this isn't an element!\n");
-    if (GST_ELEMENT(pad->peer->parent)->threadstate != NULL)
-      cothread_switch(GST_ELEMENT(pad->peer->parent)->threadstate);
-  }
-#endif
 }
 
 /* gst_pad_pull() is given the sink pad */
@@ -260,31 +246,6 @@ GstBuffer *gst_pad_pull(GstPad *pad) {
     return NULL;
   }
 
-#ifdef OLD_STUFF
-  // if the pull function exists for the pad, call it directly
-  if (pad->pull) {
-    return (pad->pull)(pad->peer);
-  // else we're likely going to have to cothread it
-  } else if (pad->bufpen == NULL) {
-    g_print("no buffer available, will have to do something about it\n");
-    peerparent = GST_ELEMENT(pad->peer->parent);
-    // if they're a cothread too, we can just switch to them
-    if (peerparent->threadstate != NULL) {
-      cothread_switch(peerparent->threadstate);
-    // otherwise we have to switch to the main thread
-    } else {
-      state = cothread_main(GST_ELEMENT(pad->parent)->threadstate->ctx);
-      g_print("GstPad: switching to supposed 0th thread at %p\n",state);
-      cothread_switch(state);
-    }
-  } else {
-    g_print("GstPad: buffer available, pulling\n");
-    buf = pad->bufpen;
-    pad->bufpen = NULL;
-    return buf;
-  }
-#endif
-
   return NULL;
 }
 
index 7e580a2..428281b 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <gst/gstpipeline.h>
 
+#include "config.h"
+
 GstElementDetails gst_pipeline_details = {
   "Pipeline object",
   "Bin",
index c7f7cf7..d455ce1 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <gst/gstplugin.h>
 
+#include "config.h"
 
 /* list of loaded modules and its sequence number */
 GList *_gst_modules;
index 9daa1b0..337b892 100644 (file)
@@ -27,9 +27,6 @@
 #include <gst/gsttype.h>
 #include <gst/gstelement.h>
 
-#include "config.h"
-
-
 typedef struct _GstPlugin GstPlugin;
 typedef struct _GstPluginElement GstPluginElement;
 
index aaec394..598396e 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <gsttee.h>
 
+#include "config.h"
 
 GstElementDetails gst_tee_details = {
   "Tee pipe fitting",
index 3b7373e..9547c8f 100644 (file)
@@ -20,6 +20,8 @@
 #include <gst/gst.h>
 #include <gst/gstthread.h>
 
+#include "config.h"
+
 GstElementDetails gst_thread_details = {
   "Threaded container",
   "Bin",
@@ -162,60 +164,6 @@ GstElement *gst_thread_new(guchar *name) {
 }
 
 
-#ifdef OLD_STUFF
-static void gst_thread_prepare(GstThread *thread) {
-  GList *elements;
-  GstElement *element;
-  GList *pads;
-  GstPad *pad, *peer;
-  GstElement *outside;
-
-  GST_BIN(thread)->numentries = 0;
-
-  /* first we need to find all the entry points into the thread */
-  elements = GST_BIN(thread)->children;
-  while (elements) {
-    element = GST_ELEMENT(elements->data);
-    gst_info("gstthread: element \"%s\" found in thread\n",
-             gst_element_get_name(GST_ELEMENT(element)));
-    if (GST_IS_SRC(element)) {
-      gst_info("gstthread: element \"%s\" is a source entry point for the thread\n",
-               gst_element_get_name(GST_ELEMENT(element)));
-      GST_BIN(thread)->entries = g_list_prepend(GST_BIN(thread)->entries,element);
-      GST_BIN(thread)->numentries++;
-    } else {
-      /* go through the list of pads to see if there's a Connection */
-      pads = gst_element_get_pad_list(element);
-      while (pads) {
-        pad = GST_PAD(pads->data);
-        /* we only worry about sink pads */
-        if (gst_pad_get_direction(pad) == GST_PAD_SINK) {
-          /* get the pad's peer */
-          peer = gst_pad_get_peer(pad);
-          if (!peer) break;
-          /* get the parent of the peer of the pad */
-          outside = GST_ELEMENT(gst_pad_get_parent(peer));
-          if (!outside) break;
-          /* if it's a connection and it's not ours... */
-          if (GST_IS_CONNECTION(outside) &&
-              (gst_object_get_parent(GST_OBJECT(outside)) != GST_OBJECT(thread))) {
-            gst_info("gstthread: element \"%s\" is the external source Connection \
-for internal element \"%s\"\n",
-                    gst_element_get_name(GST_ELEMENT(outside)),
-                    gst_element_get_name(GST_ELEMENT(element)));
-            GST_BIN(thread)->entries = g_list_prepend(GST_BIN(thread)->entries,outside);
-            GST_BIN(thread)->numentries++;
-          }
-        }
-        pads = g_list_next(pads);
-      }
-    }
-    elements = g_list_next(elements);
-  }
-  gst_info("gstthread: have %d entries into thread\n",GST_BIN(thread)->numentries);
-}
-#endif
-
 
 static GstElementStateReturn gst_thread_change_state(GstElement *element) {
   GstThread *thread;
@@ -261,18 +209,6 @@ static GstElementStateReturn gst_thread_change_state(GstElement *element) {
       }
       return GST_STATE_SUCCESS;
       break;
-#if OLDSTATE
-    case ~GST_STATE_RUNNING:
-      // stop, reap, and join the thread
-      GST_FLAG_UNSET(thread,GST_THREAD_STATE_SPINNING);
-      GST_FLAG_SET(thread,GST_THREAD_STATE_REAPING);
-      gst_thread_signal_thread(thread);
-      pthread_join(thread->thread_id,0);
-      // tear down the internal state
-      gst_info("gstthread: tearing down thread's iteration state\n");
-      // FIXME do stuff
-      break;
-#endif
     case GST_STATE_PLAYING:
       if (!stateset) return FALSE;
       gst_info("gstthread: starting thread \"%s\"\n",
@@ -324,41 +260,6 @@ void *gst_thread_main_loop(void *arg) {
   return NULL;
 }
 
-#ifdef OLD_STUFF
-/**
- * gst_thread_iterate:
- * @thread: the thread to iterate
- *
- * do one iteration
- */
-void gst_thread_iterate(GstThread *thread) {
-  GList *entries;
-  GstElement *entry;
-
-  g_return_if_fail(thread != NULL);
-  g_return_if_fail(GST_IS_THREAD(thread));
-//  g_return_if_fail(GST_FLAG_IS_SET(thread,GST_STATE_RUNNING));
-  g_return_if_fail(thread->numentries > 0);
-
-  entries = thread->entries;
-
-  DEBUG("gstthread: %s: thread iterate\n", gst_element_get_name(GST_ELEMENT(thread)));
-
-  while (entries) {
-    entry = GST_ELEMENT(entries->data);
-    if (GST_IS_SRC(entry))
-      gst_src_push(GST_SRC(entry));
-    else if (GST_IS_CONNECTION(entry))
-      gst_connection_push(GST_CONNECTION(entry));
-    else
-      g_assert_not_reached();
-    entries = g_list_next(entries);
-  }
-  DEBUG("gstthread: %s: thread iterate done\n", gst_element_get_name(GST_ELEMENT(thread)));
-  //g_print(",");
-}
-#endif
-
 static void gst_thread_signal_thread(GstThread *thread) {
   g_mutex_lock(thread->lock);
   g_cond_signal(thread->cond);
index c901f37..d7a3c1c 100644 (file)
@@ -6,6 +6,9 @@ INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) \
 
 bin_PROGRAMS = gstplay
 
+gladedir = $(datadir)/gstplay
+glade_DATA = gstplay.glade play.xpm stop.xpm pause.xpm
+
 gstplay_SOURCES = \
        gstplay.c \
        mpeg1.c mpeg2.c avi.c\
@@ -14,9 +17,9 @@ gstplay_SOURCES = \
 
 noinst_HEADERS = codecs.h
 
-CFLAGS += -O2 -Wall
+CFLAGS += -O2 -Wall -DDATADIR=\""$(gladedir)/"\"
 
-gstplay_CFLAGS = $(shell gnome-config --cflags gnomeui) $(shell libglade-config --cflags gnome)
+gstplay_CFLAGS = $(shell gnome-config --cflags gnomeui) $(shell libglade-config --cflags gnome) 
 gstplay_LDFLAGS = $(shell gnome-config --libs gnomeui) $(shell libglade-config --libs gnome)
 
 gstplay_LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la \
index 9b70736..c1bd000 100644 (file)
@@ -53,7 +53,7 @@ on_open2_activate                      (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
   GladeXML *xml;
-  xml = glade_xml_new("gstplay.glade", "fileselection1");
+  xml = glade_xml_new(DATADIR "gstplay.glade", "fileselection1");
   /* connect the signals in the interface */
   glade_xml_signal_autoconnect(xml);
   open_file_selection = glade_xml_get_widget(xml, "fileselection1");
@@ -115,7 +115,7 @@ on_drawingarea1_configure_event        (GtkWidget *widget, GdkEventConfigure *ev
 void on_about_activate(GtkWidget *widget, gpointer data)
 {
   GladeXML *xml;
-  xml = glade_xml_new("gstplay.glade", "about");
+  xml = glade_xml_new(DATADIR "gstplay.glade", "about");
   /* connect the signals in the interface */
   glade_xml_signal_autoconnect(xml);
 }
index 5abd8ad..834d016 100644 (file)
@@ -3,9 +3,7 @@
  * Glade will not overwrite this file.
  */
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 //#define DEBUG_ENABLED
 
@@ -83,7 +81,8 @@ static void frame_displayed(GstSrc *asrc)
 
 gboolean idle_func(gpointer data) {
   DEBUG("idle start %s\n",MUTEX_STATUS());
-  gst_src_push(GST_SRC(data));
+  //gst_src_push(GST_SRC(data));
+  gst_bin_iterate(GST_BIN(data));
   DEBUG("idle stop %s\n",MUTEX_STATUS());
   return TRUE;
 }
@@ -170,20 +169,21 @@ void change_state(GstPlayState new_state) {
       mute_audio(FALSE);
       statustext = "playing";
       update_status_area(status_area);
-      gtk_idle_add(idle_func,src);
+      gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
+      gtk_idle_add(idle_func, pipeline);
       state = GSTPLAY_PLAYING;
       update_buttons(0);
       break;
     case GSTPLAY_PAUSE:
       statustext = "paused";
       update_status_area(status_area);
-      if (state != GSTPLAY_STOPPED) gtk_idle_remove_by_data(src);
+      if (state != GSTPLAY_STOPPED) gtk_idle_remove_by_data(pipeline);
       mute_audio(TRUE);
       state = GSTPLAY_PAUSE;
       update_buttons(1);
       break;
     case GSTPLAY_STOPPED:
-      if (state != GSTPLAY_PAUSE) gtk_idle_remove_by_data(src);
+      if (state != GSTPLAY_PAUSE) gtk_idle_remove_by_data(pipeline);
       statustext = "stopped";
       update_status_area(status_area);
       mute_audio(TRUE);
@@ -232,14 +232,12 @@ static void have_type(GstSink *sink) {
   }
   else if (strstr(gsttype->mime, "mpeg1")) {
     mpeg1_setup_video_thread(gst_element_get_pad(src,"src"), video_render_queue, GST_ELEMENT(pipeline));
-    gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
     gst_clock_reset(gst_clock_get_system());
     gtk_signal_connect(GTK_OBJECT(show),"frame_displayed",
                        GTK_SIGNAL_FUNC(frame_displayed),NULL);
   }
   else if (strstr(gsttype->mime, "mp3")) {
     mpeg1_setup_audio_thread(gst_element_get_pad(src,"src"), audio_render_queue, GST_ELEMENT(pipeline));
-    gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
     gst_clock_reset(gst_clock_get_system());
   }
   else {
@@ -254,13 +252,14 @@ static void have_type(GstSink *sink) {
     gtk_signal_connect(GTK_OBJECT(parse),"pads_created",
                        GTK_SIGNAL_FUNC(gstplay_parse_pads_created),pipeline);
   }
+  gtk_object_set(GTK_OBJECT(src),"offset",0,NULL);
+
   g_print("setting to READY state\n");
   gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
   g_print("setting to PLAYING state\n");
   gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
   g_print("set to PLAYING state\n");
 
-  gtk_object_set(GTK_OBJECT(src),"offset",0,NULL);
 }
 
 gint start_from_file(guchar *filename) 
@@ -286,6 +285,8 @@ gint start_from_file(guchar *filename)
                   gst_element_get_pad(typefind,"sink"));
 
   g_print("setting to READY state\n");
+
+  gst_bin_create_plan(GST_BIN(pipeline));
   gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
 
   state = GSTPLAY_STOPPED;
@@ -315,8 +316,9 @@ main (int argc, char *argv[])
   glade_gnome_init();
   gst_init(&argc,&argv);
 
+  g_print("using %s\n", DATADIR"gstplay.glade");
   /* load the interface */
-  xml = glade_xml_new("gstplay.glade", "gstplay");
+  xml = glade_xml_new(DATADIR "gstplay.glade", "gstplay");
   /* connect the signals in the interface */
 
   status_area = glade_xml_get_widget(xml, "status_area");
index a43e2a1..cef310e 100644 (file)
@@ -43,7 +43,7 @@ while test $# -gt 0; do
       ;;
     --cflags)
       if test $prefix -ef @builddir@ ; then
-        includes=-I@builddir@
+        includes=-I@builddir@ 
       elif test @includedir@ != /usr/include ; then
         includes=-I@includedir@
       fi
@@ -51,10 +51,10 @@ while test $# -gt 0; do
       ;;
     --libs)
       if test $prefix -ef @builddir@ ; then
-        echo @builddir@/lib@PACKAGE@.la
+        echo @builddir@/libgst.la
       else
         libdirs=-L@libdir@
-        echo $libdirs -l@PACKAGE@
+        echo $libdirs -lgst
       fi
       ;;
     *)
index 634b143..12090a1 100644 (file)
@@ -4,7 +4,7 @@ filter_LTLIBRARIES = libgstcolorspace.la
 
 libgstcolorspace_la_SOURCES = gstcolorspace.c rgb2rgb.c yuv2rgb.c
 
-libgstcolorspaceincludedir = $(includedir)/gst/libs/gstcolorspace.h
+libgstcolorspaceincludedir = $(includedir)/gst/libs/gstcolorspace
 libgstcolorspaceinclude_HEADERS = gstcolorspace.h
 
 noinst_HEADERS = yuv2rgb.h
index 1fd776c..5a5422c 100644 (file)
@@ -4,7 +4,7 @@ filter_LTLIBRARIES = libgstgetbits.la
 
 libgstgetbits_la_SOURCES = gstgetbits.c gstgetbits_inl.h 
 
-libgstgetbitsincludedir = $(includedir)/gst/libs/gstgetbits.h
+libgstgetbitsincludedir = $(includedir)/gst/libs/gstgetbits
 libgstgetbitsinclude_HEADERS = gstgetbits.h
 
 noinst_HEADERS = gstgetbits.h gstgetbits_inl.h
index a7c6a20..9a97325 100644 (file)
@@ -4,6 +4,9 @@ filter_LTLIBRARIES = libgstidct.la
 
 libgstidct_la_SOURCES = fastintidct.c floatidct.c gstidct.c intidct.c mmxidct.S mmx32idct.c
 
+libgstidctincludedir = $(includedir)/gst/libs/gstidct
+libgstidctinclude_HEADERS = gstidct.h
+
 bin_PROGRAMS = ieeetest
 
 ieeetest_SOURCES = ieeetest.c
@@ -11,7 +14,7 @@ ieeetest_LDADD = libgstidct.la $(GLIB_LIBS) $(GTK_LIBS) $(top_srcdir)/gst/libgst
 ieeetest_CFLAGS = $(shell gnome-config --cflags gnomeui) -g -Wall
 ieeetest_LDFLAGS = $(shell gnome-config --libs gnomeui) 
 
-noinst_HEADERS = gstidct.h
+noinst_HEADERS = dct.h
 
 CFLAGS += -Wall -O2 -funroll-all-loops -finline-functions -ffast-math
 
index 29b80b8..e12b45c 100644 (file)
@@ -4,7 +4,7 @@ filter_LTLIBRARIES = libgstputbits.la
 
 libgstputbits_la_SOURCES = gstputbits.c 
 
-libgstputbitsincludedir = $(includedir)/gst/libs/gstputbits.h
+libgstputbitsincludedir = $(includedir)/gst/libs/gstputbits
 libgstputbitsinclude_HEADERS = gstputbits.h
 
 noinst_HEADERS = gstputbits.h 
index 935780b..18b5c21 100644 (file)
@@ -4,7 +4,8 @@ filter_LTLIBRARIES = libgstriff.la
 
 libgstriff_la_SOURCES = gstriffparse.c gstriffencode.c gstriffutil.c
 
-noinst_HEADERS = gstriff.h
+libgstriffincludedir = $(includedir)/gst/libs/gstriff
+libgstriffinclude_HEADERS = gstriff.h
 
 CFLAGS += -Wall -O2  -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math
 
index 7285410..738570f 100644 (file)
@@ -4,7 +4,7 @@ filter_LTLIBRARIES = libgstvideoscale.la
 
 libgstvideoscale_la_SOURCES = gstvideoscale.c 
 
-libgstvideoscaleincludedir = $(includedir)/gst/libs/gstvideoscale.h
+libgstvideoscaleincludedir = $(includedir)/gst/libs/gstvideoscale
 libgstvideoscaleinclude_HEADERS = gstvideoscale.h
 
 noinst_HEADERS = yuv2rgb.h
index d9b4099..20514dd 100644 (file)
@@ -4,12 +4,9 @@ filter_LTLIBRARIES = libwinloader.la
 
 libwinloader_la_SOURCES = driver.c elfdll.c ext.c externals.c module.c pe_image.c pe_resource.c registry.c resource.c stubs.s vfl.c afl.c
 
-libwinloaderincludedir = $(includedir)/gst/libs/winloader.h
-libwinloaderinclude_HEADERS = 
-
 noinst_HEADERS = externals.h
 
-DEFINES=-rdynamic -fPIC -g -D__WINE__ -Ddbg_printf=__vprintf -DTRACE=__vprintf 
+DEFINES=-rdynamic -fPIC -D__WINE__ -Ddbg_printf=__vprintf -DTRACE=__vprintf 
 CFLAGS += $(DEFINES) 
 
 INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/include
index 7be7f2c..cbec8e3 100644 (file)
@@ -105,7 +105,7 @@ int main(int argc,char *argv[]) {
 
   xmlSaveFile("launch.xml",gst_xml_write(pipeline));
 
-  gst_element_set_state(pipeline,GST_STATE_RUNNING);
+  gst_element_set_state(pipeline,GST_STATE_READY);
   gst_element_set_state(pipeline,GST_STATE_PLAYING);
 
   if (t)