format.c 490 Bytes
Newer Older
Jack Moffitt's avatar
Jack Moffitt committed
1 2 3 4 5 6 7 8
/* format.c
**
** format plugin implementation
**
*/

#include <stdlib.h>
#include <string.h>
9
#include <time.h>
Jack Moffitt's avatar
Jack Moffitt committed
10 11 12 13 14 15 16 17

#include "connection.h"
#include "refbuf.h"

#include "format.h"

#include "format_vorbis.h"

Jack Moffitt's avatar
Jack Moffitt committed
18
format_plugin_t *format_get_plugin(format_type_t type, char *mount)
Jack Moffitt's avatar
Jack Moffitt committed
19 20 21 22 23 24
{
	format_plugin_t *plugin;

	switch (type) {
	case FORMAT_TYPE_VORBIS:
		plugin = format_vorbis_get_plugin();
Jack Moffitt's avatar
Jack Moffitt committed
25
		if (plugin) plugin->mount = mount;
Jack Moffitt's avatar
Jack Moffitt committed
26 27 28 29 30 31 32 33
		break;
	default:
		plugin = NULL;
		break;
	}

	return plugin;
}