INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Anyone uses Rainmeter?  (Read 2930 times)

maxxsid

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 865
Anyone uses Rainmeter?
« on: September 26, 2013, 02:06:19 am »

I just upgraded to MC 19. Soita skin for Rainmeter stopped working (it shows the album art plus playback controls for MC in Rainmeter shell). Worked/works with MC18. It uses "CAD plugin" for MC - I have no idea what it is...

?

_max
Logged

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1587
Re: Anyone uses Rainmeter?
« Reply #1 on: September 26, 2013, 07:00:01 am »

Yep.
There's an updated plugin on the MC 18 board somewhere (1.01) which you need for late MC 18 onwards. Try searching for Poiru's posts.

-Leezer-
Logged

maxxsid

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 865
Re: Anyone uses Rainmeter?
« Reply #2 on: September 26, 2013, 09:15:05 am »

I didn't know that the plugin was MC instance specific. Found the updated version. Works now. Thanks much!
Logged

maxxsid

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 865
Re: Anyone uses Rainmeter?
« Reply #3 on: September 26, 2013, 09:55:15 am »

hmm... now Rainmeter does show the cover art but MC doesn't!
MC show the cover for the first item in the playlist but it wouldn't refresh for any subsequent tracks - the display says - "The display for this zone is owned by a different window"...
?
Logged

maxxsid

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 865
Re: Anyone uses Rainmeter?
« Reply #4 on: September 26, 2013, 10:13:43 am »

installed older version of the plugin (1.0.0) - works fine! (so far)
Logged

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1587
Re: Anyone uses Rainmeter?
« Reply #5 on: September 27, 2013, 05:09:32 pm »

All I can tell you is that I've got no issues with 1.01 here. It's in use on a daily basis, so I hope I'd notice any major issues quite quickly.
1.0 crashes in certain circumstances, to do with deleting files from the library primarily, so I wouldn't recommend you run it :)

Let me have some specifics of what you're trying to do and if I can reproduce it, I can poke Poiru again  :P
You might want to try a full uninstall and reinstall and see if that helps matters.

-Leezer-
Logged

maxxsid

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 865
Re: Anyone uses Rainmeter?
« Reply #6 on: October 10, 2013, 12:37:56 am »

It stopped working again a couple of days ago...
Now neither version of the plugin works.
I am not doing anything special, just using Soita skin for Rainmeter - it has album art, Title/Artist/Album, progress bar and playback controls.

-- Album art is only shown for the first track played after MC is just started. Doesn't get refreshed afterwards.
-- Same for Title/Artist/Album
-- Progress bar works
-- playback controls work but the play button only acts as Pause
-- if I do manual Refresh Skin in Rainmeter - it does get refreshed.

I am on 19.0.55...
Installed 15.0.49 - all works
Installed 15.0.50 - doesn't work

Let's see...

Code: [Select]
19.0.50 (10/2/2013)

1. NEW: Added View > Size option to resize Standard View (only works well with some skins; Noire recommended).
2. Changed: Memory playback automatically disengages when using Audio Calibration for Tools > Advanced Tools (since audio calibration clips will play forever until stopped).
3. Changed: Audio Calibration clips always use gapless track transitions (instead of possibly gapping or fading based on user options).
4. SDK: Skin items can specify a Scale attribute so that high resolution images can be used (ie. Scale="2.0" for a double resolution image).
5. Fixed: When watching an on-going television recording in transport stream (.ts) format, not all of the already recorded portion was shown, if the portion was longer than the pre-set time-shifting window.
6. Fixed: ATI HDTVWonder tuner would not record in transport stream format.
7. Changed: DSD encoding targets a slightly more conservative volume level (by about 1.6dB) so that it works better with Sabre-based DACs (and possibly others).
8. Fixed: Clicking 'Exit' in Theater View with the mouse would not show the dialog with the last couple builds.

I don't see anything there which could break the plugin...
?

Logged

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1587
Re: Anyone uses Rainmeter?
« Reply #7 on: October 10, 2013, 06:20:59 am »

From a brief poke, it looks like MC isn't posting COM messages on state change. MC bug I think, although I don't understand the code too well.

(MC should push a COM message every time something; Track etc. changes. Forcing a refresh through Rainmeter causes the plugin to directly ask MC for updated data)

Matt......

-Leezer-
Logged

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1587
Re: Anyone uses Rainmeter?
« Reply #8 on: October 10, 2013, 06:34:26 am »

As a further note, I've performed a basic test of this by adding a breakpoint to the start of the int_cad track information call:
Code: [Select]
void CJrPlugin::SendTrackInfo()
{
CComPtr<IMJCurPlaylistAutomation> playlist = c_MjObject->GetCurPlaylist();
if (!playlist) return;

CComPtr<IMJFileAutomation> file = playlist->GetFile(playlist->Position);
if (!file) return;

WCHAR buffer[2048];
int len = _snwprintf_s(
buffer,
_TRUNCATE,
L"%s\t%s\t%s\t%s\t%ld\t\t%ld\t%u\t%s\t%ld\t%s\t\t\t\t\t\t\t%ld",
(WCHAR*)file->Name,
(WCHAR*)file->Artist,
(WCHAR*)file->Album,
(WCHAR*)file->Genre,
file->Year,
file->Tracknumber,
(UINT)file->Duration,
(WCHAR*)file->Filename,
file->Rating * 2,
(WCHAR*)file->GetImageFile(IMAGEFILE_DISPLAY_NO_DEFAULT),
file->Bitrate);

COPYDATASTRUCT cds;
cds.cbData = (len + 1) * sizeof(WCHAR);
cds.dwData = IPC_CURRENT_TRACK_NOTIFICATION;
cds.lpData = (PVOID)&buffer;
::SendMessage(c_CadWindow, WM_COPYDATA, (WPARAM)c_Window, (LPARAM)&cds);
}

This should be being called every time the plugin is notified of a state change via COM, but it isn't. The only time this is getting called is when a manual refresh of the skin is selected in Rainmeter, and it deliberately asks for the information rather than waiting for the state change message.
Rolling back to .49 and this is called as expected every time the player state changes.

-Leezer-
Logged

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1587
Re: Anyone uses Rainmeter?
« Reply #9 on: October 17, 2013, 05:28:49 pm »

Further notes-
I've been doing a little more digging, and it seems to me that MC is not passing the PLAYER_INFO_CHANGE_PLAYING_FILE message over the COM interface.

Adding a breakpoint to the code where it recieves this broadcast message never gets called above build 50.

-Leezer-
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42344
  • Shoes gone again!
Re: Anyone uses Rainmeter?
« Reply #10 on: October 17, 2013, 05:45:55 pm »

Thanks for debugging.  I'll try to figure this out tomorrow.
Logged
Matt Ashland, JRiver Media Center

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1587
Re: Anyone uses Rainmeter?
« Reply #11 on: October 17, 2013, 05:55:34 pm »

I just wish it was C#  :D
C++ may be more powerful, but I much prefer a language where I don't even have to think about pointers or call stacks :-X

Vagskal was also complaining about issues with the Last.FM plugin in the build 56 thread, which makes me even more suspicious of this being an MC bug.

-Leezer-
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42344
  • Shoes gone again!
Re: Anyone uses Rainmeter?
« Reply #12 on: October 18, 2013, 02:30:33 pm »

Rainmeter registers to receive MCC window messages using pMJ->RegisterWindowWithRouter(...).

From what I can see, MC is sending a message to it on track change (WM_MC_COMMAND, MCC_NOTIFY_PLAYER_INFO_CHANGED with parameter PLAYER_INFO_CHANGE_PLAYING_FILE).

Can you step it in the debugger and see if you're getting this message?
Logged
Matt Ashland, JRiver Media Center

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1587
Re: Anyone uses Rainmeter?
« Reply #13 on: October 18, 2013, 02:59:15 pm »

Not receiving the message at all as far as I can see :(
I've also now tried a breakpoint just after it enters the MC broadcast message function:
Quote
   else if (uMsg == WM_MC_COMMAND)   // JRiver broadcast message
   {
breakpoint
      switch (wParam)
      {
      case MCC_NOTIFY_PLAYER_INFO_CHANGED:
         {
            if (lParam & PLAYER_INFO_CHANGE_PLAYER_STATE)
            {
               CComPtr<IMJPlaybackAutomation> playback = c_MjObject->GetPlayback();
               WPARAM state = 0;
               if (playback->State == PLAYSTATE_PLAYING || playback->State == PLAYSTATE_WAITING)
               {
                  state = 1;
               }
               else if (playback->State == PLAYSTATE_PAUSED)
               {
                  state = 2;
               }
               ::SendMessage(c_CadWindow, WM_USER, state, IPC_STATE_CHANGED_NOTIFICATION);
            }
            else if (lParam & PLAYER_INFO_CHANGE_VOLUME)
            {
               CComPtr<IMJMixerAutomation> mixer = c_MjObject->GetMJMixer();
               ::SendMessage(c_CadWindow, WM_USER, (WPARAM)mixer->Volume, IPC_VOLUME_CHANGED_NOTIFICATION);
            }
            else if (lParam & PLAYER_INFO_CHANGE_PLAYING_FILE)
            {
               SendTrackInfo();
            }
         }
         break;

      case MCC_NOTIFY_PLAYBACK_OPTIONS_CHANGED:
         {
            CComPtr<IMJCurPlaylistAutomation> playlist = c_MjObject->GetCurPlaylist();
            if (playlist)
            {
               ::SendMessage(c_CadWindow, WM_USER, (WPARAM)(playlist->Continuous != VARIANT_FALSE), (LPARAM)IPC_REPEAT_CHANGED_NOTIFICATION);
               ::SendMessage(c_CadWindow, WM_USER, (WPARAM)(playlist->Shuffle != VARIANT_FALSE), (LPARAM)IPC_SHUFFLE_CHANGED_NOTIFICATION);
            }
         }
         break;

      case MCC_UPDATE:
         if (lParam & MCC_UPDATE_FLAG_FILE_PROPERTIES)
         {
            SendTrackInfo();
         }
         break;
      }

      return 0;
   }

   return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
}

AFAIK, this ought to break as soon as you broadcast anything. I'm reinstalling .49 at the moment to see where it breaks :)

-Leezer-
Logged

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1587
Re: Anyone uses Rainmeter?
« Reply #14 on: October 18, 2013, 03:10:15 pm »

So, this is what I'm seeing.
19.0.49 sends a MCC_NOTIFY_PLAYER_INFO_CHANGED immediately on playback startup.

19.0.50 onwards doesn't appear to be sending this, so it's not getting as far as asking for the track information :)
The test breakpoint from my case above hits almost instantly on the debugger being activated, so MC is sending at least some MCC window messages.

-Leezer-
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42344
  • Shoes gone again!
Re: Anyone uses Rainmeter?
« Reply #15 on: October 18, 2013, 05:30:16 pm »

Thanks for the help.  That got me right to the issue.  Some of the MCC notification messages had gotten accidentally shifted by one, causing problems with third party things.

However, next build will add native CD Art Display support.  I'll post in more detail later.  Thanks to poiru for his work here.
Logged
Matt Ashland, JRiver Media Center

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1587
Re: Anyone uses Rainmeter?
« Reply #16 on: October 18, 2013, 05:42:18 pm »

Wonderful  ;D

Much appreciated.

-Leezer-
Logged

maxxsid

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 865
Re: Anyone uses Rainmeter?
« Reply #17 on: October 22, 2013, 12:51:35 am »

All works in 19.0.59. Thanks much!
Logged
Pages: [1]   Go Up