Esempio n. 1
0
static gboolean
xmms_xml_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);

	methods.init = xmms_xml_init;
	methods.read = xmms_xml_read;
	methods.seek = xmms_xml_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/xml",
	                              NULL);

	xmms_magic_add ("xml header", "application/xml",
	                "0 string <?xml", NULL);
	xmms_magic_add ("xml header", "application/xml",
	                "0 string \xef\xbb\xbf<?xml", NULL);

	return TRUE;
}
Esempio n. 2
0
static gboolean
xmms_mpc_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
    xmms_xform_methods_t methods;

    XMMS_XFORM_METHODS_INIT (methods);
    methods.init = xmms_mpc_init;
    methods.destroy = xmms_mpc_destroy;
    methods.read = xmms_mpc_read;
    methods.seek = xmms_mpc_seek;

    xmms_xform_plugin_methods_set (xform_plugin, &methods);

    xmms_xform_plugin_metadata_mapper_init (xform_plugin,
                                            basic_mappings,
                                            G_N_ELEMENTS (basic_mappings),
                                            mappings,
                                            G_N_ELEMENTS (mappings));

    xmms_xform_plugin_indata_add (xform_plugin, XMMS_STREAM_TYPE_MIMETYPE,
                                  "audio/x-mpc", NULL);

    xmms_magic_add ("mpc header", "audio/x-mpc", "0 string MP+", NULL);

#ifndef HAVE_MPCDEC_OLD
    /* The old API doesn't support sv8 bitstream, so we add it only for the
     * new version */
    xmms_magic_add ("mpc header", "audio/x-mpc", "0 string MPCK", NULL);
#endif

    return TRUE;
}
Esempio n. 3
0
static gboolean
xmms_faad_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_faad_init;
	methods.destroy = xmms_faad_destroy;
	methods.read = xmms_faad_read;
	methods.seek = xmms_faad_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/aac",
	                              NULL);

	xmms_magic_add ("mpeg aac header", "audio/aac",
	                "0 beshort&0xfff6 0xfff0", NULL);

	xmms_magic_add ("adif header", "audio/aac",
	                "0 string ADIF", NULL);

	return TRUE;
}
Esempio n. 4
0
static gboolean
xmms_sndfile_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);

	methods.init = xmms_sndfile_init;
	methods.destroy = xmms_sndfile_destroy;
	methods.read = xmms_sndfile_read;
	methods.seek = xmms_sndfile_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/x-aiff",
	                              NULL);
	xmms_magic_add ("aiff header", "audio/x-aiff",
	                "0 string FORM", ">8 string AIFF", NULL);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/x-au",
	                              NULL);
	xmms_magic_add ("au header", "audio/x-au",
	                "0 string .snd", NULL);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/x-caf",
	                              NULL);
	xmms_magic_add ("caf header", "audio/x-caf",
	                "0 string caff", ">8 string desc", NULL);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/x-paf",
	                              NULL);
	xmms_magic_add ("paf header", "audio/x-paf",
	                "0 byte 0x20", ">1 string paf", NULL);

	/* Add further libsndfile supported formats here. When adding formats based
	 * on MS wav format (w64, rf64 for instance) attention must be payed that
	 * we don't mask out the magics added by the wave plugin and vice versa.
	 */

	return TRUE;
}
Esempio n. 5
0
static gboolean
xmms_wavpack_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);

	methods.init = xmms_wavpack_init;
	methods.destroy = xmms_wavpack_destroy;
	methods.read = xmms_wavpack_read;
	methods.seek = xmms_wavpack_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_metadata_mapper_init (xform_plugin,
	                                        basic_mappings,
	                                        G_N_ELEMENTS (basic_mappings),
	                                        mappings,
	                                        G_N_ELEMENTS (mappings));

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/x-wavpack",
	                              NULL);

	xmms_magic_add ("wavpack header v4", "audio/x-wavpack",
	                "0 string wvpk", NULL);

	xmms_magic_extension_add ("audio/x-wavpack", "*.wv");

	return TRUE;
}
Esempio n. 6
0
static gboolean
xmms_speex_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);

	methods.init = xmms_speex_init;
	methods.destroy = xmms_speex_destroy;
	methods.read = xmms_speex_read;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/x-speex",
	                              NULL);

	xmms_magic_add ("ogg/speex header", "audio/x-speex",
	                "0 string OggS", ">4 byte 0",
	                ">>28 string Speex   ", NULL);

	xmms_magic_extension_add ("audio/x-speex", "*.spx");

	xmms_xform_plugin_config_property_register (xform_plugin,
	                                            "perceptual_enhancer",
	                                            "1", NULL, NULL);

	return TRUE;
}
Esempio n. 7
0
static gboolean
xmms_vorbis_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_vorbis_init;
	methods.destroy = xmms_vorbis_destroy;
	methods.read = xmms_vorbis_read;
	methods.seek = xmms_vorbis_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_metadata_mapper_init (xform_plugin,
	                                        basic_mappings,
	                                        G_N_ELEMENTS (basic_mappings),
	                                        mappings,
	                                        G_N_ELEMENTS (mappings));

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/ogg",
	                              NULL);


	xmms_magic_add ("ogg/vorbis header",
	                "application/ogg",
	                "0 string OggS", ">4 byte 0",
	                ">>28 string \x01vorbis", NULL);

	xmms_magic_extension_add ("application/ogg", "*.ogg");

	return TRUE;
}
gboolean
xmms_id3v2_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_id3v2_init;
	methods.destroy = xmms_id3v2_destroy;
	methods.read = xmms_xform_read;
	methods.seek = xmms_id3v2_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	/*
	  xmms_plugin_info_add (plugin, "URL", "http://www.xmms.org/");
	  xmms_plugin_info_add (plugin, "Author", "XMMS Team");
	  xmms_plugin_info_add (plugin, "License", "GPL");
	*/

	/* xmms_xform_indata_constraint_add */
	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/id3v2",
	                              NULL);

	xmms_magic_add ("id3 header", "application/id3v2",
	                "0 string ID3",
	                ">3 byte <0xff",
	                ">>4 byte <0xff",
	                NULL);

	return TRUE;
}
Esempio n. 9
0
static gboolean
xmms_opus_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_opus_init;
	methods.destroy = xmms_opus_destroy;
	methods.read = xmms_opus_read;
	methods.seek = xmms_opus_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_metadata_mapper_init (xform_plugin,
	                                        basic_mappings,
	                                        G_N_ELEMENTS (basic_mappings),
	                                        mappings,
	                                        G_N_ELEMENTS (mappings));

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/ogg; codecs=opus",
	                              NULL);

	xmms_magic_add ("Opus header", "audio/ogg; codecs=opus",
	                "0 string OggS",
	                ">28 string OpusHead", NULL);

	xmms_magic_extension_add ("audio/ogg; codecs=opus", "*.opus");

	return TRUE;
}
Esempio n. 10
0
static gboolean
xmms_asx_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.browse = xmms_asx_browse;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/x-asx-playlist",
	                              XMMS_STREAM_TYPE_END);

	xmms_xform_plugin_set_out_stream_type (xform_plugin,
	                                       XMMS_STREAM_TYPE_MIMETYPE,
	                                       "application/x-xmms2-playlist-entries",
	                                       XMMS_STREAM_TYPE_END);

	xmms_magic_extension_add ("application/x-asx-playlist", "*.asx");

	xmms_magic_add ("ASX header", "application/x-asx-playlist",
	                "0 string/c <asx version=\"3.0\">", NULL);

	return TRUE;
}
Esempio n. 11
0
static gboolean
xmms_wave_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);

	methods.init = xmms_wave_init;
	methods.destroy = xmms_wave_destroy;
	methods.read = xmms_wave_read;
	methods.seek = xmms_wave_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/x-wav",
	                              NULL);

	xmms_magic_add ("wave header", "audio/x-wav",
	                "0 string RIFF", ">8 string WAVE",
	                ">>12 string fmt ", NULL);

	return TRUE;
}
Esempio n. 12
0
File: pls.c Progetto: chrippa/xmms2
static gboolean
xmms_pls_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_pls_init;
	methods.destroy = xmms_pls_destroy;
	methods.browse = xmms_pls_browse;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/x-scpls",
	                              NULL);

	xmms_magic_add ("pls header",
	                "audio/x-scpls",
	                "0 string [playlist]\r\n",
	                "0 string [playlist]\n", NULL);

	xmms_magic_extension_add ("audio/x-scpls", "*.pls");

	return TRUE;
}
Esempio n. 13
0
static gboolean
xmms_flac_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);

	methods.init = xmms_flac_init;
	methods.destroy = xmms_flac_destroy;
	methods.read = xmms_flac_read;
	methods.seek = xmms_flac_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_metadata_basic_mapper_init (xform_plugin, mappings,
	                                              G_N_ELEMENTS (mappings));

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/x-flac",
	                              XMMS_STREAM_TYPE_END);

	xmms_magic_add ("flac header", "audio/x-flac",
	                "0 string fLaC", NULL);

	return TRUE;
}
Esempio n. 14
0
static gboolean
xmms_asf_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
    xmms_xform_methods_t methods;

    XMMS_XFORM_METHODS_INIT (methods);

    methods.init = xmms_asf_init;
    methods.destroy = xmms_asf_destroy;
    methods.read = xmms_asf_read;
    methods.seek = xmms_asf_seek;

    xmms_xform_plugin_methods_set (xform_plugin, &methods);

    xmms_xform_plugin_metadata_mapper_init (xform_plugin,
                                            basic_mappings,
                                            G_N_ELEMENTS (basic_mappings),
                                            mappings,
                                            G_N_ELEMENTS (mappings));

    xmms_xform_plugin_indata_add (xform_plugin,
                                  XMMS_STREAM_TYPE_MIMETYPE,
                                  "video/x-ms-asf",
                                  XMMS_STREAM_TYPE_END);

    xmms_magic_add ("asf header", "video/x-ms-asf",
                    "0 belong 0x3026b275", NULL);

    return TRUE;
}
Esempio n. 15
0
File: mid1.c Progetto: chrippa/xmms2
static gboolean
xmms_mid1_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_mid1_init;
	methods.destroy = xmms_mid1_destroy;
	methods.read = xmms_mid1_read;
	methods.seek = xmms_mid1_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	/*
	xmms_plugin_info_add (plugin, "URL", "http://www.xmms2.org/");
	xmms_plugin_info_add (plugin, "Author", "Adam Nielsen <*****@*****.**>");
	xmms_plugin_info_add (plugin, "License", "LGPL");
	*/

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/mid-0",
	                              NULL);
	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/mid-1",
	                              NULL);
	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/riffmidi",
	                              NULL);

	xmms_magic_add ("Standard MIDI file (format-0)", "audio/mid-0",
	                "0 string MThd",
	                ">8 beshort 0",
	                NULL);
	xmms_magic_add ("Standard MIDI file (format-1)", "audio/mid-1",
	                "0 string MThd",
	                ">8 beshort 1",
	                NULL);
	xmms_magic_add ("Microsoft RIFF MIDI file", "audio/riffmidi",
	                "0 string RIFF",
	                ">8 string RMID",
	                NULL);

	return TRUE;
}
Esempio n. 16
0
static gboolean
xmms_sid_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	/*
	xmms_plugin_info_add (plugin, "URL", "http://xmms2.org/");
	xmms_plugin_info_add (plugin, "URL", "http://sidplay2.sourceforge.net/");
	xmms_plugin_info_add (plugin, "URL", "http://www.geocities.com/SiliconValley/Lakes/5147/resid/");
	xmms_plugin_info_add (plugin, "Author", "XMMS Team");
	*/

	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_sid_init;
	methods.destroy = xmms_sid_destroy;
	methods.read = xmms_sid_read;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/prs.sid",
	                              NULL);

	/* Can only fastforward SIDs, not rewind */
/*
	xmms_plugin_properties_add (plugin, XMMS_PLUGIN_PROPERTY_FAST_FWD);
	xmms_plugin_properties_add (plugin, XMMS_PLUGIN_PROPERTY_SUBTUNES);
*/

	xmms_magic_add ("sidplay infofile", "audio/prs.sid",
	                "0 string SIDPLAY INFOFILE", NULL);
	xmms_magic_add ("psid header", "audio/prs.sid",
	                "0 string PSID", NULL);
	xmms_magic_add ("rsid header", "audio/prs.sid",
	                "0 string RSID", NULL);


	xmms_xform_plugin_config_property_register (xform_plugin, "songlength_path",
	                                            "", NULL, NULL);

	return TRUE;
}
Esempio n. 17
0
File: mp4.c Progetto: chrippa/xmms2
static gboolean
xmms_mp4_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_mp4_init;
	methods.destroy = xmms_mp4_destroy;
	methods.read = xmms_mp4_read;
	methods.seek = xmms_mp4_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_metadata_mapper_init (xform_plugin,
	                                        basic_mappings,
	                                        G_N_ELEMENTS (basic_mappings),
	                                        mappings,
	                                        G_N_ELEMENTS (mappings));

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "video/mp4",
	                              NULL);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/mp4",
	                              NULL);

	xmms_magic_add ("mpeg-4 header", "video/mp4",
	                "4 string ftyp",
	                ">8 string isom",
	                ">8 string mp41",
	                ">8 string mp42",
	                NULL);

	xmms_magic_add ("iTunes header", "audio/mp4",
	                "4 string ftyp", ">8 string M4A ", NULL);

	return TRUE;
}
Esempio n. 18
0
static gboolean
xmms_mpg123_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;
	int result;

	result = mpg123_init ();
	if (result != MPG123_OK) {
	    return FALSE;
	}

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_mpg123_init;
	methods.destroy = xmms_mpg123_destroy;
	methods.read = xmms_mpg123_read;
	methods.seek = xmms_mpg123_seek;
	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_config_property_register (xform_plugin,
	                                            "id3v1_encoding",
	                                            "ISO8859-1",
	                                            NULL,
	                                            NULL);

	xmms_xform_plugin_config_property_register (xform_plugin, "id3v1_enable",
	                                            "1", NULL, NULL);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/mpeg",
	                              XMMS_STREAM_TYPE_PRIORITY,
	                              40,
	                              XMMS_STREAM_TYPE_END);

	/* Well, I usually only see mp3 and mp2 ... layer 1 files
	 * are quite rare.
	 */
	xmms_magic_extension_add ("audio/mpeg", "*.mp3");
	xmms_magic_extension_add ("audio/mpeg", "*.mp2");
	xmms_magic_extension_add ("audio/mpeg", "*.mp1");

	/* That's copied from the mad xform. */
	xmms_magic_add ("mpeg header", "audio/mpeg",
	                "0 beshort&0xfff6 0xfff6",
	                "0 beshort&0xfff6 0xfff4",
	                "0 beshort&0xffe6 0xffe2",
	                NULL);

	return TRUE;
}
Esempio n. 19
0
static gboolean
xmms_html_setup (xmms_xform_plugin_t *xform)
{
	xmms_xform_methods_t methods;
	XMMS_XFORM_METHODS_INIT (methods);

	methods.init = xmms_html_init;
	methods.browse = xmms_html_browse;
	xmms_xform_plugin_methods_set (xform, &methods);

	xmms_xform_plugin_indata_add (xform,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "text/html",
	                              NULL);

	xmms_xform_plugin_indata_add (xform,
	                              XMMS_STREAM_TYPE_MIMETYPE,
				      "application/x-xmms2-xml+html",
				      NULL);

	xmms_magic_extension_add ("text/html", "*.html");
	xmms_magic_extension_add ("text/html", "*.xhtml");

	xmms_magic_add ("html doctype", "text/html",
	                "0 string/c <!DOCTYPE HTML ",
	                NULL);

	xmms_magic_add ("html tag", "text/html",
	                "0 string/c <html ",
	                NULL);

	xmms_magic_add ("html header tag", "text/html",
	                "0 string/c <head ",
	                NULL);

	return TRUE;
}
Esempio n. 20
0
static gboolean
xmms_mad_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_mad_init;
	methods.destroy = xmms_mad_destroy;
	methods.read = xmms_mad_read;
	methods.seek = xmms_mad_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	/*
	  xmms_plugin_info_add (plugin, "URL", "http://xmms2.org/");
	  xmms_plugin_info_add (plugin, "Author", "XMMS Team");
	  xmms_plugin_info_add (plugin, "License", "GPL");
	*/

	xmms_xform_plugin_config_property_register (xform_plugin, "id3v1_encoding",
	                                            "ISO8859-1", NULL, NULL);

	xmms_xform_plugin_config_property_register (xform_plugin, "id3v1_enable",
	                                            "1", NULL, NULL);

	/* xmms_xform_indata_constraint_add */
	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/mpeg",
	                              NULL);

	xmms_magic_add ("mpeg header", "audio/mpeg",
	                "0 beshort&0xfff6 0xfff6",
	                "0 beshort&0xfff6 0xfff4",
	                "0 beshort&0xffe6 0xffe2",
	                NULL);

	xmms_magic_extension_add ("audio/mpeg", "*.mp3");

	return TRUE;
}
Esempio n. 21
0
static gboolean
xmms_nulstripper_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);

	methods.init = xmms_nulstripper_init;
	methods.destroy = xmms_nulstripper_destroy;
	methods.read = xmms_nulstripper_read;
	methods.seek = xmms_nulstripper_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/x-nul-padded",
	                              NULL);

	xmms_magic_add ("NUL padded", "application/x-nul-padded",
	                "0 byte 0x0", NULL);

	return TRUE;
}
Esempio n. 22
0
static gboolean
xmms_m3u_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_m3u_init;
	methods.destroy = xmms_m3u_destroy;
	methods.browse = xmms_m3u_browse;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/x-mpegurl",
	                              NULL);

	xmms_magic_add ("Extended M3U header", "audio/x-mpegurl",
	                "0 string #EXTM3U", NULL);

	xmms_magic_extension_add ("audio/x-mpegurl", "*.m3u");

	return TRUE;
}
Esempio n. 23
0
static gboolean
xmms_gme_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_gme_init;
	methods.destroy = xmms_gme_destroy;
	methods.read = xmms_gme_read;
	methods.seek = xmms_gme_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	xmms_xform_plugin_config_property_register (xform_plugin, "loops", G_STRINGIFY (GME_DEFAULT_SONG_LOOPS), NULL, NULL);
	xmms_xform_plugin_config_property_register (xform_plugin, "maxlength", G_STRINGIFY (GME_DEFAULT_SONG_LENGTH), NULL, NULL);
	xmms_xform_plugin_config_property_register (xform_plugin, "samplerate", G_STRINGIFY (GME_DEFAULT_SAMPLE_RATE), NULL, NULL);
	xmms_xform_plugin_config_property_register (xform_plugin, "stereodepth", G_STRINGIFY (GME_DEFAULT_STEREO_DEPTH), NULL, NULL);

	/* todo: add other mime types */
	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/x-spc",
	                              NULL);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/x-nsf",
	                              NULL);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/x-nsfe",
	                              NULL);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/x-gbs",
	                              NULL);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/x-gym",
	                              NULL);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/x-vgm",
	                              NULL);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/x-sap",
	                              NULL);

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "application/x-ay",
	                              NULL);

	/* todo: add other magic */
	xmms_magic_add ("SPC700 save state",
	                "application/x-spc",
	                "0 string SNES-SPC700 Sound File Data",
	                NULL);

	xmms_magic_add ("NSF file",
	                "application/x-nsf",
	                "0 string NESM",
	                NULL);

	xmms_magic_add ("NSFE file",
	                "application/x-nsfe",
	                "0 string NSFE",
	                NULL);

	xmms_magic_add ("GBS file",
	                "application/x-gbs",
	                "0 string GBS",
	                NULL);

	xmms_magic_add ("GYM file",
	                "application/x-gym",
	                "0 string GYMX",
	                NULL);

	xmms_magic_add ("VGM file",
	                "application/x-vgm",
	                "0 string Vgm",
	                NULL);

	xmms_magic_add ("SAP file",
	                "application/x-sap",
	                "0 string SAP",
	                NULL);

	xmms_magic_add ("AY file",
	                "application/x-ay",
	                "0 string ZXAYEMU",
	                NULL);

	/* todo: add other file extensions */
	xmms_magic_extension_add ("application/x-spc", "*.spc");
	xmms_magic_extension_add ("application/x-nsf", "*.nsf");
	xmms_magic_extension_add ("application/x-nsfe", "*.nsfe");
	xmms_magic_extension_add ("application/x-gbs", "*.gbs");
	xmms_magic_extension_add ("application/x-gym", "*.gym");
	xmms_magic_extension_add ("application/x-vgm", "*.vgm");
	xmms_magic_extension_add ("application/x-sap", "*.sap");
	xmms_magic_extension_add ("application/x-ay", "*.ay");

	return TRUE;
}
Esempio n. 24
0
static gboolean
xmms_modplug_plugin_setup (xmms_xform_plugin_t *xform_plugin)
{
	xmms_xform_methods_t methods;
	int i;

	XMMS_XFORM_METHODS_INIT (methods);
	methods.init = xmms_modplug_init;
	methods.destroy = xmms_modplug_destroy;
	methods.read = xmms_modplug_read;
	methods.seek = xmms_modplug_seek;

	xmms_xform_plugin_methods_set (xform_plugin, &methods);

	/*
	xmms_plugin_info_add (plugin, "URL", "http://xmms2.org/");
	xmms_plugin_info_add (plugin, "Author", "XMMS Team");
	xmms_plugin_info_add (plugin, "License", "GPL");
	*/

	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/mod",
	                              NULL);
	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/xm",
	                              NULL);
	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/s3m",
	                              NULL);
	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/it",
	                              NULL);
	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/med",
	                              NULL);
	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/amf",
	                              NULL);
	xmms_xform_plugin_indata_add (xform_plugin,
	                              XMMS_STREAM_TYPE_MIMETYPE,
	                              "audio/umx",
	                              NULL);

	xmms_magic_add ("Fasttracker II module", "audio/xm",
	                "0 string Extended Module:", NULL);
	xmms_magic_add ("ScreamTracker III module", "audio/s3m",
	                "44 string SCRM", NULL);
	xmms_magic_add ("Impulse Tracker module", "audio/it",
	                "0 string IMPM", NULL);
	xmms_magic_add ("MED module", "audio/med",
	                "0 string MMD", NULL);
	xmms_magic_add ("AMF module", "audio/amf",
	                "0 string AMF", NULL);

	/* http://www.unrealwiki.com/wiki/Package_File_Format */
	xmms_magic_add ("Unreal Engine package", "audio/umx",
	                "0 belong 0xc1832a9e", NULL);

	/* these are for all (not all but should be most) various types of .mod files */
	xmms_magic_add ("4-channel Protracker module", "audio/mod",
	                "1080 string M.K.", NULL);
	xmms_magic_add ("4-channel Protracker module", "audio/mod",
	                "1080 string M!K!", NULL);
	xmms_magic_add ("4-channel Startracker module", "audio/mod",
	                "1080 string FLT4", NULL);
	xmms_magic_add ("8-channel Startracker module", "audio/mod",
	                "1080 string FLT8", NULL);
	xmms_magic_add ("4-channel Fasttracker module", "audio/mod",
	                "1080 string 4CHN", NULL);
	xmms_magic_add ("6-channel Fasttracker module", "audio/mod",
	                "1080 string 6CHN", NULL);
	xmms_magic_add ("8-channel Fasttracker module", "audio/mod",
	                "1080 string 8CHN", NULL);
	xmms_magic_add ("8-channel Octalyzer module", "audio/mod",
	                "1080 string CD81", NULL);
	xmms_magic_add ("8-channel Octalyzer module", "audio/mod",
	                "1080 string OKTA", NULL);
	xmms_magic_add ("16-channel Taketracker module", "audio/mod",
	                "1080 string 16CN", NULL);
	xmms_magic_add ("32-channel Taketracker module", "audio/mod",
	                "1080 string 32CN", NULL);

	for (i = 0; i < G_N_ELEMENTS (config_params); i++) {
		xmms_xform_plugin_config_property_register (xform_plugin,
		                                            config_params[i].key,
		                                            config_params[i].value,
		                                            NULL, NULL);
	}

	return TRUE;
}