Bug#822245: vlc desktop file missing Mime type 'video/vnd.mpegurl'

Petter Reinholdtsen pere at hungry.com
Thu May 5 22:09:29 UTC 2016


[Sebastian Ramacher]
> Hi Petter

Hi.

> It's a lot easier for us if you send a patch upstream [1] and point us
> to the commit. Or wait until someone of use has the time to do that.

Right.  I'll try to see if I can do that.  Until then, I decided to
compare the announced supported Mime types for the VLC desktop file and
the browser plugin, and was surprised that there was quite a lot of
difference there:

These are only announced by the desktop file:

        application/x-extension-mp4
        application/x-flac
        application/x-shockwave-flash
        audio/amr-wb
        audio/vnd.rn-realaudio
        audio/x-mp3
        audio/x-ms-asf
        audio/x-ms-asx
        audio/x-ms-wax
        audio/x-pn-aiff
        audio/x-pn-au
        audio/x-pn-realaudio
        audio/x-pn-realaudio-plugin
        audio/x-pn-wav
        audio/x-pn-windows-acm
        audio/x-real-audio
        audio/x-scpls
        audio/x-vorbis+ogg
        image/vnd.rn-realpix
        misc/ultravox
        video/dv
        video/mp2t
        video/mp4v-es
        video/msvideo
        video/vnd.rn-realvideo
        video/x-anim
        video/x-avi
        video/x-flc
        video/x-fli
        video/x-nsv
        video/x-ogm+ogg
        x-content/audio-cdda
        x-content/audio-player
        x-content/video-dvd
        x-content/video-svcd
        x-content/video-vcd
        x-scheme-handler/mms
        x-scheme-handler/rtmp
        x-scheme-handler/rtsp

These are only announced by the browser plugin:

	application/mpeg4-iod
	application/mpeg4-muxcodetable
	application/x-google-vlc-plugin
	application/x-mplayer2
	application/x-vlc-plugin
	audio/3gpp
	audio/3gpp2
	audio/flac
	audio/m4a
	audio/ogg;
	audio/wav
	audio/x-ms-wma
	audio/x-realaudio
	codecs=opus
	video/3gpp
	video/3gpp2
	video/divx
	video/flv
	video/mpeg-system
	video/x-m4v
	video/x-mpeg-system
	video/x-ms-asf-plugin
	video/x-ms-wvx

I suspect both should agree on the MIME types supported by VLC.  Note
that none of them support the MIME type requested in this bug report.

I used this script to generate the list:
#!/bin/sh
#
# Compare supported MIME types of vlc desktop file and browser plugin.

cat > x.c <<EOF
#include <stdio.h>
#include <dlfcn.h>

int main(int argc, char *argv[]) {
  void *lib_handle;
  char *error;
  lib_handle = dlopen(argv[1], RTLD_LAZY);
  if (!lib_handle) {
    fprintf(stderr, "error: unable to load library\n");
    return(1);
  }
  char * (*func)(void);
  func = dlsym(lib_handle, "NP_GetMIMEDescription");
  if (NULL != (error = dlerror())) {
    fprintf(stderr, "error: from dlsym: %s\n", error);
    return 1;
  }
  char *mimedesc = (*func)();
  printf("%s\n", mimedesc);
  dlclose(lib_handle);
  return 0;
}
EOF

gcc -o x x.c -ldl

./x /usr/lib/mozilla/plugins/libvlcplugin.so | sed "s/;/;\n/g" | \
    cut -d: -f1 |sort > plugin
grep ^MimeType /usr/share/applications/vlc.desktop | cut -d= -f2- | \
     tr ';' "\n" | sort > desktop

echo "These are only announced by the desktop file:"
comm -13 plugin desktop | sed 's/^/\t/'

echo "These are only announced by the browser plugin:"
comm -23 plugin desktop | sed 's/^/\t/'

rm plugin desktop x

--
Happy hacking
Petter Reinholdtsen



More information about the pkg-multimedia-maintainers mailing list