mp3splt-gtk: src/player_window.c File Reference

mp3splt-gtk 0.9.3.1519

Loading...
Searching...
No Matches
player_window.c File Reference
`#include <sys/timeb.h>`
`#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, ui_infos *infos)
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.

## Macro Definition Documentation

## ◆ DRAWING_AREA_HEIGHT

#define DRAWING_AREA_HEIGHT 123

Definition at line 44 of file player_window.c.

## ◆ DRAWING_AREA_HEIGHT_WITH_SILENCE_WAVE

#define DRAWING_AREA_HEIGHT_WITH_SILENCE_WAVE 232

Definition at line 45 of file player_window.c.

## ◆ DRAWING_AREA_WIDTH

#define DRAWING_AREA_WIDTH 400

Definition at line 43 of file player_window.c.

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Definition at line 48 of file player_window.c.

## Function Documentation

## ◆ add_playlist_file()

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

add a row to the table

Definition at line 3080 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:

## ◆ adjust_zoom_coeff()

void adjust_zoom_coeff | ( | ui_infos * | infos | ) |

Definition at line 2978 of file player_window.c.

## ◆ cancel_quick_preview()

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

cancels preview

Definition at line 1656 of file player_window.c.

Referenced by cancel_quick_preview_all().

Here is the caller graph for this function:

## ◆ cancel_quick_preview_all()

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

full cancel of the preview

Definition at line 1648 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:

## ◆ change_current_filename()

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 261 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:

## ◆ check_update_down_progress_bar()

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

updates bottom progress bar

Definition at line 1094 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:

## ◆ clear_previous_distances()

void clear_previous_distances | ( | ui_state * | ui | ) |

Definition at line 2086 of file player_window.c.

## ◆ compute_douglas_peucker_filters()

void compute_douglas_peucker_filters | ( | ui_state * | ui | ) |

Definition at line 131 of file player_window.c.

## ◆ connect_button_event()

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

play button event

Definition at line 533 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:

## ◆ connect_to_player_with_song()

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 527 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:

## ◆ create_player_control_frame()

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

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

Definition at line 3045 of file player_window.c.

## ◆ create_player_playlist_frame()

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

creates the playlist of the player

Definition at line 3259 of file player_window.c.

References create_playlist_columns(), and split_tree_row_activated().

Here is the call graph for this function:

## ◆ create_playlist_columns()

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

creates playlist columns

Definition at line 3144 of file player_window.c.

Referenced by create_player_playlist_frame().

Here is the caller graph for this function:

## ◆ disconnect_button_event()

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

disconnect button event

Definition at line 637 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:

## ◆ draw_silence_wave()

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 1963 of file player_window.c.

## ◆ enable_player_buttons()

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

enables the buttons of the player

Definition at line 341 of file player_window.c.

Referenced by connect_button_event().

Here is the caller graph for this function:

## ◆ file_chooser_ok_event()

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

Definition at line 3529 of file player_window.c.

## ◆ get_current_splitpoints_time_left_right()

void get_current_splitpoints_time_left_right | ( | gint * | time_left,
|  | gint * | time_right,
|  | gint * | splitpoint_left,
|  | ui_state * | ui )

Definition at line 2523 of file player_window.c.

## ◆ get_currently_scanning_for_silence_safe()

gint get_currently_scanning_for_silence_safe | ( | ui_state * | ui | ) |

Definition at line 172 of file player_window.c.

## ◆ get_left_drawing_time()

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.

## ◆ get_preview_start_position_safe()

gint get_preview_start_position_safe | ( | ui_state * | ui | ) |

Definition at line 2651 of file player_window.c.

## ◆ get_quick_preview_end_splitpoint_safe()

gint get_quick_preview_end_splitpoint_safe | ( | ui_state * | ui | ) |

Definition at line 1370 of file player_window.c.

## ◆ get_right_drawing_time()

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.

## ◆ hide_connect_button()

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

Hide the connect button.

Definition at line 403 of file player_window.c.

## ◆ pause_event()

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

pause button event

Definition at line 749 of file player_window.c.

References player_is_running(), and player_pause().

Here is the call graph for this function:

## ◆ player_key_actions_set_sensitivity()

void player_key_actions_set_sensitivity | ( | gboolean | sensitivity,
|  | gui_state * | gui )

Definition at line 3306 of file player_window.c.

## ◆ player_quick_preview()

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

makes a preview of the song

Definition at line 2661 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:

## ◆ refresh_drawing_area()

void refresh_drawing_area | ( | gui_state * | gui,
|  | ui_infos * | infos )

Definition at line 1088 of file player_window.c.

## ◆ restart_player_timer()

void restart_player_timer | ( | ui_state * | ui | ) |

Definition at line 680 of file player_window.c.

## ◆ set_currently_scanning_for_silence_safe()

void set_currently_scanning_for_silence_safe | ( | gint | value,
|  | ui_state * | ui )

Definition at line 165 of file player_window.c.

## ◆ set_preview_start_position_safe()

void set_preview_start_position_safe | ( | gint | value,
|  | ui_state * | ui )

Definition at line 2643 of file player_window.c.

## ◆ set_quick_preview_end_splitpoint_safe()

void set_quick_preview_end_splitpoint_safe | ( | gint | value,
|  | ui_state * | ui )

Definition at line 1363 of file player_window.c.

## ◆ show_connect_button()

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

Show the connect button.

Definition at line 427 of file player_window.c.

References wh_container_has_child().

Here is the call graph for this function: