Video getting launched in Direct3D window

This forum is about all development around libVLC.
gnshdxt@gmail.com
New Cone
New Cone
Posts: 1
Joined: 25 Aug 2016 05:47

Video getting launched in Direct3D window

Postby gnshdxt@gmail.com » 25 Aug 2016 06:33

Hi all,

I am trying to launch a video using libvlc and python interface.
Every time I execute the code, Video is getting launched in Direct3D window from where I cannot pause or stop manually.
How to make it launch in the main window?

Below is the code I used to launch VLC

Code: Select all

import vlc filepath = "test.mp4" movie = os.path.expanduser(filepath) instance = vlc.Instance() media = instance.media_new(movie) player = instance.media_player_new() player.set_media(media) player.set_fullscreen(1) player.play()

coderXY
New Cone
New Cone
Posts: 4
Joined: 24 Aug 2016 22:12

Re: Video getting launched in Direct3D window

Postby coderXY » 25 Aug 2016 09:08

In C or C++, you have to call libvlc_media_player_set_hwnd with your window handle (HNWD) to tell libvlc where to render the media.
And to pause or stop the playback, call libvlc_media_player_play, libvlc_media_player_pause or libvlc_media_player_stop.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 6 guests