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

Go to the source code of this file.

## Macros

#define | DRAWING_AREA_HEIGHT 123
#define | DRAWING_AREA_HEIGHT_WITH_SILENCE_WAVE 232
#define | DRAWING_AREA_WIDTH 400

## Enumerations

enum | { COL_NAME, COL_FILENAME, PLAYLIST_COLUMNS }

## Functions

void | add_playlist_file (const gchar *name, ui_state *ui)
void | adjust_zoom_coeff (ui_infos *infos)
void | cancel_quick_preview (gui_status *status)
void | cancel_quick_preview_all (ui_state *ui)
void | change_current_filename (const gchar *fname, ui_state *ui)
void | check_update_down_progress_bar (ui_state *ui)
void | clear_previous_distances (ui_state *ui)
void | compute_douglas_peucker_filters (ui_state *ui)
void | connect_button_event (GtkWidget *widget, ui_state *ui)
void | connect_to_player_with_song (gint i, ui_state *ui)
GtkWidget * | create_player_control_frame (ui_state *ui)
GtkWidget * | create_player_playlist_frame (ui_state *ui)
void | create_playlist_columns (GtkTreeView *playlist_tree)
void | disconnect_button_event (GtkWidget *widget, ui_state *ui)
gint | draw_silence_wave (gint left_mark, gint right_mark, gint interpolation_text_x, gint interpolation_text_y, gfloat draw_time, gint width_drawing_area, gint y_margin, gfloat current_time, gfloat total_time, gfloat zoom_coeff, GtkWidget *da, cairo_t *gc, ui_state *ui)
void | enable_player_buttons (ui_state *ui)
void | file_chooser_ok_event (const gchar *fname, ui_state *ui)
void | get_current_splitpoints_time_left_right (gint *time_left, gint *time_right, gint *splitpoint_left, ui_state *ui)
gint | get_currently_scanning_for_silence_safe (ui_state *ui)
gfloat | get_left_drawing_time (gfloat current_time, gfloat total_time, gfloat zoom_coeff)
gint | get_preview_start_position_safe (ui_state *ui)
gint | get_quick_preview_end_splitpoint_safe (ui_state *ui)
gfloat | get_right_drawing_time (gfloat current_time, gfloat total_time, gfloat zoom_coeff)
void | hide_connect_button (gui_state *gui)
void | pause_event (GtkWidget *widget, ui_state *ui)
void | player_key_actions_set_sensitivity (gboolean sensitivity, gui_state *gui)
void | player_quick_preview (gint splitpoint_to_preview, ui_state *ui)
void | refresh_drawing_area (gui_state *gui)
void | restart_player_timer (ui_state *ui)
void | set_currently_scanning_for_silence_safe (gint value, ui_state *ui)
void | set_preview_start_position_safe (gint value, ui_state *ui)
void | set_quick_preview_end_splitpoint_safe (gint value, ui_state *ui)
void | show_connect_button (gui_state *gui)

## Detailed Description

The player control tab

this file is used for the player control tab

Definition in file player_window.c.

## Function Documentation

void add_playlist_file | ( | const gchar * | name,
|  | ui_state * | ui
| ) |  |

add a row to the table

Definition at line 3073 of file player_window.c.

References file_exists(), and get_real_name_from_filename().

Referenced by gstreamer_add_files().

Here is the call graph for this function:

Here is the caller graph for this function:

void cancel_quick_preview | ( | gui_status * | status | ) |

cancels quick preview

Definition at line 1579 of file player_window.c.

Referenced by cancel_quick_preview_all().

Here is the caller graph for this function:

void cancel_quick_preview_all | ( | ui_state * | ui | ) |

full cancel of the quick preview

Definition at line 1571 of file player_window.c.

References cancel_quick_preview().

Referenced by player_quick_preview(), remove_all_rows(), and remove_splitpoint().

Here is the call graph for this function:

Here is the caller graph for this function:

void change_current_filename | ( | const gchar * | fname,
|  | ui_state * | ui
| ) |  |

Change the name of the song that is to be cut and played.

Manages changing the filename itselves as well as recalculating the silence wave if needed.

Definition at line 265 of file player_window.c.

References get_input_filename(), and set_input_filename().

Referenced by split_tree_row_activated().

Here is the call graph for this function:

Here is the caller graph for this function:

void check_update_down_progress_bar | ( | ui_state * | ui | ) |

updates bottom progress bar

Definition at line 1087 of file player_window.c.

References get_input_filename(), get_real_name_from_filename(), and get_splitpoint_name().

Referenced by connect_button_event(), remove_all_rows(), and remove_splitpoint().

Here is the call graph for this function:

Here is the caller graph for this function:

void connect_button_event | ( | GtkWidget * | widget,
|  | ui_state * | ui
| ) |  |

play button event

Definition at line 537 of file player_window.c.

References check_update_down_progress_bar(), connect_snackamp(), connect_to_player_with_song(), enable_player_buttons(), player_is_running(), and player_start().

Referenced by split_tree_row_activated().

Here is the call graph for this function:

Here is the caller graph for this function:

void connect_to_player_with_song | ( | gint | i,
|  | ui_state * | ui
| ) |  |

connects to player with the song from the filename entry

Parameters

  i | 0 means then start playing, != 0 means dont start playing right now

Definition at line 531 of file player_window.c.

References get_input_filename().

Referenced by connect_button_event(), and split_tree_row_activated().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_player_control_frame | ( | ui_state * | ui | ) |

creates the control player frame, stop button, play button, etc.

Definition at line 3038 of file player_window.c.

GtkWidget* create_player_playlist_frame | ( | ui_state * | ui | ) |

creates the playlist of the player

Definition at line 3252 of file player_window.c.

References create_playlist_columns(), and split_tree_row_activated().

Here is the call graph for this function:

void create_playlist_columns | ( | GtkTreeView * | playlist_tree | ) |

creates playlist columns

Definition at line 3137 of file player_window.c.

Referenced by create_player_playlist_frame().

Here is the caller graph for this function:

void disconnect_button_event | ( | GtkWidget * | widget,
|  | ui_state * | ui
| ) |  |

disconnect button event

Definition at line 641 of file player_window.c.

References cancel_button_event(), disconnect_snackamp(), file_exists(), get_input_filename(), and player_quit().

Here is the call graph for this function:

gint draw_silence_wave | ( | gint | left_mark,
|  | gint | right_mark,
|  | gint | interpolation_text_x,
|  | gint | interpolation_text_y,
|  | gfloat | draw_time,
|  | gint | width_drawing_area,
|  | gint | y_margin,
|  | gfloat | current_time,
|  | gfloat | total_time,
|  | gfloat | zoom_coeff,
|  | GtkWidget * | da,
|  | cairo_t * | gc,
|  | ui_state * | ui
| ) |  |

Draws the silence wave.

Definition at line 1874 of file player_window.c.

void enable_player_buttons | ( | ui_state * | ui | ) |

enables the buttons of the player

Definition at line 345 of file player_window.c.

Referenced by connect_button_event().

Here is the caller graph for this function:

gfloat get_left_drawing_time | ( | gfloat | current_time,
|  | gfloat | total_time,
|  | gfloat | zoom_coeff
| ) |  |

returns the value of the left drawing area

Definition at line 1437 of file player_window.c.

gfloat get_right_drawing_time | ( | gfloat | current_time,
|  | gfloat | total_time,
|  | gfloat | zoom_coeff
| ) |  |

returns the value of the right drawing area

Definition at line 1428 of file player_window.c.

void hide_connect_button | ( | gui_state * | gui | ) |

Hide the connect button.

Definition at line 407 of file player_window.c.

void pause_event | ( | GtkWidget * | widget,
|  | ui_state * | ui
| ) |  |

pause button event

Definition at line 753 of file player_window.c.

References player_is_running(), and player_pause().

Here is the call graph for this function:

void player_quick_preview | ( | gint | splitpoint_to_preview,
|  | ui_state * | ui
| ) |  |

makes a quick preview of the song

Definition at line 2644 of file player_window.c.

References cancel_quick_preview_all(), get_splitpoint_time(), player_is_paused(), player_is_playing(), player_play(), player_seek(), and put_status_message().

Here is the call graph for this function:

void show_connect_button | ( | gui_state * | gui | ) |

Show the connect button.

Definition at line 431 of file player_window.c.

References wh_container_has_child().

Here is the call graph for this function: