title: LibVLC tutorial without SDL?
body: <p>I am trying to write a video frame by frame to a *.yuv file and found <a href="http://wiki.videolan.org/LibVLC_SampleCode_SDL" rel="nofollow noreferrer">this</a> tutorial about rendering a video into an SDL surface. </p>
  
  <p>Now I'm not exactly sure how to use this code without the SDL library. For example, the lock function:</p>
  
  <pre><code>static void *lock(void *data, void **p_pixels)
  {
      struct ctx *ctx = data;
  
      SDL_LockMutex(ctx-&gt;mutex);
      SDL_LockSurface(ctx-&gt;surf);
      *p_pixels = ctx-&gt;surf-&gt;pixels;
      return NULL; /* picture identifier, not needed here */
  }
  </code></pre>
  
  <p>How can I write this function without <code>struct ctx</code>, <code>SDL_LockMutex</code> and <code>SDL_LockSurface</code>?</p>
  
  <p>As you can imagine, I am not a very experienced programmer so please be patient with me ;)<br> 
  Thanks in advance!</p>