player_control.c File Reference
`#include "player_control.h"`
Include dependency graph for player_control.c:

Go to the source code of this file.

## Functions

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

## 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_control.c.

## Function Documentation

void player_add_files | ( | GList * | list,
|  | ui_state * | ui
| ) |  |

add files to playlist

Definition at line 166 of file player_control.c.

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

Referenced by player_add_play_files().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_add_files_and_select | ( | GList * | list,
|  | ui_state * | ui
| ) |  |

add files to playlist

Definition at line 189 of file player_control.c.

References gstreamer_add_files(), gstreamer_select_last_file(), myaudacious_add_files(), myaudacious_select_last_file(), snackamp_add_files(), and snackamp_select_last_file().

Here is the call graph for this function:

void player_add_play_files | ( | GList * | list,
|  | ui_state * | ui
| ) |  |

add files to playlist

Definition at line 215 of file player_control.c.

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

Here is the call graph for this function:

gint player_get_elapsed_time | ( | ui_state * | ui | ) |

returns the elapsed time of the player

Definition at line 45 of file player_control.c.

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

Here is the call graph for this function:

gchar* player_get_filename | ( | ui_state * | ui | ) |

gets the filename of the current song

The returned string must be g_free'd after use

Definition at line 485 of file player_control.c.

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

Here is the call graph for this function:

gint player_get_playlist_number | ( | ui_state * | ui | ) |

returns the number of songs in the playlist

Definition at line 586 of file player_control.c.

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

Here is the call graph for this function:

void player_get_song_infos | ( | gchar * | total_infos,
|  | ui_state * | ui
| ) |  |

get infos about the song

Parameters

  total_infos | The result of this function call

Definition at line 409 of file player_control.c.

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

Here is the call graph for this function:

gchar* player_get_title | ( | ui_state * | ui | ) |

Get the title of the song.

The returned string must be g_freed after use

Definition at line 513 of file player_control.c.

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

Here is the call graph for this function:

gint player_get_total_time | ( | ui_state * | ui | ) |

returns total time of the song

Definition at line 70 of file player_control.c.

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

Here is the call graph for this function:

gint player_get_volume | ( | ui_state * | ui | ) |

gets the volume of the player

Definition at line 538 of file player_control.c.

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

Here is the call graph for this function:

gint player_is_paused | ( | ui_state * | ui | ) |

Check if the player is paused.

Definition at line 457 of file player_control.c.

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

Referenced by player_quick_preview().

Here is the call graph for this function:

Here is the caller graph for this function:

gint player_is_playing | ( | ui_state * | ui | ) |

returns TRUE if the player is playing, else FALSE

Definition at line 432 of file player_control.c.

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

Referenced by player_quick_preview().

Here is the call graph for this function:

Here is the caller graph for this function:

gint player_is_running | ( | ui_state * | ui | ) |

returns FALSE if the player is not running, else TRUE

Definition at line 95 of file player_control.c.

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

Referenced by connect_button_event(), and pause_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_next | ( | ui_state * | ui | ) |

pass to the next song

Definition at line 335 of file player_control.c.

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

Here is the call graph for this function:

void player_pause | ( | ui_state * | ui | ) |

pause the song

Definition at line 312 of file player_control.c.

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

Referenced by pause_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_play | ( | ui_state * | ui | ) |

plays the song

Definition at line 266 of file player_control.c.

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

Referenced by player_quick_preview().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_prev | ( | ui_state * | ui | ) |

pass to the previous song

Definition at line 358 of file player_control.c.

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

Here is the call graph for this function:

gint player_quit | ( | ui_state * | ui | ) |

quits the player

Definition at line 611 of file player_control.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_seek | ( | gint | position,
|  | ui_state * | ui
| ) |  |

jumps to a position in the song

Definition at line 381 of file player_control.c.

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

Referenced by player_quick_preview().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_set_volume | ( | gint | volume,
|  | ui_state * | ui
| ) |  |

sets the volume of the player

Definition at line 563 of file player_control.c.

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

Here is the call graph for this function:

void player_start | ( | ui_state * | ui | ) |

starts the player

Definition at line 120 of file player_control.c.

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

Referenced by connect_button_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_start_add_files | ( | GList * | list,
|  | ui_state * | ui
| ) |  |

start player and add files to playlist

Definition at line 143 of file player_control.c.

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

Here is the call graph for this function:

void player_start_play_with_songs | ( | GList * | list,
|  | ui_state * | ui
| ) |  |

starts the player

Definition at line 240 of file player_control.c.

References gstreamer_play_last_file(), gstreamer_start_with_songs(), myaudacious_play_last_file(), myaudacious_start_with_songs(), snackamp_play_last_file(), and snackamp_start_with_songs().

Here is the call graph for this function:

void player_stop | ( | ui_state * | ui | ) |

stops the song

Definition at line 289 of file player_control.c.

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

Here is the call graph for this function: