Commit a2f6ad95 authored by Wim Taymans's avatar Wim Taymans
Browse files

Lots of compile fixes for glib2.0

Original commit message from CVS:
Lots of compile fixes for glib2.0
parent 80d8eb35
......@@ -30,7 +30,7 @@ main (int argc, char *argv[])
autoplugger = gst_autoplugfactory_make ("static");
gtk_signal_connect (GTK_OBJECT (autoplugger), "new_object", new_object_added, NULL);
g_signal_connectc (G_OBJECT (autoplugger), "new_object", new_object_added, NULL,FALSE);
element = gst_autoplug_to_caps (autoplugger, testcaps,
gst_pad_get_caps (gst_element_get_pad (osssink, "sink")),
......
......@@ -38,7 +38,7 @@ main (int argc, char *argv[])
gst_element_connect (disksrc, "src", element, "sink");
gtk_object_set (GTK_OBJECT (disksrc), "location", argv[1], NULL);
g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
......
......@@ -13,7 +13,7 @@ int main(int argc,char *argv[]) {
src = gst_elementfactory_make("fakesrc","src");
identity = gst_elementfactory_make("identity","identity");
g_return_val_if_fail(identity != NULL,2);
gtk_object_set(GTK_OBJECT(identity),"loop_based",TRUE,NULL);
g_object_set(G_OBJECT(identity),"loop_based",TRUE,NULL);
sink = gst_elementfactory_make("fakesink","sink");
g_return_val_if_fail(sink != NULL,3);
......
......@@ -28,7 +28,7 @@ main(int argc,char *argv[])
g_return_val_if_fail(pipeline != NULL, 1);
src = gst_elementfactory_make("fakesrc","src");
gtk_object_set (GTK_OBJECT (src), "num_buffers", 1, NULL);
g_object_set (G_OBJECT (src), "num_buffers", 1, NULL);
g_return_val_if_fail(src != NULL, 2);
identity = gst_elementfactory_make("identity","identity");
......@@ -43,8 +43,8 @@ main(int argc,char *argv[])
gst_element_connect(src,"src",identity,"sink");
gst_element_connect(identity,"src",sink,"sink");
gtk_signal_connect (GTK_OBJECT (src), "eos", eos_signal_element, NULL);
gtk_signal_connect (GTK_OBJECT (pipeline), "eos", eos_signal, NULL);
g_signal_connectc (G_OBJECT (src), "eos", eos_signal_element, NULL, FALSE);
g_signal_connectc (G_OBJECT (pipeline), "eos", eos_signal, NULL, FALSE);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
......
......@@ -29,7 +29,7 @@ main(int argc,char *argv[])
g_return_val_if_fail(pipeline != NULL, 1);
src = gst_elementfactory_make("fakesrc","src");
gtk_object_set (GTK_OBJECT (src), "num_buffers", 1, NULL);
g_object_set (G_OBJECT (src), "num_buffers", 1, NULL);
g_return_val_if_fail(src != NULL, 2);
identity = gst_elementfactory_make("identity","identity");
......@@ -46,7 +46,7 @@ main(int argc,char *argv[])
gst_element_connect(identity,"src",sink,"sink");
src2 = gst_elementfactory_make("fakesrc","src2");
gtk_object_set (GTK_OBJECT (src2), "num_buffers", 3, NULL);
g_object_set (G_OBJECT (src2), "num_buffers", 3, NULL);
g_return_val_if_fail(src2 != NULL, 2);
identity2 = gst_elementfactory_make("identity","identity2");
......@@ -62,8 +62,8 @@ main(int argc,char *argv[])
gst_element_connect(src2,"src",identity2,"sink");
gst_element_connect(identity2,"src",sink2,"sink");
gtk_signal_connect (GTK_OBJECT (src), "eos", eos_signal_element, NULL);
gtk_signal_connect (GTK_OBJECT (pipeline), "eos", eos_signal, NULL);
g_signal_connectc (G_OBJECT (src), "eos", eos_signal_element, NULL, FALSE);
g_signal_connectc (G_OBJECT (pipeline), "eos", eos_signal, NULL, FALSE);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
......
......@@ -29,8 +29,8 @@ main(int argc,char *argv[])
g_return_val_if_fail(pipeline != NULL, 1);
src = gst_elementfactory_make("fakesrc","src");
gtk_object_set (GTK_OBJECT (src), "num_buffers", 2, NULL);
gtk_object_set (GTK_OBJECT (src), "num_sources", 2, NULL);
g_object_set (G_OBJECT (src), "num_buffers", 2, NULL);
g_object_set (G_OBJECT (src), "num_sources", 2, NULL);
g_return_val_if_fail(src != NULL, 2);
identity = gst_elementfactory_make("identity","identity");
......@@ -58,8 +58,8 @@ main(int argc,char *argv[])
gst_element_connect(src,"src1",identity2,"sink");
gst_element_connect(identity2,"src",sink2,"sink");
gtk_signal_connect (GTK_OBJECT (src), "eos", eos_signal_element, NULL);
gtk_signal_connect (GTK_OBJECT (pipeline), "eos", eos_signal, NULL);
g_signal_connectc (G_OBJECT (src), "eos", eos_signal_element, NULL, FALSE);
g_signal_connectc (G_OBJECT (pipeline), "eos", eos_signal, NULL, FALSE);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
......
......@@ -29,7 +29,7 @@ main(int argc,char *argv[])
g_return_val_if_fail(pipeline != NULL, 1);
src = gst_elementfactory_make("fakesrc","src");
gtk_object_set (GTK_OBJECT (src), "num_buffers", 1, NULL);
g_object_set (G_OBJECT (src), "num_buffers", 1, NULL);
g_return_val_if_fail(src != NULL, 2);
identity = gst_elementfactory_make("identity","identity");
......@@ -51,7 +51,7 @@ main(int argc,char *argv[])
gst_element_connect(identity,"src",sink,"sink");
src2 = gst_elementfactory_make("fakesrc","src2");
gtk_object_set (GTK_OBJECT (src2), "num_buffers", 3, NULL);
g_object_set (G_OBJECT (src2), "num_buffers", 3, NULL);
g_return_val_if_fail(src2 != NULL, 2);
identity2 = gst_elementfactory_make("identity","identity2");
......@@ -67,8 +67,8 @@ main(int argc,char *argv[])
gst_element_connect(src2,"src",identity2,"sink");
gst_element_connect(identity2,"src",sink2,"sink");
gtk_signal_connect (GTK_OBJECT (src), "eos", eos_signal_element, NULL);
gtk_signal_connect (GTK_OBJECT (pipeline), "eos", eos_signal, NULL);
g_signal_connectc (G_OBJECT (src), "eos", eos_signal_element, NULL, FALSE);
g_signal_connectc (G_OBJECT (pipeline), "eos", eos_signal, NULL, FALSE);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
......
......@@ -29,11 +29,11 @@ main(int argc,char *argv[])
g_return_val_if_fail(pipeline != NULL, 1);
src = gst_elementfactory_make("fakesrc","src");
gtk_object_set (GTK_OBJECT (src), "num_buffers", 4, NULL);
g_object_set (G_OBJECT (src), "num_buffers", 4, NULL);
g_return_val_if_fail(src != NULL, 2);
identity = gst_elementfactory_make("identity","identity");
gtk_object_set (GTK_OBJECT (identity), "sleep_time", 1000000, NULL);
g_object_set (G_OBJECT (identity), "sleep_time", 1000000, NULL);
g_return_val_if_fail(identity != NULL, 3);
sink = gst_elementfactory_make("fakesink","sink");
......@@ -52,7 +52,7 @@ main(int argc,char *argv[])
gst_element_connect(identity,"src",sink,"sink");
src2 = gst_elementfactory_make("fakesrc","src2");
gtk_object_set (GTK_OBJECT (src2), "num_buffers", 1, NULL);
g_object_set (G_OBJECT (src2), "num_buffers", 1, NULL);
g_return_val_if_fail(src2 != NULL, 2);
identity2 = gst_elementfactory_make("identity","identity2");
......@@ -68,10 +68,10 @@ main(int argc,char *argv[])
gst_element_connect(src2,"src",identity2,"sink");
gst_element_connect(identity2,"src",sink2,"sink");
gtk_signal_connect (GTK_OBJECT (src), "eos", eos_signal_element, NULL);
gtk_signal_connect (GTK_OBJECT (src2), "eos", eos_signal_element, NULL);
gtk_signal_connect (GTK_OBJECT (pipeline), "eos", eos_signal, NULL);
gtk_signal_connect (GTK_OBJECT (thread), "eos", eos_signal_element, NULL);
g_signal_connectc (G_OBJECT (src), "eos", eos_signal_element, NULL, FALSE);
g_signal_connectc (G_OBJECT (src2), "eos", eos_signal_element, NULL, FALSE);
g_signal_connectc (G_OBJECT (pipeline), "eos", eos_signal, NULL, FALSE);
g_signal_connectc (G_OBJECT (thread), "eos", eos_signal_element, NULL, FALSE);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
......
......@@ -29,14 +29,14 @@ main(int argc,char *argv[])
g_return_val_if_fail(pipeline != NULL, 1);
src2 = gst_elementfactory_make("fakesrc","src2");
gtk_object_set (GTK_OBJECT (src2), "num_buffers", 4, NULL);
g_object_set (G_OBJECT (src2), "num_buffers", 4, NULL);
g_return_val_if_fail(src2 != NULL, 2);
identity2 = gst_elementfactory_make("identity","identity2");
g_return_val_if_fail(identity2 != NULL, 3);
queue = gst_elementfactory_make("queue","queue");
gtk_object_set (GTK_OBJECT (queue), "max_level", 1, NULL);
g_object_set (G_OBJECT (queue), "max_level", 1, NULL);
g_return_val_if_fail(queue != NULL, 4);
gst_element_connect(src2,"src",identity2,"sink");
......@@ -47,7 +47,7 @@ main(int argc,char *argv[])
gst_bin_add(pipeline,GST_ELEMENT(queue));
identity = gst_elementfactory_make("identity","identity");
//gtk_object_set (GTK_OBJECT (identity), "sleep_time", 1000000, NULL);
//g_object_set (G_OBJECT (identity), "sleep_time", 1000000, NULL);
g_return_val_if_fail(identity != NULL, 3);
sink = gst_elementfactory_make("fakesink","sink");
......@@ -64,10 +64,10 @@ main(int argc,char *argv[])
gst_element_connect(queue,"src",identity,"sink");
gst_element_connect(identity,"src",sink,"sink");
gtk_signal_connect (GTK_OBJECT (src2), "eos", eos_signal_element, NULL);
gtk_signal_connect (GTK_OBJECT (queue), "eos", eos_signal_element, NULL);
gtk_signal_connect (GTK_OBJECT (pipeline), "eos", eos_signal, NULL);
gtk_signal_connect (GTK_OBJECT (thread), "eos", eos_signal_element, NULL);
g_signal_connectc (G_OBJECT (src2), "eos", eos_signal_element, NULL, FALSE);
g_signal_connectc (G_OBJECT (queue), "eos", eos_signal_element, NULL, FALSE);
g_signal_connectc (G_OBJECT (pipeline), "eos", eos_signal, NULL, FALSE);
g_signal_connectc (G_OBJECT (thread), "eos", eos_signal_element, NULL, FALSE);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
......
......@@ -14,9 +14,9 @@ eos_signal (GstElement *element)
gst_element_set_state (GST_ELEMENT (element), GST_STATE_NULL);
g_print ("quiting main loop\n");
gdk_threads_enter ();
gtk_main_quit();
gdk_threads_leave ();
//gdk_threads_enter ();
//g_main_quit();
//gdk_threads_leave ();
g_print ("quited main loop\n");
}
......@@ -35,7 +35,7 @@ main(int argc,char *argv[])
g_return_val_if_fail(bin != NULL, 1);
src = gst_elementfactory_make ("fakesrc", "src");
gtk_object_set (GTK_OBJECT (src), "num_buffers", 1, NULL);
g_object_set (G_OBJECT (src), "num_buffers", 1, NULL);
g_return_val_if_fail (src != NULL, 2);
identity = gst_elementfactory_make ("identity", "identity");
......@@ -52,15 +52,15 @@ main(int argc,char *argv[])
gst_element_connect(src, "src", identity, "sink");
gst_element_connect(identity, "src", sink, "sink");
gtk_signal_connect (GTK_OBJECT (src), "eos", eos_signal_element, NULL);
gtk_signal_connect (GTK_OBJECT (bin), "eos", eos_signal_element, NULL);
gtk_signal_connect (GTK_OBJECT (thread), "eos", eos_signal, NULL);
g_signal_connectc (G_OBJECT (src), "eos", eos_signal_element, NULL, FALSE);
g_signal_connectc (G_OBJECT (bin), "eos", eos_signal_element, NULL, FALSE);
g_signal_connectc (G_OBJECT (thread), "eos", eos_signal, NULL, FALSE);
gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PLAYING);
gdk_threads_enter ();
gtk_main();
gdk_threads_leave ();
//gdk_threads_enter ();
//g_main();
//gdk_threads_leave ();
g_print ("quiting\n");
......
......@@ -127,7 +127,7 @@ int main(int argc,char *argv[]) {
//return;
g_print("\n\nSetting EOS on fakesrc and iterating again:\n");
gtk_object_set(GTK_OBJECT(src),"eos",TRUE,NULL);
g_object_set(G_OBJECT(src),"eos",TRUE,NULL);
gst_bin_iterate(thread);
g_print("\n\nIterating:\n");
......
......@@ -46,11 +46,11 @@ int main(int argc,char *argv[]) {
pipeline = gst_pipeline_new("pipeline");
sourcethread = gst_elementfactory_make("thread","sourcethread");
src = gst_elementfactory_make("disksrc","src");
gtk_object_set(GTK_OBJECT(src),"location","/home/omega/media/AlienSong.mpg",NULL);
g_object_set(G_OBJECT(src),"location","/home/omega/media/AlienSong.mpg",NULL);
parse = gst_elementfactory_make("mpeg1parse","parse");
gtk_signal_connect(GTK_OBJECT(parse),"new_pad",
GTK_SIGNAL_FUNC(new_pad),pipeline);
g_signal_connectc(G_OBJECT(parse),"new_pad",
G_CALLBACK(new_pad),pipeline,FALSE);
gst_bin_add(GST_BIN(sourcethread),src);
gst_bin_add(GST_BIN(sourcethread),parse);
......
......@@ -56,15 +56,15 @@ int main(int argc,char *argv[]) {
src = gst_elementfactory_make("fdsrc","src");
g_return_val_if_fail(src != NULL,1);
gtk_object_set(GTK_OBJECT(src),"location",fdin,NULL);
g_object_set(G_OBJECT(src),"location",fdin,NULL);
lame = gst_elementfactory_make("lame","encoder");
g_return_val_if_fail(lame != NULL,2);
gtk_object_set(GTK_OBJECT(lame),"bitrate",bitrate,NULL);
g_object_set(G_OBJECT(lame),"bitrate",bitrate,NULL);
sink = gst_elementfactory_make("fdsink","sink");
g_return_val_if_fail(sink != NULL,3);
gtk_object_set(GTK_OBJECT(src),"fd",fdout,NULL);
g_object_set(G_OBJECT(src),"fd",fdout,NULL);
gst_bin_add(GST_BIN(pipeline),src);
gst_bin_add(GST_BIN(pipeline),lame);
......
......@@ -21,11 +21,11 @@ int main(int argc,char *argv[]) {
paranoia = gst_elementfactory_make("cdparanoia","paranoia");
g_return_val_if_fail(paranoia != NULL,3);
gtk_object_set(GTK_OBJECT(paranoia),"paranoia_mode",0,NULL);
// gtk_object_set(GTK_OBJECT(paranoia),"start_sector",0,"end_sector",75,NULL);
g_object_set(G_OBJECT(paranoia),"paranoia_mode",0,NULL);
// g_object_set(G_OBJECT(paranoia),"start_sector",0,"end_sector",75,NULL);
queue = gst_elementfactory_make("queue","queue");
gtk_object_set(GTK_OBJECT(queue),"max_level",750,NULL);
g_object_set(G_OBJECT(queue),"max_level",750,NULL);
g_return_val_if_fail(queue != NULL,4);
osssink = gst_elementfactory_make("fakesink","osssink");
......@@ -40,8 +40,8 @@ int main(int argc,char *argv[]) {
gst_element_connect(paranoia,"src",queue,"sink");
gst_element_connect(queue,"src",audio_thread,"sink");
gtk_signal_connect(GTK_OBJECT(gst_element_get_pad(paranoia,"src")),"eos",
GTK_SIGNAL_FUNC(paranoia_eos),NULL);
g_signal_connectc(G_OBJECT(gst_element_get_pad(paranoia,"src")),"eos",
G_CALLBACK(paranoia_eos),NULL,FALSE);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
if (GST_STATE(paranoia) != GST_STATE_PLAYING) fprintf(stderr,"error: state not set\n");
......
......@@ -21,7 +21,7 @@ fprintf(stderr,"QUEUE: fakesrc\n");
fprintf(stderr,"QUEUE: queue\n");
queue = gst_elementfactory_make("queue","queue");
g_return_val_if_fail(4,queue != NULL);
gtk_object_set(GTK_OBJECT(queue),"max_level",1,NULL);
g_object_set(G_OBJECT(queue),"max_level",1,NULL);
fprintf(stderr,"QUEUE: fakesink\n");
sink = gst_elementfactory_make("fakesink","sink");
g_return_val_if_fail(5,sink != NULL);
......
......@@ -29,15 +29,15 @@ int main(int argc,char *argv[]) {
paranoia = gst_elementfactory_make("cdparanoia","paranoia");
g_return_val_if_fail(paranoia != NULL,2);
gtk_object_set(GTK_OBJECT(paranoia),"paranoia_mode",0,NULL);
// gtk_object_set(GTK_OBJECT(paranoia),"start_sector",0,"end_sector",75,NULL);
g_object_set(G_OBJECT(paranoia),"paranoia_mode",0,NULL);
// g_object_set(G_OBJECT(paranoia),"start_sector",0,"end_sector",75,NULL);
lame = gst_elementfactory_make("lame","lame");
g_return_val_if_fail(lame != NULL,3);
gtk_object_set(GTK_OBJECT(lame),"bitrate",128,NULL);
g_object_set(G_OBJECT(lame),"bitrate",128,NULL);
sink = gst_elementfactory_make("fdsink","fdsink");
g_return_val_if_fail(sink != NULL,4);
gtk_object_set(GTK_OBJECT(sink),"fd",outfile,NULL);
g_object_set(G_OBJECT(sink),"fd",outfile,NULL);
fprintf(stderr,"paranoia is %p, lame is %p, sink is %p\n",paranoia,lame,sink);
gst_bin_add(GST_BIN(pipeline),paranoia);
......
......@@ -54,8 +54,8 @@ int main(int argc,char *argv[])
src = gst_bin_get_by_name (GST_BIN (bin), "fakesrc");
if (src) {
gtk_signal_connect (GTK_OBJECT(src), "handoff",
GTK_SIGNAL_FUNC(buffer_handoff_src), bin);
g_signal_connectc (G_OBJECT(src), "handoff",
G_CALLBACK(buffer_handoff_src), bin,FALSE);
}
else {
g_print ("could not find src element\n");
......@@ -64,8 +64,8 @@ int main(int argc,char *argv[])
sink = gst_bin_get_by_name (GST_BIN (bin), "fakesink");
if (sink) {
gtk_signal_connect (GTK_OBJECT(sink), "handoff",
GTK_SIGNAL_FUNC(buffer_handoff_sink), bin);
g_signal_connectc (G_OBJECT(sink), "handoff",
G_CALLBACK(buffer_handoff_sink), bin,FALSE);
}
else {
g_print ("could not find sink element\n");
......
......@@ -25,16 +25,16 @@ int main(int argc,char *argv[]) {
bin = gst_bin_new("bin");
g_return_val_if_fail(1,bin != NULL);
gtk_signal_connect(GTK_OBJECT(src),"state_change",
GTK_SIGNAL_FUNC(state_change),NULL);
gtk_signal_connect(GTK_OBJECT(subbin),"state_change",
GTK_SIGNAL_FUNC(state_change),NULL);
gtk_signal_connect(GTK_OBJECT(filter),"state_change",
GTK_SIGNAL_FUNC(state_change),NULL);
gtk_signal_connect(GTK_OBJECT(sink),"state_change",
GTK_SIGNAL_FUNC(state_change),NULL);
gtk_signal_connect(GTK_OBJECT(bin),"state_change",
GTK_SIGNAL_FUNC(state_change),NULL);
g_signal_connectc (G_OBJECT(src),"state_change",
G_CALLBACK(state_change),NULL,FALSE);
g_signal_connectc (G_OBJECT(subbin),"state_change",
G_CALLBACK(state_change),NULL,FALSE);
g_signal_connectc (G_OBJECT(filter),"state_change",
G_CALLBACK(state_change),NULL,FALSE);
g_signal_connectc (G_OBJECT(sink),"state_change",
G_CALLBACK(state_change),NULL,FALSE);
g_signal_connectc (G_OBJECT(bin),"state_change",
G_CALLBACK(state_change),NULL,FALSE);
g_print("STATES: element '%s' starts at state %d(%s)\n",gst_element_get_name(src),
GST_STATE(src),gst_element_statename(GST_STATE(src)));
......
......@@ -12,9 +12,9 @@ int main(int argc,char *argv[]) {
pipeline = GST_BIN (gst_pipeline_new("pipeline"));
thread = GST_BIN (gst_thread_new("thread"));
src = gst_elementfactory_make("fakesrc","src");
gtk_object_set(GTK_OBJECT(src),"silent",TRUE,NULL);
g_object_set(G_OBJECT(src),"silent",TRUE,NULL);
sink = gst_elementfactory_make("fakesink","sink");
gtk_object_set(GTK_OBJECT(sink),"silent",TRUE,NULL);
g_object_set(G_OBJECT(sink),"silent",TRUE,NULL);
fprintf(stderr,"ADDING src\n");
gst_bin_add(thread,src);
......
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