VLC claims it cannot connect
Posted: 20 Jan 2009 04:00
Hello,
I have VLC for windows binary installed(latest) and I am using the latest source files.
I have compiled and executed the following sample code in the wiki :
What I get is the following :
The host is ok and I can connect and stream the video by directly running the vlc binary.
What am I missing?
I have VLC for windows binary installed(latest) and I am using the latest source files.
I have compiled and executed the following sample code in the wiki :
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <vlc/vlc.h>
#include <windows.h>
static void raise(libvlc_exception_t * ex)
{
if (libvlc_exception_raised (ex))
{
fprintf (stderr, "error: %s\n", libvlc_exception_get_message(ex));
exit (-1);
}
}
int main(int argc, char* argv[])
{
const char * const vlc_args[] = {
"-I", "dummy"}, /* Don't use any interface */
"--ignore-config", /* Don't use VLC's config */
"--plugin-path=c:/Program Files/VideoLAN/VLC/plugins" };
libvlc_exception_t ex;
libvlc_instance_t * inst;
libvlc_media_player_t *mp;
libvlc_media_t *m;
libvlc_exception_init (&ex);
/* init vlc modules, should be done only once */
inst = libvlc_new (sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args, &ex);
raise (&ex);
/* Create a new item */
m = libvlc_media_new (inst, "http://www.myotherdrive.com/file/336.440409.21072008.04451.0008fi/Fishing-H.264%20900kbps%20Streaming.mov", &ex);
raise (&ex);
/* XXX: demo art and meta information fetching */
/* Create a media player playing environement */
mp = libvlc_media_player_new_from_media (m, &ex);
raise (&ex);
/* No need to keep the media now */
libvlc_media_release (m);
#if 0
/* This is a non working code that show how to hooks into a window,
* if we have a window around */
libvlc_drawable_t drawable = xdrawable;
/* or on windows */
libvlc_drawable_t drawable = hwnd;
libvlc_media_player_set_drawable (mp, drawable, &ex);
raise (&ex);
#endif
/* play the media_player */
libvlc_media_player_play (mp, &ex);
raise (&ex);
sleep (10); /* Let it play a bit */
/* Stop playing */
libvlc_media_player_stop (mp, &ex);
/* Free the media_player */
libvlc_media_player_release (mp);
libvlc_release (inst);
raise (&ex);
return 0;
}
What I get is the following :
Code: Select all
C:\Program Files\VideoLAN\VLC>demo2
[00000001] main libvlc debug: VLC media player - version 0.9.8a Grishenko - (c)
1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--host=i5
86-mingw32msvc' '--build=i386-linux' '--enable-mkv' '--enable-release' '--withou
t-contrib' '--enable-nls' '--enable-shared-libvlc' '--enable-update-check' '--en
able-lua' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-twolame' '
--enable-quicktime' '--enable-real' '--enable-realrtsp' '--enable-ffmpeg' '--wit
h-ffmpeg-mp3lame' '--with-ffmpeg-faac' '--with-ffmpeg-config-path=/usr/win32/bin
' '--with-ffmpeg-zlib' '--enable-live555' '--with-live555-tree=/usr/win32/live.c
om' '--ena
[00000001] main libvlc debug: translation test: code is "C"
[00000397] access_http access error: cannot connect to www.myotherdrive.com:80
[00000397] access_mms access error: cannot connect to www.myotherdrive.com:80
What am I missing?