if ( ! gst_init_check(NULL, NULL, 0) ) { printf("Couldn't init gstreamer."); return FALSE; } loop = g_main_loop_new (NULL, FALSE); // create our one in all wonder gst package thingy!!!! tha playbin playbin = gst_element_factory_make ("playbin", "playbin"); if (!playbin) { printf("Couldn't create playbin element."); return FALSE; } // callback pour la gestion des evenements du bus gst_bus_add_watch(gst_pipeline_get_bus(GST_PIPELINE(playbin)), cb_bus, loop); //gst_bus_add_watch(gst_pipeline_get_bus(GST_PIPELINE(playbin)), cb_bus, NULL); //gst_bus_set_sync_handler (gst_pipeline_get_bus (GST_PIPELINE (playbin)), (GstBusSyncHandler) cb_bus2, video_win); // callback pour la mise à jour de la scale barre //g_timeout_add (TIMER_INTERVAL, (GSourceFunc) cb_update_scale, playbin); vsink = gst_element_factory_make("ximagesink", "vsink"); //asink = gst_element_factory_make ("autoaudiosink", "asink"); asink = gst_element_factory_make ("fakesink", "asink"); g_object_set (G_OBJECT (playbin), "audio-sink", asink, "video-sink", vsink, NULL); if ( ! playbin || ! vsink || ! asink ) { printf("Couldn't continue due to an error while making elements : "); if ( ! playbin) printf(" playbin."); if ( ! vsink) printf(" vsink."); if ( ! asink) printf(" asink."); return FALSE; } return TRUE;