<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TArKi</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TArKi"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/TArKi/"/>
	<updated>2026-11-04T17:15:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=LibVLC_Tutorial_0.9&amp;diff=16345</id>
		<title>LibVLC Tutorial 0.9</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=LibVLC_Tutorial_0.9&amp;diff=16345"/>
		<updated>2010-06-16T08:57:59Z</updated>

		<summary type="html">&lt;p&gt;TArKi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LibVLC Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039; This may work with 0.9 and 1.0 version, you just need to remove exception to get it to work on 1.1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Of course, windows binary builds don&#039;t come with vlc.h, so you&#039;ll need a copy of the source to get them.  See [[LibVLC_Tutorial_086c]] for some instructions on getting the build working.&lt;br /&gt;
&lt;br /&gt;
=== Linking against LibVLC ===&lt;br /&gt;
&lt;br /&gt;
cc example.c -lvlc -o example&lt;br /&gt;
&lt;br /&gt;
=== Sample LibVLC Code  ===&lt;br /&gt;
&lt;br /&gt;
 #include &amp;amp;lt;stdio.h&amp;amp;gt;&lt;br /&gt;
 #include &amp;amp;lt;stdlib.h&amp;amp;gt;&lt;br /&gt;
 #include &amp;amp;lt;vlc/vlc.h&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // Uncomment this line if you get a &amp;quot;sleep was not declared in this scope&amp;quot;&lt;br /&gt;
 // #include &amp;amp;lt;unistd.h&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
 static void raise(libvlc_exception_t * ex)&lt;br /&gt;
 {&lt;br /&gt;
     if (libvlc_exception_raised (ex))&lt;br /&gt;
     {&lt;br /&gt;
          fprintf (stderr, &amp;quot;error:&amp;amp;nbsp;%s\n&amp;quot;, libvlc_exception_get_message(ex));&lt;br /&gt;
          exit (-1);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 int main(int argc, char* argv[])&lt;br /&gt;
 {&lt;br /&gt;
     const char * const vlc_args[] = {&lt;br /&gt;
               &amp;quot;-I&amp;quot;, &amp;quot;dummy&amp;quot;, /* Don&#039;t use any interface */&lt;br /&gt;
               &amp;quot;--ignore-config&amp;quot;, /* Don&#039;t use VLC&#039;s config */&lt;br /&gt;
               &amp;quot;--plugin-path=/set/your/path/to/libvlc/module/if/you/are/on/windows/or/macosx&amp;quot; };&lt;br /&gt;
     libvlc_exception_t ex;&lt;br /&gt;
     libvlc_instance_t * inst;&lt;br /&gt;
     libvlc_media_player_t *mp;&lt;br /&gt;
     libvlc_media_t *m;&lt;br /&gt;
     &lt;br /&gt;
     libvlc_exception_init (&amp;amp;amp;ex);&lt;br /&gt;
     /* init vlc modules, should be done only once */&lt;br /&gt;
     inst = libvlc_new (sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args, &amp;amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;amp;ex);&lt;br /&gt;
  &lt;br /&gt;
     /* Create a new item */&lt;br /&gt;
     m = libvlc_media_new (inst, &amp;quot;http://mycool.movie.com/test.mov&amp;quot;, &amp;amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;amp;ex);&lt;br /&gt;
    &lt;br /&gt;
     /* XXX: demo art and meta information fetching */&lt;br /&gt;
    &lt;br /&gt;
     /* Create a media player playing environement */&lt;br /&gt;
     mp = libvlc_media_player_new_from_media (m, &amp;amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;amp;ex);&lt;br /&gt;
     &lt;br /&gt;
     /* No need to keep the media now */&lt;br /&gt;
     libvlc_media_release (m);&lt;br /&gt;
 &lt;br /&gt;
 #if 0&lt;br /&gt;
     /* This is a non working code that show how to hooks into a window,&lt;br /&gt;
      * if we have a window around */&lt;br /&gt;
      libvlc_drawable_t drawable = xdrawable;&lt;br /&gt;
     /* or on windows */&lt;br /&gt;
      libvlc_drawable_t drawable = hwnd;&lt;br /&gt;
 &lt;br /&gt;
      libvlc_media_player_set_drawable (mp, drawable, &amp;amp;amp;ex);&lt;br /&gt;
      raise (&amp;amp;amp;ex);&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
     /* play the media_player */&lt;br /&gt;
     libvlc_media_player_play (mp, &amp;amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;amp;ex);&lt;br /&gt;
    &lt;br /&gt;
     sleep (10); /* Let it play a bit */&lt;br /&gt;
    &lt;br /&gt;
     /* Stop playing */&lt;br /&gt;
 #warning There is known deadlock bug here. Please update to LibVLC 1.1!&lt;br /&gt;
     libvlc_media_player_stop (mp, &amp;amp;amp;ex);&lt;br /&gt;
 &lt;br /&gt;
     /* Free the media_player */&lt;br /&gt;
     libvlc_media_player_release (mp);&lt;br /&gt;
 &lt;br /&gt;
     libvlc_release (inst);&lt;br /&gt;
     raise (&amp;amp;amp;ex);&lt;br /&gt;
 &lt;br /&gt;
     return 0;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>TArKi</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=LibVLC_Tutorial_0.9&amp;diff=16344</id>
		<title>LibVLC Tutorial 0.9</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=LibVLC_Tutorial_0.9&amp;diff=16344"/>
		<updated>2010-06-16T08:57:26Z</updated>

		<summary type="html">&lt;p&gt;TArKi: /* Sample LibVLC Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LibVLC Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039; This may work with 0.9 and 1.0 version, you just need to remove exception to get it to work on 1.1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Of course, windows binary builds don&#039;t come with vlc.h, so you&#039;ll need a copy of the source to get them.  See [[LibVLC_Tutorial_086c]] for some instructions on getting the build working.&lt;br /&gt;
&lt;br /&gt;
=== Linking against LibVLC ===&lt;br /&gt;
&lt;br /&gt;
cc example.c -lvlc -o example&lt;br /&gt;
&lt;br /&gt;
=== Sample LibVLC Code  ===&lt;br /&gt;
&lt;br /&gt;
 #include &amp;amp;lt;stdio.h&amp;amp;gt;&lt;br /&gt;
 #include &amp;amp;lt;stdlib.h&amp;amp;gt;&lt;br /&gt;
 #include &amp;amp;lt;vlc/vlc.h&amp;amp;gt;&lt;br /&gt;
 #include &amp;amp;lt;unistd.h&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
 static void raise(libvlc_exception_t * ex)&lt;br /&gt;
 {&lt;br /&gt;
     if (libvlc_exception_raised (ex))&lt;br /&gt;
     {&lt;br /&gt;
          fprintf (stderr, &amp;quot;error:&amp;amp;nbsp;%s\n&amp;quot;, libvlc_exception_get_message(ex));&lt;br /&gt;
          exit (-1);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 int main(int argc, char* argv[])&lt;br /&gt;
 {&lt;br /&gt;
     const char * const vlc_args[] = {&lt;br /&gt;
               &amp;quot;-I&amp;quot;, &amp;quot;dummy&amp;quot;, /* Don&#039;t use any interface */&lt;br /&gt;
               &amp;quot;--ignore-config&amp;quot;, /* Don&#039;t use VLC&#039;s config */&lt;br /&gt;
               &amp;quot;--plugin-path=/set/your/path/to/libvlc/module/if/you/are/on/windows/or/macosx&amp;quot; };&lt;br /&gt;
     libvlc_exception_t ex;&lt;br /&gt;
     libvlc_instance_t * inst;&lt;br /&gt;
     libvlc_media_player_t *mp;&lt;br /&gt;
     libvlc_media_t *m;&lt;br /&gt;
     &lt;br /&gt;
     libvlc_exception_init (&amp;amp;amp;ex);&lt;br /&gt;
     /* init vlc modules, should be done only once */&lt;br /&gt;
     inst = libvlc_new (sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args, &amp;amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;amp;ex);&lt;br /&gt;
  &lt;br /&gt;
     /* Create a new item */&lt;br /&gt;
     m = libvlc_media_new (inst, &amp;quot;http://mycool.movie.com/test.mov&amp;quot;, &amp;amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;amp;ex);&lt;br /&gt;
    &lt;br /&gt;
     /* XXX: demo art and meta information fetching */&lt;br /&gt;
    &lt;br /&gt;
     /* Create a media player playing environement */&lt;br /&gt;
     mp = libvlc_media_player_new_from_media (m, &amp;amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;amp;ex);&lt;br /&gt;
     &lt;br /&gt;
     /* No need to keep the media now */&lt;br /&gt;
     libvlc_media_release (m);&lt;br /&gt;
 &lt;br /&gt;
 #if 0&lt;br /&gt;
     /* This is a non working code that show how to hooks into a window,&lt;br /&gt;
      * if we have a window around */&lt;br /&gt;
      libvlc_drawable_t drawable = xdrawable;&lt;br /&gt;
     /* or on windows */&lt;br /&gt;
      libvlc_drawable_t drawable = hwnd;&lt;br /&gt;
 &lt;br /&gt;
      libvlc_media_player_set_drawable (mp, drawable, &amp;amp;amp;ex);&lt;br /&gt;
      raise (&amp;amp;amp;ex);&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
     /* play the media_player */&lt;br /&gt;
     libvlc_media_player_play (mp, &amp;amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;amp;ex);&lt;br /&gt;
    &lt;br /&gt;
     sleep (10); /* Let it play a bit */&lt;br /&gt;
    &lt;br /&gt;
     /* Stop playing */&lt;br /&gt;
 #warning There is known deadlock bug here. Please update to LibVLC 1.1!&lt;br /&gt;
     libvlc_media_player_stop (mp, &amp;amp;amp;ex);&lt;br /&gt;
 &lt;br /&gt;
     /* Free the media_player */&lt;br /&gt;
     libvlc_media_player_release (mp);&lt;br /&gt;
 &lt;br /&gt;
     libvlc_release (inst);&lt;br /&gt;
     raise (&amp;amp;amp;ex);&lt;br /&gt;
 &lt;br /&gt;
     return 0;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>TArKi</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=LibVLC_Tutorial_0.9&amp;diff=16343</id>
		<title>LibVLC Tutorial 0.9</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=LibVLC_Tutorial_0.9&amp;diff=16343"/>
		<updated>2010-06-16T08:56:54Z</updated>

		<summary type="html">&lt;p&gt;TArKi: /* Sample LibVLC Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LibVLC Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039; This may work with 0.9 and 1.0 version, you just need to remove exception to get it to work on 1.1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Of course, windows binary builds don&#039;t come with vlc.h, so you&#039;ll need a copy of the source to get them.  See [[LibVLC_Tutorial_086c]] for some instructions on getting the build working.&lt;br /&gt;
&lt;br /&gt;
=== Linking against LibVLC ===&lt;br /&gt;
&lt;br /&gt;
cc example.c -lvlc -o example&lt;br /&gt;
&lt;br /&gt;
=== Sample LibVLC Code ===&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;vlc/vlc.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 static void raise(libvlc_exception_t * ex)&lt;br /&gt;
 {&lt;br /&gt;
     if (libvlc_exception_raised (ex))&lt;br /&gt;
     {&lt;br /&gt;
          fprintf (stderr, &amp;quot;error: %s\n&amp;quot;, libvlc_exception_get_message(ex));&lt;br /&gt;
          exit (-1);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 int main(int argc, char* argv[])&lt;br /&gt;
 {&lt;br /&gt;
     const char * const vlc_args[] = {&lt;br /&gt;
               &amp;quot;-I&amp;quot;, &amp;quot;dummy&amp;quot;, /* Don&#039;t use any interface */&lt;br /&gt;
               &amp;quot;--ignore-config&amp;quot;, /* Don&#039;t use VLC&#039;s config */&lt;br /&gt;
               &amp;quot;--plugin-path=/set/your/path/to/libvlc/module/if/you/are/on/windows/or/macosx&amp;quot; };&lt;br /&gt;
     libvlc_exception_t ex;&lt;br /&gt;
     libvlc_instance_t * inst;&lt;br /&gt;
     libvlc_media_player_t *mp;&lt;br /&gt;
     libvlc_media_t *m;&lt;br /&gt;
     &lt;br /&gt;
     libvlc_exception_init (&amp;amp;ex);&lt;br /&gt;
     /* init vlc modules, should be done only once */&lt;br /&gt;
     inst = libvlc_new (sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
  &lt;br /&gt;
     /* Create a new item */&lt;br /&gt;
     m = libvlc_media_new (inst, &amp;quot;http://mycool.movie.com/test.mov&amp;quot;, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
    &lt;br /&gt;
     /* XXX: demo art and meta information fetching */&lt;br /&gt;
    &lt;br /&gt;
     /* Create a media player playing environement */&lt;br /&gt;
     mp = libvlc_media_player_new_from_media (m, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
     &lt;br /&gt;
     /* No need to keep the media now */&lt;br /&gt;
     libvlc_media_release (m);&lt;br /&gt;
 &lt;br /&gt;
 #if 0&lt;br /&gt;
     /* This is a non working code that show how to hooks into a window,&lt;br /&gt;
      * if we have a window around */&lt;br /&gt;
      libvlc_drawable_t drawable = xdrawable;&lt;br /&gt;
     /* or on windows */&lt;br /&gt;
      libvlc_drawable_t drawable = hwnd;&lt;br /&gt;
 &lt;br /&gt;
      libvlc_media_player_set_drawable (mp, drawable, &amp;amp;ex);&lt;br /&gt;
      raise (&amp;amp;ex);&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
     /* play the media_player */&lt;br /&gt;
     libvlc_media_player_play (mp, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
    &lt;br /&gt;
     sleep (10); /* Let it play a bit */&lt;br /&gt;
    &lt;br /&gt;
     /* Stop playing */&lt;br /&gt;
 #warning There is known deadlock bug here. Please update to LibVLC 1.1!&lt;br /&gt;
     libvlc_media_player_stop (mp, &amp;amp;ex);&lt;br /&gt;
 &lt;br /&gt;
     /* Free the media_player */&lt;br /&gt;
     libvlc_media_player_release (mp);&lt;br /&gt;
 &lt;br /&gt;
     libvlc_release (inst);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
 &lt;br /&gt;
     return 0;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>TArKi</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=LibVLC_Tutorial_0.9&amp;diff=16342</id>
		<title>LibVLC Tutorial 0.9</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=LibVLC_Tutorial_0.9&amp;diff=16342"/>
		<updated>2010-06-16T08:56:03Z</updated>

		<summary type="html">&lt;p&gt;TArKi: /* Sample LibVLC Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LibVLC Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039; This may work with 0.9 and 1.0 version, you just need to remove exception to get it to work on 1.1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Of course, windows binary builds don&#039;t come with vlc.h, so you&#039;ll need a copy of the source to get them.  See [[LibVLC_Tutorial_086c]] for some instructions on getting the build working.&lt;br /&gt;
&lt;br /&gt;
=== Linking against LibVLC ===&lt;br /&gt;
&lt;br /&gt;
cc example.c -lvlc -o example&lt;br /&gt;
&lt;br /&gt;
=== Sample LibVLC Code ===&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;vlc/vlc.h&amp;gt;&lt;br /&gt;
 //Uncomment this line if you get a &amp;quot;sleep was not declared in this scope&amp;quot; error&lt;br /&gt;
// #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 static void raise(libvlc_exception_t * ex)&lt;br /&gt;
 {&lt;br /&gt;
     if (libvlc_exception_raised (ex))&lt;br /&gt;
     {&lt;br /&gt;
          fprintf (stderr, &amp;quot;error: %s\n&amp;quot;, libvlc_exception_get_message(ex));&lt;br /&gt;
          exit (-1);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 int main(int argc, char* argv[])&lt;br /&gt;
 {&lt;br /&gt;
     const char * const vlc_args[] = {&lt;br /&gt;
               &amp;quot;-I&amp;quot;, &amp;quot;dummy&amp;quot;, /* Don&#039;t use any interface */&lt;br /&gt;
               &amp;quot;--ignore-config&amp;quot;, /* Don&#039;t use VLC&#039;s config */&lt;br /&gt;
               &amp;quot;--plugin-path=/set/your/path/to/libvlc/module/if/you/are/on/windows/or/macosx&amp;quot; };&lt;br /&gt;
     libvlc_exception_t ex;&lt;br /&gt;
     libvlc_instance_t * inst;&lt;br /&gt;
     libvlc_media_player_t *mp;&lt;br /&gt;
     libvlc_media_t *m;&lt;br /&gt;
     &lt;br /&gt;
     libvlc_exception_init (&amp;amp;ex);&lt;br /&gt;
     /* init vlc modules, should be done only once */&lt;br /&gt;
     inst = libvlc_new (sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
  &lt;br /&gt;
     /* Create a new item */&lt;br /&gt;
     m = libvlc_media_new (inst, &amp;quot;http://mycool.movie.com/test.mov&amp;quot;, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
    &lt;br /&gt;
     /* XXX: demo art and meta information fetching */&lt;br /&gt;
    &lt;br /&gt;
     /* Create a media player playing environement */&lt;br /&gt;
     mp = libvlc_media_player_new_from_media (m, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
     &lt;br /&gt;
     /* No need to keep the media now */&lt;br /&gt;
     libvlc_media_release (m);&lt;br /&gt;
 &lt;br /&gt;
 #if 0&lt;br /&gt;
     /* This is a non working code that show how to hooks into a window,&lt;br /&gt;
      * if we have a window around */&lt;br /&gt;
      libvlc_drawable_t drawable = xdrawable;&lt;br /&gt;
     /* or on windows */&lt;br /&gt;
      libvlc_drawable_t drawable = hwnd;&lt;br /&gt;
 &lt;br /&gt;
      libvlc_media_player_set_drawable (mp, drawable, &amp;amp;ex);&lt;br /&gt;
      raise (&amp;amp;ex);&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
     /* play the media_player */&lt;br /&gt;
     libvlc_media_player_play (mp, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
    &lt;br /&gt;
     sleep (10); /* Let it play a bit */&lt;br /&gt;
    &lt;br /&gt;
     /* Stop playing */&lt;br /&gt;
 #warning There is known deadlock bug here. Please update to LibVLC 1.1!&lt;br /&gt;
     libvlc_media_player_stop (mp, &amp;amp;ex);&lt;br /&gt;
 &lt;br /&gt;
     /* Free the media_player */&lt;br /&gt;
     libvlc_media_player_release (mp);&lt;br /&gt;
 &lt;br /&gt;
     libvlc_release (inst);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
 &lt;br /&gt;
     return 0;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>TArKi</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=LibVLC_Tutorial_0.9&amp;diff=16341</id>
		<title>LibVLC Tutorial 0.9</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=LibVLC_Tutorial_0.9&amp;diff=16341"/>
		<updated>2010-06-16T08:55:23Z</updated>

		<summary type="html">&lt;p&gt;TArKi: /* Sample LibVLC Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LibVLC Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039; This may work with 0.9 and 1.0 version, you just need to remove exception to get it to work on 1.1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Of course, windows binary builds don&#039;t come with vlc.h, so you&#039;ll need a copy of the source to get them.  See [[LibVLC_Tutorial_086c]] for some instructions on getting the build working.&lt;br /&gt;
&lt;br /&gt;
=== Linking against LibVLC ===&lt;br /&gt;
&lt;br /&gt;
cc example.c -lvlc -o example&lt;br /&gt;
&lt;br /&gt;
=== Sample LibVLC Code ===&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;vlc/vlc.h&amp;gt;&lt;br /&gt;
 /*Uncomment this line if you get a &amp;quot;‘sleep’ was not declared in this scope&amp;quot; error*/&lt;br /&gt;
/* #include &amp;lt;unistd.h&amp;gt;*/&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 static void raise(libvlc_exception_t * ex)&lt;br /&gt;
 {&lt;br /&gt;
     if (libvlc_exception_raised (ex))&lt;br /&gt;
     {&lt;br /&gt;
          fprintf (stderr, &amp;quot;error: %s\n&amp;quot;, libvlc_exception_get_message(ex));&lt;br /&gt;
          exit (-1);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 int main(int argc, char* argv[])&lt;br /&gt;
 {&lt;br /&gt;
     const char * const vlc_args[] = {&lt;br /&gt;
               &amp;quot;-I&amp;quot;, &amp;quot;dummy&amp;quot;, /* Don&#039;t use any interface */&lt;br /&gt;
               &amp;quot;--ignore-config&amp;quot;, /* Don&#039;t use VLC&#039;s config */&lt;br /&gt;
               &amp;quot;--plugin-path=/set/your/path/to/libvlc/module/if/you/are/on/windows/or/macosx&amp;quot; };&lt;br /&gt;
     libvlc_exception_t ex;&lt;br /&gt;
     libvlc_instance_t * inst;&lt;br /&gt;
     libvlc_media_player_t *mp;&lt;br /&gt;
     libvlc_media_t *m;&lt;br /&gt;
     &lt;br /&gt;
     libvlc_exception_init (&amp;amp;ex);&lt;br /&gt;
     /* init vlc modules, should be done only once */&lt;br /&gt;
     inst = libvlc_new (sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
  &lt;br /&gt;
     /* Create a new item */&lt;br /&gt;
     m = libvlc_media_new (inst, &amp;quot;http://mycool.movie.com/test.mov&amp;quot;, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
    &lt;br /&gt;
     /* XXX: demo art and meta information fetching */&lt;br /&gt;
    &lt;br /&gt;
     /* Create a media player playing environement */&lt;br /&gt;
     mp = libvlc_media_player_new_from_media (m, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
     &lt;br /&gt;
     /* No need to keep the media now */&lt;br /&gt;
     libvlc_media_release (m);&lt;br /&gt;
 &lt;br /&gt;
 #if 0&lt;br /&gt;
     /* This is a non working code that show how to hooks into a window,&lt;br /&gt;
      * if we have a window around */&lt;br /&gt;
      libvlc_drawable_t drawable = xdrawable;&lt;br /&gt;
     /* or on windows */&lt;br /&gt;
      libvlc_drawable_t drawable = hwnd;&lt;br /&gt;
 &lt;br /&gt;
      libvlc_media_player_set_drawable (mp, drawable, &amp;amp;ex);&lt;br /&gt;
      raise (&amp;amp;ex);&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
     /* play the media_player */&lt;br /&gt;
     libvlc_media_player_play (mp, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
    &lt;br /&gt;
     sleep (10); /* Let it play a bit */&lt;br /&gt;
    &lt;br /&gt;
     /* Stop playing */&lt;br /&gt;
 #warning There is known deadlock bug here. Please update to LibVLC 1.1!&lt;br /&gt;
     libvlc_media_player_stop (mp, &amp;amp;ex);&lt;br /&gt;
 &lt;br /&gt;
     /* Free the media_player */&lt;br /&gt;
     libvlc_media_player_release (mp);&lt;br /&gt;
 &lt;br /&gt;
     libvlc_release (inst);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
 &lt;br /&gt;
     return 0;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>TArKi</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=LibVLC_Tutorial_0.9&amp;diff=16340</id>
		<title>LibVLC Tutorial 0.9</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=LibVLC_Tutorial_0.9&amp;diff=16340"/>
		<updated>2010-06-16T08:54:28Z</updated>

		<summary type="html">&lt;p&gt;TArKi: /* Sample LibVLC Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LibVLC Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039; This may work with 0.9 and 1.0 version, you just need to remove exception to get it to work on 1.1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Of course, windows binary builds don&#039;t come with vlc.h, so you&#039;ll need a copy of the source to get them.  See [[LibVLC_Tutorial_086c]] for some instructions on getting the build working.&lt;br /&gt;
&lt;br /&gt;
=== Linking against LibVLC ===&lt;br /&gt;
&lt;br /&gt;
cc example.c -lvlc -o example&lt;br /&gt;
&lt;br /&gt;
=== Sample LibVLC Code ===&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;vlc/vlc.h&amp;gt;&lt;br /&gt;
// Uncomment this line if you get a &amp;quot;‘sleep’ was not declared in this scope&amp;quot; error&lt;br /&gt;
// #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 static void raise(libvlc_exception_t * ex)&lt;br /&gt;
 {&lt;br /&gt;
     if (libvlc_exception_raised (ex))&lt;br /&gt;
     {&lt;br /&gt;
          fprintf (stderr, &amp;quot;error: %s\n&amp;quot;, libvlc_exception_get_message(ex));&lt;br /&gt;
          exit (-1);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 int main(int argc, char* argv[])&lt;br /&gt;
 {&lt;br /&gt;
     const char * const vlc_args[] = {&lt;br /&gt;
               &amp;quot;-I&amp;quot;, &amp;quot;dummy&amp;quot;, /* Don&#039;t use any interface */&lt;br /&gt;
               &amp;quot;--ignore-config&amp;quot;, /* Don&#039;t use VLC&#039;s config */&lt;br /&gt;
               &amp;quot;--plugin-path=/set/your/path/to/libvlc/module/if/you/are/on/windows/or/macosx&amp;quot; };&lt;br /&gt;
     libvlc_exception_t ex;&lt;br /&gt;
     libvlc_instance_t * inst;&lt;br /&gt;
     libvlc_media_player_t *mp;&lt;br /&gt;
     libvlc_media_t *m;&lt;br /&gt;
     &lt;br /&gt;
     libvlc_exception_init (&amp;amp;ex);&lt;br /&gt;
     /* init vlc modules, should be done only once */&lt;br /&gt;
     inst = libvlc_new (sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
  &lt;br /&gt;
     /* Create a new item */&lt;br /&gt;
     m = libvlc_media_new (inst, &amp;quot;http://mycool.movie.com/test.mov&amp;quot;, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
    &lt;br /&gt;
     /* XXX: demo art and meta information fetching */&lt;br /&gt;
    &lt;br /&gt;
     /* Create a media player playing environement */&lt;br /&gt;
     mp = libvlc_media_player_new_from_media (m, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
     &lt;br /&gt;
     /* No need to keep the media now */&lt;br /&gt;
     libvlc_media_release (m);&lt;br /&gt;
 &lt;br /&gt;
 #if 0&lt;br /&gt;
     /* This is a non working code that show how to hooks into a window,&lt;br /&gt;
      * if we have a window around */&lt;br /&gt;
      libvlc_drawable_t drawable = xdrawable;&lt;br /&gt;
     /* or on windows */&lt;br /&gt;
      libvlc_drawable_t drawable = hwnd;&lt;br /&gt;
 &lt;br /&gt;
      libvlc_media_player_set_drawable (mp, drawable, &amp;amp;ex);&lt;br /&gt;
      raise (&amp;amp;ex);&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
     /* play the media_player */&lt;br /&gt;
     libvlc_media_player_play (mp, &amp;amp;ex);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
    &lt;br /&gt;
     sleep (10); /* Let it play a bit */&lt;br /&gt;
    &lt;br /&gt;
     /* Stop playing */&lt;br /&gt;
 #warning There is known deadlock bug here. Please update to LibVLC 1.1!&lt;br /&gt;
     libvlc_media_player_stop (mp, &amp;amp;ex);&lt;br /&gt;
 &lt;br /&gt;
     /* Free the media_player */&lt;br /&gt;
     libvlc_media_player_release (mp);&lt;br /&gt;
 &lt;br /&gt;
     libvlc_release (inst);&lt;br /&gt;
     raise (&amp;amp;ex);&lt;br /&gt;
 &lt;br /&gt;
     return 0;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>TArKi</name></author>
	</entry>
</feed>