Recent

Author Topic: paslibvlc components  (Read 10774 times)

ysun80

  • Newbie
  • Posts: 5
paslibvlc components
« on: May 05, 2012, 05:53:14 pm »
I am using paslibvlc v1.1.11 on MacOS lazarus 0.9.30.4.
I got "Access violation" error message when I play a video file.
Anyone has the same experience? How should I do?

minovitiello

  • New Member
  • *
  • Posts: 14
Re: paslibvlc components
« Reply #1 on: September 01, 2012, 09:34:33 am »
I have the same problem in linux, but with any type of media.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: paslibvlc components
« Reply #2 on: September 01, 2012, 09:46:27 am »
Have you searched the forum? I think I remember threads about VLC on OSX...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

minovitiello

  • New Member
  • *
  • Posts: 14
Re: paslibvlc components
« Reply #3 on: September 01, 2012, 01:50:47 pm »
It seems to work well only in windows. Under Linux can not find the handle of the library...
Try mplayer instead.
« Last Edit: September 01, 2012, 01:52:30 pm by minovitiello »

varianus

  • New Member
  • *
  • Posts: 25
Re: paslibvlc components
« Reply #4 on: September 01, 2012, 04:22:21 pm »
I've got the same problem under Linux (Ubuntu 12.04, VLC 2.0.3). The access violation came from libvlc and seems related to some problems during plugins initialization . Maybe under linux we need to pass some special args to libvlc_new.
At the moment the only workaround i've found is to remove the file  /usr/lib/vlc/plugins/codec/libdirac_plugin.so. but this is a really ugly way to solve the problem.

minovitiello

  • New Member
  • *
  • Posts: 14
Re: paslibvlc components
« Reply #5 on: September 01, 2012, 09:33:50 pm »
The page dedicated to libvlc is specified that no parameter is passed to libvlc_new  to initialize it.
http://www.videolan.org/developers/vlc/doc/doxygen/html/group__libvlc__core.html#ga915aa5778053d7b52ff9f6ba6e2f7764

I translated this code in lazarus, but I got the same result:
http://wiki.videolan.org/Using_libvlc_with_Delphi

I modify this line:
Pointer(libvlc_new) := GetProcedureAddress(vlcHandle, PWideChar('libvlc_new'));
If libvlc_new=Nil Then failedList.Add('libvlc_new');

the function is found, but the initialization of vlc fails:
vlcInstance := libvlc_new(0, nil);//ERROR! external SIGSEGV

Leledumbo

  • Hero Member
  • *****
  • Posts: 8819
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: paslibvlc components
« Reply #6 on: September 02, 2012, 08:10:53 am »
Did you guys try the demo? I also get a SIGSEGV, all of them happens with the following stacktrace:
Quote
#0 _IO_file_underflow at :0
#1 _IO_default_uflow at :0
#2 __uflow at :0
#3 getc at :0
#4 luaL_loadfile at :0
#5 ?? at :0
#6 ?? at :0
#7 ?? at :0
#8 ?? at :0
#9 ?? at :0
#10 vlc_module_load at :0
#11 module_need at :0
#12 ?? at :0
#13 ?? at :0
#14 ?? at :0
#15 ?? at :0
#16 start_thread at :0
#17 clone at :0
Can anyone guess something here?

varianus

  • New Member
  • *
  • Posts: 25
Re: paslibvlc components
« Reply #7 on: November 18, 2012, 11:42:02 am »
I've found a solution for my errors during VLC initialization under Linux (Ubuntu 12.10 64 bit, VLC 2.0.5).
It seems that libVLC raises some floating point exception during dirac plug-in initialization.
Everything works fine if I mask exceptions before calling libvlc_new.

Code: [Select]
uses
  math, ...
...
var
  ExceptionMask : TFPUExceptionMask; 
...
  ExceptionMask:= GetExceptionMask;
  SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide,exOverflow, exUnderflow, exPrecision]);
  p_li := libvlc_new(ArgsNumber, @args);
  SetExceptionMask(ExceptionMask);
....

Maybe this solves also yours problems.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8819
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: paslibvlc components
« Reply #8 on: November 18, 2012, 12:27:00 pm »
Quote
It seems that libVLC raises some floating point exception during dirac plug-in initialization.
Everything works fine if I mask exceptions before calling libvlc_new.
Please report to the author, we may get a fix.

benohb

  • Full Member
  • ***
  • Posts: 218
Re: paslibvlc components
« Reply #9 on: March 10, 2016, 02:09:20 am »
Always Always.. check the library version ::)



1-Create a new project
2-Add libvlc to uses
3-
Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. begin
  3. Loadlibvlc('/usr/lib/libvlc.so',true);
  4. end;
  5.  
4-run + click button
If you see a problem .  There is a conflict in the library . (  inform you the name of missing  procedure)


In my situation I have found that " libvlc_media_list_add_file_content" is deprecated. in debian sid 32bit libvlc 1:2.2


The solution


Commenting the deprecated procedure "//"


//  pointer(libvlc_media_list_add_file_content):=GetProcAddress(hlib,'libvlc_media_list_add_file_content');


or


Remove the Raise Exception in libvlc / Loadlibvlc() 
The problem of "message Exception" is blocking load of library if just one procedure missing

sorry about my bad english
« Last Edit: March 10, 2016, 02:11:08 am by benohb »

 

TinyPortal © 2005-2018