SourceForge Logo

TBX Player is a multimedia player designed for mixing streams from any source (MP3, Ogg vorbis, etc...).
It's very flexible with dynamic modules (gui, input, output, dsp, general), and compile under both UNIX and WINDOWS plateform.

TBX 3 is currently not available. We will make packages when it will become stable.
However you can download the current sources from the CVS tree:

cvs -z9 -d:pserver:anonymous@cvs.tbx.sourceforge.net:/cvsroot/tbx co tbx

Currently TBX compile under GNU/Linux with GCC3, and under WINDOWS with Borland C++ Compiler 5.5, Microsoft Visual C++ 6 or Borland C++ Builder 6.
If you need a port to BSD, inform us.

How It Works

The core is the tbx executable. You can find the core sources in tbx/src directory.
When the core starts, it first loads available modules. Input modules must be in /input directory, output modules in /output directory, and so on.
We have five kind of modules: A valid module must export a "get_tbx_module" function. To make such a function in C, you should have:

void GET_TBX_MODULE(void *_module)

GET_TBX_MODULE is a macro defined in get_tbx_module.h (available in tbx/include directory), included in your std-module_type.h. By example, if you want to make an input module, you should include std-input.h in your files.

Each module has an associated structure (struct s_module_type).
The core creates the structure, and pass it to get_tbx_module, which must fill the data. Here is an example for a GUI module:

void	GET_TBX_MODULE(void *_gui)
{
  t_gui	*gui;

  gui = _gui;
  gui->Init = gui_init;
  gui->Start = gui_start;
  gui->End = gui_end;
  strcpy(gui->Infos.module_name, "Example GUI");
}
Each structure has its own s_module_type.h, have a look on them to know every function.
The core assume the function pointers are valid (not null), so you MUST fill all the function pointers of the structure.

Then TBX opens the previously selected GUI module. If none was selected, it opens a default GUI according to the OS.
Currently, the default GUI for GNU/Linux is a GTK2 interface, and a Borland C++ Builder (BCB) interface for WINDOWS.
These interfaces look like TBX Player v1.0: a winamp-like player, a playlist editor, a browse for files, etc.

Any module you make should include tbx.h. Global include files needed for modules can be found in tbx/include directory.
If you are under WINDOWS environment, be careful to define WIN32 macro, which is not defined by default with Borland tools.
(The core does "#ifdef WIN32")

Each module structure has a "void *data" element, feel free to use it.
Have a look on the current modules to understand how you can use it.

Next: Core