- int i;
- static struct { const char *psz_search; int i_type; } types_array[] =
- {
- { "http", ITEM_TYPE_NET },
- { "dvd", ITEM_TYPE_DISC },
- { "cdda", ITEM_TYPE_CDDA },
- { "mms", ITEM_TYPE_NET },
- { "rtsp", ITEM_TYPE_NET },
- { "udp", ITEM_TYPE_NET },
- { "rtp", ITEM_TYPE_NET },
- { "vcd", ITEM_TYPE_DISC },
- { "v4l", ITEM_TYPE_CARD },
- { "dshow", ITEM_TYPE_CARD },
- { "pvr", ITEM_TYPE_CARD },
- { "dvb", ITEM_TYPE_CARD },
- { "qpsk", ITEM_TYPE_CARD },
- { "sdp", ITEM_TYPE_NET },
- { "ftp", ITEM_TYPE_NET },
- { "smb", ITEM_TYPE_NET },
- { NULL, 0 }
+ static const struct item_type_entry tab[] =
+ { /* /!\ Alphabetical order /!\ */
+ /* Short match work, not just exact match */
+ { "alsa", ITEM_TYPE_CARD, false },
+ { "atsc", ITEM_TYPE_CARD, false },
+ { "bd", ITEM_TYPE_DISC, false },
+ { "cable", ITEM_TYPE_CARD, false },
+ { "cdda", ITEM_TYPE_CDDA, false },
+ { "cqam", ITEM_TYPE_CARD, false },
+ { "dc1394", ITEM_TYPE_CARD, false },
+ { "dccp", ITEM_TYPE_STREAM, true },
+ { "deckli", ITEM_TYPE_CARD, false }, /* decklink */
+ { "dir", ITEM_TYPE_DIRECTORY, false },
+ { "dshow", ITEM_TYPE_CARD, false },
+ { "dv", ITEM_TYPE_CARD, false },
+ { "dvb", ITEM_TYPE_CARD, false },
+ { "dvd", ITEM_TYPE_DISC, false },
+ { "dtv", ITEM_TYPE_CARD, false },
+ { "eyetv", ITEM_TYPE_CARD, false },
+ { "fd", ITEM_TYPE_UNKNOWN, false },
+ { "ftp", ITEM_TYPE_FILE, true },
+ { "http", ITEM_TYPE_FILE, true },
+ { "icyx", ITEM_TYPE_STREAM, true },
+ { "imem", ITEM_TYPE_UNKNOWN, false },
+ { "itpc", ITEM_TYPE_PLAYLIST, true },
+ { "jack", ITEM_TYPE_CARD, false },
+ { "linsys", ITEM_TYPE_CARD, false },
+ { "live", ITEM_TYPE_STREAM, true }, /* livedotcom */
+ { "mms", ITEM_TYPE_STREAM, true },
+ { "mtp", ITEM_TYPE_DISC, false },
+ { "ofdm", ITEM_TYPE_CARD, false },
+ { "oss", ITEM_TYPE_CARD, false },
+ { "pnm", ITEM_TYPE_STREAM, true },
+ { "qam", ITEM_TYPE_CARD, false },
+ { "qpsk", ITEM_TYPE_CARD, false },
+ { "qtcapt", ITEM_TYPE_CARD, false }, /* qtcapture */
+ { "raw139", ITEM_TYPE_CARD, false }, /* raw1394 */
+ { "rt", ITEM_TYPE_STREAM, true }, /* rtp, rtsp, rtmp */
+ { "satell", ITEM_TYPE_CARD, false }, /* sattelite */
+ { "screen", ITEM_TYPE_CARD, false },
+ { "sdp", ITEM_TYPE_STREAM, true },
+ { "sftp", ITEM_TYPE_FILE, true },
+ { "shm", ITEM_TYPE_CARD, false },
+ { "smb", ITEM_TYPE_FILE, true },
+ { "svcd", ITEM_TYPE_DISC, false },
+ { "tcp", ITEM_TYPE_STREAM, true },
+ { "terres", ITEM_TYPE_CARD, false }, /* terrestrial */
+ { "udp", ITEM_TYPE_STREAM, true }, /* udplite too */
+ { "unsv", ITEM_TYPE_STREAM, true },
+ { "usdigi", ITEM_TYPE_CARD, false }, /* usdigital */
+ { "v4l", ITEM_TYPE_CARD, false },
+ { "vcd", ITEM_TYPE_DISC, false },
+ { "window", ITEM_TYPE_CARD, false },