Difference between revisions of "Talk:LibVLC Tutorial 0.9"

From VideoLAN Wiki
Jump to navigation Jump to search
(The code wasn't tested)
m (moved Talk:LibVLC Tutorial to Talk:LibVLC Tutorial 0.9: We need a new tutorial for current version)
 
(2 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
is used for the tutorial, that would be fine, if the
 
is used for the tutorial, that would be fine, if the
 
text mentioned that.
 
text mentioned that.
 +
 +
[[User:davidlallen|davidlallen]] 17:29, 19 August 2007 (PST)
  
 
--
 
--
Line 13: Line 15:
 
The code wasn't tested, but should work using 0.9.0, or at least show how to use.--[[User:Pdherbemont|Pdherbemont]] 22:36, 19 August 2007 (CEST)
 
The code wasn't tested, but should work using 0.9.0, or at least show how to use.--[[User:Pdherbemont|Pdherbemont]] 22:36, 19 August 2007 (CEST)
  
---
+
== Text displaying ==
 
 
I am new to this wiki, and I don't want to jump too far
 
ahead.  However, I have modified the tutorial code so
 
that it compiles and runs on cygwin gcc 3.4 and windows
 
XP, using the latest released vlc version 0.8.6c.
 
 
 
I will paste the code here, in the talk page, in
 
case it would be a violation of etiquette to just dump
 
the code on the main page.  Note the code on the main
 
page has syntax errors at least, and either it has
 
big prototyping problems or else the related API's
 
are substantially different in whatever vlc version the
 
author used to compile against.
 
 
 
Note for linux, remove <windows.h>, change
 
"Sleep (10000)" to "sleep (10)".
 
 
 
#include <stdio.h>
 
#include <windows.h>
 
#include <vlc/libvlc.h>
 
 
 
static void quit_on_exception (libvlc_exception_t *excp) {
 
  if (libvlc_exception_raised (excp)) {
 
      fprintf(stderr, "error: %s\n", libvlc_exception_get_message(excp));
 
      exit(-1);
 
  }
 
}
 
  
int main(int argc, char **argv) {
+
Hi,
  libvlc_exception_t excp;
+
How can i expose the function that handle with text displaying?
  libvlc_instance_t *inst;
+
This is very important for every app that handle with user data on stream.
  int item;
 
  char *myarg0 = "-I";  char *myarg1 = "dummy";
 
  char *myarg2 = "--plugin-path=c:\\program files\\videolan\\plugins";
 
  char *myargs[4] = {myarg0, myarg1, myarg2, NULL};
 
  char *filename = "c:\\video\\main\\Everybody_Hates_Chris_Feb_26.mpg";
 
  
  libvlc_exception_init (&excp);
+
Thanks.
  inst = libvlc_new (3, myargs, &excp);
 
  quit_on_exception (&excp);
 
  item = libvlc_playlist_add (inst, filename, NULL, &excp);
 
  quit_on_exception (&excp);
 
  libvlc_playlist_play (inst, item, 0, NULL, &excp);
 
  quit_on_exception (&excp);
 
  Sleep (10000);
 
  libvlc_destroy (inst);
 
  return 0;
 
}
 

Latest revision as of 13:22, 10 May 2010

This code doesn't appear to compile. I am using gcc 3.4. But some of the problems are obvious, eg line 6, the parentheses don't match.

What version of libvlc was used to create the tutorial? Functions libvlc_media_... don't appear to exist in the latest release version, 0.8.6c. If an unreleased version is used for the tutorial, that would be fine, if the text mentioned that.

davidlallen 17:29, 19 August 2007 (PST)

--

The code wasn't tested, but should work using 0.9.0, or at least show how to use.--Pdherbemont 22:36, 19 August 2007 (CEST)

Text displaying

Hi, How can i expose the function that handle with text displaying? This is very important for every app that handle with user data on stream.

Thanks.