Re: Retrieve currently playing songs' lyrics and other questions!

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Windy (windy_at_smartbarxp.com)
Date: 01/08/05


Date: Sat, 8 Jan 2005 19:47:42 -0000

Hiya,

Thanks very much for your advice. I simplified it to:

  // Get the lyrics
  bstrType = _T("Lyrics");
  hr = pMedia->getItemInfo(bstrType, &bstrLyrics);
  if (SUCCEEDED(hr))
  {
       MessageBox(OLE2T(bstrLyrics));
  }
  else
  {
       MessageBox(_T("Failed to get artist information from media."),
_T("Warn"), MB_OK | MB_ICONWARNING);
  }

and all worked well. Now that I have these lyrics, I'd like to "flush" them
to the hard drive. I.E., take the metadata from the library and write it to
the physical mp3 file. I've done some sniffing around, and apparently I have
to open the song with the metadata editor object, and then call the Flush()
method. However, I've tried declaring the IWMMetadataEditor object, but I
get the following error:

error C2065: 'IWMMetadataEditor' : undeclared identifier

Which header file do I need to declare? None of them seem to define
IWMMetadataEditor!

Thanks very much for any help,

Windy

"Jim Travis [ms]" <jtravis@online.microsoft.com> wrote in message
news:ONeZMeU9EHA.2112@TK2MSFTNGP14.phx.gbl...
> Actor and Artist are valid aliases for Author.
>
> http://msdn.microsoft.com/library/en-us/wmplay10/mmp_sdk/authorattribute.asp
>
> In any event, using an invalid attribute name shouldn't crash the Player,
> it should just return a failure HR. Look for something else going on
> there.
>
> For instance, perhaps bstrArtist is returning a NULL value and OLE2T is
> throwing an exception? Just a guess...
>
> --
> Jim Travis
> Microsoft Corp.
> Windows Media Player SDK
>
> Download:
> http://msdn.microsoft.com/library/default.asp?url=/downloads/list/winmedia.asp
>
> Latest online:
> http://msdn.microsoft.com/library/en-us/wmplay10/mmp_sdk/windowsmediaplayer10sdk.asp
>
> Please do not send email directly to this alias as this alias is for
> newsgroup purposes only. This posting is provided "AS IS" with no
> warranties, and confers no rights. You assume all risk for your use. ©
> 2004
> Microsoft Corporation. All rights reserved.
>
> "Windy" <windy@smartbarxp.com> wrote in message
> news:%23TTEcFR9EHA.4004@tk2msftngp13.phx.gbl...
>> Dear Sirs,
>>
>> I'm very very new to creating windows media player (10) plugins - in fact
>> I started only today! Other than this newsgroup and the Microsoft SDK
>> documentation, there seems to be next to no information/examples about
>> creating said plugins. If anyone knows of any web pages I might browse
>> related to the subject I'd be very grateful.
>>
>> On to the main thrust of this post, I have posted below the LaunchPage
>> method from the SDK UI plugin example:
>>
>> void LaunchPage(IWMPMedia *pMedia)
>> {
>> USES_CONVERSION;
>>
>> HRESULT hr;
>> CComBSTR bstrType;
>> CComBSTR bstrArtist;
>>
>> // Get the name of the artist.
>> bstrType = _T("artist");
>> hr = pMedia->getItemInfo(bstrType, &bstrArtist);
>> if (SUCCEEDED(hr))
>> {
>> // Create the search URL.
>> TCHAR szSearch[MAX_PATH];
>> _stprintf(szSearch, _T("http://www.google.co.uk/search?hl=en&q=%s"),
>> OLE2T(bstrArtist));
>> CComBSTR bstrURL = szSearch;
>> // Launch the search page.
>> m_pPlugin->m_spCore->launchURL(bstrURL);
>> }
>> else
>> {
>> MessageBox(_T("Failed to get artist information from media."),
>> _T("Warn"), MB_OK | MB_ICONWARNING);
>> }
>> }
>>
>> I'm trying to slowly make changes to this function so that I can get a
>> feel for the whole plugin scenario. What I'd like to do is use that
>> method to simply display a MessageBox with the songs Lyrics - not the
>> artist name as is retrieved at the mo. I changed
>>
>> bstrType = _T("artist");
>> to
>> bstrType = _T("lyrics");
>>
>> but this just causes the player to crash! I had a look in the attribute
>> reference and couldn't even find a type of type "artist"! Could someone
>> gently explain how I might get the desired result (My C++ isn't so hot
>> either, although I've been programming in other languages for years).
>>
>> Thanks for any help,
>>
>> Windy
>>
>>
>
>



Relevant Pages

  • Re: WMP 11 has crashed and i cant re-install it!! PLEASE HELP!!
    ... This isn't something that the player team could fix themselves. ... I know that the problem is at a much higher level in Microsoft than ... concerning high level decisions concerning the WMP. ... concerning movies they rent. ...
    (microsoft.public.windowsmedia.player)
  • Re: CREATIVE ZEN NOT RECOGNIZED
    ... Microsoft or Creative See anser 3 below. ... The MTP that the player use to communicate ... Creative Customer Support Services ... unitll SP3 installation. ...
    (microsoft.public.windowsxp.hardware)
  • Re: FTC Complaint filed
    ... used by Microsoft to load DRM, Media Connect, and WMP11. ... make Real your primary player. ... Real wants to sell you downloads just as do Microsoft and many other ... IE is ONLY used for Windows Updates. ...
    (microsoft.public.windowsmedia.player)
  • Re: FTC Complaint filed
    ... used by Microsoft to load DRM, Media Connect, and WMP11. ... make Real your primary player. ... Real wants to sell you downloads just as do Microsoft and many other ... IE is ONLY used for Windows Updates. ...
    (microsoft.public.windowsmedia.player)
  • Re: FTC Complaint filed
    ... used by Microsoft to load DRM, Media Connect, and WMP11. ... make Real your primary player. ... Real wants to sell you downloads just as do Microsoft and many other ...
    (microsoft.public.windowsmedia.player)