VLC 0.9.2 : Delphi Wrapper

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
keypad
Blank Cone
Blank Cone
Posts: 17
Joined: 27 Sep 2006 17:50

VLC 0.9.2 : Delphi Wrapper

Postby keypad » 12 Sep 2008 12:26

Hello !

I use libvlc.dll in my Delphi Application.
I did a unit libvlc.pas using the new API libvlc.dll and a second unit TFPPlayer.pas.

I can play, add options like goom or other, all work fine !!

But i've tried to play playlist since 2 days... but Dll just add to the media list the first media object and not the others !!

I do like this (where the filename is a m3u with several items, readable with VLC) :

Code: Select all

constructor TTFPPlayer.Create(AOwner: TComponent); var Args: array [0..1] of PChar; val:TValue; begin inherited Create(AOwner); VLC := nil; VLCInput := nil; Media := nil; MediaPlayer := nil; FIsPlaying := False; ParentColor := False; Color := clBlack; Width := 320; Height := 240; Caption := ''; BevelOuter := bvNone; case VLD_Startup of VLD_SUCCESS : begin end; VLD_NOLIB : begin raise TEVLCLoadLibrary.Create('VLC Player non installé!'); exit; end; VLD_NOTFOUND : begin raise TEVLCNotFound.Create('VLC Player non installé ou mauvaise version!'); exit; end; end; //On efface les erreurs FillChar(VLCError,SizeOf(VLCError),0); //On crée une instance de VLC Args[0] := PChar(VLD_LibPath); Args[1] := nil; VLC := libvlc_new( 1, @Args[0], VLCError); // on crée un timer FTimer := TTimer.Create(nil); FTimer.Enabled := False; FTimer.Interval := 500; FTimer.OnTimer := FTimerTimer; end; procedure TTFPPlayer.Playlist_play(filename : pchar); begin libvlc_video_set_parent(VLC, Self.Handle, VLCError); CheckError; medialist := libvlc_media_list_new(vlc, vlcerror); checkerror; libvlc_media_list_add_file_content(medialist, filename,vlcerror); checkerror; Medialistplayer := libvlc_media_list_player_new(vlc, vlcerror); checkerror; MediaPlayer := libvlc_media_player_new(vlc,vlcerror); checkerror; libvlc_media_list_player_set_media_list(Medialistplayer, medialist, vlcerror); checkerror; libvlc_media_list_player_set_media_player(Medialistplayer,mediaplayer,vlcerror); checkerror; libvlc_media_list_player_play(Medialistplayer, vlcerror); checkerror; end;
Just the first media item from the m3u is added..not the others...(and there is no error)

Can someone help me ??
(i know that the playlist function is DEPRECATED so i try to use media list...)

(I will make my Delphi wrapper available when i will have finsh it)

( PS : Excuse me for my englis, but I'm a French developper : http://tfptools.free.fr )

Thanks a lot !

Keypad
Last edited by keypad on 22 Sep 2008 10:44, edited 1 time in total.

keypad
Blank Cone
Blank Cone
Posts: 17
Joined: 27 Sep 2006 17:50

Re: VLC 0.9.2, libvlc.dll : Media List (Playlist) with Delphi

Postby keypad » 12 Sep 2008 16:17

It's very strange, and i don't know how to load a m3u file in a media-list.....

icebob
New Cone
New Cone
Posts: 4
Joined: 28 Aug 2008 10:48

Re: VLC 0.9.2, libvlc.dll : Media List (Playlist) with Delphi

Postby icebob » 19 Sep 2008 18:30

Hello!

I created a Delphi wrapper for VLC 0.8.6i one month ago http://wiki.videolan.org/IceVLCPlayer.

Is Your wrapper for 0.9.2 public? Downloadable?

Icebob

keypad
Blank Cone
Blank Cone
Posts: 17
Joined: 27 Sep 2006 17:50

Re: VLC 0.9.2, libvlc.dll : Media List (Playlist) with Delphi

Postby keypad » 20 Sep 2008 13:09

Hello

Just wait one or 2 weeks and it will be downloadable ! ;-)

keypad
Blank Cone
Blank Cone
Posts: 17
Joined: 27 Sep 2006 17:50

Re: VLC 0.9.2, libvlc.dll : Media List (Playlist) with Delphi

Postby keypad » 22 Sep 2008 10:42

Here is a link to my project (I haven't finished it yet), VLC0.9.2 is included .
As you can see, i have several problems...If you can Help me i will be very glad !!

Here are the problems :
* Playlist : The playlist items count function is OK but not the playlist item index of the media's playing !! .. if you have a solution ....!
* libpath : I don't know why, but i have to put all the dll in the exe path...

I am a "self-made" developper, i haven't study for this..

Please, if you modify this project, send it to me....we will arrive together !

See you soon !

The link : http://www.tvfreeplayer.com/bin/tfptool ... Player.zip


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 89 guests