2000-10-30 21:02:08 +00:00
|
|
|
#include <config.h>
|
|
|
|
#include <gnome.h>
|
2001-12-13 23:14:39 +00:00
|
|
|
#ifdef USE_GLIB2
|
|
|
|
#include <libgnomeui/libgnomeui.h>
|
|
|
|
#include <libgnomeui/gnome-ui-init.h>
|
|
|
|
#endif
|
2000-10-30 21:02:08 +00:00
|
|
|
#include "gstmediaplay.h"
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
2001-05-21 01:19:06 +00:00
|
|
|
GstMediaPlay *play;
|
|
|
|
|
|
|
|
gst_init (&argc,&argv);
|
2001-12-13 23:14:39 +00:00
|
|
|
|
|
|
|
#ifdef USE_GLIB2
|
|
|
|
gnome_program_init ("gstmediaplay", "0.3",
|
|
|
|
LIBGNOMEUI_MODULE,
|
|
|
|
argc, argv, NULL);
|
|
|
|
#else
|
2001-05-21 01:19:06 +00:00
|
|
|
gnome_init ("gstreamer", VERSION, argc, argv);
|
|
|
|
glade_init();
|
|
|
|
glade_gnome_init();
|
2001-12-13 23:14:39 +00:00
|
|
|
#endif
|
2001-06-13 01:18:12 +00:00
|
|
|
|
2001-05-21 01:19:06 +00:00
|
|
|
play = gst_media_play_new ();
|
|
|
|
|
|
|
|
if (argc > 1) {
|
2001-08-15 22:32:30 +00:00
|
|
|
int i;
|
|
|
|
|
2001-12-14 18:11:52 +00:00
|
|
|
gst_media_play_show_playlist (play);
|
|
|
|
gst_media_play_start_uri (play, argv [1]);
|
2001-08-15 22:32:30 +00:00
|
|
|
|
2001-12-14 18:11:52 +00:00
|
|
|
for (i = 1; i < argc; i++)
|
|
|
|
gst_media_play_addto_playlist (play, argv [i]);
|
2001-05-21 01:19:06 +00:00
|
|
|
}
|
|
|
|
|
2001-10-17 10:21:27 +00:00
|
|
|
#ifndef GST_DISABLE_LOADSAVE
|
2001-12-14 18:11:52 +00:00
|
|
|
xmlSaveFile ("gstmediaplay.gst", gst_xml_write (
|
|
|
|
gst_play_get_pipeline (play->play)));
|
2001-10-17 10:21:27 +00:00
|
|
|
#endif
|
2001-05-21 01:19:06 +00:00
|
|
|
|
|
|
|
gdk_threads_enter();
|
2001-12-14 18:11:52 +00:00
|
|
|
#ifdef USE_GLIB2
|
|
|
|
gtk_main ();
|
|
|
|
#else
|
2001-05-21 01:19:06 +00:00
|
|
|
gst_main();
|
2001-12-14 18:11:52 +00:00
|
|
|
#endif
|
2001-05-21 01:19:06 +00:00
|
|
|
gdk_threads_leave();
|
|
|
|
|
|
|
|
return 0;
|
2000-10-30 21:02:08 +00:00
|
|
|
}
|