test/bindings/Makefile
tests/Makefile
tests/sched/Makefile
+tests/eos/Makefile
examples/Makefile
examples/autoplug/Makefile
examples/helloworld/Makefile
examples/thread/Makefile
examples/xml/Makefile
editor/Makefile
+editor/pixmaps/Makefile
tools/Makefile
docs/Makefile
docs/gst/Makefile
fakesrc detects the end of stream. It just sent the last buffer
and sets the srcpad to EOS with gst_pad_eos ().
- the eos handler returns false because queue2 return false on the
+ the eos handler returns false because queue2 returns false on the
eos request. the parent removes fakesrc as an EOS provider.
queue2 was responisble for the EOS delay and so it gets added to the bin
libgsteditorinclude_HEADERS = \
gsteditor.h
-
bin_PROGRAMS = gsteditor
gsteditor_SOURCES = editor.c
gsteditor_LDFLAGS = libgsteditor.la
+gladedir = $(datadir)/gsteditor
+glade_DATA = editor.glade editorelement.glade
noinst_HEADERS = \
gsteditorproject.h \
gsteditorimage.h \
gsteditorcreate.h
-CFLAGS = -O2 -Wall
+CFLAGS = -O2 -Wall -DDATADIR="\"$(gladedir)/\""
+
+SUBDIRS = pixmaps
-EXTRA_DIST = editor.glade editorelement.glade
+EXTRA_DIST = $(glade_DATA)
#include <gnome.h>
#include <gst/gst.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
#include "gsteditorimage.h"
GHashTable *_gst_editor_images;
{GST_EDITOR_IMAGE_TEE, gst_tee_get_type },
};
-GstEditorImage *gst_editor_image_get(GstEditorImageType type) {
-
+GstEditorImage*
+gst_editor_image_get(GstEditorImageType type)
+{
+ struct stat statbuf;
GstEditorImage *new = g_new0(GstEditorImage, 1);
- new->pixmap = gdk_pixmap_colormap_create_from_xpm(NULL, gdk_colormap_get_system(), &new->bitmap, NULL,
+ if (stat (_gst_editor_image_name[type], &statbuf) == 0) {
+ new->pixmap = gdk_pixmap_colormap_create_from_xpm(NULL, gdk_colormap_get_system(), &new->bitmap, NULL,
_gst_editor_image_name[type]);
+ }
+ else {
+ new->pixmap = gdk_pixmap_colormap_create_from_xpm(NULL, gdk_colormap_get_system(), &new->bitmap, NULL,
+ g_strconcat (DATADIR, _gst_editor_image_name[type], NULL));
+ }
return new;
}
#include <gnome.h>
#include <gst/gst.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
#include "gsteditorpalette.h"
#include "gsteditorimage.h"
GtkWidget *palette_window;
connect_struct data;
GModule *symbols;
+ struct stat statbuf;
palette = GST_EDITOR_PALETTE(gtk_type_new(GST_TYPE_EDITOR_PALETTE));
data.palette = palette;
data.symbols = symbols;
- palette->xml = glade_xml_new("editor.glade", "palette_window");
+ if (stat(DATADIR"editor.glade", &statbuf) == 0) {
+ palette->xml = glade_xml_new(DATADIR"editor.glade", "palette_window");
+ }
+ else {
+ palette->xml = glade_xml_new ("editor.glade", "palette_window");
+ }
+ g_assert (palette->xml != NULL);
+
glade_xml_signal_autoconnect_full (palette->xml, gst_editor_palette_connect_func, &data);
palette_window = glade_xml_get_widget(palette->xml, "palette_window");
#include <gnome.h>
#include <gst/gst.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
#include <glade/glade.h>
#include "gsteditorproject.h"
#include "gsteditorpalette.h"
GModule *symbols;
GstEditorPalette *palette;
GList *elements;
+ struct stat statbuf;
view = GST_EDITOR_PROJECT_VIEW(gtk_type_new(GST_TYPE_EDITOR_PROJECT_VIEW));
data.view = view;
data.symbols = symbols;
- view->xml = glade_xml_new("editor.glade", "main_project_window");
+
+ if (stat(DATADIR"editor.glade", &statbuf) == 0) {
+ g_print ("loading from %s\n", DATADIR"editor.glade");
+ view->xml = glade_xml_new(DATADIR"editor.glade", "main_project_window");
+ }
+ else {
+ g_print ("loading from %s\n", "editor.glade");
+ view->xml = glade_xml_new ("editor.glade", "main_project_window");
+ }
+ g_assert (view->xml != NULL);
+
glade_xml_signal_autoconnect_full (view->xml, gst_editor_project_connect_func, &data);
main_window = glade_xml_get_widget(view->xml, "main_project_window");
#include <gst/gst.h>
#include <gst/gstpropsprivate.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
#include "gsteditorproperty.h"
#include "gsteditorimage.h"
GtkWidget *property_window;
connect_struct data;
GModule *symbols;
+ struct stat statbuf;
property = GST_EDITOR_PROPERTY(gtk_type_new(GST_TYPE_EDITOR_PROPERTY));
data.property = property;
data.symbols = symbols;
- property->xml = glade_xml_new("editor.glade", "property_window");
+ if (stat (DATADIR"editor.glade", &statbuf) == 0) {
+ property->xml = glade_xml_new(DATADIR"editor.glade", "property_window");
+ }
+ else {
+ property->xml = glade_xml_new ("editor.glade", "property_window");
+ }
+ g_assert (property->xml != NULL);
+
glade_xml_signal_autoconnect_full (property->xml, gst_editor_property_connect_func, &data);
property_window = glade_xml_get_widget(property->xml, "property_window");
ARG_LOOP_BASED,
ARG_OUTPUT,
ARG_PATERN,
+ ARG_NUM_BUFFERS,
};
#define GST_TYPE_FAKESRC_OUTPUT (gst_fakesrc_output_get_type())
GTK_ARG_READWRITE, ARG_OUTPUT);
gtk_object_add_arg_type ("GstFakeSrc::patern", GTK_TYPE_STRING,
GTK_ARG_READWRITE, ARG_PATERN);
+ gtk_object_add_arg_type ("GstFakeSrc::num_buffers", GTK_TYPE_INT,
+ GTK_ARG_READWRITE, ARG_NUM_BUFFERS);
gtkobject_class->set_arg = gst_fakesrc_set_arg;
gtkobject_class->get_arg = gst_fakesrc_get_arg;
fakesrc->srcpads = g_slist_append(NULL,pad);
fakesrc->loop_based = FALSE;
+ fakesrc->num_buffers = -1;
// we're ready right away, since we don't have any args...
// gst_element_set_state(GST_ELEMENT(fakesrc),GST_STATE_READY);
}
break;
case ARG_PATERN:
break;
+ case ARG_NUM_BUFFERS:
+ src->num_buffers = GTK_VALUE_INT (*arg);
+ break;
default:
break;
}
case ARG_PATERN:
GTK_VALUE_STRING (*arg) = src->patern;
break;
+ case ARG_NUM_BUFFERS:
+ GTK_VALUE_INT (*arg) = src->num_buffers;
+ break;
default:
arg->type = GTK_TYPE_INVALID;
break;
src = GST_FAKESRC(gst_pad_get_parent(pad));
g_return_val_if_fail(GST_IS_FAKESRC(src), NULL);
+ if (src->num_buffers == 0) {
+ gst_pad_set_eos (pad);
+ return NULL;
+ }
+ else {
+ if (src->num_buffers > 0)
+ src->num_buffers--;
+ }
+
g_print("(%s:%s)> ",GST_DEBUG_PAD_NAME(pad));
buf = gst_buffer_new();
GstFakeSrcOutputType output;
gchar *patern;
GList *paternlist;
+ gint num_buffers;
};
struct _GstFakeSrcClass {
GST_INFO (GST_CAT_PADS,"set EOS on src pad %s:%s",GST_DEBUG_PAD_NAME(pad));
GST_FLAG_SET (pad, GST_PAD_EOS);
+ gst_element_signal_eos (GST_ELEMENT (pad->parent));
+
return TRUE;
}
xvlibs=
endif
-gstmediaplay_LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la \
- $(top_builddir)/plugins/videosink/gdkxvimage.lo ${xvlibs} -lXxf86vm
-
+gstmediaplay_LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la
+
#include <config.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
#include <gnome.h>
#include "gstmediaplay.h"
#include "callbacks.h"
{
GModule *symbols;
connect_struct data;
+ struct stat statbuf;
+
- g_print("using %s\n", DATADIR"gstmediaplay.glade");
/* load the interface */
- mplay->xml = glade_xml_new (DATADIR"gstmediaplay.glade", "gstplay");
- //mplay->xml = glade_xml_new ("/usr/local/share/gstplay/gstplay.glade", "gstplay");
- if (mplay->xml == NULL) {
- glade_xml_new ("gstmediaplay.glade", "gstplay");
+ if (stat(DATADIR"gstmediaplay.glade", &statbuf) == 0) {
+ mplay->xml = glade_xml_new (DATADIR"gstmediaplay.glade", "gstplay");
+ }
+ else {
+ mplay->xml = glade_xml_new ("gstmediaplay.glade", "gstplay");
}
g_assert (mplay->xml != NULL);
ARG_LOOP_BASED,
ARG_OUTPUT,
ARG_PATERN,
+ ARG_NUM_BUFFERS,
};
#define GST_TYPE_FAKESRC_OUTPUT (gst_fakesrc_output_get_type())
GTK_ARG_READWRITE, ARG_OUTPUT);
gtk_object_add_arg_type ("GstFakeSrc::patern", GTK_TYPE_STRING,
GTK_ARG_READWRITE, ARG_PATERN);
+ gtk_object_add_arg_type ("GstFakeSrc::num_buffers", GTK_TYPE_INT,
+ GTK_ARG_READWRITE, ARG_NUM_BUFFERS);
gtkobject_class->set_arg = gst_fakesrc_set_arg;
gtkobject_class->get_arg = gst_fakesrc_get_arg;
fakesrc->srcpads = g_slist_append(NULL,pad);
fakesrc->loop_based = FALSE;
+ fakesrc->num_buffers = -1;
// we're ready right away, since we don't have any args...
// gst_element_set_state(GST_ELEMENT(fakesrc),GST_STATE_READY);
}
break;
case ARG_PATERN:
break;
+ case ARG_NUM_BUFFERS:
+ src->num_buffers = GTK_VALUE_INT (*arg);
+ break;
default:
break;
}
case ARG_PATERN:
GTK_VALUE_STRING (*arg) = src->patern;
break;
+ case ARG_NUM_BUFFERS:
+ GTK_VALUE_INT (*arg) = src->num_buffers;
+ break;
default:
arg->type = GTK_TYPE_INVALID;
break;
src = GST_FAKESRC(gst_pad_get_parent(pad));
g_return_val_if_fail(GST_IS_FAKESRC(src), NULL);
+ if (src->num_buffers == 0) {
+ gst_pad_set_eos (pad);
+ return NULL;
+ }
+ else {
+ if (src->num_buffers > 0)
+ src->num_buffers--;
+ }
+
g_print("(%s:%s)> ",GST_DEBUG_PAD_NAME(pad));
buf = gst_buffer_new();
GstFakeSrcOutputType output;
gchar *patern;
GList *paternlist;
+ gint num_buffers;
};
struct _GstFakeSrcClass {