Commit f899ed1d authored by hark's avatar hark
Browse files

some moving around

parent 3d6ef15b
......@@ -3,7 +3,7 @@
# https://securityblog.redhat.com/2014/03/26/fortify-and-you/
#
CC=colorgcc
CFLAGS= -O0 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-conversion -Wpedantic -Wformat -Wformat-security -fstack-protector -D_FORTIFY_SOURCE=2 -std=c99 -D_GNU_SOURCE
#-std=c99
# -Werror -Wconversion -Wsign-conversion
......@@ -28,36 +28,36 @@ all : c-player c-player-0.10 c-player-debug snowControl
c-player-0.10 : c-player.c
gcc -DTESTING -DGTK -g c-player.c wraps.c playlist.c snowbin.c teebin.c -o c-player-0.10 `pkg-config --cflags --libs gstreamer-interfaces-0.10 gstreamer-pbutils-0.10 gtk+-2.0 gstreamer-0.10` $(CFLAGS)
$(CC) -DTESTING -DGTK -g c-player.c wraps.c playlist.c snowbin.c teebin.c -o c-player-0.10 `pkg-config --cflags --libs gstreamer-interfaces-0.10 gstreamer-pbutils-0.10 gtk+-2.0 gstreamer-0.10` $(CFLAGS)
c-player-debug : c-player.c
gcc -DTT -DTESTING -DGTK -DGST1 -g c-player.c wraps.c playlist.c snowbin.c teebin.c -o c-player-debug `pkg-config --cflags --libs gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0` $(CFLAGS)
$(CC) -DTT -DTESTING -DGTK -DGST1 -g c-player.c wraps.c playlist.c snowbin.c teebin.c -o c-player-debug `pkg-config --cflags --libs gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0` $(CFLAGS)
c-player-np : c-player.c snowbin.c teebin.c wraps.c common.h
gcc -DFP -DGTK -DGST1 -g c-player.c wraps.c snowbin.c teebin.c -o c-player-np `pkg-config --cflags --libs gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0` $(CFLAGS)
$(CC) -DFP -DGTK -DGST1 -g c-player.c wraps.c snowbin.c teebin.c -o c-player-np `pkg-config --cflags --libs gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0` $(CFLAGS)
c-player : c-player.c snowbin.c playlist.c teebin.c wraps.c common.h playlist.h teebin.h
gcc -DSNOWBIN -DFP -DPL -DGTK -DGST1 -g c-player.c wraps.c playlist.c snowbin.c teebin.c -o c-player `pkg-config --cflags --libs gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0` $(CFLAGS)
$(CC) -DSNOWBIN -DFP -DPL -DGTK -DGST1 -g c-player.c wraps.c playlist.c snowbin.c teebin.c -o c-player `pkg-config --cflags --libs gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0` $(CFLAGS)
c-player-cli : c-player.c snowbin.c teebin.c wraps.c common.h
gcc -DGST1 -g c-player.c wraps.c snowbin.c teebin.c -o c-player-cli `pkg-config --cflags --libs gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0` $(CFLAGS)
$(CC) -DGST1 -g c-player.c wraps.c snowbin.c teebin.c -o c-player-cli `pkg-config --cflags --libs gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0` $(CFLAGS)
snowControl : snowControl.c
gcc snowControl.c -o snowControl `pkg-config --cflags --libs gtk+-2.0`
$(CC) snowControl.c -o snowControl `pkg-config --cflags --libs gtk+-2.0`
s2s: s2s.c
gcc -g -DGST1 s2s.c wraps.c teebin.c snowbin.c -o s2s `pkg-config --cflags --libs gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0` $(CFLAGS)
$(CC) -g -DGST1 s2s.c wraps.c teebin.c snowbin.c -o s2s `pkg-config --cflags --libs gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0` $(CFLAGS)
s2s-cli : s2s-cli.c
gcc -g -DGST1 -DCLI s2s-cli.c snowbin.c fortunesrc.c gphotosrc.c rtpiobin.c dvgrabsrc.c wraps.c -o s2s-cli `pkg-config --cflags --libs libgphoto2 gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 gstreamer-rtsp-server-1.0`-lreadline $(CFLAGS)
$(CC) -g -DGST1 -DCLI s2s-cli.c snowbin.c fortunesrc.c gphotosrc.c rtpiobin.c dvgrabsrc.c wraps.c -o s2s-cli `pkg-config --cflags --libs libgphoto2 gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 gstreamer-rtsp-server-1.0`-lreadline $(CFLAGS)
bigscreen: bigscreen.c
gcc -g bigscreen.c wraps.c -o bigscreen `pkg-config --cflags --libs gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0` $(CFLAGS)
$(CC) -g bigscreen.c wraps.c -o bigscreen `pkg-config --cflags --libs gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0` $(CFLAGS)
tcp2rtsp: tcp2rtsp.c
gcc -g tcp2rtsp.c -o tcp2rtsp `pkg-config --cflags --libs gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 gstreamer-rtsp-server-1.0` $(CFLAGS)
$(CC) -g tcp2rtsp.c -o tcp2rtsp `pkg-config --cflags --libs gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 gstreamer-rtsp-server-1.0` $(CFLAGS)
midicontrol: midicontrol.c
gcc -g midicontrol.c -o midicontrol `pkg-config --cflags --libs alsa` $(CFLAGS)
......@@ -44,10 +44,14 @@ static gchar *sink = "snowbin";
//Gtk things
#ifdef GTK
GtkWidget *main_window;
/*
static GtkWidget *feed_label;
static GtkWidget *clock_label;
static char *markup = NULL;
static GtkWidget *dialog, *video_window, *main_hbox;
static GtkWidget *video_window, *main_hbox;
*/
#ifdef TT
//threadtest
GtkWidget *label_time;
......@@ -57,6 +61,31 @@ GError *error = NULL;
#endif
static void cleanup( PlayerData * data) {
// this needs to be called from the main thread!
//global pData
g_print ("Cleaning up\n");
g_print ("Deleting pipeline\n");
gst_element_set_state (data->playbin2, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (data->playbin2));
// g_source_remove (bus_watch_id);
#ifdef GTK
gtk_main_quit();
#else
g_main_loop_unref (data->loop);
#endif
free(data);
exit(0);
}
#ifdef TT
static GSourceFunc set_time (char * markup_time)
{
......@@ -151,18 +180,20 @@ stop_cb (GtkButton * button, PlayerData * data)
#endif
static void
load_uri (const gchar * uri)
load_uri (const gchar * uri, PlayerData * data)
{
// this would stop playback, so don't do that
//gst_element_set_state (playerData.playbin2, GST_STATE_READY);
// GstStateChangeReturn ret;
g_object_set (pData->playbin2, "uri", uri, NULL);
g_object_set (data->playbin2, "uri", uri, NULL);
#ifdef GTK
char *markup;
markup =
g_markup_printf_escaped
("<span foreground=\"red\" size=\"x-small\">%s</span>", uri);
gtk_label_set_markup (GTK_LABEL (loaded_label), markup);
gtk_label_set_markup (GTK_LABEL (data->gui->loaded_label), markup);
free(markup);
#endif
// gst_element_set_state (pData->playbin2, GST_STATE_PLAYING);
}
......@@ -194,7 +225,7 @@ preview_cb (GtkCheckButton * preview_check, PlayerData * data)
delete_event_cb (GtkWidget * widget, GdkEvent * event, PlayerData * data)
{
stop_cb (NULL, data);
gtk_main_quit ();
cleanup (data);
}
/* This function is called everytime the video window needs to be redrawn (due to damage/exposure,
......@@ -244,67 +275,72 @@ slider_cb (GtkRange * range, PlayerData * data)
static void
create_ui (PlayerData * data)
{
static GtkWidget *main_window; /* The uppermost window, containing all other windows */
static GtkWidget *main_box; /* VBox to hold main_hbox and the controls */
char *markup;
PlayerGui *gui;
/* now in PlayerGui
GtkWidget *main_window; //The uppermost window, containing all other windows
GtkWidget *main_box; // VBox to hold main_hbox and the controls
GtkWidget *controls; // HBox to hold the buttons and the slider
GtkWidget *options; // HBox to hold the options and current uri
GtkWidget *play_button, *pause_button, *stop_button, *open_button, *add_button; // Buttons
GtkWidget *test_button, *previous_button, *next_button;
*/
// GtkWidget *main_hbox; /* HBox to hold the video_window and the stream info text widget */
static GtkWidget *controls; /* HBox to hold the buttons and the slider */
static GtkWidget *options; /* HBox to hold the options and current uri */
static GtkWidget *play_button, *pause_button, *stop_button, *open_button, *add_button; /* Buttons */
static GtkWidget *test_button, *previous_button, *next_button;
// static GtkWidget *preview_check; /* Checkbuttons */
// static GtkWidget *preview_check; /* Checkbuttons */
// this should be done by playlist
// GtkWidget *loop_check; /* Checkbuttons */
// initialize data->gui
data->gui = (PlayerGui*)malloc(sizeof(struct PlayerGui));
gui = data->gui;
main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (G_OBJECT (main_window), "delete-event",
G_CALLBACK (delete_event_cb), data);
video_window = gtk_drawing_area_new ();
gtk_widget_set_size_request (video_window, 250, 350);
gtk_widget_set_double_buffered (video_window, FALSE);
g_signal_connect (video_window, "realize", G_CALLBACK (realize_cb), data);
g_signal_connect (video_window, "expose_event", G_CALLBACK (expose_cb),
gui->video_window = gtk_drawing_area_new ();
gtk_widget_set_size_request (gui->video_window, 250, 350);
gtk_widget_set_double_buffered (gui->video_window, FALSE);
g_signal_connect (gui->video_window, "realize", G_CALLBACK (realize_cb), data);
g_signal_connect (gui->video_window, "expose_event", G_CALLBACK (expose_cb),
data);
/* make the feed label that will change color based on playing state */
feed_label = gtk_label_new(NULL);
gui->feed_label = gtk_label_new(NULL);
markup =
g_markup_printf_escaped
("<span foreground=\"red\" size=\"x-large\">F: %u --</span>", data->feedid);
gtk_label_set_markup (GTK_LABEL(feed_label), markup);
gtk_label_set_markup (GTK_LABEL(gui->feed_label), markup);
g_free (markup);
loaded_label = gtk_label_new(NULL);
gui->loaded_label = gtk_label_new(NULL);
markup =
g_markup_printf_escaped
("<span foreground=\"red\" size=\"x-small\">currently loaded uri</span>");
gtk_label_set_markup (GTK_LABEL(loaded_label), markup);
gtk_label_set_markup (GTK_LABEL(gui->loaded_label), markup);
g_free (markup);
markup =
g_markup_printf_escaped
("<span foreground=\"pink\" size=\"x-large\">clock</span>");
clock_label = gtk_label_new ("clock");
gtk_label_set_markup (GTK_LABEL (clock_label), markup);
gui->clock_label = gtk_label_new ("clock");
gtk_label_set_markup (GTK_LABEL (gui->clock_label), markup);
g_free (markup);
play_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PLAY);
g_signal_connect (G_OBJECT (play_button), "clicked", G_CALLBACK (play_cb),
gui->play_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PLAY);
g_signal_connect (G_OBJECT (gui->play_button), "clicked", G_CALLBACK (play_cb),
data);
pause_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PAUSE);
g_signal_connect (G_OBJECT (pause_button), "clicked", G_CALLBACK (pause_cb),
gui->pause_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PAUSE);
g_signal_connect (G_OBJECT (gui->pause_button), "clicked", G_CALLBACK (pause_cb),
data);
stop_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_STOP);
g_signal_connect (G_OBJECT (stop_button), "clicked", G_CALLBACK (stop_cb),
gui->stop_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_STOP);
g_signal_connect (G_OBJECT (gui->stop_button), "clicked", G_CALLBACK (stop_cb),
data);
data->preview_check = gtk_check_button_new_with_label ("preview current video");
......@@ -332,52 +368,52 @@ thread_time = g_thread_create( thread_time_func, (gpointer)label_time, FALSE, &e
/* pack all the windows in boxes */
/* controls */
controls = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (controls), feed_label, FALSE, FALSE, 2);
gtk_box_pack_start (GTK_BOX (controls), play_button, FALSE, FALSE, 2);
gtk_box_pack_start (GTK_BOX (controls), pause_button, FALSE, FALSE, 2);
gtk_box_pack_start (GTK_BOX (controls), stop_button, FALSE, FALSE, 2);
gtk_box_pack_start (GTK_BOX (controls), data->preview_check, FALSE, FALSE, 2);
gui->controls = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (gui->controls), gui->feed_label, FALSE, FALSE, 2);
gtk_box_pack_start (GTK_BOX (gui->controls), gui->play_button, FALSE, FALSE, 2);
gtk_box_pack_start (GTK_BOX (gui->controls), gui->pause_button, FALSE, FALSE, 2);
gtk_box_pack_start (GTK_BOX (gui->controls), gui->stop_button, FALSE, FALSE, 2);
gtk_box_pack_start (GTK_BOX (gui->controls), data->preview_check, FALSE, FALSE, 2);
/* options */
options = gtk_vbox_new (FALSE, 0);
gui->options = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (options), video_window, TRUE, TRUE, 2);
gtk_box_pack_start (GTK_BOX (options), data->slider, TRUE, TRUE, 2);
gtk_box_pack_start (GTK_BOX (options), clock_label, TRUE, TRUE, 2);
gtk_box_pack_start (GTK_BOX (options), loaded_label, FALSE, FALSE, 2);
gtk_box_pack_start (GTK_BOX (gui->options), gui->video_window, TRUE, TRUE, 2);
gtk_box_pack_start (GTK_BOX (gui->options), data->slider, TRUE, TRUE, 2);
gtk_box_pack_start (GTK_BOX (gui->options), gui->clock_label, TRUE, TRUE, 2);
gtk_box_pack_start (GTK_BOX (gui->options), gui->loaded_label, FALSE, FALSE, 2);
#ifdef TT
gtk_box_pack_start (GTK_BOX (options), label_time, FALSE, FALSE, 2);
gtk_box_pack_start (GTK_BOX (gui->options), gui->label_time, FALSE, FALSE, 2);
#endif
// this should be done by playlist
// gtk_box_pack_start (GTK_BOX (options), uri_entrybox, FALSE, FALSE, 2);
/* main hbox */
main_hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (main_hbox), data->streams_list, FALSE, FALSE,
gui->main_hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (gui->main_hbox), data->streams_list, FALSE, FALSE,
2);
/* main box */
main_box = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (main_box), main_hbox, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (main_box), options, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (main_box), controls, FALSE, FALSE, 0);
gui->main_box = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (gui->main_box), gui->main_hbox, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gui->main_box), gui->options, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (gui->main_box), gui->controls, FALSE, FALSE, 0);
#ifdef PL
/* init playlist */
playlist_box = playlist_init_gtk ();
// pack the playlist
gtk_box_pack_start (GTK_BOX (main_box), playlist_box, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gui->main_box), playlist_box, TRUE, TRUE, 0);
load_uri (playlist_get_current ());
load_uri (playlist_get_current (), data);
#endif
gtk_container_add (GTK_CONTAINER (main_window), main_box);
gtk_container_add (GTK_CONTAINER (main_window), gui->main_box);
gtk_window_set_default_size (GTK_WINDOW (main_window), 640, 480);
gtk_widget_show_all (main_window);
gtk_widget_hide(main_hbox);
gtk_widget_hide(gui->main_hbox);
}
#endif
......@@ -390,6 +426,7 @@ refresh_ui (PlayerData * data)
auto gint64 current = -1;
auto char *nicetime;
auto int sec, min, hour, time;
char *markup;
// printf("refresh_ui state: %u paused=%u \n", data->state, GST_STATE_PAUSED);
/* We do not want to update anything unless we are in the PAUSED or PLAYING states */
if (data->state < GST_STATE_PAUSED)
......@@ -444,7 +481,7 @@ refresh_ui (PlayerData * data)
markup =
g_markup_printf_escaped
("<span foreground=\"black\" size=\"x-large\">%s</span>", nicetime);
gtk_label_set_markup (GTK_LABEL (clock_label), markup);
gtk_label_set_markup (GTK_LABEL (data->gui->clock_label), markup);
}
......@@ -452,14 +489,15 @@ refresh_ui (PlayerData * data)
}
#endif
extern int
player_reset_and_play ()
player_reset_and_play (PlayerData *data)
{
//FIXME: this should use the PlayerData that it gets, not pData (but then the playlist needs fixing)
/* stop playing */
gst_element_set_state (pData->playbin2, GST_STATE_READY);
#ifdef PL
printf("current uri: %s", playlist_get_current());
load_uri(playlist_get_current());
// printf("current uri: %s", playlist_get_current());
load_uri(playlist_get_current(), pData);
#endif
int ret = 0;
/* Start playing */
......@@ -546,7 +584,7 @@ eos_cb (GstBus * bus, GstMessage * msg, PlayerData * data)
gst_element_set_state (data->playbin2, GST_STATE_READY);
// loop should be done in playlist
//if (loop == 0) load_uri (playlist_get_next ());
player_reset_and_play();
player_reset_and_play(data);
//gst_element_set_state (data->playbin2, GST_STATE_PLAYING);
......@@ -562,7 +600,7 @@ state_changed_cb (GstBus * bus, GstMessage * msg, PlayerData * data)
auto GstFormat fmt = GST_FORMAT_TIME;
char feedname[10] = "F:00";
snprintf(&feedname, sizeof(feedname), "F:%u", data->feedid);
char *markup;
gst_message_parse_state_changed (msg, &old_state, &new_state,
&pending_state);
#ifdef GTK
......@@ -585,7 +623,7 @@ state_changed_cb (GstBus * bus, GstMessage * msg, PlayerData * data)
g_markup_printf_escaped
("<span foreground=\"orange\" size=\"x-large\">%s</span>",
feedname);
gtk_label_set_markup (GTK_LABEL (feed_label), markup);
gtk_label_set_markup (GTK_LABEL (data->gui->feed_label), markup);
#endif
break;
......@@ -595,7 +633,7 @@ state_changed_cb (GstBus * bus, GstMessage * msg, PlayerData * data)
g_markup_printf_escaped
("<span foreground=\"green\" size=\"x-large\">%s</span>",
feedname);
gtk_label_set_markup (GTK_LABEL (feed_label), markup);
gtk_label_set_markup (GTK_LABEL (data->gui->feed_label), markup);
#endif
break;
......@@ -605,7 +643,7 @@ state_changed_cb (GstBus * bus, GstMessage * msg, PlayerData * data)
g_markup_printf_escaped
("<span foreground=\"purple\" size=\"x-large\">%s</span>",
feedname);
gtk_label_set_markup (GTK_LABEL (feed_label), markup);
gtk_label_set_markup (GTK_LABEL (data->gui->feed_label), markup);
#endif
break;
......@@ -615,7 +653,7 @@ state_changed_cb (GstBus * bus, GstMessage * msg, PlayerData * data)
g_markup_printf_escaped
("<span foreground=\"black\" size=\"x-large\">%s</span>",
feedname);
gtk_label_set_markup (GTK_LABEL (feed_label), markup);
gtk_label_set_markup (GTK_LABEL (data->gui->feed_label), markup);
#endif
break;
......@@ -650,7 +688,7 @@ state_changed_cb (GstBus * bus, GstMessage * msg, PlayerData * data)
g_markup_printf_escaped
("<span foreground=\"blue\" size=\"x-large\">%s</span>",
feedname);
gtk_label_set_markup (GTK_LABEL (feed_label), markup);
gtk_label_set_markup (GTK_LABEL (data->gui->feed_label), markup);
#endif
break;
......@@ -907,32 +945,11 @@ static void init_media(PlayerData *data)
}
static void cleanup() {
// this needs to be called from the main thread!
//global pData
g_print ("Cleaning up\n");
g_print ("Deleting pipeline\n");
gst_element_set_state (pData->playbin2, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (pData->playbin2));
// g_source_remove (bus_watch_id);
#ifdef GTK
gtk_main_quit();
#else
g_main_loop_unref (pData->loop);
#endif
free(pData);
exit(0);
}
static int signal_handler(PlayerData * data) {
printf(" \n Signal caught: %u \n ", 10);
cleanup();
cleanup(data);
}
int
......@@ -1058,7 +1075,7 @@ init_media(pData);
#endif
#ifndef PL
//load url
load_uri(pData->playuri);
load_uri(pData->playuri, pData);
gst_element_set_state (pData->playbin2, GST_STATE_PLAYING);
#endif
......
......@@ -135,6 +135,31 @@ struct snowData {
int audiosink;
};
typedef struct PlayerGui PlayerGui;
struct PlayerGui {
#ifdef GTK
GtkWidget *feed_label;
GtkWidget *clock_label;
char *markup;
GtkWidget *video_window, *main_hbox;
//
//
GtkWidget *main_window; /* The uppermost window, containing all other windows */
GtkWidget *main_box; /* VBox to hold main_hbox and the controls */
// GtkWidget *main_hbox; /* HBox to hold the video_window and the stream info text widget */
GtkWidget *controls; /* HBox to hold the buttons and the slider */
GtkWidget *options; /* HBox to hold the options and current uri */
GtkWidget *play_button, *pause_button, *stop_button, *open_button, *add_button; /* Buttons */
GtkWidget *test_button, *previous_button, *next_button;
GtkWidget *loaded_label;
#endif
};
/* Structure to contain all our information, so we can pass it around */
typedef struct PlayerData PlayerData;
struct PlayerData{
......@@ -154,6 +179,7 @@ struct PlayerData{
//gtk
#ifdef GTK
PlayerGui *gui;
GtkWidget *slider; /* Slider widget to keep track of current position */
GtkWidget *streams_list; /* Text widget to display info about the streams */
gulong slider_update_signal_id; /* Signal ID for the slider update signal */
......@@ -169,7 +195,6 @@ PlayerData *pData;
// depreciated globall vars
#ifdef GTK
GtkWidget *loaded_label;
GtkWidget *playlist_view;
GtkWidget *playlist_box;
#endif
......
......@@ -795,21 +795,15 @@ filechooser_selection_changed_cb ()
static void
previous_cb ()
{
printf("previous_cb not doing anything");
//load_uri (playlist_get_previous ());
playlist_get_previous();
player_reset_and_play();
//g_print(":we got: %s \n", playlist_get_previous());
}
static void
next_cb ()
{
printf("next_cb not doing anything");
playlist_get_next();
player_reset_and_play();
// load_uri (playlist_get_next ());
}
......
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