FreePascal Wrapper for LibVLC v1.1.x

This forum is about all development around libVLC.
NXP
New Cone
New Cone
Posts: 4
Joined: 08 Aug 2010 14:49

FreePascal Wrapper for LibVLC v1.1.x

Postby NXP » 08 Aug 2010 15:32

I have made Wrapper for FreePascal which works in Linux and others Unix-like systems on the basis of PasLibVlcUnit, but the elementary example under abnormal condition comes to the end.
Please show an error.
The example code on С works without censures.

FPC Wrapper v1 http://narod.ru/disk/23527784000/1_libvlc5.pas.html
FPC Wrapper v2 http://narod.ru/disk/23527799000/2_libvlc5.pas.html
FPC Wrapper v3 (Win/Unix supports) http://narod.ru/disk/23527927000/libvlc5.pas.html

Code:

Code: Select all

program VLCexample; uses sysutils, libvlc5; var args: array[0..1] of PChar; inst: libvlc_instance_t_ptr; mp: libvlc_media_player_t_ptr; m: libvlc_media_t_ptr; begin (* Load the VLC engine *) args[0] := PChar('-vvvvvvvvvvvvvvvvvvvv'); args[1] := nil; inst := libvlc_new(1, args); (* libvlc_new(0, nil); *) (* Create a new item *) m := libvlc_media_new_path (inst, '/home/uploads/2009/07/data_center/1.flv'); (* Create a media player playing environement *) mp := libvlc_media_player_new_from_media (m); (* No need to keep the media now *) libvlc_media_release (m); (* play the media_player *) libvlc_media_player_play (mp); sleep(1000); (* Stop playing *) libvlc_media_player_stop (mp); (* Free the media_player *) libvlc_media_player_release (mp); libvlc_release (inst); end.
stdout

Code: Select all

sergey@linux-68dp:~/VLC/1> fpc VLCexample.pas Free Pascal Compiler version 2.2.4 [2010/01/15] for i386 Copyright (c) 1993-2008 by Florian Klaempfl Target OS: Linux for i386 Compiling VLCexample.pas Compiling libvlc5.pas libvlc5.pas(537,1) Warning: cdecl'ared functions have no high parameter Linking VLCexample /usr/bin/ld: warning: link.res contains output sections; did you forget -T? 4458 lines compiled, 0.4 sec 1 warning(s) issued sergey@linux-68dp:~/VLC/1> ./VLCexample [0x8092834] main libvlc debug: VLC media player - 1.1.2 The Luggage [0x8092834] main libvlc debug: Copyright © 1996-2010 the VideoLAN team [0x8092834] main libvlc debug: revision exported [0x8092834] main libvlc debug: configured with ./configure '--host=i686-pc-linux-gnu' '--build=i686-pc-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--enable-a52' '--enable-aa' '--enable-alsa' '--enable-asademux' '--enable-dca' '--enable-dvb' '--enable-dvbpsi' '--enable-dvdnav' '--enable-dvdread' '--enable-faad' '--enable-fast-install' '--enable-fb' '--enable-flac' '--enable-freetype' '--enable-fribidi' '--enable-glx' '--enable-gnomevfs' '--enable-gnutls' '--enable-httpd' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libcddb' '--enable-libmpeg2' '--enable-libproxy' '--enable-lirc' '--enable-live555' '--enable-lua' '--enable-mad' '--enable-mkv' '--enable-mod' '--enable-mozilla' '--enable-ncurses' '--enable-ogg' '--enable-optimizations' '--enable-oss' '--enable-pulse' '--enable-pvr' '--enable-real' '--enable-realrtsp' '--enable-smb' '--enable-sout' '--enable-speex' '--enable-taglib' '--enable-theora' '--enable-v4l' '--enable-v4l2' '--enable-vcd' '--enable-vcdx' '--enable-visual' '--enable-vorbis' '--enable-waveout' '--enable-xvideo' '--with-live555-tree=/usr/lib/live' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' 'CXXFLAGS=-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' [0x8092834] main libvlc debug: translation test: code is "C" [0x8092834] main libvlc debug: checking plugin modules [0x8092834] main libvlc debug: loading plugins cache file /usr/lib/vlc/plugins/plugins-04041e-3e8.dat [0x8092834] main libvlc debug: recursively browsing `/usr/lib/vlc/plugins' [0x8092834] main libvlc debug: saving plugins cache /usr/lib/vlc/plugins/plugins-04041e-3e8.dat [0x8092834] main libvlc debug: module bank initialized (400 modules) [0x8092834] main libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 FPU [0x8092834] main libvlc debug: looking for memcpy module: 3 candidates [0x8092834] main libvlc debug: using memcpy module "memcpymmxext" [0x81274e4] main input debug: Creating an input for 'Media Library' [0x81274e4] main input debug: Input is a meta file: disabling unneeded options [0x81274e4] main input debug: using timeshift granularity of 50 MiB [0x81274e4] main input debug: using timeshift path '/tmp' [0x81274e4] main input debug: `file/xspf-open:///home/sergey/.local/share/vlc/ml.xspf' gives access `file' demux `xspf-open' path `/home/sergey/.local/share/vlc/ml.xspf' [0x81274e4] main input debug: creating demux: access='file' demux='xspf-open' path='/home/sergey/.local/share/vlc/ml.xspf' [0x812b364] main demux debug: looking for access_demux module: 2 candidates [0x812b364] main demux debug: no access_demux module matching "file" could be loaded [0x812b364] main demux debug: TIMER module_need() : 0.556 ms - Total 0.556 ms / 1 intvls (Avg 0.556 ms) [0x81274e4] main input debug: creating access 'file' path='/home/sergey/.local/share/vlc/ml.xspf' [0x812b344] main access debug: looking for access module: 2 candidates [0x812b344] filesystem access debug: opening file `/home/sergey/.local/share/vlc/ml.xspf' [0x812b344] main access debug: using access module "filesystem" [0x812b344] main access debug: TIMER module_need() : 0.401 ms - Total 0.401 ms / 1 intvls (Avg 0.401 ms) [0x812b7b4] main stream debug: Using AStream*Stream [0x812b7b4] main stream debug: pre buffering [0x812b7b4] main stream debug: received first data after 0 ms [0x812b7b4] main stream debug: pre-buffering done 314 bytes in 0s - 5379 KiB/s [0x812b9fc] main stream debug: looking for stream_filter module: 5 candidates [0x812b9fc] main stream debug: no stream_filter module matching "any" could be loaded [0x812b9fc] main stream debug: TIMER module_need() : 0.632 ms - Total 0.632 ms / 1 intvls (Avg 0.632 ms) [0x812b9fc] main stream debug: looking for stream_filter module: 1 candidate [0x812b9fc] main stream debug: using stream_filter module "stream_filter_record" [0x812b9fc] main stream debug: TIMER module_need() : 0.318 ms - Total 0.318 ms / 1 intvls (Avg 0.318 ms) [0x81274e4] main input debug: creating demux: access='file' demux='xspf-open' path='/home/sergey/.local/share/vlc/ml.xspf' [0x812bb8c] main demux debug: looking for demux module: 1 candidate [0x812bb8c] playlist demux debug: using XSPF playlist reader [0x812bb8c] main demux debug: using demux module "playlist" [0x812bb8c] main demux debug: TIMER module_need() : 0.417 ms - Total 0.417 ms / 1 intvls (Avg 0.417 ms) [0x812bd9c] main demux meta debug: looking for meta reader module: 2 candidates [0x812bd9c] lua demux meta debug: Trying Lua scripts in /home/sergey/.local/share/vlc/lua/meta/reader [0x812bd9c] lua demux meta debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader [0x812bd9c] lua demux meta debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac An unhandled exception occurred at $B77D8AB9 : EAccessViolation : Access violation $B77D8AB9 sergey@linux-68dp:~/VLC/1>
Something not so :(

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: FreePascal Wrapper for LibVLC v1.1.x

Postby Rémi Denis-Courmont » 08 Aug 2010 17:13

Can't you get a stack trace from gdb and/or valgrind?
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

NXP
New Cone
New Cone
Posts: 4
Joined: 08 Aug 2010 14:49

Re: FreePascal Wrapper for LibVLC v1.1.x

Postby NXP » 08 Aug 2010 18:45

No debug output. Obviously, the error occurs when calling libvlc_new ().
You might not have a repeat compilation?

NXP
New Cone
New Cone
Posts: 4
Joined: 08 Aug 2010 14:49

Re: FreePascal Wrapper for LibVLC v1.1.x

Postby NXP » 11 Aug 2010 18:31

No I did not tell my solution?
Two pieces of code. Completely identical, in different languages. At C works http://freepascal.ru/forum/viewtopic.ph ... 098#p44993

NXP
New Cone
New Cone
Posts: 4
Joined: 08 Aug 2010 14:49

Re: FreePascal Wrapper for LibVLC v1.1.x

Postby NXP » 17 Aug 2010 21:39

Please, tell me a solution.

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: FreePascal Wrapper for LibVLC v1.1.x

Postby Rémi Denis-Courmont » 18 Aug 2010 16:47

Please give us debug traces.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 21 guests