INTERACT FORUM

Please login or register.

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

Author Topic: Problems with IVisData::GetTrackInfo  (Read 1615 times)

SteveV

  • Regular Member
  • Recent member
  • *
  • Posts: 37
  • software geek
Problems with IVisData::GetTrackInfo
« on: July 24, 2005, 12:26:43 pm »

I'm writing a screensaver display plugin the orbits lyrics and cover art when in full screen mode.  I've run into a strange problem where GetTrackInfo(TRACK_INFO_FIELDS::FIELD_IMAGEFILE) returns the correct cover art image on the 1st, 3rd, 5th, ... tracks played but returns the default MC Logo.png image every other track.

In other words:  GetTrackInfo(TRACK_INFO_FIELDS::FIELD_IMAGEFILE) is returning the following values:

First Track Played:
C:\DOCUME~1\STEVEV~1\LOCALS~1\Temp\APE Decompressed Cover Art (temp).jpg
(contains correct image)

Second Track Played:
C:\Program Files\J River\Media Center\Data\Default Art\Logo.png

Third Track Played:
C:\DOCUME~1\STEVEV~1\LOCALS~1\Temp\APE Decompressed Cover Art (temp).jpg
(contains correct image)

Forth Track Played:
C:\Program Files\J River\Media Center\Data\Default Art\Logo.png
(contains correct image)

etc.

Here's a very simplified snippet of what I'm doing:

Code: [Select]
HRESULT CScreenSaverControl::OnDrawAdvanced(ATL_DRAWINFO& di)
{
m_pVisData->GetData();

if(m_pVisData->GetVisInfo(VIS_INFO_FIELDS::VIS_DATA_TRACK_CHANGED)
{
CString sImageFile = m_pVisData->GetTrackInfo(TRACK_INFO_FIELDS::FIELD_IMAGEFILE);
TRACE(sImageFile + "\r\n");

CString sLyrics = m_pVisData->GetTrackInfo(TRACK_INFO_FIELDS::FIELD_LYRICS);
DrawCoverArtImage(di.hdcDraw)
DrawLyrics(di.hdcDraw)
}
}


Any thoughts?

Steve
Logged

@l@n

  • Regular Member
  • World Citizen
  • ***
  • Posts: 146
  • bla bla bla, bla bla bla bla
Re: Problems with IVisData::GetTrackInfo
« Reply #1 on: July 24, 2005, 09:28:57 pm »

Steve, I had a simular problem with my aTagger plugin.  I had to make sure that I closed the temp image file (to remove the file lock) so that the temp image file could be updated by MC for the subsequent files.

The documentation isnt clear, but MC reuses the same temp image file for each request.  If you are holding a lock on the temp image file after processing song 1, MC cant populate the temp image file (because it is locked) for song 2.

I hope this helps...  @l@n
Logged
Download the aLyrics plug-in at http://aLyrics.auldridge.biz

SteveV

  • Regular Member
  • Recent member
  • *
  • Posts: 37
  • software geek
Re: Problems with IVisData::GetTrackInfo
« Reply #2 on: July 25, 2005, 08:34:13 am »

Thanks, Alan.

I have run int this a number of times with GDI+.  I should have remembered this was the culprit.

Regards,
Steve
Logged
Pages: [1]   Go Up