gtkanal.c File Reference

#include <config.h>
#include <gtk/gtk.h>
#include "main.h"
#include "lame.h"
#include "machine.h"
#include "encoder.h"
#include "lame-analysis.h"
#include "get_audio.h"
#include "gtkanal.h"
#include "gpkplotting.h"
#include "lame_global_flags.h"
#include "util.h"
#include "console.h"
#include <unistd.h>

Include dependency graph for gtkanal.c:

Go to the source code of this file.

Classes

struct  gtkinfostruct

Defines

#define msleep(t)   usleep((t) * 1000)
#define STR(x)   #x
#define XSTR(x)   STR(x)
#define MP3X_MAJOR_VERSION   0
#define MP3X_MINOR_VERSION   82
#define MP3X_ALPHA_VERSION   0
#define MP3X_BETA_VERSION   0
#define C(chr)   "<control>" #chr
#define func(name)   (GtkItemFactoryCallback) (name)

Functions

int gtkmakeframe (void)
void plot_frame (void)
static void update_progress (void)
static void analyze (void)
static void plotclick (GtkWidget *widget, gpointer data)
static int frameadv1 (GtkWidget *widget, gpointer data)
static void frameadv (GtkWidget *widget, gpointer data)
static void delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
static void channel_option (GtkWidget *widget, gpointer data)
static void spec_option (GtkWidget *widget, gpointer data)
static gint key_press_event (GtkWidget *widget, GdkEventKey *event)
const char * get_mp3x_version (void)
static void text_window (GtkWidget *widget, gpointer data)
static void get_main_menu (GtkWidget *windows, GtkWidget **menubar)
int gtkcontrol (lame_global_flags *gfp2, char *inPath)

Variables

plotting_datapinfo
plotting_datapplot
plotting_data Pinfo [NUMPINFO]
static gint idle_keepgoing
static gint idle_count_max
static gint idle_count
static gint idle_end = 0
static gint idle_back = 0
static int mp3done = 0
static GtkWidget * frameprogress
static GtkWidget * framecounter
static int subblock_draw [3] = { 1, 1, 1 }
GtkWidget * window
GtkWidget * pcmbox
GtkWidget * winbox
GtkWidget * enerbox [2]
GtkWidget * mdctbox [2]
GtkWidget * sfbbox [2]
GtkWidget * headerbox
gtkinfostruct gtkinfo
static lame_global_flagsgfp
lame_internal_flagsgfc
static const GtkItemFactoryEntry menu_items []


Define Documentation

#define C ( chr   )     "<control>" #chr

Definition at line 1328 of file gtkanal.c.

#define func ( name   )     (GtkItemFactoryCallback) (name)

Definition at line 1329 of file gtkanal.c.

Referenced by main().

#define MP3X_ALPHA_VERSION   0

Definition at line 65 of file gtkanal.c.

Referenced by get_mp3x_version().

#define MP3X_BETA_VERSION   0

Definition at line 66 of file gtkanal.c.

Referenced by get_mp3x_version().

#define MP3X_MAJOR_VERSION   0

Definition at line 63 of file gtkanal.c.

Referenced by get_mp3x_version().

#define MP3X_MINOR_VERSION   82

Definition at line 64 of file gtkanal.c.

Referenced by get_mp3x_version().

#define msleep (  )     usleep((t) * 1000)

Definition at line 52 of file gtkanal.c.

#define STR (  )     #x

Stringify x.

Definition at line 59 of file gtkanal.c.

#define XSTR (  )     STR(x)

Stringify x, perform macro expansion.

Definition at line 61 of file gtkanal.c.


Function Documentation

static void analyze ( void   )  [static]

Definition at line 862 of file gtkanal.c.

References idle_count, idle_count_max, idle_end, idle_keepgoing, plot_frame(), and update_progress().

Referenced by channel_option(), frameadv(), frameadv1(), key_press_event(), plotclick(), and spec_option().

Here is the call graph for this function:

static void channel_option ( GtkWidget *  widget,
gpointer  data 
) [static]

Definition at line 1021 of file gtkanal.c.

References analyze(), gtkinfostruct::chflag, gtkinfo, and gtkinfostruct::msflag.

Here is the call graph for this function:

static void delete_event ( GtkWidget *  widget,
GdkEvent *  event,
gpointer  data 
) [static]

Definition at line 1006 of file gtkanal.c.

References mp3done.

Referenced by gtkcontrol().

static void frameadv ( GtkWidget *  widget,
gpointer  data 
) [static]

Definition at line 963 of file gtkanal.c.

References analyze(), plotting_data::frameNum, idle_back, idle_count, idle_count_max, idle_end, idle_keepgoing, NUMBACK, Pinfo, pplot, and READ_AHEAD.

Referenced by gtkcontrol().

Here is the call graph for this function:

static int frameadv1 ( GtkWidget *  widget,
gpointer  data 
) [static]

Definition at line 884 of file gtkanal.c.

References analyze(), gtkinfostruct::avebits, plotting_data::emph, plotting_data::frameNum, plotting_data::frametime, gtkinfo, gtkmakeframe(), plotting_data::i_stereo, idle_back, idle_count, idle_count_max, idle_end, idle_keepgoing, plotting_data::mainbits, gtkinfostruct::maxbits, memcpy, plotting_data::mixed, mp3done, plotting_data::mpg123blocktype, plotting_data::ms_stereo, plotting_data::num_samples, NUMPINFO, pinfo, Pinfo, plot_frame(), pplot, plotting_data::preflag, gtkinfostruct::pupdate, READ_AHEAD, plotting_data::sampfreq, gtkinfostruct::totalframes, plotting_data::totbits, gtkinfostruct::totemph, gtkinfostruct::totis, gtkinfostruct::totmix, gtkinfostruct::totms, gtkinfostruct::totpreflag, gtkinfostruct::totshort, and update_progress().

Referenced by gtkcontrol().

Here is the call graph for this function:

static void get_main_menu ( GtkWidget *  windows,
GtkWidget **  menubar 
) [static]

Definition at line 1377 of file gtkanal.c.

Referenced by gtkcontrol().

const char* get_mp3x_version ( void   ) 

Parameters:
void 
Returns:
a pointer to a string which describes the version of mp3x.

Definition at line 1117 of file gtkanal.c.

References MP3X_ALPHA_VERSION, MP3X_BETA_VERSION, MP3X_MAJOR_VERSION, MP3X_MINOR_VERSION, and XSTR.

Referenced by text_window().

int gtkcontrol ( lame_global_flags gfp2,
char *  inPath 
)

Definition at line 1425 of file gtkanal.c.

References gtkinfostruct::approxbits, gtkinfostruct::avebits, gtkinfostruct::chflag, delete_event(), gtkinfostruct::difference, enerbox, FALSE, gtkinfostruct::filetype, gtkinfostruct::flag123, frameadv(), frameadv1(), framecounter, frameprogress, get_main_menu(), gfc, gfp, gpk_plot_new(), gtkinfo, headerbox, idle_count, idle_count_max, idle_keepgoing, input_format, lame_global_struct::internal_flags, is_mpeg_file_format(), gtkinfostruct::kbflag, key_press_event(), lame_get_totalframes(), gtkinfostruct::maxbits, mdctbox, mp3done, gtkinfostruct::msflag, pcmbox, Pinfo, plotclick(), pplot, gtkinfostruct::pupdate, READ_AHEAD, sfbbox, gtkinfostruct::sfblines, gtkinfostruct::totalframes, gtkinfostruct::totemph, gtkinfostruct::totis, gtkinfostruct::totmix, gtkinfostruct::totms, gtkinfostruct::totshort, TRUE, winbox, and window.

Referenced by main().

Here is the call graph for this function:

int gtkmakeframe ( void   ) 

Definition at line 126 of file gtkanal.c.

References DECDELAY, error_flush(), error_printf(), plotting_data::frameNum, plotting_data::frameNum123, plotting_data::framesize, get_audio16(), gfc, gfp, input_format, is_mpeg_file_format(), lame_decode1(), lame_decode_init(), lame_encode_buffer(), lame_get_frameNum(), lame_get_framesize(), lame_get_mode(), lame_get_out_samplerate(), LAME_MAXMP3BUFFER, MAXMPGLAG, MONO, mpg123_pinfo, plotting_data::pcmdata2, lame_internal_flags::pinfo, pinfo, plotting_data::sampfreq, and plotting_data::stereo.

Referenced by frameadv1().

Here is the call graph for this function:

static gint key_press_event ( GtkWidget *  widget,
GdkEventKey *  event 
) [static]

Definition at line 1079 of file gtkanal.c.

References analyze(), and subblock_draw.

Referenced by gtkcontrol().

Here is the call graph for this function:

void plot_frame ( void   ) 

Definition at line 242 of file gtkanal.c.

References plotting_data::frameNum, i, MAXMPGLAG, and pplot.

Referenced by analyze(), and frameadv1().

static void plotclick ( GtkWidget *  widget,
gpointer  data 
) [static]

Definition at line 875 of file gtkanal.c.

References analyze().

Referenced by gtkcontrol().

Here is the call graph for this function:

static void spec_option ( GtkWidget *  widget,
gpointer  data 
) [static]

Definition at line 1045 of file gtkanal.c.

References analyze(), gtkinfostruct::difference, gtkinfostruct::flag123, gtkinfo, gtkinfostruct::kbflag, gtkinfostruct::pupdate, and gtkinfostruct::sfblines.

Here is the call graph for this function:

static void text_window ( GtkWidget *  widget,
gpointer  data 
) [static]

Definition at line 1137 of file gtkanal.c.

References gtkinfostruct::approxbits, gtkinfostruct::avebits, FALSE, get_lame_url(), get_lame_version(), get_mp3x_version(), get_psy_version(), gtkinfo, gtkinfostruct::maxbits, Pinfo, gtkinfostruct::totemph, gtkinfostruct::totis, gtkinfostruct::totmix, gtkinfostruct::totms, gtkinfostruct::totpreflag, gtkinfostruct::totshort, TRUE, and window.

Here is the call graph for this function:

static void update_progress ( void   )  [static]

Definition at line 846 of file gtkanal.c.

References framecounter, plotting_data::frameNum, frameprogress, plotting_data::frametime, gfp, gtkinfo, lame_get_totalframes(), pplot, and gtkinfostruct::totalframes.

Referenced by analyze(), and frameadv1().

Here is the call graph for this function:


Variable Documentation

GtkWidget* enerbox[2]

Definition at line 91 of file gtkanal.c.

Referenced by gtkcontrol().

GtkWidget* framecounter [static]

Definition at line 82 of file gtkanal.c.

Referenced by gtkcontrol(), and update_progress().

GtkWidget* frameprogress [static]

Definition at line 81 of file gtkanal.c.

Referenced by gtkcontrol(), and update_progress().

lame_internal_flags* gfc

Definition at line 120 of file gtkanal.c.

Referenced by ABR_iteration_loop(), add_dummy_byte(), AddVbrFrame(), adjust_ATH(), amp_scalefac_bands(), balance_noise(), best_huffman_divide(), bin_search_StepSize(), bitpressure_strategy(), block_type_set(), calc_interchannel_masking(), calc_min_bits(), calc_target_bits(), calc_xmin(), CBR_iteration_loop(), compute_ath(), compute_ffts(), compute_flushbits(), compute_masking_s(), convert_partition2scalefac_l(), convert_partition2scalefac_s(), copy_buffer(), count_bits(), CRC_writeheader(), determine_block_type(), drain_into_ancillary(), encodeSideInfo2(), fft_long(), fft_short(), fill_buffer(), fill_buffer_resample(), flush_bitstream(), format_bitstream(), free_id3tag(), freegfc(), get_framebits(), getframebits(), gtkcontrol(), gtkmakeframe(), huffman_coder_count1(), huffman_init(), Huffmancode(), id3tag_add_v2(), id3tag_init(), id3tag_pad_v2(), id3tag_set_album(), id3tag_set_albumart(), id3tag_set_artist(), id3tag_set_comment(), id3tag_set_fieldvalue(), id3tag_set_genre(), id3tag_set_title(), id3tag_set_track(), id3tag_set_year(), id3tag_space_v1(), id3tag_v1_only(), id3tag_v2_only(), id3tag_write_v1(), id3tag_write_v2(), inc_subblock_gain(), init_bit_stream_w(), init_fft(), init_outer_loop(), init_xrpow(), init_xrpow_core_init(), InitVbrTag(), iteration_finish_one(), iteration_init(), L3psycho_anal(), L3psycho_anal_ns(), lame_bitrate_block_type_hist(), lame_bitrate_hist(), lame_bitrate_kbps(), lame_bitrate_stereo_mode_hist(), lame_block_type_hist(), lame_close(), lame_debugf(), lame_encode(), lame_encode_buffer(), lame_encode_buffer_float(), lame_encode_buffer_int(), lame_encode_buffer_interleaved(), lame_encode_buffer_long(), lame_encode_buffer_long2(), lame_encode_buffer_sample_t(), lame_encode_flush(), lame_encode_flush_nogap(), lame_encode_frame_init(), lame_encode_mp3_frame(), lame_errorf(), lame_get_AudiophileGain(), lame_get_mf_samples_to_encode(), lame_get_noclipGainChange(), lame_get_noclipScale(), lame_get_PeakSample(), lame_get_RadioGain(), lame_get_short_threshold_lrm(), lame_get_short_threshold_s(), lame_get_substep(), lame_init_bitstream(), lame_init_old(), lame_init_params(), lame_init_params_ppflt(), lame_init_qval(), lame_mp3_tags_fid(), lame_msgf(), lame_print_config(), lame_print_internals(), lame_set_nogap_currentindex(), lame_set_nogap_total(), lame_set_short_threshold_lrm(), lame_set_short_threshold_s(), lame_set_substep(), lame_stereo_mode_hist(), long_block_constrain(), LongHuffmancodebits(), mask_add(), mdct_sub48(), msfix1(), noquant_count_bits(), ns_msfix(), on_pe(), outer_loop(), psfb21_analogsilence(), psycho_loudness_approx(), psymodel_init(), putbits2(), putbits_noheaders(), putheader_bits(), PutLameVBR(), PutVbrTag(), quantize_init(), quantize_xrpow(), recalc_divide_init(), recalc_divide_sub(), reduce_bit_usage(), ResvAdjust(), ResvFrameBegin(), ResvFrameEnd(), ResvMaxBits(), set_frame_pinfo(), set_pinfo(), short_block_constrain(), ShortHuffmancodebits(), trancate_smallspectrums(), update_inbuffer_size(), updateStats(), VBR_encode_frame(), VBR_encode_granule(), VBR_new_iteration_loop(), VBR_new_prepare(), VBR_old_iteration_loop(), VBR_old_prepare(), writeheader(), and writeMainData().

lame_global_flags* gfp [static]

Definition at line 119 of file gtkanal.c.

Referenced by ABR_iteration_loop(), add_dummy_byte(), AddVbrFrame(), amp_scalefac_bands(), apply_abr_preset(), apply_preset(), ATHformula(), ATHmdct(), balance_noise(), block_type_set(), calc_interchannel_masking(), calc_min_bits(), calc_target_bits(), calc_xmin(), CBR_iteration_loop(), compute_ath(), compute_ffts(), compute_flushbits(), compute_masking_s(), determine_block_type(), drain_into_ancillary(), encodeSideInfo2(), fill_buffer(), fill_buffer_resample(), flush_bitstream(), format_bitstream(), get_audio(), get_audio16(), get_audio_common(), get_framebits(), getframebits(), gtkcontrol(), gtkmakeframe(), id3tag_add_v2(), id3tag_init(), id3tag_pad_v2(), id3tag_set_album(), id3tag_set_albumart(), id3tag_set_artist(), id3tag_set_comment(), id3tag_set_fieldvalue(), id3tag_set_genre(), id3tag_set_title(), id3tag_set_track(), id3tag_set_year(), id3tag_space_v1(), id3tag_v1_only(), id3tag_v2_only(), id3tag_write_v1(), id3tag_write_v2(), init_infile(), init_s3_values(), InitVbrTag(), iteration_init(), L3psycho_anal(), L3psycho_anal_ns(), lame_bitrate_block_type_hist(), lame_bitrate_hist(), lame_bitrate_kbps(), lame_bitrate_stereo_mode_hist(), lame_block_type_hist(), lame_close(), lame_decoder(), lame_encode(), lame_encode_buffer(), lame_encode_buffer_float(), lame_encode_buffer_int(), lame_encode_buffer_interleaved(), lame_encode_buffer_long(), lame_encode_buffer_long2(), lame_encode_buffer_sample_t(), lame_encode_finish(), lame_encode_flush(), lame_encode_flush_nogap(), lame_encode_frame(), lame_encode_frame_init(), lame_encode_mp3_frame(), lame_get_allow_diff_short(), lame_get_analysis(), lame_get_athaa_sensitivity(), lame_get_athaa_type(), lame_get_ATHcurve(), lame_get_ATHlower(), lame_get_ATHonly(), lame_get_ATHshort(), lame_get_ATHtype(), lame_get_AudiophileGain(), lame_get_brate(), lame_get_bWriteVbrTag(), lame_get_compression_ratio(), lame_get_copyright(), lame_get_cwlimit(), lame_get_decode_on_the_fly(), lame_get_decode_only(), lame_get_disable_reservoir(), lame_get_emphasis(), lame_get_encoder_delay(), lame_get_encoder_padding(), lame_get_error_protection(), lame_get_exp_nspsytune(), lame_get_experimentalX(), lame_get_experimentalY(), lame_get_extension(), lame_get_findPeakSample(), lame_get_findReplayGain(), lame_get_force_ms(), lame_get_force_short_blocks(), lame_get_frameNum(), lame_get_framesize(), lame_get_free_format(), lame_get_highpassfreq(), lame_get_highpasswidth(), lame_get_in_samplerate(), lame_get_interChRatio(), lame_get_lowpassfreq(), lame_get_lowpasswidth(), lame_get_maskingadjust(), lame_get_maskingadjust_short(), lame_get_mf_samples_to_encode(), lame_get_mode(), lame_get_msfix(), lame_get_no_short_blocks(), lame_get_noATH(), lame_get_noclipGainChange(), lame_get_noclipScale(), lame_get_nogap_currentindex(), lame_get_nogap_total(), lame_get_num_channels(), lame_get_num_samples(), lame_get_original(), lame_get_out_samplerate(), lame_get_PeakSample(), lame_get_psy_model(), lame_get_quality(), lame_get_quant_comp(), lame_get_quant_comp_short(), lame_get_quantization_type(), lame_get_RadioGain(), lame_get_ReplayGain_decode(), lame_get_ReplayGain_input(), lame_get_scale(), lame_get_scale_left(), lame_get_scale_right(), lame_get_sfscale(), lame_get_short_threshold_lrm(), lame_get_short_threshold_s(), lame_get_size_mp3buffer(), lame_get_strict_ISO(), lame_get_subblock_gain(), lame_get_substep(), lame_get_totalframes(), lame_get_useTemporal(), lame_get_VBR(), lame_get_VBR_hard_min(), lame_get_VBR_max_bitrate_kbps(), lame_get_VBR_mean_bitrate_kbps(), lame_get_VBR_min_bitrate_kbps(), lame_get_VBR_q(), lame_get_version(), lame_init(), lame_init_bitstream(), lame_init_old(), lame_init_params(), lame_init_params_ppflt(), lame_init_qval(), lame_mp3_tags_fid(), lame_print_config(), lame_print_internals(), lame_set_allow_diff_short(), lame_set_analysis(), lame_set_asm_optimizations(), lame_set_athaa_loudapprox(), lame_set_athaa_sensitivity(), lame_set_athaa_type(), lame_set_ATHcurve(), lame_set_ATHlower(), lame_set_ATHonly(), lame_set_ATHshort(), lame_set_ATHtype(), lame_set_brate(), lame_set_bWriteVbrTag(), lame_set_compression_ratio(), lame_set_copyright(), lame_set_cwlimit(), lame_set_debugf(), lame_set_decode_on_the_fly(), lame_set_decode_only(), lame_set_disable_reservoir(), lame_set_emphasis(), lame_set_error_protection(), lame_set_errorf(), lame_set_exp_nspsytune(), lame_set_experimentalX(), lame_set_experimentalY(), lame_set_extension(), lame_set_findPeakSample(), lame_set_findReplayGain(), lame_set_force_ms(), lame_set_force_short_blocks(), lame_set_free_format(), lame_set_highpassfreq(), lame_set_highpasswidth(), lame_set_in_samplerate(), lame_set_interChRatio(), lame_set_lowpassfreq(), lame_set_lowpasswidth(), lame_set_maskingadjust(), lame_set_maskingadjust_short(), lame_set_mode(), lame_set_mode_automs(), lame_set_msfix(), lame_set_msgf(), lame_set_no_short_blocks(), lame_set_noATH(), lame_set_nogap_currentindex(), lame_set_nogap_total(), lame_set_num_channels(), lame_set_num_samples(), lame_set_original(), lame_set_out_samplerate(), lame_set_preset(), lame_set_psy_model(), lame_set_quality(), lame_set_quant_comp(), lame_set_quant_comp_short(), lame_set_quantization_type(), lame_set_ReplayGain_decode(), lame_set_ReplayGain_input(), lame_set_scale(), lame_set_scale_left(), lame_set_scale_right(), lame_set_sfscale(), lame_set_short_threshold(), lame_set_short_threshold_lrm(), lame_set_short_threshold_s(), lame_set_strict_ISO(), lame_set_subblock_gain(), lame_set_substep(), lame_set_tune(), lame_set_useTemporal(), lame_set_VBR(), lame_set_VBR_hard_min(), lame_set_VBR_max_bitrate_kbps(), lame_set_VBR_mean_bitrate_kbps(), lame_set_VBR_min_bitrate_kbps(), lame_set_VBR_q(), lame_stereo_mode_hist(), long_help(), on_pe(), OpenSndFile(), outer_loop(), parse_aiff_header(), parse_args(), parse_args_from_string(), parse_file_header(), parse_wave_header(), presets_set(), psymodel_init(), PutLameVBR(), PutVbrTag(), read_samples_mp3(), ResvFrameBegin(), ResvMaxBits(), set_frame_pinfo(), set_pinfo(), short_help(), timestatus(), update_progress(), VBR_encode_granule(), VBR_new_iteration_loop(), VBR_new_prepare(), VBR_old_iteration_loop(), VBR_old_prepare(), and writeMainData().

struct gtkinfostruct gtkinfo

Referenced by channel_option(), frameadv1(), gtkcontrol(), spec_option(), text_window(), and update_progress().

GtkWidget* headerbox

Definition at line 94 of file gtkanal.c.

Referenced by gtkcontrol().

gint idle_back = 0 [static]

Definition at line 79 of file gtkanal.c.

Referenced by frameadv(), and frameadv1().

gint idle_count [static]

Definition at line 77 of file gtkanal.c.

Referenced by analyze(), frameadv(), frameadv1(), and gtkcontrol().

gint idle_count_max [static]

Definition at line 76 of file gtkanal.c.

Referenced by analyze(), frameadv(), frameadv1(), and gtkcontrol().

gint idle_end = 0 [static]

Definition at line 78 of file gtkanal.c.

Referenced by analyze(), frameadv(), and frameadv1().

gint idle_keepgoing [static]

Definition at line 75 of file gtkanal.c.

Referenced by analyze(), frameadv(), frameadv1(), and gtkcontrol().

GtkWidget* mdctbox[2]

Definition at line 92 of file gtkanal.c.

Referenced by gtkcontrol().

const GtkItemFactoryEntry menu_items[] [static]

Definition at line 1331 of file gtkanal.c.

int mp3done = 0 [static]

Definition at line 80 of file gtkanal.c.

Referenced by delete_event(), frameadv1(), and gtkcontrol().

GtkWidget* pcmbox

Definition at line 89 of file gtkanal.c.

Referenced by gtkcontrol().

plotting_data Pinfo[NUMPINFO]

Definition at line 71 of file gtkanal.c.

Referenced by frameadv(), frameadv1(), gtkcontrol(), and text_window().

plotting_data* pinfo

Definition at line 69 of file gtkanal.c.

Referenced by frameadv1(), and gtkmakeframe().

plotting_data* pplot

Definition at line 70 of file gtkanal.c.

Referenced by frameadv(), frameadv1(), gtkcontrol(), plot_frame(), and update_progress().

GtkWidget* sfbbox[2]

Definition at line 93 of file gtkanal.c.

Referenced by gtkcontrol().

int subblock_draw[3] = { 1, 1, 1 } [static]

Definition at line 84 of file gtkanal.c.

Referenced by key_press_event().

GtkWidget* winbox

Definition at line 90 of file gtkanal.c.

Referenced by gtkcontrol().

GtkWidget* window

Definition at line 87 of file gtkanal.c.


Generated on Sun Dec 2 11:34:55 2007 for LAME by  doxygen 1.5.2