Various fixes for the build/install problems update to the docs/manual. Added a simple helloworld example.

Original commit message from CVS:
Various fixes for the build/install problems
update to the docs/manual. Added a simple helloworld example.
This commit is contained in:
Wim Taymans 2000-08-18 20:35:48 +00:00
parent aca33a2b4a
commit 6661696de0
28 changed files with 64 additions and 321 deletions

2
README
View file

@ -1,6 +1,6 @@
This is gnome-streamer, a framework for streaming media in GNOME. The This is gnome-streamer, a framework for streaming media in GNOME. The
fundamental design comes from the video pipeline at Oregon Graduate 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 that will provide the various codec and other functionality. The
interface hopefully is generic enough for various companies (ahem, Apple) 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 to release binary codecs for Linux, until such time as they get a clue and

View file

@ -14,7 +14,7 @@ LDFLAGS = $(GLIB_LIBS) $(GTK_LIBS) $(top_srcdir)/gst/libgst.la $(top_srcdir)/gst
EXTRA_DIST=gstreamer.types.in EXTRA_DIST=gstreamer.types.in
HTML_DIR=$(datadir)/gstreamer/gst/html HTML_DIR=$(datadir)/gstreamer/html
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)

View file

@ -8,6 +8,8 @@
<!ENTITY BINS SYSTEM "bins.sgml"> <!ENTITY BINS SYSTEM "bins.sgml">
<!ENTITY BUFFERS SYSTEM "buffers.sgml"> <!ENTITY BUFFERS SYSTEM "buffers.sgml">
<!ENTITY STATES SYSTEM "states.sgml"> <!ENTITY STATES SYSTEM "states.sgml">
<!ENTITY HELLOWORLD SYSTEM "helloworld.sgml">
]> ]>
@ -96,19 +98,15 @@
<partintro> <partintro>
<para> <para>
With the basic concepts out of the way, you're ready to start building a 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 full-scale GStreamer application.
creation of a generic application skeleton: a source tree using </para>
<application>automake</application> and <para>
<application>autoconf</application>, argument parsing, session We assume the reader is familiar with GTK+/GNOME programming.
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.
</para> </para>
</partintro> </partintro>
&HELLOWORLD;
</part> </part>
<!-- ############ Advanced GStreamer - part ############# --> <!-- ############ Advanced GStreamer - part ############# -->

View file

@ -26,6 +26,8 @@
#include "gsteditor.h" #include "gsteditor.h"
#include "config.h"
extern gboolean _gst_plugin_spew; extern gboolean _gst_plugin_spew;
int main(int argc,char *argv[]) { int main(int argc,char *argv[]) {

View file

@ -343,7 +343,7 @@ static void gst_editor_element_realize(GstEditorElement *element) {
/* create the title */ /* create the title */
element->title = gnome_canvas_item_new(element->group, element->title = gnome_canvas_item_new(element->group,
gnome_canvas_text_get_type(), 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, "x",x1+1.0,"y",y1+1.0,"anchor",GTK_ANCHOR_NORTH_WEST,
"font_gdk",gtk_widget_get_default_style()->font, "font_gdk",gtk_widget_get_default_style()->font,
NULL); 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); // g_print("gst_editor_element_state_change got state 0x%08x\n",state);
// if it's an unset // if it's an unset
#ifdef OLD
if (state & GST_STATE_MAX) { if (state & GST_STATE_MAX) {
state = ~state; state = ~state;
for (id=0;id<(sizeof(state)*8)-1;id++) { for (id=0;id<(sizeof(state)*8)-1;id++) {
@ -882,6 +883,7 @@ static void gst_editor_element_state_change(GstElement *element,
state /= 2; state /= 2;
} }
} }
#endif
gst_editor_element_set_state(editorelement,id,FALSE); gst_editor_element_set_state(editorelement,id,FALSE);
} }

View file

@ -60,9 +60,6 @@ libgstinclude_HEADERS = \
cothreads.h cothreads.h
CFLAGS += -O2 -Wall CFLAGS += -O2 -Wall
#if USE_DEBUG
CFLAGS += -g
#endif
libgst_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS) $(XML_LIBS) libgst_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS) $(XML_LIBS)
libgst_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE) libgst_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE)

View file

@ -19,6 +19,8 @@
#include <gst/gst.h> #include <gst/gst.h>
#include "config.h"
GstElementDetails gst_bin_details = { GstElementDetails gst_bin_details = {
"Generic bin", "Generic bin",
"Bin", "Bin",
@ -150,23 +152,9 @@ void gst_bin_add(GstBin *bin,GstElement *element) {
bin->numchildren++; bin->numchildren++;
gst_object_set_parent(GST_OBJECT(element),GST_OBJECT(bin)); 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... */ /* we know we have at least one child, we just added one... */
// if (GST_STATE(element) < GST_STATE_READY) // if (GST_STATE(element) < GST_STATE_READY)
// gst_bin_change_state_norecurse(bin,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); 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) 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 else
return GST_STATE_FAILURE; return GST_STATE_FAILURE;
} }
@ -282,7 +270,7 @@ static gboolean gst_bin_change_state_type(GstBin *bin,
children = g_list_next(children); children = g_list_next(children);
} }
if (type == GST_TYPE_BIN) if (type == GST_TYPE_BIN)
gst_element_change_state(GST_ELEMENT(bin),state); gst_element_set_state(GST_ELEMENT(bin),state);
return TRUE; return TRUE;
} }
@ -417,77 +405,6 @@ void gst_bin_create_plan(GstBin *bin) {
(oclass->create_plan)(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[]) { static int gst_bin_loopfunc_wrapper(int argc,char *argv[]) {
GstElement *element = GST_ELEMENT(argv); GstElement *element = GST_ELEMENT(argv);
GList *pads; GList *pads;

View file

@ -324,18 +324,9 @@ GstElementStateReturn gst_element_change_state(GstElement *element) {
// g_print("gst_element_change_state(\"%s\",%d)\n", // g_print("gst_element_change_state(\"%s\",%d)\n",
// element->name,state); // 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(element) = GST_STATE_PENDING(element);
GST_STATE_PENDING(element) = GST_STATE_NONE_PENDING; GST_STATE_PENDING(element) = GST_STATE_NONE_PENDING;
#endif
gtk_signal_emit(GTK_OBJECT(element),gst_element_signals[STATE_CHANGE], gtk_signal_emit(GTK_OBJECT(element),gst_element_signals[STATE_CHANGE],
GST_STATE(element)); GST_STATE(element));
return TRUE; return TRUE;

View file

@ -35,25 +35,6 @@ extern "C" {
#endif /* __cplusplus */ #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 { typedef enum {
GST_STATE_NONE_PENDING = -1, GST_STATE_NONE_PENDING = -1,
GST_STATE_NULL = 0, GST_STATE_NULL = 0,
@ -67,7 +48,6 @@ typedef enum {
GST_STATE_SUCCESS = 1, GST_STATE_SUCCESS = 1,
GST_STATE_ASYNC = 2, GST_STATE_ASYNC = 2,
} GstElementStateReturn; } GstElementStateReturn;
#endif
static inline char *_gst_print_statename(int state) { static inline char *_gst_print_statename(int state) {
switch (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(obj) (GST_ELEMENT(obj)->current_state)
#define GST_STATE_PENDING(obj) (GST_ELEMENT(obj)->pending_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 \ #define GST_TYPE_ELEMENT \
(gst_element_get_type()) (gst_element_get_type())
#define GST_ELEMENT(obj) \ #define GST_ELEMENT(obj) \

View file

@ -24,7 +24,9 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gst/gsttrace.h> #include <gst/gsttrace.h>
#include "config.h" //#include "config.h"
#undef HAVE_ATOMIC_H
#ifdef HAVE_ATOMIC_H #ifdef HAVE_ATOMIC_H
#include <asm/atomic.h> #include <asm/atomic.h>

View 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"); //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 */ /* gst_pad_pull() is given the sink pad */
@ -260,31 +246,6 @@ GstBuffer *gst_pad_pull(GstPad *pad) {
return NULL; 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; return NULL;
} }

View file

@ -19,6 +19,8 @@
#include <gst/gstpipeline.h> #include <gst/gstpipeline.h>
#include "config.h"
GstElementDetails gst_pipeline_details = { GstElementDetails gst_pipeline_details = {
"Pipeline object", "Pipeline object",
"Bin", "Bin",

View file

@ -26,6 +26,7 @@
#include <gst/gstplugin.h> #include <gst/gstplugin.h>
#include "config.h"
/* list of loaded modules and its sequence number */ /* list of loaded modules and its sequence number */
GList *_gst_modules; GList *_gst_modules;

View file

@ -27,9 +27,6 @@
#include <gst/gsttype.h> #include <gst/gsttype.h>
#include <gst/gstelement.h> #include <gst/gstelement.h>
#include "config.h"
typedef struct _GstPlugin GstPlugin; typedef struct _GstPlugin GstPlugin;
typedef struct _GstPluginElement GstPluginElement; typedef struct _GstPluginElement GstPluginElement;

View file

@ -19,6 +19,7 @@
#include <gsttee.h> #include <gsttee.h>
#include "config.h"
GstElementDetails gst_tee_details = { GstElementDetails gst_tee_details = {
"Tee pipe fitting", "Tee pipe fitting",

View file

@ -20,6 +20,8 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/gstthread.h> #include <gst/gstthread.h>
#include "config.h"
GstElementDetails gst_thread_details = { GstElementDetails gst_thread_details = {
"Threaded container", "Threaded container",
"Bin", "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) { static GstElementStateReturn gst_thread_change_state(GstElement *element) {
GstThread *thread; GstThread *thread;
@ -261,18 +209,6 @@ static GstElementStateReturn gst_thread_change_state(GstElement *element) {
} }
return GST_STATE_SUCCESS; return GST_STATE_SUCCESS;
break; 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: case GST_STATE_PLAYING:
if (!stateset) return FALSE; if (!stateset) return FALSE;
gst_info("gstthread: starting thread \"%s\"\n", gst_info("gstthread: starting thread \"%s\"\n",
@ -324,41 +260,6 @@ void *gst_thread_main_loop(void *arg) {
return NULL; 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) { static void gst_thread_signal_thread(GstThread *thread) {
g_mutex_lock(thread->lock); g_mutex_lock(thread->lock);
g_cond_signal(thread->cond); g_cond_signal(thread->cond);

View file

@ -6,6 +6,9 @@ INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) \
bin_PROGRAMS = gstplay bin_PROGRAMS = gstplay
gladedir = $(datadir)/gstplay
glade_DATA = gstplay.glade play.xpm stop.xpm pause.xpm
gstplay_SOURCES = \ gstplay_SOURCES = \
gstplay.c \ gstplay.c \
mpeg1.c mpeg2.c avi.c\ mpeg1.c mpeg2.c avi.c\
@ -14,9 +17,9 @@ gstplay_SOURCES = \
noinst_HEADERS = codecs.h 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_LDFLAGS = $(shell gnome-config --libs gnomeui) $(shell libglade-config --libs gnome)
gstplay_LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la \ gstplay_LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la \

View file

@ -53,7 +53,7 @@ on_open2_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
GladeXML *xml; GladeXML *xml;
xml = glade_xml_new("gstplay.glade", "fileselection1"); xml = glade_xml_new(DATADIR "gstplay.glade", "fileselection1");
/* connect the signals in the interface */ /* connect the signals in the interface */
glade_xml_signal_autoconnect(xml); glade_xml_signal_autoconnect(xml);
open_file_selection = glade_xml_get_widget(xml, "fileselection1"); 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) void on_about_activate(GtkWidget *widget, gpointer data)
{ {
GladeXML *xml; GladeXML *xml;
xml = glade_xml_new("gstplay.glade", "about"); xml = glade_xml_new(DATADIR "gstplay.glade", "about");
/* connect the signals in the interface */ /* connect the signals in the interface */
glade_xml_signal_autoconnect(xml); glade_xml_signal_autoconnect(xml);
} }

View file

@ -3,9 +3,7 @@
* Glade will not overwrite this file. * Glade will not overwrite this file.
*/ */
#ifdef HAVE_CONFIG_H #include <config.h>
# include <config.h>
#endif
//#define DEBUG_ENABLED //#define DEBUG_ENABLED
@ -83,7 +81,8 @@ static void frame_displayed(GstSrc *asrc)
gboolean idle_func(gpointer data) { gboolean idle_func(gpointer data) {
DEBUG("idle start %s\n",MUTEX_STATUS()); 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()); DEBUG("idle stop %s\n",MUTEX_STATUS());
return TRUE; return TRUE;
} }
@ -170,20 +169,21 @@ void change_state(GstPlayState new_state) {
mute_audio(FALSE); mute_audio(FALSE);
statustext = "playing"; statustext = "playing";
update_status_area(status_area); 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; state = GSTPLAY_PLAYING;
update_buttons(0); update_buttons(0);
break; break;
case GSTPLAY_PAUSE: case GSTPLAY_PAUSE:
statustext = "paused"; statustext = "paused";
update_status_area(status_area); 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); mute_audio(TRUE);
state = GSTPLAY_PAUSE; state = GSTPLAY_PAUSE;
update_buttons(1); update_buttons(1);
break; break;
case GSTPLAY_STOPPED: 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"; statustext = "stopped";
update_status_area(status_area); update_status_area(status_area);
mute_audio(TRUE); mute_audio(TRUE);
@ -232,14 +232,12 @@ static void have_type(GstSink *sink) {
} }
else if (strstr(gsttype->mime, "mpeg1")) { else if (strstr(gsttype->mime, "mpeg1")) {
mpeg1_setup_video_thread(gst_element_get_pad(src,"src"), video_render_queue, GST_ELEMENT(pipeline)); 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()); gst_clock_reset(gst_clock_get_system());
gtk_signal_connect(GTK_OBJECT(show),"frame_displayed", gtk_signal_connect(GTK_OBJECT(show),"frame_displayed",
GTK_SIGNAL_FUNC(frame_displayed),NULL); GTK_SIGNAL_FUNC(frame_displayed),NULL);
} }
else if (strstr(gsttype->mime, "mp3")) { else if (strstr(gsttype->mime, "mp3")) {
mpeg1_setup_audio_thread(gst_element_get_pad(src,"src"), audio_render_queue, GST_ELEMENT(pipeline)); 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()); gst_clock_reset(gst_clock_get_system());
} }
else { else {
@ -254,13 +252,14 @@ static void have_type(GstSink *sink) {
gtk_signal_connect(GTK_OBJECT(parse),"pads_created", gtk_signal_connect(GTK_OBJECT(parse),"pads_created",
GTK_SIGNAL_FUNC(gstplay_parse_pads_created),pipeline); GTK_SIGNAL_FUNC(gstplay_parse_pads_created),pipeline);
} }
gtk_object_set(GTK_OBJECT(src),"offset",0,NULL);
g_print("setting to READY state\n"); g_print("setting to READY state\n");
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
g_print("setting to PLAYING state\n"); g_print("setting to PLAYING state\n");
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
g_print("set to PLAYING state\n"); g_print("set to PLAYING state\n");
gtk_object_set(GTK_OBJECT(src),"offset",0,NULL);
} }
gint start_from_file(guchar *filename) gint start_from_file(guchar *filename)
@ -286,6 +285,8 @@ gint start_from_file(guchar *filename)
gst_element_get_pad(typefind,"sink")); gst_element_get_pad(typefind,"sink"));
g_print("setting to READY state\n"); g_print("setting to READY state\n");
gst_bin_create_plan(GST_BIN(pipeline));
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
state = GSTPLAY_STOPPED; state = GSTPLAY_STOPPED;
@ -315,8 +316,9 @@ main (int argc, char *argv[])
glade_gnome_init(); glade_gnome_init();
gst_init(&argc,&argv); gst_init(&argc,&argv);
g_print("using %s\n", DATADIR"gstplay.glade");
/* load the interface */ /* load the interface */
xml = glade_xml_new("gstplay.glade", "gstplay"); xml = glade_xml_new(DATADIR "gstplay.glade", "gstplay");
/* connect the signals in the interface */ /* connect the signals in the interface */
status_area = glade_xml_get_widget(xml, "status_area"); status_area = glade_xml_get_widget(xml, "status_area");

View file

@ -43,7 +43,7 @@ while test $# -gt 0; do
;; ;;
--cflags) --cflags)
if test $prefix -ef @builddir@ ; then if test $prefix -ef @builddir@ ; then
includes=-I@builddir@ includes=-I@builddir@
elif test @includedir@ != /usr/include ; then elif test @includedir@ != /usr/include ; then
includes=-I@includedir@ includes=-I@includedir@
fi fi
@ -51,10 +51,10 @@ while test $# -gt 0; do
;; ;;
--libs) --libs)
if test $prefix -ef @builddir@ ; then if test $prefix -ef @builddir@ ; then
echo @builddir@/lib@PACKAGE@.la echo @builddir@/libgst.la
else else
libdirs=-L@libdir@ libdirs=-L@libdir@
echo $libdirs -l@PACKAGE@ echo $libdirs -lgst
fi fi
;; ;;
*) *)

View file

@ -4,7 +4,7 @@ filter_LTLIBRARIES = libgstcolorspace.la
libgstcolorspace_la_SOURCES = gstcolorspace.c rgb2rgb.c yuv2rgb.c libgstcolorspace_la_SOURCES = gstcolorspace.c rgb2rgb.c yuv2rgb.c
libgstcolorspaceincludedir = $(includedir)/gst/libs/gstcolorspace.h libgstcolorspaceincludedir = $(includedir)/gst/libs/gstcolorspace
libgstcolorspaceinclude_HEADERS = gstcolorspace.h libgstcolorspaceinclude_HEADERS = gstcolorspace.h
noinst_HEADERS = yuv2rgb.h noinst_HEADERS = yuv2rgb.h

View file

@ -4,7 +4,7 @@ filter_LTLIBRARIES = libgstgetbits.la
libgstgetbits_la_SOURCES = gstgetbits.c gstgetbits_inl.h libgstgetbits_la_SOURCES = gstgetbits.c gstgetbits_inl.h
libgstgetbitsincludedir = $(includedir)/gst/libs/gstgetbits.h libgstgetbitsincludedir = $(includedir)/gst/libs/gstgetbits
libgstgetbitsinclude_HEADERS = gstgetbits.h libgstgetbitsinclude_HEADERS = gstgetbits.h
noinst_HEADERS = gstgetbits.h gstgetbits_inl.h noinst_HEADERS = gstgetbits.h gstgetbits_inl.h

View file

@ -4,6 +4,9 @@ filter_LTLIBRARIES = libgstidct.la
libgstidct_la_SOURCES = fastintidct.c floatidct.c gstidct.c intidct.c mmxidct.S mmx32idct.c 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 bin_PROGRAMS = ieeetest
ieeetest_SOURCES = ieeetest.c 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_CFLAGS = $(shell gnome-config --cflags gnomeui) -g -Wall
ieeetest_LDFLAGS = $(shell gnome-config --libs gnomeui) 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 CFLAGS += -Wall -O2 -funroll-all-loops -finline-functions -ffast-math

View file

@ -4,7 +4,7 @@ filter_LTLIBRARIES = libgstputbits.la
libgstputbits_la_SOURCES = gstputbits.c libgstputbits_la_SOURCES = gstputbits.c
libgstputbitsincludedir = $(includedir)/gst/libs/gstputbits.h libgstputbitsincludedir = $(includedir)/gst/libs/gstputbits
libgstputbitsinclude_HEADERS = gstputbits.h libgstputbitsinclude_HEADERS = gstputbits.h
noinst_HEADERS = gstputbits.h noinst_HEADERS = gstputbits.h

View file

@ -4,7 +4,8 @@ filter_LTLIBRARIES = libgstriff.la
libgstriff_la_SOURCES = gstriffparse.c gstriffencode.c gstriffutil.c 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 CFLAGS += -Wall -O2 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math

View file

@ -4,7 +4,7 @@ filter_LTLIBRARIES = libgstvideoscale.la
libgstvideoscale_la_SOURCES = gstvideoscale.c libgstvideoscale_la_SOURCES = gstvideoscale.c
libgstvideoscaleincludedir = $(includedir)/gst/libs/gstvideoscale.h libgstvideoscaleincludedir = $(includedir)/gst/libs/gstvideoscale
libgstvideoscaleinclude_HEADERS = gstvideoscale.h libgstvideoscaleinclude_HEADERS = gstvideoscale.h
noinst_HEADERS = yuv2rgb.h noinst_HEADERS = yuv2rgb.h

View 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 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 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) CFLAGS += $(DEFINES)
INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/include INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/include

View file

@ -105,7 +105,7 @@ int main(int argc,char *argv[]) {
xmlSaveFile("launch.xml",gst_xml_write(pipeline)); 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); gst_element_set_state(pipeline,GST_STATE_PLAYING);
if (t) if (t)