Aw I knew it was something like that! I must've missed a measure defining PlayerType!
Just to clarify, I need to change all instances of PlayerType with PlayerName is that correct?
Thanks again for your thoroughness and taking time to test and explain, you're a great asset to this site, both of you.
It is currently September 19th, 2024, 1:38 am
Media Player Plugin
-
- Posts: 1700
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Media Player Plugin
57686174 77696C6C 6265 77696C6C 6265
-
- Rainmeter Sage
- Posts: 8171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
-
- Rainmeter Sage
- Posts: 8171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Media Player Plugin
Until balala will answer this tomorrow, the general rule is that one should always follow the specifications of what he's using.
-
- Rainmeter Sage
- Posts: 16552
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Media Player Plugin
PlayerName has to be used on NowPlaying measures, to define the player with which the measure(s) should work. It has to be for instance PlayerName=CAD, PlayerName=WMP, or PlayerName=Winamp (these are just three examples, there are a few others as well) or any other supported player. This option, as long as I know and understand, doesn't make sense on MediaPlayer plugin measures. See above why.
PlayerType is used to set what a MediaPlayer plugin measure (or a NowPlaying measure) should return. For instance a such measure, having a PlayerType=Artist option, returns the artist of the just played piece, while another having a PlayerType=Title option returns the title. As you saw, if you set the name of a player on this option onto a MediaPlayer plugin measure, you get Rainmeter crashing. In fact any not-valid value used on this options, crashes Rainmeter immediately. This probably is something related to this plugin, because the same mistake on a NowPlaying measure doesn't cause any trouble.
So, in fact the answer of your question is yes: you have to change all instances of PlayerType with PlayerName.
You're welcome and thanks for the appreciations.
-
- Posts: 24
- Joined: December 6th, 2021, 10:07 am
Re: Media Player Plugin
Yep, that's true. And it's not necessarily an issue with the plugin itself and more with the other applications. Windows provides an API through which the media applications can share status about the playback, but it is up to those applications developers to implement those.Yincognito wrote: ↑August 11th, 2023, 2:21 pm I don't know about the crash, but the position and/or duration seems to be a known issue, depending on what info the player provides to Windows or the API. Check earlier pages for similar reports.
-
- Posts: 24
- Joined: December 6th, 2021, 10:07 am
Re: Media Player Plugin
About that, in the first post it is mentioned that the measure options are similar as the NowPlaying measure from Rainmeter (which has documentation here: https://docs.rainmeter.net/manual/measures/nowplaying/), however the PlayerName option is not supported (as it just uses the Windows10 API, there is nothing to choose). I am going to rephrase that better.sl23 wrote: ↑August 11th, 2023, 8:46 am This skin works for me but doesn't display the progress bar or times.
I've also followed the first post regarding changing Measure=NowPlaying to the Measure=Plugin ; Plugin=MediaPlayer.dll in my own skin, which then crashed Rainmeter! I also removed reference to PlayerType=CAD, just in case it was that causing the crash, but nothing seems to work. Any Ideas?
Do I still use PlayerType=CAD for foobar2000 or not?
Thanks...
-
- Posts: 24
- Joined: December 6th, 2021, 10:07 am
Re: Media Player Plugin
Even though the options given are incorrect, the plugin shouldn't just crash. I'm going to investigate this.balala wrote: ↑August 11th, 2023, 7:24 pm After seeing your post, reading a little bit more carefully sl23's post, I realized what he did: added a PlayerType=CAD option, to some (or all?) plugin measures. When I did the same, Rainmeter instantly crashed. I tried replacing the PlayerType option on all MediaPlayer plugin measures, got Rainmeter crashing. Tried replacing only on one single measure. Got Rainmeter crashing again. So this is the issue: the PlayerType=CAD option does crash Rainmeter, doesn't matter on how many measures is it used.
Also, thank you @balala and @Yincognito for your patience in finding the problem.
-
- Rainmeter Sage
- Posts: 8171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Media Player Plugin
No problem, this time was more of a lucky thing initially, but if it results in a better plugin, it's all good.
-
- Rainmeter Sage
- Posts: 16552
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Media Player Plugin
Even if it shouldn't, it does, it seems. Not a problem I think, if we know this detail.
How?
-
- Posts: 24
- Joined: December 6th, 2021, 10:07 am
Re: Media Player Plugin
Place breakpoints and run the code with the debugger line by line )
It wasn't that hard to find the bug though. It seems that when the player type was unknown I was sending the wrong variable type to the rainmeter logs and it was crashing because of memory access.
I have published a new release on the repo with the fix.