| 1 |
/* |
| 2 |
module: module loading and listing interface |
| 3 |
|
| 4 |
copyright ?-2015 by the mpg123 project - free software under the terms of the LGPL 2.1 |
| 5 |
see COPYING and AUTHORS files in distribution or http://mpg123.org |
| 6 |
initially written by Nicholas J. Humphfrey |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef _MPG123_MODULE_H_ |
| 10 |
#define _MPG123_MODULE_H_ |
| 11 |
|
| 12 |
#include "out123.h" |
| 13 |
|
| 14 |
/* TODO: put that into out123_int.h instead? */ |
| 15 |
#define MPG123_MODULE_API_VERSION (3) |
| 16 |
|
| 17 |
/* The full structure is delared in audio.h */ |
| 18 |
struct audio_output_struct; |
| 19 |
|
| 20 |
typedef struct mpg123_module_struct { |
| 21 |
const int api_version; /* module API version number */ |
| 22 |
|
| 23 |
const char* name; /* short name of the module */ |
| 24 |
const char* description; /* description of what the module does */ |
| 25 |
const char* revision; /* source code revision */ |
| 26 |
|
| 27 |
void* handle; /* dynamic loader handle */ |
| 28 |
|
| 29 |
/* Initialisers - set to NULL if unsupported by module */ |
| 30 |
int (*init_output)(out123_handle *ao); /* audio output - returns 0 on success */ |
| 31 |
|
| 32 |
} mpg123_module_t; |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
/* ------ Declarations from "module.c" ------ */ |
| 37 |
|
| 38 |
mpg123_module_t* INT123_open_module( const char* type, const char* name, int verbose |
| 39 |
, const char* bindir ); |
| 40 |
void INT123_close_module(mpg123_module_t* module, int verbose); |
| 41 |
int INT123_list_modules( const char *type, char ***names, char ***descr, int verbose |
| 42 |
, const char* bindir ); |
| 43 |
|
| 44 |
#endif |