[vlc-devel] [vlc-commits] dbus: move static const tables in the C file

Rémi Denis-Courmont remi at remlab.net
Mon Aug 8 08:32:28 CEST 2011


On Mon,  8 Aug 2011 02:08:43 +0200 (CEST), git at videolan.org (Rafaël Carré)
wrote:
> +static const char* ppsz_supported_uri_schemes[] = {
> +    "file", "http", "https", "rtsp", "realrtsp", "pnm", "ftp", "mtp",
> "smb",
> +    "mms", "mmsu", "mmst", "mmsh", "unsv", "itpc", "icyx", "rtmp",
"rtp",
> +    "dccp", "dvd", "vcd", "vcdx"
> +};
> +
> +static const char* ppsz_supported_mime_types[] = {
> +    "audio/mpeg", "audio/x-mpeg",
> +    "video/mpeg", "video/x-mpeg",
> +    "video/mpeg-system", "video/x-mpeg-system",
> +    "video/mp4",
> +    "audio/mp4",
> +    "video/x-msvideo",
> +    "video/quicktime",
> +    "application/ogg", "application/x-ogg",
> +    "video/x-ms-asf",  "video/x-ms-asf-plugin",
> +    "application/x-mplayer2",
> +    "video/x-ms-wmv",
> +    "video/x-google-vlc-plugin",
> +    "audio/wav", "audio/x-wav",
> +    "audio/3gpp",
> +    "video/3gpp",
> +    "audio/3gpp2",
> +    "video/3gpp2",
> +    "video/divx",
> +    "video/flv", "video/x-flv",
> +    "video/x-matroska",
> +    "audio/x-matroska",
> +    "application/xspf+xml"
> +};

Character matrices would save a number of relocations as opposed to arrays
of character pointers.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list