Add a README and turn off verbose debugging by default.

This commit is contained in:
William King 2012-02-24 15:41:12 -08:00
parent 77f3bd2402
commit fea66c1542
2 changed files with 27 additions and 2 deletions

View File

@ -0,0 +1,23 @@
You HAVE to have libvlc version 1.2 or later for mod_vlc to work. Both for the reason that
libvlc version 1.2 is LGPL and because there are new api's in 1.2 that are required.
Building and usage:
I used git://git.videolan.org/vlc.git to get the latest version of libvlc.
On debian I had to install:
sudo apt-get install libavcodec-dev libavutil-dev libavformat-dev liba52-0.7.4-dev
My configure line for libvlc was:
./configure --prefix=/usr/ --disable-vlc --disable-lua --disable-mad --disable-swscale --disable-postproc --disable-xcb --disable-alsa
The dialplan syntax I use are one of the following:
<action application="playback" data="http://example.com/vlc.mp3"/>
<action application="playback" data="vlc:///usr/local/freeswitch/sounds/vlc.mp3"/>
Development:
If you are having troubles, first change the value of vlc_args in mod_vlc.c.
The documentation for the libvlc library is located at:
http://www.videolan.org/developers/vlc/doc/doxygen/html/group__libvlc.html

View File

@ -46,6 +46,9 @@
static char *vlc_file_supported_formats[SWITCH_MAX_CODECS] = { 0 };
/* Change valud to -vvv for vlc related debug. Be careful since vlc is at least as verbose as FS about logging */
const char *vlc_args = "";
libvlc_instance_t *inst;
struct vlc_file_context {
@ -172,7 +175,6 @@ static switch_status_t vlc_file_close(switch_file_handle_t *handle)
SWITCH_MODULE_LOAD_FUNCTION(mod_vlc_load)
{
switch_file_interface_t *file_interface;
const char *args = "-vvv";
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
@ -188,7 +190,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_vlc_load)
file_interface->file_read = vlc_file_read;
/* load the vlc engine. */
inst = libvlc_new(1, &args);
inst = libvlc_new(1, &vlc_args);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Initialized VLC instance\n");