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

This forum is about all development around libVLC.
nicephore
New Cone
New Cone
Posts: 3
Joined: 18 Jun 2015 11:18

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

Postby nicephore » 18 Jun 2015 11:33

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.

nicephore
New Cone
New Cone
Posts: 3
Joined: 18 Jun 2015 11:18

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

Postby nicephore » 18 Jun 2015 12:59

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


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 23 guests