libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
ZPlay::LoadID3Ex Method

Load ID3 extended data from current stream. (ANSI version) Only in version 2.00 and above.

C++
virtual __stdcall int LoadID3Ex(TID3InfoEx * pId3Info, unsigned int fDecodeEmbededPicture) = 0;
Parameters 
Description 
TID3InfoEx * pId3Info 
Pointer to TID3InfoEx structure receiving ID3 data. User must allocate memory for this structure. 
unsigned int fDecodeEmbededPicture 
Set to 1 to decode attached jpeg, png picture to HBITMAP. See Remarks section. 
Return Values 
Description 
All OK. 
Error. To get error message read here

Check supported formats for info tag support. Some formats can support some sort of "Info tags", but not all. 

libZPlay library implements "ID3 tag" interface to different info tags (VORBIS comment, RIFF Info, ...). So, you can retrieve ID3 informations from different streams (mp3, ogg, flac, wav) because library will convert "format specific tag" to ID3 tag info. 

Note:
This function can retrieve attached picture from info tag. If you need to draw this picture on screen, set fDecodeEmbededPicture parameter to 1 to decode attached picture into HBITMAP. Library can decode jpeg and png image. To draw picture on screen use DrawBitmapToHDC or DrawBitmapToHWND with hBitmap member from TID3Picture. If attached image format is not supported by internal image decoder, use PictureData and PictureDataSize members from TID3Picture and decode these data with your own image decoder. Use MIMEType to determine format of attached image (image/gif, image/tiff, ...).
 

 

Load ID3 info from current stream and draw picture on screen. 

ZPlay C++ Class interface  

TID3InfoEx id3_info;
if(instance->LoadID3Ex(&id3_info, 1))
{
  printf("Title:   %s\n", id3_info.Title);
  printf("Artist:  %s\n", id3_info.Artist);
  printf("Album:   %s\n", id3_info.Album);
  printf("Year:    %s\n", id3_info.Year);
  printf("Comment: %s\n", id3_info.Comment);
  printf("Genre:   %s\n", id3_info.Genre);
  printf("Track:   %s\n", id3_info.TrackNum);

  if(id3_info.Picture.CanDrawPicture)
      instance->DrawBitmapToHWND(NULL, 0, 0, 0, 0, id3_info.Picture.hBitmap);
  else
  {
     // can't decode attached image to hBitmap, use PictureData and PictureDataSize
     // to decode this format by your own image decoder
  }
}
Copyright (c) 2010. Zoran Cindori - All rights reserved.

Web: http://libzplay.sourceforge.net/

Email: zcindori@inet.hr