[svn r52] Added reference to the GSTINTERFACES_LIBS (gst_x_overlay* functions).
7 #include "hildon-widgets/hildon-program.h"
8 #include "hildon-widgets/hildon-window.h"
12 #include "gmyth_remote_encoder.h"
13 #include "gmyth_settings.h"
14 #include "gmyth_context.h"
15 #include "gmyth_tvchain.h"
16 #include "gmyth_remote_util.h"
19 #include "mmyth_tvplayer.h"
22 cb_destroy (GtkWidget * widget, gpointer data)
24 MMythUi *mmyth_ui = (MMythUi *) data;
26 if (mmyth_ui->tvplayer != NULL) {
27 if (mmyth_tvplayer_is_playing (mmyth_ui->tvplayer) )
28 mmyth_tvplayer_stop_playing (mmyth_ui->tvplayer);
31 mmyth_ui_finalize (mmyth_ui);
38 debug_error_func( const gchar*log_domain, GLogLevelFlags log_level, const gchar *message,
42 /* leave this with NO print out messages, once you need to disable debug messages! */
43 //g_print ( "[%s] DEBUG messages disabled!\n", __FUNCTION__ );
48 main (gint argc, gchar * argv[])
53 HildonProgram *program = NULL;
60 gtk_init (&argc, &argv);
61 gst_init (&argc, &argv);
63 g_log_set_default_handler( debug_error_func, NULL );
66 /* Init libmmyth context */
67 gmyth_context_initialize ();
69 #ifndef MAEMO_PLATFORM
70 /* create the main window */
71 window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
72 gtk_widget_set_size_request (window, MAIN_WINDOW_WIDTH, MAIN_WINDOW_HEIGHT);
73 gtk_window_set_title (GTK_WINDOW (window), "Mythtv Frontend");
75 /* Creating Hildonized main view */
76 program = HILDON_PROGRAM(hildon_program_get_instance());
77 window = hildon_window_new();
79 //g_signal_connect(G_OBJECT(window), "delete_event", gtk_main_quit, NULL);
81 hildon_program_add_window(program, HILDON_WINDOW (window));
82 g_set_application_name("Maemo Mythtv");
85 /* Initializes MMyth Widgets */
87 mmyth_ui = mmyth_ui_initialize (program, window);
89 mmyth_ui = mmyth_ui_initialize (window);
92 //mmyth_ui->loop = g_main_loop_new (NULL, FALSE);
94 /* Connect destroy signal handling */
95 g_signal_connect (window, "destroy", G_CALLBACK (cb_destroy), mmyth_ui);
97 /* Shows main window and start gtk loop */
98 gtk_widget_show (window);