Help with Python Bindings - setmedia

This forum is about all development around libVLC.
robinsiebler
New Cone
New Cone
Posts: 2
Joined: 01 Oct 2017 22:06

Help with Python Bindings - setmedia

Postby robinsiebler » 01 Oct 2017 22:23

I am creating a simple media player. I have a function called play_song(). This function sets the media and then plays it (or tries to). The 1st time I call the function, it works, but the 2nd time I call the function, it hangs on set_media(). I have no clue why. Below is an excerpt. The full code is here - https://pastebin.com/SKM6sbey.

Code: Select all

def play_song(self): self.mediaplayer.set_media(self.media) self.mediaplayer.play()
The 2nd call to the function:

Code: Select all

def play_next_song(self): if self.current_song_index < len(self.numbered_list) - 1: self.current_song_index += 1 self.media = self.instance.media_new(self.numbered_list[self.current_song_index][1]) self.play_song() def SongFinished(self, event): self.play_next_song()

robinsiebler
New Cone
New Cone
Posts: 2
Joined: 01 Oct 2017 22:06

Re: Help with Python Bindings - setmedia

Postby robinsiebler » 03 Oct 2017 07:57

I tried creating a simple PySide/QT app and the same thing happens. I definitely think it is a bug!

OlivierAubert
Developer
Developer
Posts: 92
Joined: 08 Mar 2007 15:43

Re: Help with Python Bindings - setmedia

Postby OlivierAubert » 09 Nov 2017 23:58



Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests