WMPTSE API: Difference between revisions

From Hydrogenaudio Knowledgebase
Line 23: Line 23:


  struct stTagItem
  struct stTagItem
  {/** memory container for a Tag */
  {
  char * MetaTagWMPKey; /** the MediaLibrary attribute's name */
  char * MetaTagWMPKey; /** the MediaLibrary attribute's name */
LPTSTR MetaTagValue; /** the value to set */
LPTSTR MetaTagValue; /** the value to set */
  };
  };
  #define TAGITEM struct stTagItem
  #define TAGITEM struct stTagItem
Line 32: Line 32:


  struct stMetaTag
  struct stMetaTag
  {/** memory container for a list of Tags */
  {
  UINT uiNbItems; /** number of list tags */
  UINT uiNbItems; /** number of list tags */
LPTAGITEM tagiItems; /** pointer to array of pointer to tag items */
LPTAGITEM tagiItems; /** pointer to array of pointer to tag items */
  };
  };
  #define METATAG struct stMetaTag
  #define METATAG struct stMetaTag
  typedef struct stMetaTag * LPMETATAG;
  typedef struct stMetaTag * LPMETATAG;

Revision as of 11:43, 9 November 2006

The WMPTSE API is the interface between the WMPTSE plug-in and its "tag support dll".

A tag support dll give WMPTSE the ability to add support of a tag format in Windows Media Player. With the this "tag support dll" properly installed, files tagged with its format are readable inside WMP.


API

Every WMPTSE API application must export two function (c standard call):

BOOL Read<TagFormat>Tag( LPTSTR lpstrFileFullPath, METATAG * pMetaTag )

BOOL Write<TagFormat>Tag( LPTSTR lpstrFileFullPath, TAGITEM tagiChangedItem )

<TagFormat> will be the name of the corresponding tag format (APE, Vorbis, MPEG4). It will be search by WMPTSE during the load process.


Definition

All types and definition are declared in WMPTSE.h. It is simple to developper to just include it at first.

For reading purpose, we will expose the necessary structure definition here.

struct stTagItem											
{
	char *	MetaTagWMPKey;	/** the MediaLibrary attribute's name */
	LPTSTR	MetaTagValue;	/** the value to set */
};
#define TAGITEM struct stTagItem		
typedef struct stTagItem * LPTAGITEM;				


struct stMetaTag
{
	UINT	uiNbItems;	/** number of list tags */
	LPTAGITEM tagiItems;	/** pointer to array of pointer to tag items */
};
#define METATAG struct stMetaTag
typedef struct stMetaTag * LPMETATAG;