From d0d75433c0cd24e47c78bff050ec103b3904bf11 Mon Sep 17 00:00:00 2001 From: William King Date: Thu, 1 Mar 2012 10:21:11 -0800 Subject: [PATCH] the http prefix should not be listed as a supported prefix since this could cause it to conflict with other modules. Now use the vlc:// prefix on any streams to have mod_vlc handle the stream. --- src/mod/formats/mod_vlc/README | 5 ++++- src/mod/formats/mod_vlc/mod_vlc.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mod/formats/mod_vlc/README b/src/mod/formats/mod_vlc/README index 16db672c59..4ffce5d174 100644 --- a/src/mod/formats/mod_vlc/README +++ b/src/mod/formats/mod_vlc/README @@ -11,8 +11,11 @@ sudo apt-get install libavcodec-dev libavutil-dev libavformat-dev liba52-0.7.4-d My configure line for libvlc was: ./configure --prefix=/usr/ --disable-vlc --disable-lua --disable-mad --disable-swscale --disable-postproc --disable-xcb --disable-alsa +Debian unstable now has VLC 2.0 packaged. I am now testing with the packaged version of the library. + The dialplan syntax I use are one of the following: - + + Development: diff --git a/src/mod/formats/mod_vlc/mod_vlc.c b/src/mod/formats/mod_vlc/mod_vlc.c index 078152156a..fdcb64ed8d 100644 --- a/src/mod/formats/mod_vlc/mod_vlc.c +++ b/src/mod/formats/mod_vlc/mod_vlc.c @@ -101,6 +101,9 @@ static switch_status_t vlc_file_open(switch_file_handle_t *handle, const char *p if(! strncmp(context->path, "http", 4)){ context->m = libvlc_media_new_location(inst, context->path); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "VLC Path is http %s\n", context->path); + } else if (! strncmp(context->path, "mms", 3)){ + context->m = libvlc_media_new_path(inst, context->path); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "VLC Path is mms %s\n", context->path); } else if (! strncmp(context->path, "/", 1)){ context->m = libvlc_media_new_path(inst, context->path); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "VLC Path is file %s\n", context->path); @@ -180,7 +183,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_vlc_load) *module_interface = switch_loadable_module_create_module_interface(pool, modname); vlc_file_supported_formats[0] = "vlc"; - vlc_file_supported_formats[1] = "http"; file_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_FILE_INTERFACE); file_interface->interface_name = modname;