• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

input/H30-Sep-2004-738590

ui/H15-Jul-2004-1,054803

COPYINGH A D18-Oct-200317.6 KiB341281

ChangelogH A D01-Oct-20048.4 KiB215184

MakefileH A D03-May-2022663 288

Makefile.rulesH A D03-May-20222.4 KiB12294

NEWSH A D28-Sep-20041 KiB3321

READMEH A D21-Sep-20044.8 KiB11680

README.interfaceH A D30-Sep-20042.6 KiB7864

base.cppH A D03-May-20224.9 KiB141116

gui.hH A D30-Sep-2004513 2514

input.hH A D30-Sep-2004537 2414

plugit.cppH A D03-May-2022921 3824

plugit.hH A D19-Sep-2004120 106

statistics.cppH A D30-Sep-20042.4 KiB6258

statistics.hH A D28-Sep-20041.4 KiB4237

ui.cppH A D03-May-2022641 2418

ui.hH A D30-Sep-2004402 2419

README

1    YES YOU HAVE OPTED TO BE SMART!!!
2
3
4Dependencies:
5             You'll need libmagic, dlopen, C++ and a unix based OS.
6	     Plugins require additional depencies.
7
8       mp3 plugin:      Shouldn't require anything special
9       vorbis plugin:   Requires libogg, libvorbis, pkg-config
10       console plugin:  Shouldn't require anything special
11       GTK2  plugin:    Requires libgtk2.x, pkg-config
12
13
14
15Compiling:
16       Edit top level Makefile to choose which plugins you wish to build
17       and where you would like to install them. mp3stat is built with a
18       non-configurable (after compile time) plugin search dir, so if
19       you're building on top of a previous install of mp3stat you'll want
20       to install in to the same directory to avoid copying over older plugins.
21
22       Rebuild mp3stat and stock plugins: just run make all in top directory
23       To install :   just run make install.
24
25       It is not necessary to rebuild mp3stat if you just want to rebuild
26       a plugin.  Simply enter the plugin's directory and make/make install/
27       make clean whatever.
28
29	   make install installs plugins into $INSTALLDIR/lib/mp3stat
30	                installs headers into $INSTALLDIR/include/mp3stat
31			installs mp3stat into $INSTALLDIR/bin/
32
33
34Running:
35      after running make install. simply execute "mp3stat"
36      mp3stat by default will want to use gtk2 as it's default ui,
37      but if you didn't build it with gtk2 at the time of compiling
38      mp3stat, then it will default to the first UI plugin it reads.
39      mp3stat
40
41      The different UI plugins each have their own valid argumenst
42      the base mp3stat program only has two. -u/-U/--ui and -l/-L/--list
43      --list will list available UI plugins found by mp3stat.
44
45      -u will allow you to override the default UI
46      eg.  mp3stat -u console
47
48      The order of arguments has some significance, since arguments are not
49      removed from the list that have been used by the base program
50      (-u and -l) This will be fixed in later versions.
51
52      Until then you'll want to specify any mp3stat specific arguments first
53      and any UI specific arguments after
54
55      an eg of using console ui:
56      mp3stat -u console -b /path/to/some/music/*.*
57
58Problems questions:
59
60      mp3stat will throw an error and not run when any library is found to not
61      work in the plugin directory.
62
63      mp3stat will not run when no ui plugins are found.
64
65
66What the hell does it do?
67
68The point of this program besides teaching me how to do gtk+ and other things
69was to give a more visual way of looking at the differences caused by encoders
70on the same audio file or between codecs. It only looks at the bitstream
71differences of bitrates,  it in no way capable of showing which encoder is
72better or which codec is better.  It's merely an informational tool for
73someone interested in knowing where an encoder is putting larger bitrates and
74smaller bitrates throughout the file.  How those change depending on quality
75levels and how different encoders handle certain audio files.
76
77
78What's the graph all about?
79
80The graph is a linear representation of the mp3 bitrates from beginning (left)
81to end (right)..  colors are shown next to their bitrates in the main output
82screen for reference.  Each unit is based on an avg of a given number of
83frames. The resolution of the graph is 500, so it takes the average bitrate of
84total_frames / 500 every frames and assigns it a color to the closest bitrate.
85That is why you can see in the chart for the breakdown of frames, say 2000 in
86the 160 area yet none of that color on the graph. Depending on the
87distribution of those frames, it can be outnumbered by surrounding
88lower-bitrate frames.  One thing you may be able to guage by the graph is the
89psychoacoustic engine of the encoders being compared.  You may find drastic
90differences in streams created by oggenc and lame, etc. The colors of the
91bitrates are chosen for best visibility in the graph.
92
93
94Adding new filetypes
95
96check README.interface
97
98
99Acknowledgements
100
101Special thanks to a very old version of mp3check for the mp3 parsing routines.
102Although i dont know how recognizeable those are anymore. heh. also ogginfo
103from the vorbis-tools package for providing more mature code than i was using.
104Also the vorbis mailing list for helping out with the instant bitrate algorithm
105for which i was too tired to be able to figure out.
106
107Also another special thanks to Torbj�rn Wassberg for all the great help in
108helping to fix mp3stat's memory allocation woes as well as other code cleanups.
109Could not have finished this release without him.
110
111And not to leave out Peter Harris who is responsible for the text mode ui and
112the Visual C project file.
113
114
115				   email ( safemode@comcast.net )
116

README.interface

1mp3stat has 2 subsystems on top of the base client; input and UI
2
3The input subsystem consists of 2 levels of inherited classes, the base is the
4statistic class.  This class contains the bulk of the data the UI uses. The
5class is then inherited by a plugin object (input).
6
7The UI subsystem is much the same way only most of the bulk of the UI subsystem
8rests in the upper layer, instead of the lower one like the input subsystem.
9
10The glue is the client: mp3stat.
11
12The following is example code for a UI plugin. It contains the basics
13you need in every UI plugin. usage() is optional, but highly recommended
14An input plugin follows a similar interface. Simply observe input.h and the
15vorbis plugin that is shipped with mp3stat, since it's easier to follow.
16
17You can have additional methods in your ui class of course.  But it is not
18recommended that you try to use methods external to your plugin other than
19those used in the example below or any returned by ld'ing the plugins shipped
20with mp3stat.
21
22your_plugin.h
23
24#include "plugit.h"
25class your_ui_plugin : public gui
26{
27   public:
28       your_ui_plugin() : gui(), type("your_moniker") {;}
29       virtual ~your_ui_plugin() {;}
30       inline virtual std::string getType() const { return(type); }
31       virtual int start(std::vector<const char*>);
32       virtual void usage() const;
33   private:
34       const std::string   type;
35       statistic           Input;
36};
37
38your_plugin.cpp
39
40#include "your_plugin.h"
41using namespace std;
42void your_ui_plugin::usage() const
43{
44    use();
45    printf("UI specific help display \n");
46}
47int your_ui_plugin::start (vector<const char*> args)
48{
49   statistic tempInput;
50   vector<const char*>::iterator i;
51     for(i = args.begin();i != args.end(); i++){
52        if(!strcmp(*i,"-h") || !strcmp(*i, "-H") || !strcmp(*i,"--help")){
53	    usage();
54	    return(0);
55	}
56	/* Other various arguments are checked for here */
57     }
58     /* you can rerun this argument loop so that your overriding arguments
59        are handled first before others.  such as having -h along with some
60	other arguments */
61
62     /* by some method, a filename is requested to be scanned */
63     tempInput = get_file_data("some filename");
64     if(tempInput.getTframes() > 0){
65        Input = tempInput;
66        /* handle displaying data to user */
67     }
68}
69
70extern "C" gui* createu() {
71       return new your_ui_plugin;
72}
73
74extern "C" void destroyu(gui* tempUI) {
75       delete tempUI;
76}
77
78