2001-09-10 02:21:46 +00:00
|
|
|
/* format.c
|
|
|
|
**
|
|
|
|
** format plugin implementation
|
|
|
|
**
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2001-10-20 06:43:04 +00:00
|
|
|
#include <time.h>
|
2001-09-10 02:21:46 +00:00
|
|
|
|
|
|
|
#include "connection.h"
|
|
|
|
#include "refbuf.h"
|
|
|
|
|
|
|
|
#include "format.h"
|
|
|
|
|
|
|
|
#include "format_vorbis.h"
|
|
|
|
|
2002-02-04 07:08:52 +00:00
|
|
|
format_plugin_t *format_get_plugin(format_type_t type, char *mount)
|
2001-09-10 02:21:46 +00:00
|
|
|
{
|
|
|
|
format_plugin_t *plugin;
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
case FORMAT_TYPE_VORBIS:
|
|
|
|
plugin = format_vorbis_get_plugin();
|
2002-02-04 07:08:52 +00:00
|
|
|
if (plugin) plugin->mount = mount;
|
2001-09-10 02:21:46 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
plugin = NULL;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return plugin;
|
|
|
|
}
|