diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2001-06-22 00:43:49 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2001-06-22 00:43:49 +0000 |
commit | 80d8eb350ce41ed03ff3100614f7a052f7349ec6 (patch) | |
tree | 6ac5977903c3cc327e4a9e8b2997a02257cc9b7f | |
parent | 17be662ab287b0fd93b08f5390e746fbbd84eba7 (diff) |
Lots of compile fixes against glib2.0
Original commit message from CVS:
Lots of compile fixes against glib2.0
-rw-r--r-- | test/ac3parse.c | 2 | ||||
-rw-r--r-- | test/ac3play.c | 4 | ||||
-rw-r--r-- | test/avi2mpg.c | 38 | ||||
-rw-r--r-- | test/dvdcat.c | 6 | ||||
-rw-r--r-- | test/lat.c | 16 | ||||
-rw-r--r-- | test/mp1tomp1.c | 22 | ||||
-rw-r--r-- | test/mp2toavi.c | 56 | ||||
-rw-r--r-- | test/mp2tomp1.c | 44 | ||||
-rw-r--r-- | test/mp3.c | 6 | ||||
-rw-r--r-- | test/mp3mad.c | 2 | ||||
-rw-r--r-- | test/mp3parse.c | 6 | ||||
-rw-r--r-- | test/mp3play.c | 6 | ||||
-rw-r--r-- | test/mp3tovorbis.c | 8 | ||||
-rw-r--r-- | test/pipetest.c | 8 | ||||
-rw-r--r-- | test/qtest.c | 8 | ||||
-rw-r--r-- | test/record.c | 2 | ||||
-rw-r--r-- | test/vidcapture.c | 12 | ||||
-rw-r--r-- | test/vidcapture2.c | 12 | ||||
-rw-r--r-- | test/xmmstest.c | 14 |
19 files changed, 135 insertions, 137 deletions
diff --git a/test/ac3parse.c b/test/ac3parse.c index 48d148df7..25431d78a 100644 --- a/test/ac3parse.c +++ b/test/ac3parse.c @@ -30,7 +30,7 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_create(srcfactory,"src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],"bytesperread",4096,NULL); + g_object_set(G_OBJECT(src),"location",argv[1],"bytesperread",4096,NULL); g_print("should be using file '%s'\n",argv[1]); parse = gst_elementfactory_create(parsefactory,"parse"); g_return_val_if_fail(parse != NULL, -1); diff --git a/test/ac3play.c b/test/ac3play.c index ebd954793..292440e2a 100644 --- a/test/ac3play.c +++ b/test/ac3play.c @@ -23,7 +23,7 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_make("disksrc","src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1],NULL); // g_print("should be using file '%s'\n",argv[1]); parse = gst_elementfactory_make("ac3parse","parse"); g_return_val_if_fail(parse != NULL, -1); @@ -58,7 +58,7 @@ int main(int argc,char *argv[]) { xmlSaveFile("ac3play.gst", gst_xml_write(GST_ELEMENT(pipeline))); // set thread start state - gtk_object_set(GTK_OBJECT(decodethread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(decodethread),"create_thread",TRUE,NULL); g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); diff --git a/test/avi2mpg.c b/test/avi2mpg.c index 1d64a9ab9..91464b55a 100644 --- a/test/avi2mpg.c +++ b/test/avi2mpg.c @@ -40,7 +40,7 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) { g_return_if_fail(audio_thread != NULL); gst_bin_add(GST_BIN(audio_thread),GST_ELEMENT(audio_encode)); - gtk_object_set(GTK_OBJECT(mux),"audio","00",NULL); + g_object_set(G_OBJECT(mux),"audio","00",NULL); // set up pad connections gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), @@ -50,7 +50,7 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) { // construct queue and connect everything in the main pipelie audio_queue = gst_elementfactory_make("queue","audio_queue"); - gtk_object_set(GTK_OBJECT(audio_queue),"max_level",BUFFER,NULL); + g_object_set(G_OBJECT(audio_queue),"max_level",BUFFER,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_thread)); gst_pad_connect(pad, @@ -60,7 +60,7 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) { // set up thread state and kick things off - gtk_object_set(GTK_OBJECT(audio_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(audio_thread),"create_thread",TRUE,NULL); g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(audio_thread),GST_STATE_READY); } else if (strncmp(gst_pad_get_name(pad), "video_", 6) == 0) { @@ -74,17 +74,17 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) { g_return_if_fail(smooth != NULL); median = gst_elementfactory_make("median","median"); g_return_if_fail(median != NULL); - gtk_object_set(GTK_OBJECT(median),"filtersize",5,NULL); - gtk_object_set(GTK_OBJECT(median),"active",TRUE,NULL); + g_object_set(G_OBJECT(median),"filtersize",5,NULL); + g_object_set(G_OBJECT(median),"active",TRUE,NULL); - gtk_object_set(GTK_OBJECT(smooth),"filtersize",16,NULL); - gtk_object_set(GTK_OBJECT(smooth),"tolerance",16,NULL); - gtk_object_set(GTK_OBJECT(smooth),"active",FALSE,NULL); + g_object_set(G_OBJECT(smooth),"filtersize",16,NULL); + g_object_set(G_OBJECT(smooth),"tolerance",16,NULL); + g_object_set(G_OBJECT(smooth),"active",FALSE,NULL); encode = gst_elementfactory_make("mpeg2enc","encode"); g_return_if_fail(encode != NULL); - gtk_object_set(GTK_OBJECT(mux),"video","00",NULL); + g_object_set(G_OBJECT(mux),"video","00",NULL); // create the thread and pack stuff into it video_thread = gst_thread_new("video_thread"); @@ -105,7 +105,7 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) { // construct queue and connect everything in the main pipeline video_queue = gst_elementfactory_make("queue","video_queue"); - gtk_object_set(GTK_OBJECT(video_queue),"max_level",BUFFER,NULL); + g_object_set(G_OBJECT(video_queue),"max_level",BUFFER,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_thread)); gst_pad_connect(pad, @@ -114,7 +114,7 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) { gst_element_get_pad(video_thread,"sink")); // set up thread state and kick things off - gtk_object_set(GTK_OBJECT(video_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(video_thread),"create_thread",TRUE,NULL); g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(video_thread),GST_STATE_READY); } @@ -139,7 +139,7 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_make("disksrc","src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1],NULL); g_print("should be using file '%s'\n",argv[1]); parse = gst_elementfactory_make("avidecoder","parse"); g_return_val_if_fail(parse != NULL, -1); @@ -153,18 +153,18 @@ int main(int argc,char *argv[]) { g_return_val_if_fail(fdsinkfactory != NULL, -1); fdsink = gst_elementfactory_create(fdsinkfactory,"fdsink"); g_return_val_if_fail(fdsink != NULL, -1); - gtk_object_set(GTK_OBJECT(fdsink),"fd",fd,NULL); + g_object_set(G_OBJECT(fdsink),"fd",fd,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(mux)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(fdsink)); - gtk_signal_connect(GTK_OBJECT(parse),"new_pad", - GTK_SIGNAL_FUNC(new_pad_created),pipeline); + g_signal_connectc(G_OBJECT(parse),"new_pad", + G_CALLBACK(new_pad_created),pipeline, FALSE); - gtk_signal_connect(GTK_OBJECT(src),"eos", - GTK_SIGNAL_FUNC(eof),NULL); + g_signal_connectc(G_OBJECT(src),"eos", + G_CALLBACK(eof),NULL, FALSE); gst_pad_connect(gst_element_get_pad(src,"src"), gst_element_get_pad(parse,"sink")); @@ -178,9 +178,7 @@ int main(int argc,char *argv[]) { g_idle_add(idle_func,pipeline); - gdk_threads_enter(); - gtk_main(); - gdk_threads_leave(); + //gtk_main(); return 0; } diff --git a/test/dvdcat.c b/test/dvdcat.c index 6d065a815..e8c5c6c5d 100644 --- a/test/dvdcat.c +++ b/test/dvdcat.c @@ -24,13 +24,13 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_make("dvdsrc","src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1],NULL); if (argc >= 3) - gtk_object_set(GTK_OBJECT(src),"offset",atoi(argv[2]),NULL); + g_object_set(G_OBJECT(src),"offset",atoi(argv[2]),NULL); sink = gst_elementfactory_make("fdsink","sink"); g_return_val_if_fail(sink != NULL, -1); - gtk_object_set(GTK_OBJECT(sink),"fd",fd,NULL); + g_object_set(G_OBJECT(sink),"fd",fd,NULL); // construct the outer pipeline gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src)); diff --git a/test/lat.c b/test/lat.c index c95940675..12c5f9467 100644 --- a/test/lat.c +++ b/test/lat.c @@ -41,7 +41,7 @@ GstElement *identity_add(GstPipeline *pipeline, GstElement *first, int count) { snprintf(buf, 20, "identity_%03d", i); ident = gst_elementfactory_make("identity",buf); g_return_val_if_fail(ident != NULL,NULL); - gtk_object_set(GTK_OBJECT(ident),"silent",TRUE,NULL); + g_object_set(G_OBJECT(ident),"silent",TRUE,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(ident)); gst_pad_connect(gst_element_get_pad(last,"src"), gst_element_get_pad(ident,"sink")); @@ -56,10 +56,10 @@ GstElement *fakesrc() { src = gst_elementfactory_make("fakesrc","src"); g_return_val_if_fail(src != NULL,NULL); - gtk_object_set(GTK_OBJECT(src),"silent",TRUE,NULL); - gtk_object_set(GTK_OBJECT(src),"num_buffers",iterations,NULL); - gtk_signal_connect(GTK_OBJECT(src), - "handoff",GTK_SIGNAL_FUNC(handoff_src),NULL); + g_object_set(G_OBJECT(src),"silent",TRUE,NULL); + g_object_set(G_OBJECT(src),"num_buffers",iterations,NULL); + g_signal_connectc(G_OBJECT(src), + "handoff",G_CALLBACK(handoff_src),NULL,FALSE); return src; } @@ -69,9 +69,9 @@ GstElement *fakesink() { sink = gst_elementfactory_make("fakesink","fakesink"); g_return_val_if_fail(sink != NULL,NULL); - gtk_object_set(GTK_OBJECT(sink),"silent",TRUE,NULL); - gtk_signal_connect(GTK_OBJECT(sink), - "handoff",GTK_SIGNAL_FUNC(handoff_sink),NULL); + g_object_set(G_OBJECT(sink),"silent",TRUE,NULL); + g_signal_connectc(G_OBJECT(sink), + "handoff",G_CALLBACK(handoff_sink),NULL,FALSE); return sink; } diff --git a/test/mp1tomp1.c b/test/mp1tomp1.c index 3c7be8878..e316e33d7 100644 --- a/test/mp1tomp1.c +++ b/test/mp1tomp1.c @@ -54,7 +54,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { // construct queue and connect everything in the main pipelie audio_queue = gst_elementfactory_make("queue","audio_queue"); - gtk_object_set(GTK_OBJECT(audio_queue),"max_level",30,NULL); + g_object_set(G_OBJECT(audio_queue),"max_level",30,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_thread)); gst_pad_connect(pad, @@ -63,7 +63,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { gst_element_get_pad(audio_thread,"sink")); // set up thread state and kick things off - gtk_object_set(GTK_OBJECT(audio_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(audio_thread),"create_thread",TRUE,NULL); g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(audio_thread),GST_STATE_READY); g_print("setting to PLAYING state\n"); @@ -96,7 +96,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { // construct queue and connect everything in the main pipelie audio_queue = gst_elementfactory_make("queue","audio_queue"); - gtk_object_set(GTK_OBJECT(audio_queue),"max_level",30,NULL); + g_object_set(G_OBJECT(audio_queue),"max_level",30,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_thread)); gst_pad_connect(pad, @@ -105,7 +105,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { gst_element_get_pad(audio_thread,"sink")); // set up thread state and kick things off - gtk_object_set(GTK_OBJECT(audio_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(audio_thread),"create_thread",TRUE,NULL); g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(audio_thread),GST_STATE_READY); g_print("setting to PLAYING state\n"); @@ -123,14 +123,14 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { g_return_if_fail(decode_video != NULL); encode = gst_elementfactory_make("mpeg2enc","encode"); g_return_if_fail(encode != NULL); - //gtk_object_set(GTK_OBJECT(show),"width",640, "height", 480,NULL); + //g_object_set(G_OBJECT(show),"width",640, "height", 480,NULL); fd = open(outfile,O_CREAT|O_RDWR|O_TRUNC); fdsinkfactory = gst_elementfactory_find("fdsink"); g_return_if_fail(fdsinkfactory != NULL); fdsink = gst_elementfactory_create(fdsinkfactory,"fdsink"); g_return_if_fail(fdsink != NULL); - gtk_object_set(GTK_OBJECT(fdsink),"fd",fd,NULL); + g_object_set(G_OBJECT(fdsink),"fd",fd,NULL); // create the thread and pack stuff into it video_thread = gst_thread_new("video_thread"); @@ -152,7 +152,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { // construct queue and connect everything in the main pipeline video_queue = gst_elementfactory_make("queue","video_queue"); - gtk_object_set(GTK_OBJECT(video_queue),"max_level",30,NULL); + g_object_set(G_OBJECT(video_queue),"max_level",30,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_thread)); gst_pad_connect(pad, @@ -161,7 +161,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { gst_element_get_pad(video_thread,"sink")); // set up thread state and kick things off - gtk_object_set(GTK_OBJECT(video_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(video_thread),"create_thread",TRUE,NULL); g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(video_thread),GST_STATE_READY); g_print("setting to PLAYING state\n"); @@ -188,7 +188,7 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_make("disksrc","src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1],NULL); g_print("should be using file '%s'\n",argv[1]); g_print("should be using output file '%s'\n",argv[2]); @@ -200,9 +200,9 @@ int main(int argc,char *argv[]) { gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse)); - gtk_signal_connect(GTK_OBJECT(parse),"new_pad",mp2tomp1, pipeline); + g_signal_connectc(G_OBJECT(parse),"new_pad",mp2tomp1, pipeline, FALSE); - gtk_signal_connect(GTK_OBJECT(src),"eos",GTK_SIGNAL_FUNC(eof),NULL); + g_signal_connectc(G_OBJECT(src),"eos",G_CALLBACK(eof),NULL, FALSE); gst_pad_connect(gst_element_get_pad(src,"src"), gst_element_get_pad(parse,"sink")); diff --git a/test/mp2toavi.c b/test/mp2toavi.c index 99653b0bf..4bd163581 100644 --- a/test/mp2toavi.c +++ b/test/mp2toavi.c @@ -18,7 +18,7 @@ void frame_encoded(GstElement *element, gint framenum, gpointer data) { gulong frame_size; static gulong total = 0; - frame_size = gst_util_get_long_arg(GTK_OBJECT(element),"last_frame_size"); + frame_size = gst_util_get_long_arg(G_OBJECT(element),"last_frame_size"); total+=frame_size; @@ -45,17 +45,17 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { // construct internal pipeline elements parse_audio = gst_elementfactory_make("ac3parse","parse_audio"); g_return_if_fail(parse_audio != NULL); - gtk_object_set(GTK_OBJECT(parse_audio),"skip", 15, NULL); + g_object_set(G_OBJECT(parse_audio),"skip", 15, NULL); decode = gst_elementfactory_make("ac3dec","decode_audio"); g_return_if_fail(decode != NULL); audio_resample = gst_elementfactory_make("audioscale","audioscale"); g_return_if_fail(audio_resample != NULL); - gtk_object_set(GTK_OBJECT(audio_resample),"frequency", 44100, NULL); + g_object_set(G_OBJECT(audio_resample),"frequency", 44100, NULL); audio_encode = gst_elementfactory_make("mpegaudio","audio_encode"); //audio_encode = gst_elementfactory_make("pipefilter","audio_encode"); g_return_if_fail(audio_encode != NULL); - //gtk_object_set(GTK_OBJECT(audio_encode),"command", "lame -x - -", NULL); + //g_object_set(G_OBJECT(audio_encode),"command", "lame -x - -", NULL); // create the thread and pack stuff into it audio_thread = gst_thread_new("audio_thread"); @@ -65,7 +65,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { gst_bin_add(GST_BIN(audio_thread),GST_ELEMENT(audio_resample)); gst_bin_add(GST_BIN(audio_thread),GST_ELEMENT(audio_encode)); - gtk_object_set(GTK_OBJECT(mux),"audio","00",NULL); + g_object_set(G_OBJECT(mux),"audio","00",NULL); // set up pad connections gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), @@ -81,7 +81,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { // construct queue and connect everything in the main pipelie audio_queue = gst_elementfactory_make("queue","audio_queue"); - gtk_object_set(GTK_OBJECT(audio_queue),"max_level",1,NULL); + g_object_set(G_OBJECT(audio_queue),"max_level",1,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_thread)); gst_pad_connect(pad, @@ -90,7 +90,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { gst_element_get_pad(audio_thread,"sink")); // set up thread state and kick things off - gtk_object_set(GTK_OBJECT(audio_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(audio_thread),"create_thread",TRUE,NULL); g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(audio_thread),GST_STATE_READY); } else if (strncmp(gst_pad_get_name(pad), "subtitle_stream_4", 17) == 0) { @@ -125,7 +125,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { // construct queue and connect everything in the main pipelie audio_queue = gst_elementfactory_make("queue","audio_queue"); - gtk_object_set(GTK_OBJECT(audio_queue),"max_level",1,NULL); + g_object_set(G_OBJECT(audio_queue),"max_level",1,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_thread)); gst_pad_connect(pad, @@ -134,7 +134,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { gst_element_get_pad(audio_thread,"sink")); // set up thread state and kick things off - gtk_object_set(GTK_OBJECT(audio_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(audio_thread),"create_thread",TRUE,NULL); g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(audio_thread),GST_STATE_READY); } else if (strncmp(gst_pad_get_name(pad), "video_", 6) == 0) { @@ -157,27 +157,27 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { g_return_if_fail(merge_subtitles != NULL); videoscale = gst_elementfactory_make("videoscale","videoscale"); g_return_if_fail(videoscale != NULL); - //gtk_object_set(GTK_OBJECT(videoscale),"width",352, "height", 288,NULL); - gtk_object_set(GTK_OBJECT(videoscale),"width",640, "height", 480,NULL); + //g_object_set(G_OBJECT(videoscale),"width",352, "height", 288,NULL); + g_object_set(G_OBJECT(videoscale),"width",640, "height", 480,NULL); median = gst_elementfactory_make("median","median"); g_return_if_fail(median != NULL); - gtk_object_set(GTK_OBJECT(median),"filtersize",9,NULL); - gtk_object_set(GTK_OBJECT(median),"active",TRUE,NULL); + g_object_set(G_OBJECT(median),"filtersize",9,NULL); + g_object_set(G_OBJECT(median),"active",TRUE,NULL); smooth = gst_elementfactory_make("smooth","smooth"); g_return_if_fail(smooth != NULL); - gtk_object_set(GTK_OBJECT(smooth),"filtersize",5,NULL); - gtk_object_set(GTK_OBJECT(smooth),"tolerance",9,NULL); - gtk_object_set(GTK_OBJECT(smooth),"active",FALSE,NULL); + g_object_set(G_OBJECT(smooth),"filtersize",5,NULL); + g_object_set(G_OBJECT(smooth),"tolerance",9,NULL); + g_object_set(G_OBJECT(smooth),"active",FALSE,NULL); encode = gst_elementfactory_make("winenc","encode"); g_return_if_fail(encode != NULL); - gtk_signal_connect(GTK_OBJECT(encode),"frame_encoded",GTK_SIGNAL_FUNC(frame_encoded),NULL); - gtk_object_set(GTK_OBJECT(encode),"bitrate",800*4,NULL); - gtk_object_set(GTK_OBJECT(encode),"quality",10000,NULL); - //gtk_object_set(GTK_OBJECT(encode),"compression",NULL,NULL); + g_signal_connectc(G_OBJECT(encode),"frame_encoded",G_CALLBACK(frame_encoded),NULL,FALSE); + g_object_set(G_OBJECT(encode),"bitrate",800*4,NULL); + g_object_set(G_OBJECT(encode),"quality",10000,NULL); + //g_object_set(G_OBJECT(encode),"compression",NULL,NULL); //encode = gst_elementfactory_make("mpeg1encoder","encode"); - //gtk_object_set(GTK_OBJECT(show),"width",640, "height", 480,NULL); + //g_object_set(G_OBJECT(show),"width",640, "height", 480,NULL); - gtk_object_set(GTK_OBJECT(mux),"video","00:DIV3",NULL); + g_object_set(G_OBJECT(mux),"video","00:DIV3",NULL); // create the thread and pack stuff into it video_thread = gst_thread_new("video_thread"); @@ -210,7 +210,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { // construct queue and connect everything in the main pipeline video_queue = gst_elementfactory_make("queue","video_queue"); - gtk_object_set(GTK_OBJECT(video_queue),"max_level",1,NULL); + g_object_set(G_OBJECT(video_queue),"max_level",1,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_thread)); gst_pad_connect(pad, @@ -219,7 +219,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { gst_element_get_pad(video_thread,"sink")); // set up thread state and kick things off - gtk_object_set(GTK_OBJECT(video_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(video_thread),"create_thread",TRUE,NULL); g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(video_thread),GST_STATE_READY); } @@ -249,7 +249,7 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_make("disksrc","src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1],NULL); g_print("should be using file '%s'\n",argv[1]); g_print("should be using output file '%s'\n",argv[2]); @@ -264,16 +264,16 @@ int main(int argc,char *argv[]) { g_return_val_if_fail(fdsinkfactory != NULL, -1); fdsink = gst_elementfactory_create(fdsinkfactory,"fdsink"); g_return_val_if_fail(fdsink != NULL, -1); - gtk_object_set(GTK_OBJECT(fdsink),"fd",fd,NULL); + g_object_set(G_OBJECT(fdsink),"fd",fd,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(mux)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(fdsink)); - gtk_signal_connect(GTK_OBJECT(parse),"new_pad",mp2tomp1, pipeline); + g_signal_connectc(G_OBJECT(parse),"new_pad",mp2tomp1, pipeline, FALSE); - gtk_signal_connect(GTK_OBJECT(src),"eos",GTK_SIGNAL_FUNC(eof),NULL); + g_signal_connectc(G_OBJECT(src),"eos",G_CALLBACK(eof),NULL, FALSE); gst_pad_connect(gst_element_get_pad(src,"src"), gst_element_get_pad(parse,"sink")); diff --git a/test/mp2tomp1.c b/test/mp2tomp1.c index a5252a891..6b20f48e0 100644 --- a/test/mp2tomp1.c +++ b/test/mp2tomp1.c @@ -29,7 +29,7 @@ create_muxer (GstElement *pipeline, gchar *type, gchar *number) gst_pad_connect(gst_element_get_pad(mux,"src"), gst_element_get_pad(fdsink,"sink")); } - gtk_object_set(GTK_OBJECT(mux), type, number,NULL); + g_object_set(G_OBJECT(mux), type, number,NULL); return gst_element_get_pad(mux,g_strconcat (type, "_", number, NULL)); } @@ -55,12 +55,12 @@ mp2tomp1 (GstElement *parser, GstPad *pad, GstElement *pipeline) g_return_if_fail(decode != NULL); audio_resample = gst_elementfactory_make("audioscale","audioscale"); g_return_if_fail(audio_resample != NULL); - gtk_object_set(GTK_OBJECT(audio_resample),"frequency", 44100, NULL); + g_object_set(G_OBJECT(audio_resample),"frequency", 44100, NULL); audio_encode = gst_elementfactory_make("mpegaudio","audio_encode"); //audio_encode = gst_elementfactory_make("pipefilter","audio_encode"); g_return_if_fail(audio_encode != NULL); - //gtk_object_set(GTK_OBJECT(audio_encode),"command", "lame -x - -", NULL); + //g_object_set(G_OBJECT(audio_encode),"command", "lame -x - -", NULL); // create the thread and pack stuff into it audio_thread = gst_thread_new("audio_thread"); @@ -83,7 +83,7 @@ mp2tomp1 (GstElement *parser, GstPad *pad, GstElement *pipeline) // construct queue and connect everything in the main pipelie audio_queue = gst_elementfactory_make("queue","audio_queue"); - gtk_object_set(GTK_OBJECT(audio_queue),"max_level",1,NULL); + g_object_set(G_OBJECT(audio_queue),"max_level",1,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_thread)); gst_pad_connect(pad, @@ -92,7 +92,7 @@ mp2tomp1 (GstElement *parser, GstPad *pad, GstElement *pipeline) gst_element_get_pad(audio_thread,"sink")); // set up thread state and kick things off - gtk_object_set(GTK_OBJECT(audio_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(audio_thread),"create_thread",TRUE,NULL); g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(audio_thread),GST_STATE_READY); } else if (strncmp(gst_pad_get_name(pad), "subtitle_stream_4", 17) == 0) { @@ -120,7 +120,7 @@ mp2tomp1 (GstElement *parser, GstPad *pad, GstElement *pipeline) // construct queue and connect everything in the main pipelie audio_queue = gst_elementfactory_make("queue","audio_queue"); - gtk_object_set(GTK_OBJECT(audio_queue),"max_level",1,NULL); + g_object_set(G_OBJECT(audio_queue),"max_level",1,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_thread)); gst_pad_connect(pad, @@ -129,7 +129,7 @@ mp2tomp1 (GstElement *parser, GstPad *pad, GstElement *pipeline) gst_element_get_pad(audio_thread,"sink")); // set up thread state and kick things off - gtk_object_set(GTK_OBJECT(audio_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(audio_thread),"create_thread",TRUE,NULL); g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(audio_thread),GST_STATE_READY); } else if (strncmp(gst_pad_get_name(pad), "video_", 6) == 0) { @@ -143,22 +143,22 @@ mp2tomp1 (GstElement *parser, GstPad *pad, GstElement *pipeline) //g_return_if_fail(merge_subtitles != NULL); videoscale = gst_elementfactory_make("videoscale","videoscale"); g_return_if_fail(videoscale != NULL); - gtk_object_set(GTK_OBJECT(videoscale),"width",352, "height", 288,NULL); + g_object_set(G_OBJECT(videoscale),"width",352, "height", 288,NULL); median = gst_elementfactory_make("median","median"); g_return_if_fail(median != NULL); - gtk_object_set(GTK_OBJECT(median),"filtersize",5,NULL); - gtk_object_set(GTK_OBJECT(median),"active",TRUE,NULL); + g_object_set(G_OBJECT(median),"filtersize",5,NULL); + g_object_set(G_OBJECT(median),"active",TRUE,NULL); smooth = gst_elementfactory_make("smooth","smooth"); g_return_if_fail(smooth != NULL); - gtk_object_set(GTK_OBJECT(smooth),"filtersize",5,NULL); - gtk_object_set(GTK_OBJECT(smooth),"tolerance",9,NULL); - gtk_object_set(GTK_OBJECT(smooth),"active",FALSE,NULL); + g_object_set(G_OBJECT(smooth),"filtersize",5,NULL); + g_object_set(G_OBJECT(smooth),"tolerance",9,NULL); + g_object_set(G_OBJECT(smooth),"active",FALSE,NULL); encode = gst_elementfactory_make("mpeg2enc","encode"); g_return_if_fail(encode != NULL); - gtk_object_set(GTK_OBJECT(encode),"frames_per_second",25.0,NULL); - //gtk_object_set(GTK_OBJECT(encode),"frames_per_second",29.97,NULL); + g_object_set(G_OBJECT(encode),"frames_per_second",25.0,NULL); + //g_object_set(G_OBJECT(encode),"frames_per_second",29.97,NULL); //encode = gst_elementfactory_make("mpeg1encoder","encode"); - //gtk_object_set(GTK_OBJECT(show),"width",640, "height", 480,NULL); + //g_object_set(G_OBJECT(show),"width",640, "height", 480,NULL); muxerpad = create_muxer (pipeline, "video", "00"); g_return_if_fail(muxerpad != NULL); @@ -192,7 +192,7 @@ mp2tomp1 (GstElement *parser, GstPad *pad, GstElement *pipeline) // construct queue and connect everything in the main pipeline video_queue = gst_elementfactory_make("queue","video_queue"); - gtk_object_set(GTK_OBJECT(video_queue),"max_level",1,NULL); + g_object_set(G_OBJECT(video_queue),"max_level",1,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_thread)); gst_pad_connect(pad, @@ -201,7 +201,7 @@ mp2tomp1 (GstElement *parser, GstPad *pad, GstElement *pipeline) gst_element_get_pad(video_thread,"sink")); // set up thread state and kick things off - gtk_object_set(GTK_OBJECT(video_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(video_thread),"create_thread",TRUE,NULL); g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(video_thread),GST_STATE_READY); } @@ -228,7 +228,7 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_make("disksrc","src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1],NULL); g_print("should be using file '%s'\n",argv[1]); g_print("should be using output file '%s'\n",argv[2]); @@ -242,15 +242,15 @@ int main(int argc,char *argv[]) { g_return_val_if_fail(fdsinkfactory != NULL, -1); fdsink = gst_elementfactory_create(fdsinkfactory,"fdsink"); g_return_val_if_fail(fdsink != NULL, -1); - gtk_object_set(GTK_OBJECT(fdsink),"fd",fd,NULL); + g_object_set(G_OBJECT(fdsink),"fd",fd,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse)); - gtk_signal_connect(GTK_OBJECT(parse),"new_pad",mp2tomp1, pipeline); + g_signal_connectc(G_OBJECT(parse),"new_pad",mp2tomp1, pipeline, FALSE); - gtk_signal_connect(GTK_OBJECT(src),"eos",GTK_SIGNAL_FUNC(eof),NULL); + g_signal_connectc(G_OBJECT(src),"eos",G_CALLBACK(eof),NULL, FALSE); gst_pad_connect(gst_element_get_pad(src,"src"), gst_element_get_pad(parse,"sink")); diff --git a/test/mp3.c b/test/mp3.c index a92064c79..88ba95503 100644 --- a/test/mp3.c +++ b/test/mp3.c @@ -34,7 +34,7 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_create(srcfactory,"src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1]); mp3 = gst_elementfactory_create(mp3factory,"mp3"); g_return_val_if_fail(mp3 != NULL, -1); sink = gst_elementfactory_create(sinkfactory,"sink"); @@ -49,8 +49,8 @@ int main(int argc,char *argv[]) { gst_pad_connect(gst_element_get_pad(mp3,"src"), gst_element_get_pad(sink,"sink")); - gtk_signal_connect(GTK_OBJECT(src),"eof", - GTK_SIGNAL_FUNC(eof),NULL); + g_signal_connectc(G_OBJECT(src),"eof", + G_CALLBACK(eof),NULL,FALSE); gst_element_set_state(GST_ELEMENT(bin),GST_STATE_READY); gst_element_set_state(GST_ELEMENT(bin),GST_STATE_PLAYING); diff --git a/test/mp3mad.c b/test/mp3mad.c index 95e31ee50..6391a2286 100644 --- a/test/mp3mad.c +++ b/test/mp3mad.c @@ -21,7 +21,7 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_create(srcfactory,"src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1],NULL); g_print("should be using file '%s'\n",argv[1]); decode = gst_elementfactory_create(decodefactory,"decode"); g_return_val_if_fail(decode != NULL, -1); diff --git a/test/mp3parse.c b/test/mp3parse.c index 7d3b3f1a8..5dc12bea4 100644 --- a/test/mp3parse.c +++ b/test/mp3parse.c @@ -35,7 +35,7 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_create(srcfactory,"src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1]); g_print("should be using file '%s'\n",argv[1]); parse = gst_elementfactory_create(parsefactory,"parse"); g_return_val_if_fail(parse != NULL, -1); @@ -46,8 +46,8 @@ int main(int argc,char *argv[]) { gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse)); - gtk_signal_connect(GTK_OBJECT(src),"eos", - GTK_SIGNAL_FUNC(eof),NULL); + g_signal_connectc(G_OBJECT(src),"eos", + G_CALLBACK(eof),NULL, FALSE); gst_pad_connect(gst_element_get_pad(src,"src"), gst_element_get_pad(parse,"sink")); diff --git a/test/mp3play.c b/test/mp3play.c index 2d6429889..564be5de5 100644 --- a/test/mp3play.c +++ b/test/mp3play.c @@ -28,7 +28,7 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_create(srcfactory,"src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1]); g_print("should be using file '%s'\n",argv[1]); parse = gst_elementfactory_create(parsefactory,"parse"); g_return_val_if_fail(parse != NULL, -1); @@ -37,8 +37,8 @@ int main(int argc,char *argv[]) { play = gst_elementfactory_create(playfactory,"play"); g_return_val_if_fail(play != NULL, -1); - gtk_signal_connect(GTK_OBJECT(src),"eos", - GTK_SIGNAL_FUNC(eof),NULL); + g_signal_connectc(G_OBJECT(src),"eos", + G_CALLBACK(eof),NULL, FALSE); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse)); diff --git a/test/mp3tovorbis.c b/test/mp3tovorbis.c index f18f6b58f..64c7e237f 100644 --- a/test/mp3tovorbis.c +++ b/test/mp3tovorbis.c @@ -36,7 +36,7 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_create(srcfactory,"src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1],NULL); g_print("should be using file '%s'\n",argv[1]); parse = gst_elementfactory_create(parsefactory,"parse"); g_return_val_if_fail(parse != NULL, -1); @@ -48,10 +48,10 @@ int main(int argc,char *argv[]) { g_return_val_if_fail(sink != NULL, -1); g_print("should be using output file '%s'\n",argv[2]); fd = open(argv[2], O_CREAT|O_RDWR|O_TRUNC); - gtk_object_set(GTK_OBJECT(sink),"fd",fd,NULL); + g_object_set(G_OBJECT(sink),"fd",fd,NULL); - gtk_signal_connect(GTK_OBJECT(src),"eos", - GTK_SIGNAL_FUNC(eof),NULL); + g_signal_connectc(G_OBJECT(src),"eos", + G_CALLBACK(eof),NULL,FALSE); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse)); diff --git a/test/pipetest.c b/test/pipetest.c index 5c77c04ef..b987b964f 100644 --- a/test/pipetest.c +++ b/test/pipetest.c @@ -31,7 +31,7 @@ int main(int argc,char *argv[]) { src = gst_elementfactory_create(srcfactory,"src"); g_return_val_if_fail(src != NULL, -1); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1],NULL); g_print("should be using file '%s'\n",argv[1]); pipe = gst_elementfactory_create(pipefactory,"pipe"); g_return_val_if_fail(pipe != NULL, -1); @@ -39,10 +39,10 @@ int main(int argc,char *argv[]) { g_return_val_if_fail(sink != NULL, -1); fd = open(argv[2],O_CREAT|O_RDWR|O_TRUNC); - gtk_object_set(GTK_OBJECT(sink),"fd",fd,NULL); + g_object_set(G_OBJECT(sink),"fd",fd,NULL); - gtk_signal_connect(GTK_OBJECT(src),"eos", - GTK_SIGNAL_FUNC(eof),NULL); + g_signal_connectc(G_OBJECT(src),"eos", + G_CALLBACK(eof),NULL,FALSE); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(pipe)); diff --git a/test/qtest.c b/test/qtest.c index 262f0499d..33b8ebad3 100644 --- a/test/qtest.c +++ b/test/qtest.c @@ -36,7 +36,7 @@ int main(int argc,char *argv[]) { srcfactory = gst_elementfactory_find("disksrc"); src = gst_elementfactory_create(srcfactory,"src"); - gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL); + g_object_set(G_OBJECT(src),"location",argv[1],NULL); gst_bin_add(GST_BIN(decodethread),GST_ELEMENT(src)); _gst_plugin_spew = TRUE; @@ -77,12 +77,12 @@ int main(int argc,char *argv[]) { // gst_pad_connect(gst_element_get_pad(queue,"src"), gst_element_get_pad(playthread,"sink")); - gtk_signal_connect(GTK_OBJECT(src),"eof", - GTK_SIGNAL_FUNC(eof),NULL); + g_signal_connectc(G_OBJECT(src),"eof", + G_CALLBACK(eof),NULL, FALSE); g_print("\nsetting up the decode thread to *NOT* thread\n"); // gtk_object_set(GTK_OBJECT(decodethread),"create_thread",TRUE,NULL); - gtk_object_set(GTK_OBJECT(playthread),"create_thread",FALSE,NULL); + g_object_set(G_OBJECT(playthread),"create_thread",FALSE,NULL); g_print("\neverything's built, setting it up to be runnable\n"); gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); diff --git a/test/record.c b/test/record.c index 5b559fdee..ebd082a3c 100644 --- a/test/record.c +++ b/test/record.c @@ -20,7 +20,7 @@ int main(int argc,char *argv[]) { fdsinkfactory = gst_elementfactory_find("fdsink"); fdsink = gst_elementfactory_create(fdsinkfactory,"fdsink"); - gtk_object_set(GTK_OBJECT(fdsink),"fd",fd,NULL); + g_object_set(G_OBJECT(fdsink),"fd",fd); /* add objects to the main pipeline */ gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(osssrc)); diff --git a/test/vidcapture.c b/test/vidcapture.c index a6c130c36..c30bee234 100644 --- a/test/vidcapture.c +++ b/test/vidcapture.c @@ -28,16 +28,16 @@ int main(int argc,char *argv[]) { compress = gst_elementfactory_create(compressfactory,"jpegenc"); encoderfactory = gst_elementfactory_find("aviencoder"); encoder = gst_elementfactory_create(encoderfactory,"aviencoder"); - gtk_object_set(GTK_OBJECT(videosrc),"width",320,"height",240,NULL); - gtk_object_set(GTK_OBJECT(videosrc),"format",9,NULL); + g_object_set(G_OBJECT(videosrc),"width",320,"height",240,NULL); + g_object_set(G_OBJECT(videosrc),"format",9,NULL); - gtk_object_set(GTK_OBJECT(encoder),"video","00:I420",NULL); + g_object_set(G_OBJECT(encoder),"video","00:I420",NULL); fd = open(argv[1],O_CREAT|O_RDWR|O_TRUNC); fdsinkfactory = gst_elementfactory_find("fdsink"); fdsink = gst_elementfactory_create(fdsinkfactory,"fdsink"); - gtk_object_set(GTK_OBJECT(fdsink),"fd",fd,NULL); + g_object_set(G_OBJECT(fdsink),"fd",fd,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(videosrc)); @@ -60,7 +60,7 @@ int main(int argc,char *argv[]) { // construct queue and connect everything in the main pipeline video_queue = gst_elementfactory_make("queue","video_queue"); - gtk_object_set(GTK_OBJECT(video_queue),"max_level",30,NULL); + g_object_set(G_OBJECT(video_queue),"max_level",30,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_thread)); gst_pad_connect(gst_element_get_pad(videosrc, "src"), @@ -68,7 +68,7 @@ int main(int argc,char *argv[]) { gst_pad_connect(gst_element_get_pad(video_queue,"src"), gst_element_get_pad(video_thread,"video_00")); - gtk_object_set(GTK_OBJECT(video_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(video_thread),"create_thread",TRUE,NULL); g_print("\neverything's built, setting it up to be runnable\n"); gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); g_print("\nok, runnable, hitting 'play'...\n"); diff --git a/test/vidcapture2.c b/test/vidcapture2.c index 01f6bbb9b..5df76ad92 100644 --- a/test/vidcapture2.c +++ b/test/vidcapture2.c @@ -29,16 +29,16 @@ int main(int argc,char *argv[]) { g_assert(compress != NULL); encoderfactory = gst_elementfactory_find("aviencoder"); encoder = gst_elementfactory_create(encoderfactory,"aviencoder"); - gtk_object_set(GTK_OBJECT(videosrc),"width",320,"height",240,NULL); - gtk_object_set(GTK_OBJECT(videosrc),"format",5,NULL); + g_object_set(G_OBJECT(videosrc),"width",320,"height",240,NULL); + g_object_set(G_OBJECT(videosrc),"format",5,NULL); - gtk_object_set(GTK_OBJECT(encoder),"video","00:DIV3",NULL); + g_object_set(G_OBJECT(encoder),"video","00:DIV3",NULL); fd = open(argv[1],O_CREAT|O_RDWR|O_TRUNC); fdsinkfactory = gst_elementfactory_find("fdsink"); fdsink = gst_elementfactory_create(fdsinkfactory,"fdsink"); - gtk_object_set(GTK_OBJECT(fdsink),"fd",fd,NULL); + g_object_set(G_OBJECT(fdsink),"fd",fd,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(videosrc)); @@ -61,7 +61,7 @@ int main(int argc,char *argv[]) { // construct queue and connect everything in the main pipeline video_queue = gst_elementfactory_make("queue","video_queue"); - gtk_object_set(GTK_OBJECT(video_queue),"max_level",30,NULL); + g_object_set(G_OBJECT(video_queue),"max_level",30,NULL); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_queue)); gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_thread)); gst_pad_connect(gst_element_get_pad(videosrc, "src"), @@ -69,7 +69,7 @@ int main(int argc,char *argv[]) { gst_pad_connect(gst_element_get_pad(video_queue,"src"), gst_element_get_pad(video_thread,"sink")); - gtk_object_set(GTK_OBJECT(video_thread),"create_thread",TRUE,NULL); + g_object_set(G_OBJECT(video_thread),"create_thread",TRUE,NULL); g_print("\neverything's built, setting it up to be runnable\n"); gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); g_print("\nok, runnable, hitting 'play'...\n"); diff --git a/test/xmmstest.c b/test/xmmstest.c index e88177b4e..91dd7176d 100644 --- a/test/xmmstest.c +++ b/test/xmmstest.c @@ -28,13 +28,13 @@ main (int argc,char *argv[]) //effect = gst_elementfactory_make("XMMS_EFFECT_echo_plugin_1.2.4", "xmms_effect"); g_return_val_if_fail(effect != NULL, -1); - gtk_object_set (GTK_OBJECT (src), "location", argv[1], NULL); - //gtk_object_set (GTK_OBJECT (src), "filename", "tone://1000", NULL); + g_object_set (G_OBJECT (src), "location", argv[1], NULL); + //gtk_object_set (G_OBJECT (src), "filename", "tone://1000", NULL); - g_print ("Song Info (text:length): %s\n",gst_util_get_string_arg (GTK_OBJECT (src), "song_info")); - //gtk_object_set (GTK_OBJECT (src), "show_about", TRUE, NULL); - //gtk_object_set (GTK_OBJECT (src), "configure", TRUE, NULL); - //gtk_object_set (GTK_OBJECT (src), "show_file_info", TRUE, NULL); + g_print ("Song Info (text:length): %s\n",gst_util_get_string_arg (G_OBJECT (src), "song_info")); + //gtk_object_set (G_OBJECT (src), "show_about", TRUE, NULL); + //gtk_object_set (G_OBJECT (src), "configure", TRUE, NULL); + //gtk_object_set (G_OBJECT (src), "show_file_info", TRUE, NULL); osssink = gst_elementfactory_make("osssink", "osssink"); g_return_val_if_fail(osssink != NULL, -1); @@ -52,7 +52,7 @@ main (int argc,char *argv[]) g_idle_add(idle_func, bin); - gtk_main(); + //gtk_main(); return 0; } |