mp3splt-gtk
player.c File Reference
#include <glib.h>
#include <stdio.h>
#include "player.h"
#include "snackamp_control.h"
#include "xmms_control.h"
#include "gstreamer_control.h"
Include dependency graph for player.c:

Go to the source code of this file.

Functions

void player_add_files (GList *list)
void player_add_files_and_select (GList *list)
void player_add_play_files (GList *list)
gint player_get_elapsed_time ()
gchar * player_get_filename ()
gint player_get_playlist_number ()
void player_get_song_infos (gchar *total_infos)
gchar * player_get_title ()
gint player_get_total_time ()
gint player_get_volume ()
gint player_is_paused ()
gint player_is_playing ()
gint player_is_running ()
void player_jump (gint position)
void player_next ()
void player_pause ()
void player_play ()
void player_prev ()
gint player_quit ()
void player_set_volume (gint volume)
void player_start ()
void player_start_add_files (GList *list)
void player_start_play_with_songs (GList *list)
void player_stop ()

Variables

int selected_player

Detailed Description


Functions to access the currently selected player

this file is used to play for the appropriate player, for example if we choose snackamp, the player will use snackamp

Definition in file player.c.


Function Documentation

void player_add_files ( GList *  list)

add files to playlist

Definition at line 174 of file player.c.

References gstreamer_add_files(), myxmms_add_files(), and snackamp_add_files().

Referenced by connect_with_song(), player_add_play_files(), and queue_files_button_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_add_files_and_select ( GList *  list)

add files to playlist

Definition at line 197 of file player.c.

References gstreamer_add_files(), gstreamer_select_last_file(), myxmms_add_files(), myxmms_select_last_file(), snackamp_add_files(), and snackamp_select_last_file().

Referenced by connect_with_song().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_add_play_files ( GList *  list)

add files to playlist

Definition at line 223 of file player.c.

References gstreamer_play_last_file(), myxmms_play_last_file(), player_add_files(), and snackamp_next().

Referenced by connect_with_song().

Here is the call graph for this function:

Here is the caller graph for this function:

returns the elapsed time of the player

Definition at line 53 of file player.c.

References gstreamer_get_time_elapsed(), myxmms_get_time_elapsed(), and snackamp_get_time_elapsed().

Referenced by print_song_time_elapsed().

Here is the call graph for this function:

Here is the caller graph for this function:

gchar* player_get_filename ( )

gets the filename of the current song

The returned string must be g_free'd after use

Definition at line 495 of file player.c.

References gstreamer_get_filename(), myxmms_get_filename(), and snackamp_get_filename().

Referenced by print_player_filename().

Here is the call graph for this function:

Here is the caller graph for this function:

returns the number of songs in the playlist

Definition at line 596 of file player.c.

References gstreamer_get_playlist_number(), myxmms_get_playlist_number(), and snackamp_get_playlist_number().

Referenced by mytimer().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_get_song_infos ( gchar *  total_infos)

get infos about the song

Parameters:
total_infosThe result of this function call

Definition at line 418 of file player.c.

References gstreamer_get_song_infos(), myxmms_get_song_infos(), and snackamp_get_song_infos().

Referenced by print_about_the_song().

Here is the call graph for this function:

Here is the caller graph for this function:

gchar* player_get_title ( )

Get the title of the song.

The returned string must be g_freed after use

Definition at line 523 of file player.c.

References gstreamer_get_title_song(), myxmms_get_title_song(), and snackamp_get_title_song().

Referenced by print_player_filename().

Here is the call graph for this function:

Here is the caller graph for this function:

returns total time of the song

Definition at line 78 of file player.c.

References gstreamer_get_total_time(), myxmms_get_total_time(), and snackamp_get_total_time().

Referenced by change_progress_bar().

Here is the call graph for this function:

Here is the caller graph for this function:

gets the volume of the player

Definition at line 548 of file player.c.

References gstreamer_get_volume(), myxmms_get_volume(), and snackamp_get_volume().

Referenced by change_volume_bar().

Here is the call graph for this function:

Here is the caller graph for this function:

gint player_is_paused ( )

Check if the player is paused.

Definition at line 467 of file player.c.

References gstreamer_is_paused(), myxmms_is_paused(), and snackamp_is_paused().

Referenced by da_unpress_event(), mytimer(), and player_quick_preview().

Here is the call graph for this function:

Here is the caller graph for this function:

returns TRUE if the player is playing, else FALSE

Definition at line 442 of file player.c.

References gstreamer_is_playing(), myxmms_is_playing(), and snackamp_is_playing().

Referenced by mytimer(), and player_quick_preview().

Here is the call graph for this function:

Here is the caller graph for this function:

returns FALSE if the player is not running, else TRUE

Definition at line 103 of file player.c.

References gstreamer_is_running(), myxmms_is_running(), and snackamp_is_running().

Referenced by change_progress_bar(), change_volume_bar(), connect_button_event(), connect_with_song(), mytimer(), next_button_event(), pause_event(), play_event(), prev_button_event(), sigpipe_handler(), and stop_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_jump ( gint  position)

jumps to a position in the song

Definition at line 392 of file player.c.

References gstreamer_jump(), myxmms_jump(), and snackamp_jump().

Referenced by change_song_position(), da_unpress_event(), and player_quick_preview().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_next ( )

pass to the next song

Definition at line 346 of file player.c.

References gstreamer_next(), myxmms_next(), and snackamp_next().

Referenced by next_button_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_pause ( )

pause the song

Definition at line 323 of file player.c.

References gstreamer_pause(), myxmms_pause(), and snackamp_pause().

Referenced by da_unpress_event(), and pause_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_play ( )

plays the song

Definition at line 277 of file player.c.

References gstreamer_play(), myxmms_play(), and snackamp_play().

Referenced by play_event(), and player_quick_preview().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_prev ( )

pass to the previous song

Definition at line 369 of file player.c.

References gstreamer_prev(), myxmms_prev(), and snackamp_prev().

Referenced by prev_button_event().

Here is the call graph for this function:

Here is the caller graph for this function:

gint player_quit ( )

quits the player

Definition at line 621 of file player.c.

References gstreamer_quit().

Referenced by disconnect_button_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_set_volume ( gint  volume)

sets the volume of the player

Definition at line 573 of file player.c.

References gstreamer_set_volume(), myxmms_set_volume(), and snackamp_set_volume().

Referenced by change_volume_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_start ( )

starts the player

Definition at line 128 of file player.c.

References gstreamer_start(), myxmms_start(), and snackamp_start().

Referenced by connect_button_event(), and play_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_start_add_files ( GList *  list)

start player and add files to playlist

Definition at line 151 of file player.c.

References gstreamer_start_with_songs(), myxmms_start_with_songs(), and snackamp_start_with_songs().

Referenced by connect_with_song().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_start_play_with_songs ( GList *  list)

starts the player

Definition at line 251 of file player.c.

References gstreamer_play_last_file(), gstreamer_start_with_songs(), myxmms_play_last_file(), myxmms_start_with_songs(), snackamp_play_last_file(), and snackamp_start_with_songs().

Referenced by connect_with_song().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_stop ( )

stops the song

Definition at line 300 of file player.c.

References gstreamer_stop(), myxmms_stop(), and snackamp_stop().

Referenced by stop_event().

Here is the call graph for this function:

Here is the caller graph for this function: