Page 1 of 1

[Delphi XE][VLCLib 1.1.11] TrackBar.position. How to do ?

Posted: 18 Jun 2015 11:33
by nicephore
Hi,
I'm Delphi XE user.

I try to set a TrackBar position so i do:

plibvlc_instance_t = type Pointer;
plibvlc_media_player_t = type Pointer;
plibvlc_media_t = type Pointer;

libvlc_media_player_get_length : function(p_media_player : Plibvlc_media_player_t) : int64;
libvlc_media_player_get_time : function(p_media_player : Plibvlc_media_player_t) : int64;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
if libvlc_media_player_is_playing(vlcMediaPlayer) <> 0 then
begin
if Self.TrackBar1.Max = 1 then
begin
Self.TrackBar1.Max := Round(libvlc_media_player_get_length(vlcMediaPlayer) / 1000);
end
else
begin
Self.TrackBar1.Position := Round(libvlc_media_player_get_time(vlcMediaPlayer) / 1000);
end;
end;
end;

But i get exception.
Did somebody can explain how to set mais TrackBar.position with vlclib.

Thanks for help.

Re: [Delphi XE][VLCLib 1.1.11] TrackBar.position. How to do ?

Posted: 18 Jun 2015 12:59
by nicephore
This working now by using Delphi Wrapper forr libVLC from DsChAeK (https://forum.videolan.org/viewtopic.php?f=32&t=78754)