It is currently September 16th, 2024, 8:42 pm

Media Player Plugin

Share and get help with Plugins and Addons
User avatar
sl23
Posts: 1686
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Media Player Plugin

Post by sl23 »

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. :thumbup: :thumbup: :thumbup:
57686174 77696C6C 6265 77696C6C 6265
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Media Player Plugin

Post by Yincognito »

balala wrote: August 11th, 2023, 7:24 pm The key here is on "mentioned settings". Didn't pay too much attention to a small detail, the following one...
Yep, that explains it, indeed. :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Media Player Plugin

Post by Yincognito »

sl23 wrote: August 11th, 2023, 8:21 pm Just to clarify, I need to change all instances of PlayerType with PlayerName is that correct?
Until balala will answer this tomorrow, the general rule is that one should always follow the specifications of what he's using. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16549
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Media Player Plugin

Post by balala »

sl23 wrote: August 11th, 2023, 8:21 pm Just to clarify, I need to change all instances of PlayerType with PlayerName is that correct?
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.
sl23 wrote: August 11th, 2023, 8:21 pm Thanks again for your thoroughness and taking time to test and explain, you're a great asset to this site, both of you.
You're welcome and thanks for the appreciations.
i2002
Posts: 24
Joined: December 6th, 2021, 10:07 am

Re: Media Player Plugin

Post by i2002 »

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.
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.
i2002
Posts: 24
Joined: December 6th, 2021, 10:07 am

Re: Media Player Plugin

Post by i2002 »

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... :thumbup:
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.
i2002
Posts: 24
Joined: December 6th, 2021, 10:07 am

Re: Media Player Plugin

Post by i2002 »

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.
Even though the options given are incorrect, the plugin shouldn't just crash. I'm going to investigate this.

Also, thank you @balala and @Yincognito for your patience in finding the problem.
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Media Player Plugin

Post by Yincognito »

i2002 wrote: August 12th, 2023, 10:49 amAlso, thank you @balala and @Yincognito for your patience in finding the problem.
No problem, this time was more of a lucky thing initially, but if it results in a better plugin, it's all good. :great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16549
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Media Player Plugin

Post by balala »

i2002 wrote: August 12th, 2023, 10:49 am Even though the options given are incorrect, the plugin shouldn't just crash.
Even if it shouldn't, it does, it seems. Not a problem I think, if we know this detail.
i2002 wrote: August 12th, 2023, 10:49 am I'm going to investigate this.
How?
i2002
Posts: 24
Joined: December 6th, 2021, 10:07 am

Re: Media Player Plugin

Post by i2002 »

balala wrote: August 12th, 2023, 11:39 am How?
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.