plugins/Makefile
plugins/au/Makefile
plugins/wav/Makefile
+plugins/riff/Makefile
+plugins/riff/avi/Makefile
plugins/mp3decode/Makefile
plugins/mp3decode/xa/Makefile
plugins/mp3decode/xing/Makefile
*/
void gst_init(int *argc,char **argv[]) {
GstTrace *gst_trace;
- GstElementFactory *factory;
gtk_init(argc,argv);
GstBuffer *parent;
};
+/* initialisation */
+void _gst_buffer_initialize();
/* creating a new buffer from scratch */
GstBuffer *gst_buffer_new();
GstElement *element;
GstElementClass *oclass;
- g_return_if_fail(factory != NULL);
- g_return_if_fail(factory->type != 0);
+ g_return_val_if_fail(factory != NULL, NULL);
+ g_return_val_if_fail(factory->type != 0, NULL);
// create an instance of the element
element = GST_ELEMENT(gtk_type_new(factory->type));
GstMeta *gst_meta_new_size(gint size) {
GstMeta *meta;
- meta = g_malloc(size);
+ meta = g_malloc0(size);
gst_meta_ref(meta);
return meta;
GstPlugin *gst_plugin_new(gchar *name);
void gst_plugin_set_longname(GstPlugin *plugin,gchar *longname);
-void gst_plugin_init();
+void _gst_plugin_initialize();
void gst_plugin_load_all();
gboolean gst_plugin_load(gchar *name);
gboolean gst_plugin_load_absolute(gchar *name);
GTK_ARG_READWRITE, ARG_CREATE_THREAD);
gstelement_class->change_state = gst_thread_change_state;
-// gstelement_class->save_thyself = gst_thread_save_thyself;
+ gstelement_class->save_thyself = gst_thread_save_thyself;
gtkobject_class->set_arg = gst_thread_set_arg;
gtkobject_class->get_arg = gst_thread_get_arg;
/* initialize the subsystem */
-void gst_type_initialize();
+void _gst_type_initialize();
/* create a new type, or find/merge an existing one */
guint16 gst_type_register(GstTypeFactory *factory);
// the position of the window
int wx, wy;
// a reference to the object sending overlay change events
- GstObject *overlay_element;
+ GtkWidget *overlay_element;
// the number of overlay regions
int clip_count;
// the overlay regions of the display window
struct _OverlayClip overlay_clip[32];
+
+ gint width;
+ gint height;
gboolean did_overlay;
gboolean fully_obscured;
#include <gtk/gtk.h>
#include <gst/gst.h>
+#include <string.h>
gint mp3_typefind(GstBuffer *buf,gpointer *private);
gint wav_typefind(GstBuffer *buf,gpointer *private);
{ "audio/wav", ".wav", wav_typefind },
{ "audio/ac3", ".ac3", NULL },
{ "video/raw", ".raw", NULL },
- { "video/mpeg video/mpeg1", ".mpg", NULL },
+ { "video/mpeg video/mpeg1 video/mpeg-system", ".mpg", NULL },
+ { "video/x-msvideo video/msvideo video/avi", ".avi", NULL },
{ NULL, NULL, NULL },
};
gboolean wav_typefind(GstBuffer *buf,gpointer *private) {
gulong *data = (gulong *)GST_BUFFER_DATA(buf);
- if (data[0] != "RIFF") return FALSE;
- if (data[2] != "WAVE") return FALSE;
+ if (strncmp((char *)data[0], "RIFF", 4)) return FALSE;
+ if (strncmp((char *)data[2], "WAVE", 4)) return FALSE;
return TRUE;
}
#noinst_PROGRAMS = basic m types a r plugin w s args mpg123 mcut push qtest
noinst_PROGRAMS = qtest spectrum record wave mp3 teardown buffer mp3parse \
- mpeg2parse mp1parse mp3play ac3parse ac3play dvdcat fake cobin videotest
+ mpeg2parse mp1parse mp3play ac3parse ac3play dvdcat fake cobin videotest \
+ aviparse
SUBDIRS = xml cothreads bindings
wave_LDFLAGS = $(shell gnome-config --libs gnomeui)
videotest_CFLAGS = $(shell gnome-config --cflags gnomeui)
videotest_LDFLAGS = $(shell gnome-config --libs gnomeui)
+aviparse_CFLAGS = $(shell gnome-config --cflags gnomeui)
+aviparse_LDFLAGS = $(shell gnome-config --libs gnomeui)
mp1parse_CFLAGS = $(shell gnome-config --cflags gnomeui)
mp1parse_LDFLAGS = $(shell gnome-config --libs gnomeui)
GstElement *videosink;
GstElement *src;
-void eof(GstSrc *src) {
- g_print("have eos, quitting\n");
- exit(0);
-}
-
-void resize(GtkWidget *wid, GtkRequisition *req, gpointer sink) {
- g_print("have resize %d %d\n", req->width, req->height);
- gtk_object_set(GTK_OBJECT(videosink),"width",req->width,"height",req->height,NULL);
-}
-
-
int main(int argc,char *argv[]) {
GstElement *bin;
GstElementFactory *srcfactory;
GstElementFactory *videosinkfactory;
GtkWidget *appwindow;
+ GtkWidget *vbox1;
+ GtkWidget *button;
+ GtkWidget *draw;
_gst_plugin_spew = TRUE;
gst_pad_connect(gst_element_get_pad(src,"src"),
gst_element_get_pad(videosink,"sink"));
- gtk_signal_connect(GTK_OBJECT(src),"eos",
- GTK_SIGNAL_FUNC(eof),NULL);
-
appwindow = gnome_app_new("Videotest","Videotest");
- gnome_app_set_contents(GNOME_APP(appwindow),
- gst_util_get_widget_arg(GTK_OBJECT(videosink),"widget"));
+
+ vbox1 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_show (vbox1);
+
+ button = gtk_button_new_with_label(_("test"));//_with_label (_("chup"));
+ gtk_widget_show (button);
+ gtk_box_pack_start (GTK_BOX (vbox1), button, FALSE, FALSE, 0);
+ //gtk_widget_set_usize (button, 50, 50);
+ //gtk_widget_set_usize (button, 0, 0);
+
+ draw = gst_util_get_widget_arg(GTK_OBJECT(videosink),"widget"),
+ gtk_box_pack_start (GTK_BOX (vbox1),
+ draw,
+ TRUE, TRUE, 0);
+ gtk_widget_show (draw);
+
+ gnome_app_set_contents(GNOME_APP(appwindow), vbox1);
+
gtk_object_set(GTK_OBJECT(appwindow),"allow_grow",TRUE,NULL);
gtk_object_set(GTK_OBJECT(appwindow),"allow_shrink",TRUE,NULL);
-// gtk_signal_connect(GTK_OBJECT(appwindow),"size-request",
-// GTK_SIGNAL_FUNC(resize),videosink);
gtk_widget_show_all(appwindow);