mp3splt-gtk

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Enumerations | Functions | Variables
player_tab.c File Reference
`#include <gtk/gtk.h>`
`#include <glib/gi18n.h>`
`#include <string.h>`
`#include <libmp3splt/mp3splt.h>`
`#include <unistd.h>`
`#include <math.h>`
`#include "util.h"`
`#include "tree_tab.h"`
`#include "player.h"`
`#include "player_tab.h"`
`#include "main_win.h"`
`#include "snackamp_control.h"`
`#include "utilities.h"`
`#include "split_files.h"`
`#include "mp3splt-gtk.h"`
`#include "ui_manager.h"`
`#include "widgets_helper.h"`
Include dependency graph for player_tab.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)
void | browse_button_event (GtkWidget *widget, gpointer data)
void | build_path (GString *path, const gchar *dir, const gchar *filename)
void | cancel_quick_preview ()
void | cancel_quick_preview_all ()
void | change_current_filename (const gchar *fname)
void | change_progress_bar ()
void | change_song_position ()
void | change_volume_button ()
void | change_volume_event (GtkScaleButton *volume_button, gdouble value, gpointer data)
void | check_stream ()
void | check_update_down_progress_bar ()
void | clear_data_player ()
void | close_file_popup_window_event (GtkWidget *window, gpointer data)
void | close_player_popup_window_event (GtkWidget *window, gpointer data)
void | close_playlist_popup_window_event (GtkWidget *window, gpointer data)
void | connect_button_event (GtkWidget *widget, gpointer data)
void | connect_change_buttons ()
void | connect_to_player_with_song (gint i)
void | connect_with_song (const gchar *fname, gint start_playing)
void | copy_filename_to_current_description (const gchar *fname)
GtkWidget * | create_choose_file_frame ()
GtkWidget * | create_delete_buttons_hbox ()
GtkWidget * | create_drawing_area ()
GtkWidget * | create_filename_player_hbox ()
GtkWidget * | create_player_buttons_hbox (GtkTreeView *tree_view)
GtkWidget * | create_player_control_frame (GtkTreeView *tree_view)
GtkWidget * | create_player_playlist_frame ()
void | create_playlist_columns (GtkTreeView *tree_view)
GtkTreeModel * | create_playlist_model ()
GtkTreeView * | create_playlist_tree ()
GtkWidget * | create_song_bar_hbox ()
GtkWidget * | create_song_informations_hbox ()
GtkWidget * | create_volume_button ()
gboolean | da_draw_event (GtkWidget *da, GdkEventExpose *event, gpointer data)
gboolean | da_notify_event (GtkWidget *da, GdkEventMotion *event, gpointer data)
gboolean | da_press_event (GtkWidget *da, GdkEventButton *event, gpointer data)
gboolean | da_unpress_event (GtkWidget *da, GdkEventButton *event, gpointer data)
gpointer | detect_silence (gpointer data)
void | disable_player_buttons ()
void | disconnect_button_event (GtkWidget *widget, gpointer data)
void | disconnect_change_buttons ()
void | draw_marks (gint time_interval, gint left_mark, gint right_mark, gint ylimit, GtkWidget *da, cairo_t *gc)
void | draw_motif (GtkWidget *da, cairo_t *gc, gint ylimit, gint x, gint model)
void | draw_motif_splitpoints (GtkWidget *da, cairo_t *gc, gint x, gint draw, gint current_point_hundr_secs, gboolean move, gint number_splitpoint)
void | draw_silence_wave (gint left_mark, gint right_mark, GtkWidget *da, cairo_t *gc)
void | draw_splitpoints (gint left_mark, gint right_mark, GtkWidget *da, cairo_t *gc)
void | enable_player_buttons ()
void | enable_show_silence_wave (GtkToggleButton *widget, gpointer data)
void | file_chooser_cancel_event ()
void | file_chooser_ok_event (gchar *fname)
gpointer | fix_ogg_stream (gpointer data)
void | fix_ogg_stream_button_event (GtkWidget *widget, gpointer data)
gint | get_draw_line_position (gint width, gfloat time)
gfloat | get_elapsed_time ()
gfloat | get_left_drawing_time ()
guchar * | get_real_name_from_filename (guchar *filename)
gfloat | get_right_drawing_time ()
void | get_silence_level (long time, float level, void *user_data)
gint | get_silence_wave_coeff ()
gint | get_splitpoint_clicked (gint button_y, gint type_clicked, gint type)
void | get_splitpoint_time_left_right (gint *time_left, gint *time_right, gint *splitpoint_left)
gchar * | get_time_for_drawing (gchar *str, gint time, gboolean hundr_or_not, gint *number_of_chars)
gint | get_time_hundrsecs (gint time)
gint | get_time_mins (gint time)
gint | get_time_secs (gint time)
gfloat | get_total_time ()
void | handle_file_detached_event (GtkHandleBox *handlebox, GtkWidget *widget, gpointer data)
void | handle_player_detached_event (GtkHandleBox *handlebox, GtkWidget *widget, gpointer data)
void | handle_playlist_detached_event (GtkHandleBox *handlebox, GtkWidget *widget, gpointer data)
void | hide_connect_button ()
void | hide_disconnect_button ()
gchar * | inputfilename_get ()
void | inputfilename_set (const gchar *filename)
gint | mytimer (gpointer data)
void | next_button_event (GtkWidget *widget, gpointer data)
void | pause_event (GtkWidget *widget, gpointer data)
gfloat | pixels_to_time (gfloat width, gint pixels)
void | play_event (GtkWidget *widget, gpointer data)
void | player_quick_preview (gint splitpoint_to_preview)
void | playlist_remove_all_files_button_event (GtkWidget *widget, gpointer data)
void | playlist_remove_file_button_event (GtkWidget *widget, gpointer data)
void | playlist_selection_changed (GtkTreeSelection *selec, gpointer data)
void | prev_button_event (GtkWidget *widget, gpointer data)
void | print_about_the_song ()
void | print_all_song_infos ()
void | print_player_filename ()
void | print_song_time_elapsed ()
gboolean | progress_bar_click_event (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
gboolean | progress_bar_enter_event (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
gboolean | progress_bar_leave_event (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
gboolean | progress_bar_scroll_event (GtkWidget *widget, GdkEventScroll *event, gpointer user_data)
gboolean | progress_bar_unclick_event (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
void | progress_bar_value_changed_event (GtkRange *range, gpointer user_data)
void | refresh_drawing_area ()
void | reset_inactive_progress_bar ()
void | reset_inactive_volume_button ()
void | reset_label_time ()
void | reset_song_infos ()
void | reset_song_name_label ()
void | restart_player_timer ()
void | scan_for_silence_wave ()
void | show_connect_button ()
void | show_disconnect_button ()
void | stop_event (GtkWidget *widget, gpointer data)
gint | time_to_pixels (gint width, gfloat time)
gboolean | volume_button_click_event (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
gboolean | volume_button_enter_event (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
gboolean | volume_button_leave_event (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
gboolean | volume_button_unclick_event (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)

## Variables

GtkWidget * | browse_button
GtkWidget * | browse_cddb_button
GtkWidget * | browse_cue_button
gboolean | button1_pressed = FALSE
gboolean | button2_pressed = FALSE
gint | button_x
gint | button_x2
gint | button_y
gint | button_y2
GtkWidget * | cancel_button
gboolean | change_volume = TRUE
gboolean | check_splitpoint = FALSE
gint | checkbox_ypos
GtkWidget * | connect_button
gfloat | current_time = 0
gint | debug_is_active
GtkWidget * | disconnect_button
GtkWidget * | drawing_area = NULL
GtkWidget * | drawing_area_expander
GtkWidget * | entry
gint | erase_split_ylimit
gint | file_browsed = FALSE
GtkWidget * | file_handle_box
gint | file_in_entry = FALSE
gchar * | filename_path_of_split
gchar * | filename_to_split
GtkWidget * | fix_ogg_stream_button
GtkWidget * | go_beg_button
GtkWidget * | Go_BegButton_active
GtkWidget * | Go_BegButton_inactive
GtkWidget * | go_end_button
GtkWidget * | Go_EndButton_active
GtkWidget * | Go_EndButton_inactive
gint | incorrect_selected_file = FALSE
GString * | inputfilename
GtkWidget * | label_time
gint | malloced_num_of_silence_points = 0
gint | margin
gboolean | mouse_on_progress_bar = FALSE
gboolean | move_splitpoints = FALSE
gfloat | move_time
GtkWidget * | names_from_filename
gint | number_of_silence_points = 0
gboolean | on_the_volume_button = FALSE
gint | only_press_pause = FALSE
GtkWidget * | pause_button
GtkWidget * | PauseButton_active
GtkWidget * | PauseButton_inactive
GtkWidget * | percent_progress_bar
GtkWidget * | play_button
GtkWidget * | PlayButton_active
GtkWidget * | PlayButton_inactive
GtkWidget * | player_add_button
GtkWidget * | player_buttons_hbox = NULL
GtkWidget * | player_handle
gint | player_hundr_secs = 0
gint | player_hundr_secs2 = 0
gint | player_minutes = 0
gint | player_minutes2 = 0
gint | player_seconds = 0
gint | player_seconds2 = 0
gboolean | playing = FALSE
GtkWidget * | playlist_handle
GtkWidget * | playlist_handle_window
GtkWidget * | playlist_remove_all_files_button
GtkWidget * | playlist_remove_file_button
GtkWidget * | playlist_tree = NULL
gint | playlist_tree_number = 0
gint | preview_start_position
gint | preview_start_splitpoint
GtkWidget * | progress_adj
GtkWidget * | progress_bar
gint | progress_ylimit
gboolean | quick_preview
gint | quick_preview_end_splitpoint
gint | real_checkbox_length
gint | real_erase_split_length
gint | real_move_split_length
gint | real_progress_length
gint | real_text_length
gint | real_wave_length
gboolean | remove_splitpoints = FALSE
gboolean | select_splitpoints = FALSE
gint | selected_player
gint | show_silence_wave = FALSE
silence_wave * | silence_points = NULL
GtkWidget * | silence_wave_check_button = NULL
GtkWidget * | song_infos
GtkWidget * | song_name_label
gint | splitnumber
gint | splitpoint_to_move = -1
gint | splitpoint_ypos
GArray * | splitpoints
gint | stay_turn = 0
GtkWidget * | stop_button
GtkWidget * | StopButton_active
GtkWidget * | StopButton_inactive
gboolean | stream = FALSE
gint | text_ypos
splt_state * | the_state
gint | timeout_id
gint | timeout_value = DEFAULT_TIMEOUT_VALUE
gboolean | timer_active = FALSE
gfloat | total_draw_time = 0
gfloat | total_time = 0
ui_state * | ui
GtkWidget * | volume_button
gint | wave_ypos
gint | we_are_splitting
gint | we_scan_for_silence = FALSE
gint | width_drawing_area = 0
GtkWidget * | window
gfloat | zoom_coeff = 2.0
gfloat | zoom_coeff_old

## Detailed Description

The player control tab

this file is used for the player control tab

Definition in file player_tab.c.

## Function Documentation

void add_playlist_file | ( | const gchar * | name | ) |

add a row to the table

Definition at line 3309 of file player_tab.c.

References get_real_name_from_filename(), is_filee(), and tree_view.

Referenced by gstreamer_add_files().

Here is the call graph for this function:

Here is the caller graph for this function:

void browse_button_event | ( | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

Events for browse button.

Also used for the cddb and cue browses.

Definition at line 3813 of file player_tab.c.

References file_chooser_cancel_event(), and remove_status_message().

Referenced by create_menu_bar().

Here is the call graph for this function:

Here is the caller graph for this function:

void cancel_quick_preview | ( |  | ) |

cancels quick preview

Definition at line 1891 of file player_tab.c.

References quick_preview.

Referenced by add_splitpoint(), cancel_quick_preview_all(), change_progress_bar(), and mytimer().

Here is the caller graph for this function:

void cancel_quick_preview_all | ( |  | ) |

full cancel of the quick preview

Definition at line 1883 of file player_tab.c.

References cancel_quick_preview(), preview_start_splitpoint, and quick_preview_end_splitpoint.

Referenced by add_splitpoint(), da_unpress_event(), 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 | ) |

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 411 of file player_tab.c.

References inputfilename_get(), inputfilename_set(), and scan_for_silence_wave().

Referenced by print_player_filename(), and split_tree_row_activated().

Here is the call graph for this function:

Here is the caller graph for this function:

void change_progress_bar | ( |  | ) |

progress bar synchronisation with player

Definition at line 1476 of file player_tab.c.

References cancel_quick_preview(), get_elapsed_time(), get_splitpoint_time(), player_get_total_time(), player_is_running(), preview_start_splitpoint, and quick_preview_end_splitpoint.

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:

void change_song_position | ( |  | ) |

changes the position inside the song

Definition at line 872 of file player_tab.c.

References player_jump().

Referenced by progress_bar_unclick_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void change_volume_button | ( |  | ) |

change volume to match the players volume

Definition at line 1459 of file player_tab.c.

References player_get_volume(), and player_is_running().

Referenced by mytimer().

Here is the call graph for this function:

Here is the caller graph for this function:

void change_volume_event | ( | GtkScaleButton * | volume_button,
|  | gdouble | value,
|  | gpointer | data
| ) |  |

changes the volume of the player

Definition at line 1526 of file player_tab.c.

References player_set_volume().

Here is the call graph for this function:

void check_stream | ( |  | ) |

checks if we have a stream

Definition at line 719 of file player_tab.c.

References reset_inactive_progress_bar().

Referenced by mytimer().

Here is the call graph for this function:

Here is the caller graph for this function:

void check_update_down_progress_bar | ( |  | ) |

updates bottom progress bar

Definition at line 1151 of file player_tab.c.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

void clear_data_player | ( |  | ) |

clear song data and makes inactive progress bar

Definition at line 476 of file player_tab.c.

References browse_button, reset_inactive_progress_bar(), reset_inactive_volume_button(), reset_label_time(), reset_song_infos(), and reset_song_name_label().

Referenced by disconnect_button_event(), and mytimer().

Here is the call graph for this function:

Here is the caller graph for this function:

void close_player_popup_window_event | ( | GtkWidget * | window,
|  | gpointer | data
| ) |  |

when closing the new window after detaching

Definition at line 1565 of file player_tab.c.

Referenced by handle_player_detached_event().

Here is the caller graph for this function:

void close_playlist_popup_window_event | ( | GtkWidget * | window,
|  | gpointer | data
| ) |  |

when closing the new window after detaching

Definition at line 3357 of file player_tab.c.

Referenced by handle_playlist_detached_event(), and player_combo_box_event().

Here is the caller graph for this function:

void connect_button_event | ( | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

play button event

enable player buttons

Definition at line 623 of file player_tab.c.

References browse_button, check_update_down_progress_bar(), connect_change_buttons(), connect_snackamp(), connect_to_player_with_song(), enable_player_buttons(), file_browsed, mytimer(), player_is_running(), and player_start().

Referenced by create_player_buttons_hbox(), queue_files_button_event(), and split_tree_row_activated().

Here is the call graph for this function:

Here is the caller graph for this function:

void connect_change_buttons | ( |  | ) |

Switches between connect and disconnect button when connecting to player.

Definition at line 526 of file player_tab.c.

References hide_connect_button(), and show_disconnect_button().

Referenced by connect_button_event(), and connect_with_song().

Here is the call graph for this function:

Here is the caller graph for this function:

void connect_to_player_with_song | ( | gint | i | ) |

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 614 of file player_tab.c.

References connect_with_song(), and inputfilename_get().

Referenced by connect_button_event(), play_event(), and split_tree_row_activated().

Here is the call graph for this function:

Here is the caller graph for this function:

void connect_with_song | ( | const gchar * | fname,
|  | gint | start_playing
| ) |  |

connect with the song fname

Parameters

  fname | the file name of the song

  start_playing

  - start playing
  - else dont start playing right now.

Definition at line 552 of file player_tab.c.

References connect_change_buttons(), enable_player_buttons(), file_browsed, mytimer(), player_add_files(), player_add_files_and_select(), player_add_play_files(), player_is_running(), player_start_add_files(), and player_start_play_with_songs().

Referenced by connect_to_player_with_song().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_delete_buttons_hbox | ( |  | ) |

creates the horizontal queue buttons horizontal box

Definition at line 3541 of file player_tab.c.

References create_cool_button(), playlist_remove_all_files_button_event(), and playlist_remove_file_button_event().

Referenced by create_player_playlist_frame().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_drawing_area | ( |  | ) |

creates the progress drawing area under the player buttons

Definition at line 3213 of file player_tab.c.

References da_notify_event(), da_press_event(), and da_unpress_event().

Referenced by create_player_control_frame().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_filename_player_hbox | ( |  | ) |

creates the filename player hbox

Definition at line 1512 of file player_tab.c.

Referenced by create_player_control_frame().

Here is the caller graph for this function:

GtkWidget* create_player_buttons_hbox | ( | GtkTreeView * | tree_view | ) |

creates the player buttons hbox

Definition at line 955 of file player_tab.c.

References connect_button_event(), create_cool_button(), disconnect_button_event(), enable_show_silence_wave(), next_button_event(), pause_event(), play_event(), prev_button_event(), and stop_event().

Referenced by create_player_control_frame().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_player_control_frame | ( | GtkTreeView * | tree_view | ) |

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

Definition at line 3255 of file player_tab.c.

References create_drawing_area(), create_filename_player_hbox(), create_player_buttons_hbox(), create_song_bar_hbox(), create_song_informations_hbox(), and handle_player_detached_event().

Referenced by create_main_vbox().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_player_playlist_frame | ( |  | ) |

creates the playlist of the player

Definition at line 3568 of file player_tab.c.

References create_delete_buttons_hbox(), create_playlist_columns(), create_playlist_tree(), handle_playlist_detached_event(), playlist_selection_changed(), and split_tree_row_activated().

Referenced by create_main_vbox().

Here is the call graph for this function:

Here is the caller graph for this function:

void create_playlist_columns | ( | GtkTreeView * | tree_view | ) |

creates playlist columns

Definition at line 3404 of file player_tab.c.

Referenced by create_player_playlist_frame().

Here is the caller graph for this function:

GtkTreeModel* create_playlist_model | ( |  | ) |

creates the model for the playlist

Definition at line 3383 of file player_tab.c.

Referenced by create_playlist_tree().

Here is the caller graph for this function:

GtkTreeView* create_playlist_tree | ( |  | ) |

creates the playlist tree

Definition at line 3395 of file player_tab.c.

References create_playlist_model(), and tree_view.

Referenced by create_player_playlist_frame().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_song_bar_hbox | ( |  | ) |

song progress bar

Definition at line 1329 of file player_tab.c.

References progress_bar_click_event(), progress_bar_enter_event(), progress_bar_leave_event(), progress_bar_scroll_event(), progress_bar_unclick_event(), and progress_bar_value_changed_event().

Referenced by create_player_control_frame().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* create_song_informations_hbox | ( |  | ) |

song information about frequency, rate, stereo, etc

Definition at line 1091 of file player_tab.c.

Referenced by create_player_control_frame().

Here is the caller graph for this function:

gboolean da_notify_event | ( | GtkWidget * | da,
|  | GdkEventMotion * | event,
|  | gpointer | data
| ) |  |

on drawing area event

Definition at line 3092 of file player_tab.c.

References get_splitpoint_time().

Referenced by create_drawing_area().

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean da_press_event | ( | GtkWidget * | da,
|  | GdkEventButton * | event,
|  | gpointer | data
| ) |  |

drawing area press event

Definition at line 2893 of file player_tab.c.

References get_splitpoint_clicked(), get_splitpoint_time(), player_quick_preview(), remove_splitpoint(), select_splitpoint(), and update_splitpoint_check().

Referenced by create_drawing_area().

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean da_unpress_event | ( | GtkWidget * | da,
|  | GdkEventButton * | event,
|  | gpointer | data
| ) |  |

drawing area release event

Definition at line 3009 of file player_tab.c.

References cancel_quick_preview_all(), change_progress_bar(), get_splitpoint_time(), player_is_paused(), player_jump(), player_pause(), preview_start_splitpoint, quick_preview, quick_preview_end_splitpoint, remove_status_message(), and update_splitpoint_from_time().

Referenced by create_drawing_area().

Here is the call graph for this function:

Here is the caller graph for this function:

void disable_player_buttons | ( |  | ) |

disables the buttons of the player

Definition at line 509 of file player_tab.c.

Referenced by disconnect_button_event().

Here is the caller graph for this function:

void disconnect_button_event | ( | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

disconnect button event

Definition at line 733 of file player_tab.c.

References browse_button, clear_data_player(), disable_player_buttons(), disconnect_change_buttons(), disconnect_snackamp(), inputfilename_get(), is_filee(), and player_quit().

Referenced by create_player_buttons_hbox(), mytimer(), and player_combo_box_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void disconnect_change_buttons | ( |  | ) |

disconnecting changing buttons

Definition at line 536 of file player_tab.c.

References hide_disconnect_button(), and show_connect_button().

Referenced by disconnect_button_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void draw_marks | ( | gint | time_interval,
|  | gint | left_mark,
|  | gint | right_mark,
|  | gint | ylimit,
|  | GtkWidget * | da,
|  | cairo_t * | gc
| ) |  |

draw the marks, minutes, seconds...

Definition at line 1842 of file player_tab.c.

References get_draw_line_position().

Here is the call graph for this function:

void draw_motif_splitpoints | ( | GtkWidget * | da,
|  | cairo_t * | gc,
|  | gint | x,
|  | gint | draw,
|  | gint | current_point_hundr_secs,
|  | gboolean | move,
|  | gint | number_splitpoint
| ) |  |

motif for splitpoints

Parameters

  draw | false if we draw the splitpoint we move
  move | FALSE means we don't move the splitpoint,
  move | = TRUE means we move the splitpoint
  number_splitpoint | is the current splitpoint we draw
  splitpoint_checked | = TRUE if the splitpoint is checked

Definition at line 1904 of file player_tab.c.

References get_first_splitpoint_selected(), get_time_for_drawing(), and splitpoints.

Referenced by draw_splitpoints().

Here is the call graph for this function:

Here is the caller graph for this function:

void draw_silence_wave | ( | gint | left_mark,
|  | gint | right_mark,
|  | GtkWidget * | da,
|  | cairo_t * | gc
| ) |  |

Draws the silence wave.

Definition at line 2166 of file player_tab.c.

References get_draw_line_position().

Here is the call graph for this function:

void draw_splitpoints | ( | gint | left_mark,
|  | gint | right_mark,
|  | GtkWidget * | da,
|  | cairo_t * | gc
| ) |  |

left, right mark in hundreths of seconds

Definition at line 2085 of file player_tab.c.

References draw_motif_splitpoints(), get_draw_line_position(), splitnumber, and splitpoints.

Here is the call graph for this function:

void enable_player_buttons | ( |  | ) |

enables the buttons of the player

Definition at line 489 of file player_tab.c.

Referenced by connect_button_event(), and connect_with_song().

Here is the caller graph for this function:

void enable_show_silence_wave | ( | GtkToggleButton * | widget,
|  | gpointer | data
| ) |  |

adds a splitpoint from the player

Definition at line 885 of file player_tab.c.

References cancel_button_event(), and scan_for_silence_wave().

Referenced by create_player_buttons_hbox().

Here is the call graph for this function:

Here is the caller graph for this function:

void file_chooser_cancel_event | ( |  | ) |

event for the file chooser cancel button

Moved here from the file tab

Definition at line 3786 of file player_tab.c.

References browse_button.

Referenced by browse_button_event().

Here is the caller graph for this function:

gpointer fix_ogg_stream | ( | gpointer | data | ) |

fix ogg stream action

we split from 0 to a big number

Definition at line 3909 of file player_tab.c.

References fix_ogg_stream_button, inputfilename_get(), mp3splt_append_splitpoint(), mp3splt_erase_all_splitpoints(), mp3splt_set_filename_to_split(), mp3splt_set_path_of_split(), print_status_bar_confirmation(), put_options_from_preferences(), remove_all_split_rows(), SPLT_OPT_OUTPUT_FILENAMES, SPLT_OPT_SPLIT_MODE, SPLT_OPTION_NORMAL_MODE, and SPLT_OUTPUT_DEFAULT.

Referenced by fix_ogg_stream_button_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void fix_ogg_stream_button_event | ( | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

we make a thread with fix_ogg_stream

Definition at line 3957 of file player_tab.c.

References fix_ogg_stream().

Here is the call graph for this function:

gint get_draw_line_position | ( | gint | width,
|  | gfloat | time
| ) |  |

returns the position of a time mark on the screen

Parameters

  width | The width of the drawing
  The | time in hundreths of a second

Definition at line 1692 of file player_tab.c.

References time_to_pixels().

Referenced by draw_marks(), draw_silence_wave(), and draw_splitpoints().

Here is the call graph for this function:

Here is the caller graph for this function:

gfloat get_elapsed_time | ( |  | ) |

returns the total elapsed time

Definition at line 1139 of file player_tab.c.

Referenced by change_progress_bar(), and progress_bar_value_changed_event().

Here is the caller graph for this function:

gfloat get_left_drawing_time | ( |  | ) |

returns the value of the left drawing area

Definition at line 1609 of file player_tab.c.

Referenced by get_splitpoint_clicked().

Here is the caller graph for this function:

guchar* get_real_name_from_filename | ( | guchar * | filename | ) |

finding the real name of the file, without the path

Todo:
  why guchar instead of gchar ?

Definition at line 147 of file split_files.c.

Referenced by add_playlist_file(), add_split_row(), and check_update_down_progress_bar().

Here is the caller graph for this function:

gfloat get_right_drawing_time | ( |  | ) |

returns the value of the right drawing area

Definition at line 1597 of file player_tab.c.

void get_silence_level | ( | long | time,
|  | float | level,
|  | void * | user_data
| ) |  |

function called from the library when scanning for the silence level

Definition at line 326 of file player_tab.c.

gint get_splitpoint_clicked | ( | gint | button_y,
|  | gint | type_clicked,
|  | gint | type
| ) |  |

Acquire the number of the splitpoint that has been clicked on.

Parameters

  type_clicked

  - 3 means right button
  - 1 means left button

  type

  - 1 means erase splitpoint area,
  - 2 means move splitpoint area,
  - 3 means check splitpoint area

Definition at line 2750 of file player_tab.c.

References get_left_drawing_time(), splitnumber, and splitpoints.

Referenced by da_press_event().

Here is the call graph for this function:

Here is the caller graph for this function:

gchar* get_time_for_drawing | ( | gchar * | str,
|  | gint | time,
|  | gboolean | hundr_or_not,
|  | gint * | number_of_chars
| ) |  |

Converts a time value to a string we can display.

Parameters

  hundr_or_not | = TRUE means we also draw hundr of secs
  time | The time in hundreths of a second

Definition at line 1650 of file player_tab.c.

References get_time_hundrsecs(), get_time_mins(), and get_time_secs().

Referenced by draw_motif_splitpoints().

Here is the call graph for this function:

Here is the caller graph for this function:

gint get_time_hundrsecs | ( | gint | time | ) |

returns the hundreth of seconds rest of a time value

Parameters

  time | The time in hundreths of a second

Definition at line 1622 of file player_tab.c.

Referenced by get_time_for_drawing().

Here is the caller graph for this function:

gint get_time_mins | ( | gint | time | ) |

returns the minutes of a time

Parameters

  time | The time in hundreth of a second

Definition at line 1640 of file player_tab.c.

Referenced by get_time_for_drawing().

Here is the caller graph for this function:

gint get_time_secs | ( | gint | time | ) |

returns the seconds rest of a time

Parameters

  time | The time in hundreths of a second

Definition at line 1631 of file player_tab.c.

Referenced by get_time_for_drawing().

Here is the caller graph for this function:

gfloat get_total_time | ( |  | ) |

returns the total time in hundreths of second

Definition at line 1133 of file player_tab.c.

void handle_file_detached_event | ( | GtkHandleBox * | handlebox,
|  | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

when we detach the handle

Definition at line 3887 of file player_tab.c.

void handle_player_detached_event | ( | GtkHandleBox * | handlebox,
|  | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

when we detach the handle

Definition at line 1578 of file player_tab.c.

References close_player_popup_window_event().

Referenced by create_player_control_frame().

Here is the call graph for this function:

Here is the caller graph for this function:

void handle_playlist_detached_event | ( | GtkHandleBox * | handlebox,
|  | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

when we detach the handle

Definition at line 3370 of file player_tab.c.

References close_playlist_popup_window_event().

Referenced by create_player_playlist_frame().

Here is the call graph for this function:

Here is the caller graph for this function:

void hide_connect_button | ( |  | ) |

Hide the connect button.

Definition at line 4010 of file player_tab.c.

Referenced by connect_change_buttons(), and player_combo_box_event().

Here is the caller graph for this function:

void hide_disconnect_button | ( |  | ) |

Hide the disconnect button.

Definition at line 4026 of file player_tab.c.

Referenced by disconnect_change_buttons().

Here is the caller graph for this function:

gchar* inputfilename_get | ( |  | ) |

Get the name of the input file.

Returns
  - The name of the input file, if set.
  - "", otherwise.

Definition at line 315 of file player_tab.c.

References inputfilename.

Referenced by add_splitpoint(), cell_edited_event(), change_current_filename(), check_update_down_progress_bar(), connect_to_player_with_song(), detect_silence_and_set_splitpoints(), disconnect_button_event(), export_file(), fix_ogg_stream(), gstreamer_get_filename(), gstreamer_start(), split_button_event(), and update_output_options().

Here is the caller graph for this function:

void inputfilename_set | ( | const gchar * | filename | ) |

Set the name of the input file.

Definition at line 292 of file player_tab.c.

References entry, and inputfilename.

Referenced by change_current_filename().

Here is the caller graph for this function:

gint mytimer | ( | gpointer | data | ) |

timer used to print infos about the song

Examples are the elapsed time and if it uses variable bitrate

Definition at line 3621 of file player_tab.c.

References cancel_quick_preview(), change_progress_bar(), change_volume_button(), check_stream(), clear_data_player(), disconnect_button_event(), get_splitpoint_time(), player_get_playlist_number(), player_is_paused(), player_is_playing(), player_is_running(), preview_start_splitpoint, print_all_song_infos(), print_player_filename(), print_song_time_elapsed(), put_status_message(), quick_preview, quick_preview_end_splitpoint, reset_inactive_progress_bar(), reset_label_time(), and reset_song_infos().

Referenced by connect_button_event(), and connect_with_song().

Here is the call graph for this function:

Here is the caller graph for this function:

void next_button_event | ( | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

event for the "next" button

Definition at line 863 of file player_tab.c.

References player_is_running(), and player_next().

Referenced by create_player_buttons_hbox().

Here is the call graph for this function:

Here is the caller graph for this function:

void pause_event | ( | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

pause button event

Definition at line 838 of file player_tab.c.

References player_is_running(), and player_pause().

Referenced by create_player_buttons_hbox().

Here is the call graph for this function:

Here is the caller graph for this function:

void play_event | ( | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

play button event

Definition at line 784 of file player_tab.c.

References browse_button, connect_to_player_with_song(), player_is_running(), player_play(), and player_start().

Referenced by create_player_buttons_hbox().

Here is the call graph for this function:

Here is the caller graph for this function:

void player_quick_preview | ( | gint | splitpoint_to_preview | ) |

makes a quick preview of the song

Definition at line 2848 of file player_tab.c.

References cancel_quick_preview_all(), change_progress_bar(), get_splitpoint_time(), player_is_paused(), player_is_playing(), player_jump(), player_play(), preview_start_position, preview_start_splitpoint, put_status_message(), quick_preview, and quick_preview_end_splitpoint.

Referenced by da_press_event(), and preview_song().

Here is the call graph for this function:

Here is the caller graph for this function:

void playlist_remove_all_files_button_event | ( | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

event for the remove file button

Definition at line 3516 of file player_tab.c.

Referenced by create_delete_buttons_hbox().

Here is the caller graph for this function:

void playlist_remove_file_button_event | ( | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

event for the remove file button

Definition at line 3462 of file player_tab.c.

Referenced by create_delete_buttons_hbox().

Here is the caller graph for this function:

void playlist_selection_changed | ( | GtkTreeSelection * | selec,
|  | gpointer | data
| ) |  |

split selection has changed

Definition at line 3437 of file player_tab.c.

Referenced by create_player_playlist_frame().

Here is the caller graph for this function:

void prev_button_event | ( | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

Event for the "previous" button.

Definition at line 854 of file player_tab.c.

References player_is_running(), and player_prev().

Referenced by create_player_buttons_hbox().

Here is the call graph for this function:

Here is the caller graph for this function:

void print_about_the_song | ( |  | ) |

prints information about the song, frequency, kbps, stereo

Definition at line 1365 of file player_tab.c.

References player_get_song_infos().

Referenced by print_all_song_infos().

Here is the call graph for this function:

Here is the caller graph for this function:

void print_all_song_infos | ( |  | ) |

get time elapsed from the song and print it on the screen

Also prints filename, frequency, bitrate, mono, stereo

Definition at line 1409 of file player_tab.c.

References print_about_the_song(), and print_player_filename().

Referenced by mytimer().

Here is the call graph for this function:

Here is the caller graph for this function:

void print_player_filename | ( |  | ) |

prints the player filename

Definition at line 1375 of file player_tab.c.

References change_current_filename(), player_get_filename(), and player_get_title().

Referenced by mytimer(), and print_all_song_infos().

Here is the call graph for this function:

Here is the caller graph for this function:

void print_song_time_elapsed | ( |  | ) |

prints the song time elapsed

Parameters

  i

  - 0 means normal state
  - 1 means we reset the time

Definition at line 1422 of file player_tab.c.

References player_get_elapsed_time().

Referenced by mytimer().

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean progress_bar_click_event | ( | GtkWidget * | widget,
|  | GdkEventCrossing * | event,
|  | gpointer | user_data
| ) |  |

when we click the progress bar

Definition at line 1124 of file player_tab.c.

Referenced by create_song_bar_hbox().

Here is the caller graph for this function:

gboolean progress_bar_enter_event | ( | GtkWidget * | widget,
|  | GdkEventCrossing * | event,
|  | gpointer | user_data
| ) |  |

when we enter the progress bar

Definition at line 1311 of file player_tab.c.

Referenced by create_song_bar_hbox().

Here is the caller graph for this function:

gboolean progress_bar_leave_event | ( | GtkWidget * | widget,
|  | GdkEventCrossing * | event,
|  | gpointer | user_data
| ) |  |

when we leave the progress bar

Definition at line 1320 of file player_tab.c.

Referenced by create_song_bar_hbox().

Here is the caller graph for this function:

gboolean progress_bar_scroll_event | ( | GtkWidget * | widget,
|  | GdkEventScroll * | event,
|  | gpointer | user_data
| ) |  |

scroll event for the progress bar

Definition at line 1302 of file player_tab.c.

Referenced by create_song_bar_hbox().

Here is the caller graph for this function:

gboolean progress_bar_unclick_event | ( | GtkWidget * | widget,
|  | GdkEventCrossing * | event,
|  | gpointer | user_data
| ) |  |

when we unclick the progress bar

Definition at line 1108 of file player_tab.c.

References change_song_position().

Referenced by create_song_bar_hbox().

Here is the call graph for this function:

Here is the caller graph for this function:

void progress_bar_value_changed_event | ( | GtkRange * | range,
|  | gpointer | user_data
| ) |  |

event when the progress bar value changed

Definition at line 1277 of file player_tab.c.

References check_update_down_progress_bar(), and get_elapsed_time().

Referenced by create_song_bar_hbox().

Here is the call graph for this function:

Here is the caller graph for this function:

void reset_inactive_progress_bar | ( |  | ) |

resets and sets inactive the progress bar

Definition at line 441 of file player_tab.c.

Referenced by check_stream(), clear_data_player(), and mytimer().

Here is the caller graph for this function:

void reset_inactive_volume_button | ( |  | ) |

resets and sets inactive the volume bar

Definition at line 448 of file player_tab.c.

Referenced by clear_data_player().

Here is the caller graph for this function:

void reset_label_time | ( |  | ) |

resets the label time

Definition at line 455 of file player_tab.c.

Referenced by clear_data_player(), and mytimer().

Here is the caller graph for this function:

void reset_song_infos | ( |  | ) |

resets song infos, frequency, etc..

Definition at line 464 of file player_tab.c.

Referenced by clear_data_player(), and mytimer().

Here is the caller graph for this function:

void reset_song_name_label | ( |  | ) |

resets the song name label

Definition at line 470 of file player_tab.c.

Referenced by clear_data_player().

Here is the caller graph for this function:

void scan_for_silence_wave | ( |  | ) |

Initialize scanning for silence in the background.

If showing the silence wave is disabled this function won't do anything.

Definition at line 393 of file player_tab.c.

References cancel_button_event().

Referenced by change_current_filename(), and enable_show_silence_wave().

Here is the call graph for this function:

Here is the caller graph for this function:

void show_connect_button | ( |  | ) |

Show the connect button.

Definition at line 4016 of file player_tab.c.

References container_has_child().

Referenced by disconnect_change_buttons(), and player_combo_box_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void show_disconnect_button | ( |  | ) |

Show the disconnec button.

Definition at line 4032 of file player_tab.c.

References container_has_child().

Referenced by connect_change_buttons().

Here is the call graph for this function:

Here is the caller graph for this function:

void stop_event | ( | GtkWidget * | widget,
|  | gpointer | data
| ) |  |

stop button event

Definition at line 814 of file player_tab.c.

References player_is_running(), and player_stop().

Referenced by create_player_buttons_hbox().

Here is the call graph for this function:

Here is the caller graph for this function:

gint time_to_pixels | ( | gint | width,
|  | gfloat | time
| ) |  |

Convert time into to pixels.

Definition at line 1676 of file player_tab.c.

Referenced by get_draw_line_position().

Here is the caller graph for this function:

gboolean volume_button_click_event | ( | GtkWidget * | widget,
|  | GdkEventCrossing * | event,
|  | gpointer | user_data
| ) |  |

when we click the volume bar

Definition at line 1544 of file player_tab.c.

gboolean volume_button_enter_event | ( | GtkWidget * | widget,
|  | GdkEventCrossing * | event,
|  | gpointer | user_data
| ) |  |

when we enter the volume bar

Definition at line 1551 of file player_tab.c.

gboolean volume_button_leave_event | ( | GtkWidget * | widget,
|  | GdkEventCrossing * | event,
|  | gpointer | user_data
| ) |  |

when we leave the volume bar

Definition at line 1558 of file player_tab.c.

gboolean volume_button_unclick_event | ( | GtkWidget * | widget,
|  | GdkEventCrossing * | event,
|  | gpointer | user_data
| ) |  |

when we unclick the volume bar

Definition at line 1537 of file player_tab.c.

## Variable Documentation

GtkWidget* browse_button

The browse button.

Definition at line 70 of file player_tab.c.

Referenced by clear_data_player(), connect_button_event(), disconnect_button_event(), file_chooser_cancel_event(), and play_event().

GtkWidget* entry

The text box showing the filename of the current input file.

Definition at line 68 of file player_tab.c.

Referenced by inputfilename_set().

gint file_browsed = FALSE

Tells us if the file was browsed or not.

Definition at line 75 of file player_tab.c.

Referenced by connect_button_event(), and connect_with_song().

GtkWidget* fix_ogg_stream_button

The fix ogg stream button.

Definition at line 72 of file player_tab.c.

Referenced by fix_ogg_stream().

GString* inputfilename

The storage for the name of the input file.

Designed to be accessed using inputfilename_set() and inputfilename_get().

Definition at line 272 of file player_tab.c.

Referenced by inputfilename_get(), inputfilename_set(), and main().

gint splitnumber

The total number of splitpoints.

Definition at line 81 of file tree_tab.c.

GArray* splitpoints

The array all splitpoints are kept in.

The splitpoints themself will be in the

Definition at line 69 of file tree_tab.c.

ui_state* ui

move all options inside

Definition at line 144 of file mp3splt-gtk.c.