Commit 10f53034 authored by Wim Taymans's avatar Wim Taymans
Browse files

Fixed the examples for glib2

Original commit message from CVS:
Fixed the examples for glib2
Removed plugins for now (need to run the script on it)
parent a2f6ad95
......@@ -8,4 +8,6 @@ endif
SUBDIRS = $(GNOME_SUBDS) \
helloworld helloworld2 \
queue queue2 queue3 queue4 \
launch thread xml plugins typefind mixer
launch thread xml typefind mixer
DIST_SUBDIRS = autoplug plugins
......@@ -27,9 +27,9 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
gtk_signal_connect(GTK_OBJECT(disksrc),"eos",
GTK_SIGNAL_FUNC(eos),NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
g_signal_connectc(G_OBJECT(disksrc),"eos",
G_CALLBACK(eos),NULL,FALSE);
/* now it's time to get the parser */
parse = gst_elementfactory_make("mp3parse","parse");
......
......@@ -32,9 +32,9 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
gtk_signal_connect(GTK_OBJECT(disksrc),"eos",
GTK_SIGNAL_FUNC(eos),NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
g_signal_connectc(G_OBJECT(disksrc),"eos",
G_CALLBACK(eos),NULL,FALSE);
/* and an audio sink */
osssink = gst_elementfactory_make("osssink", "play_audio");
......
......@@ -270,14 +270,14 @@ create_input_channel (int id, char* location)
g_assert(channel->disksrc != NULL);
GST_DEBUG(0, "c_i_p : setting location\n");
gtk_object_set(GTK_OBJECT(channel->disksrc),"location", location, NULL);
g_object_set(G_OBJECT(channel->disksrc),"location", location, NULL);
/* add disksrc to the bin before autoplug */
gst_bin_add(GST_BIN(channel->pipe), channel->disksrc);
/* connect signal to eos of disksrc */
gtk_signal_connect(GTK_OBJECT(channel->disksrc),"eos",
GTK_SIGNAL_FUNC(eos),NULL);
g_signal_connectc (G_OBJECT(channel->disksrc),"eos",
G_CALLBACK(eos),NULL,FALSE);
#ifdef DEBUG
......@@ -395,7 +395,7 @@ void env_register_cp (GstElement *volenv, double cp_time, double cp_level)
char buffer[30];
sprintf (buffer, "%f:%f", cp_time, cp_level);
gtk_object_set(GTK_OBJECT(volenv), "controlpoint", buffer, NULL);
g_object_set(G_OBJECT(volenv), "controlpoint", buffer, NULL);
}
......@@ -25,7 +25,7 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
parse = gst_elementfactory_make("mp3parse", "parse");
decode = gst_elementfactory_make("mpg123", "decode");
......
......@@ -35,9 +35,9 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
gtk_signal_connect(GTK_OBJECT(disksrc),"eos",
GTK_SIGNAL_FUNC(eos), thread);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
g_signal_connectc (G_OBJECT(disksrc),"eos",
G_CALLBACK(eos), thread, FALSE);
queue = gst_elementfactory_make("queue", "queue");
......
......@@ -35,9 +35,9 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
gtk_signal_connect(GTK_OBJECT(disksrc),"eos",
GTK_SIGNAL_FUNC(eos), thread);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
g_signal_connectc(G_OBJECT(disksrc),"eos",
G_CALLBACK(eos), thread, FALSE);
queue = gst_elementfactory_make("queue", "queue");
......
......@@ -37,9 +37,9 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
gtk_signal_connect(GTK_OBJECT(disksrc),"eos",
GTK_SIGNAL_FUNC(eos), thread);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
g_signal_connectc(G_OBJECT(disksrc),"eos",
G_CALLBACK(eos), thread, FALSE);
queue = gst_elementfactory_make("queue", "queue");
queue2 = gst_elementfactory_make("queue", "queue2");
......
......@@ -36,9 +36,9 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
gtk_signal_connect(GTK_OBJECT(disksrc),"eos",
GTK_SIGNAL_FUNC(eos), thread);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
g_signal_connectc(G_OBJECT(disksrc),"eos",
G_CALLBACK(eos), thread, FALSE);
/* and an audio sink */
osssink = gst_elementfactory_make("osssink", "play_audio");
......
......@@ -34,7 +34,7 @@ main(int argc, char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
typefind = gst_elementfactory_make("typefind", "typefind");
g_assert(typefind != NULL);
......@@ -43,8 +43,8 @@ main(int argc, char *argv[])
gst_bin_add(GST_BIN(bin), disksrc);
gst_bin_add(GST_BIN(bin), typefind);
gtk_signal_connect (GTK_OBJECT (typefind), "have_type",
type_found, NULL);
g_signal_connectc (G_OBJECT (typefind), "have_type",
type_found, NULL, FALSE);
gst_pad_connect(gst_element_get_pad(disksrc,"src"),
gst_element_get_pad(typefind,"sink"));
......
......@@ -32,12 +32,12 @@ int main(int argc,char *argv[])
//thread = gst_thread_new("thread");
thread = gst_elementfactory_make("thread", "thread");
g_assert(thread != NULL);
gtk_signal_connect (GTK_OBJECT (thread), "object_saved", object_saved, g_strdup ("decoder thread"));
g_signal_connectc (G_OBJECT (thread), "object_saved", object_saved, g_strdup ("decoder thread"), FALSE);
thread2 = gst_elementfactory_make("thread", "thread2");
//thread2 = gst_thread_new("thread2");
g_assert(thread2 != NULL);
gtk_signal_connect (GTK_OBJECT (thread2), "object_saved", object_saved, g_strdup ("render thread"));
g_signal_connectc (G_OBJECT (thread2), "object_saved", object_saved, g_strdup ("render thread"), FALSE);
/* create a new bin to hold the elements */
bin = gst_bin_new("bin");
......@@ -46,7 +46,7 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
queue = gst_elementfactory_make("queue", "queue");
queue2 = gst_elementfactory_make("queue", "queue2");
......
......@@ -35,7 +35,7 @@ int main(int argc,char *argv[])
xml = gst_xml_new ();
gtk_signal_connect (GTK_OBJECT (xml), "object_loaded", xml_loaded, xml);
g_signal_connectc (G_OBJECT (xml), "object_loaded", xml_loaded, xml, FALSE);
ret = gst_xml_parse_file(xml, "xmlTest.gst", NULL);
g_assert (ret == TRUE);
......
......@@ -8,4 +8,6 @@ endif
SUBDIRS = $(GNOME_SUBDS) \
helloworld helloworld2 \
queue queue2 queue3 queue4 \
launch thread xml plugins typefind mixer
launch thread xml typefind mixer
DIST_SUBDIRS = autoplug plugins
......@@ -27,9 +27,9 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
gtk_signal_connect(GTK_OBJECT(disksrc),"eos",
GTK_SIGNAL_FUNC(eos),NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
g_signal_connectc(G_OBJECT(disksrc),"eos",
G_CALLBACK(eos),NULL,FALSE);
/* now it's time to get the parser */
parse = gst_elementfactory_make("mp3parse","parse");
......
......@@ -32,9 +32,9 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
gtk_signal_connect(GTK_OBJECT(disksrc),"eos",
GTK_SIGNAL_FUNC(eos),NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
g_signal_connectc(G_OBJECT(disksrc),"eos",
G_CALLBACK(eos),NULL,FALSE);
/* and an audio sink */
osssink = gst_elementfactory_make("osssink", "play_audio");
......
......@@ -270,14 +270,14 @@ create_input_channel (int id, char* location)
g_assert(channel->disksrc != NULL);
GST_DEBUG(0, "c_i_p : setting location\n");
gtk_object_set(GTK_OBJECT(channel->disksrc),"location", location, NULL);
g_object_set(G_OBJECT(channel->disksrc),"location", location, NULL);
/* add disksrc to the bin before autoplug */
gst_bin_add(GST_BIN(channel->pipe), channel->disksrc);
/* connect signal to eos of disksrc */
gtk_signal_connect(GTK_OBJECT(channel->disksrc),"eos",
GTK_SIGNAL_FUNC(eos),NULL);
g_signal_connectc (G_OBJECT(channel->disksrc),"eos",
G_CALLBACK(eos),NULL,FALSE);
#ifdef DEBUG
......@@ -395,7 +395,7 @@ void env_register_cp (GstElement *volenv, double cp_time, double cp_level)
char buffer[30];
sprintf (buffer, "%f:%f", cp_time, cp_level);
gtk_object_set(GTK_OBJECT(volenv), "controlpoint", buffer, NULL);
g_object_set(G_OBJECT(volenv), "controlpoint", buffer, NULL);
}
......@@ -25,7 +25,7 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
parse = gst_elementfactory_make("mp3parse", "parse");
decode = gst_elementfactory_make("mpg123", "decode");
......
......@@ -35,9 +35,9 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
gtk_signal_connect(GTK_OBJECT(disksrc),"eos",
GTK_SIGNAL_FUNC(eos), thread);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
g_signal_connectc (G_OBJECT(disksrc),"eos",
G_CALLBACK(eos), thread, FALSE);
queue = gst_elementfactory_make("queue", "queue");
......
......@@ -35,9 +35,9 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
gtk_signal_connect(GTK_OBJECT(disksrc),"eos",
GTK_SIGNAL_FUNC(eos), thread);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
g_signal_connectc(G_OBJECT(disksrc),"eos",
G_CALLBACK(eos), thread, FALSE);
queue = gst_elementfactory_make("queue", "queue");
......
......@@ -37,9 +37,9 @@ int main(int argc,char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source");
g_assert(disksrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
gtk_signal_connect(GTK_OBJECT(disksrc),"eos",
GTK_SIGNAL_FUNC(eos), thread);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL);
g_signal_connectc(G_OBJECT(disksrc),"eos",
G_CALLBACK(eos), thread, FALSE);
queue = gst_elementfactory_make("queue", "queue");
queue2 = gst_elementfactory_make("queue", "queue2");
......
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