mp3splt-gtk
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.

Defines

#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_svg_path (GString *imagefile, gchar *svg_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_bar ()
void change_volume_event (GtkWidget *widget, 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_control_box ()
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_bar ()
void reset_label_time ()
void reset_song_infos ()
void reset_song_name_label ()
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_bar_click_event (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
gboolean volume_bar_enter_event (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
gboolean volume_bar_leave_event (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
gboolean volume_bar_scroll_event (GtkWidget *widget, GdkEventScroll *event, gpointer user_data)
gboolean volume_bar_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
GtkWidget * da = NULL
gint debug_is_active
GtkWidget * disconnect_button
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_bar = 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_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_wavesilence_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_statethe_state
gint timeout_id
gint timeout_value = 200
gboolean timer_active = FALSE
gfloat total_draw_time = 0
gfloat total_time = 0
ui_stateui
GtkWidget * volume_adj
GtkWidget * volume_bar
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 3338 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 3849 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:

cancels quick preview

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

full cancel of the quick preview

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

progress bar synchronisation with player

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

changes the position inside the song

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

change volume to match the players volume

Definition at line 1458 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 ( GtkWidget *  widget,
gpointer  data 
)

changes the volume of the player

Definition at line 1524 of file player_tab.c.

References player_set_volume().

Referenced by create_volume_control_box(), and volume_bar_scroll_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void check_stream ( )

checks if we have a stream

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

updates bottom progress bar

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

clear song data and makes inactive progress bar

Definition at line 474 of file player_tab.c.

References browse_button, reset_inactive_progress_bar(), reset_inactive_volume_bar(), 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 1619 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 3386 of file player_tab.c.

Referenced by handle_playlist_detached_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 626 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:

Switches between connect and disconnect button when connecting to player.

Definition at line 524 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:
i0 means then start playing, != 0 means dont start playing right now

Definition at line 617 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:
fnamethe file name of the song
start_playing
  • start playing
  • else dont start playing right now.

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

creates the horizontal queue buttons horizontal box

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

creates the filename player hbox

Definition at line 1510 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 928 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 3274 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(), create_volume_control_box(), 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:

creates the playlist of the player

Definition at line 3615 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 3445 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 3419 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 3431 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 1328 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:

song information about frequency, rate, stereo, etc

Definition at line 1062 of file player_tab.c.

Referenced by create_player_control_frame().

Here is the caller graph for this function:

GtkWidget* create_volume_control_box ( )

creates the volume vertical bar

Definition at line 1584 of file player_tab.c.

References change_volume_event(), volume_bar_click_event(), volume_bar_enter_event(), volume_bar_leave_event(), volume_bar_scroll_event(), and volume_bar_unclick_event().

Referenced by create_player_control_frame().

Here is the call graph for this function:

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

References get_splitpoint_time(), and refresh_drawing_area().

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

References get_splitpoint_clicked(), get_splitpoint_time(), player_quick_preview(), refresh_drawing_area(), 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 3048 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, refresh_drawing_area(), 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:

disables the buttons of the player

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

disconnecting changing buttons

Definition at line 534 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 1895 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:
drawfalse if we draw the splitpoint we move
moveFALSE means we don't move the splitpoint,
move= TRUE means we move the splitpoint
number_splitpointis the current splitpoint we draw
splitpoint_checked= TRUE if the splitpoint is checked

Definition at line 1957 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 2218 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 2137 of file player_tab.c.

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

Here is the call graph for this function:

enables the buttons of the player

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

event for the file chooser cancel button

Moved here from the file tab

Definition at line 3822 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)
void fix_ogg_stream_button_event ( GtkWidget *  widget,
gpointer  data 
)

we make a thread with fix_ogg_stream

Definition at line 3990 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:
widthThe width of the drawing
Thetime in hundreths of a second

Definition at line 1761 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 1110 of file player_tab.c.

Referenced by change_progress_bar(), and progress_bar_value_changed_event().

Here is the caller graph for this function:

returns the value of the left drawing area

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

returns the value of the right drawing area

Definition at line 1666 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 325 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 2789 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
timeThe time in hundreths of a second

Definition at line 1719 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:
timeThe time in hundreths of a second

Definition at line 1691 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:
timeThe time in hundreth of a second

Definition at line 1709 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:
timeThe time in hundreths of a second

Definition at line 1700 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 1104 of file player_tab.c.

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

when we detach the handle

Definition at line 3920 of file player_tab.c.

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

when we detach the handle

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

Hide the connect button.

Definition at line 4043 of file player_tab.c.

Referenced by connect_change_buttons(), and player_combo_box_event().

Here is the caller graph for this function:

Hide the disconnect button.

Definition at line 4059 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 314 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 291 of file player_tab.c.

References entry, and inputfilename.

Referenced by change_current_filename().

Here is the caller graph for this function:

void next_button_event ( GtkWidget *  widget,
gpointer  data 
)

event for the "next" button

Definition at line 854 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 829 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 785 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 2887 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 3561 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 3507 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 3482 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 845 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:

prints information about the song, frequency, kbps, stereo

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

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

Also prints filename, frequency, bitrate, mono, stereo

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

prints the player filename

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

prints the song time elapsed

Parameters:
i
  • 0 means normal state
  • 1 means we reset the time

Definition at line 1421 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 1095 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 1310 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 1319 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 1301 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 1079 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 1275 of file player_tab.c.

References check_update_down_progress_bar(), get_elapsed_time(), and refresh_drawing_area().

Referenced by create_song_bar_hbox().

Here is the call graph for this function:

Here is the caller graph for this function:

refreshes the drawing area

Definition at line 1125 of file player_tab.c.

Referenced by add_splitpoint(), da_notify_event(), da_press_event(), da_unpress_event(), progress_bar_value_changed_event(), remove_all_rows(), and remove_splitpoint().

Here is the caller graph for this function:

resets and sets inactive the progress bar

Definition at line 439 of file player_tab.c.

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

Here is the caller graph for this function:

resets and sets inactive the volume bar

Definition at line 446 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 453 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 462 of file player_tab.c.

Referenced by clear_data_player(), and mytimer().

Here is the caller graph for this function:

resets the song name label

Definition at line 468 of file player_tab.c.

Referenced by clear_data_player().

Here is the caller graph for this function:

Initialize scanning for silence in the background.

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

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

Show the connect button.

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

Show the disconnec button.

Definition at line 4065 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 811 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 1745 of file player_tab.c.

Referenced by get_draw_line_position().

Here is the caller graph for this function:

gboolean volume_bar_click_event ( GtkWidget *  widget,
GdkEventCrossing *  event,
gpointer  user_data 
)

when we click the volume bar

Definition at line 1545 of file player_tab.c.

Referenced by create_volume_control_box().

Here is the caller graph for this function:

gboolean volume_bar_enter_event ( GtkWidget *  widget,
GdkEventCrossing *  event,
gpointer  user_data 
)

when we enter the volume bar

Definition at line 1554 of file player_tab.c.

Referenced by create_volume_control_box().

Here is the caller graph for this function:

gboolean volume_bar_leave_event ( GtkWidget *  widget,
GdkEventCrossing *  event,
gpointer  user_data 
)

when we leave the volume bar

Definition at line 1564 of file player_tab.c.

Referenced by create_volume_control_box().

Here is the caller graph for this function:

gboolean volume_bar_scroll_event ( GtkWidget *  widget,
GdkEventScroll *  event,
gpointer  user_data 
)

scroll event for the volume bar

Definition at line 1574 of file player_tab.c.

References change_volume_event().

Referenced by create_volume_control_box().

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean volume_bar_unclick_event ( GtkWidget *  widget,
GdkEventCrossing *  event,
gpointer  user_data 
)

when we unclick the volume bar

Definition at line 1536 of file player_tab.c.

Referenced by create_volume_control_box().

Here is the caller graph for this function:


Variable Documentation

GtkWidget* browse_button
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().

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

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

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.

move all options inside

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