Getting the set time or set position to work with LIBVLC

This forum is about all development around libVLC.
daSpud99
New Cone
New Cone
Posts: 6
Joined: 08 Apr 2019 12:15

Getting the set time or set position to work with LIBVLC

Postby daSpud99 » 15 Apr 2019 11:35

In Windows: I tried the RC interface and the keyboard shortcut keys work as expected, but I can't tie the video to a control on the screen so that is out. Then I tried HTTP and that also worked with the keyboard shortcuts, but again no anchor to any control on the screen.

With LibVLC I was able to get the player to work and tie it to a control on the screen. This keeps it from overlapping my program BUT I cannot get the keyboard shortcuts to work. And I think I just discovered why:

Code: Select all

--keyboard-events, --no-keyboard-events Key press events (default enabled) This enables VLC hotkeys from the (non-embedded) video window.
I need embedded windows so I have to do my own positioning. That is no problem except that the libvlc_media_player_set_time and libvlc_media_player_set_position don't seem to work for me. The playback either stops or starts from the beginning.

The code is in WinDev and looks like this:

Code: Select all

PROCEDURE PositionSet(rPos is real,bFast is boolean) API(:sDLL,"libvlc_media_player_set_position",:mp,rPos,bFast)

Code: Select all

PROCEDURE TimeSet(nMSeconds is 8-byte int, bFast is boolean) nRes is int = API(:sDLL,"libvlc_media_player_set_time",:mp,nMSeconds,bFast)
In the latter case the return is 0 (success) and the time retrieved matches what I was trying to set it to, but the video did not go there. It either keeps playing or stops.

I don't know if it has anything to do with this but the result from libvlc_media_player_is_playing is 0 and libvlc_media_player_is_seekable is 1.

Thank you.

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: Getting the set time or set position to work with LIBVLC

Postby mfkl » 16 Apr 2019 05:16

Can you share logs, full code and libvlc version?
https://mfkl.github.io

daSpud99
New Cone
New Cone
Posts: 6
Joined: 08 Apr 2019 12:15

Re: Getting the set time or set position to work with LIBVLC

Postby daSpud99 » 16 Apr 2019 07:32

Thanks, 3.0.6 is the version.

Logs? I don't know where they are or how to turn them on or off. Sharing full code might not help much. It is in WinDev. I am using the API calls and no callbacks. I must have the LIbVLC loaded and operating somewhat as the video does play.

I have no idea what callbacks are or how to use them, but I guess I will learn if that is what is needed to get this rolling.

I just found that this page: https://www.videolan.org/developers/vlc ... a288a7f106 shows Set_Time with a 3rd parameter called bFast but the code that I downloaded for 3.0.6 only shows 2 parameters (player and time).


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 30 guests