Difference between revisions of "Media Identifiers"

From LinuxMCE
Jump to: navigation, search
(Imported document)
 
(beautification plus link to media_plugin details)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<table width="100%"> <tr><td bgcolor="#FFCFCF">This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007.  In general any information should apply to LinuxMCE.  However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.</td></tr> </table><p>Whenever media is detected, the Media Plugin will send an "Identify Media" command to all devices with the category "Media Identifier" on the same computer as the drive that detected the media.  The device must respond by filling in the out parameter "ID" with an XML document describing the media.</p><br>
+
Whenever media is detected, the [[Media_Plugin]] will send an "Identify Media" command to all devices with the category "Media Identifier" on the same computer as the drive that detected the media.  The device must respond by filling in the out parameter "ID" with an XML document describing the media.
<p>The XML file must have the following tags:</p>
+
<p>
+
<?xml version="1.0" encoding="ISO-8859-1" ?>
+
  <Possibility="X">Description<br>
+
  <Filename>X</Filename>
+
  <Picture format="jpg">X</Picture>
+
  <PK_AttributeType="X">Value of attribute</PK_Attribute><br>
+
  <Item="X"><br>
+
    <PK_AttributeType="X">Value of attribute</PK_Attribute><br>
+
  
 +
The XML file must have the following tags:
 +
<?xml version="1.0" encoding="ISO-8859-1" ?>
 +
  <Possibility="X">Description<br>
 +
  <Filename>X</Filename>
 +
  <Picture format="jpg">X</Picture>
 +
  <PK_AttributeType="X">Value of attribute</PK_Attribute><br>
 +
  <Item="X"><br>
 +
    <PK_AttributeType="X">Value of attribute</PK_Attribute><br> 
 
   </Item>
 
   </Item>
</Possibility></p>
+
</Possibility></p>
</xml>
+
</xml>
<br><p>If the device has only detected 1 possible match for the media, "Possibility" is an optional tag.  Otherwise, X should be a ranking of 0-10 on the likelihood of a positive match, where 10 is a definite match--don't even ask the user--and 0 is a generic match to be used only if there no other matches.  All other possible matches will be presented to the user with the highest ranked (ie 9) listed first.  Description is a short description for the user.</p>
+
If the device has only detected 1 possible match for the media, "Possibility" is an optional tag.  Otherwise, X should be a ranking of 0-10 on the likelihood of a positive match, where 10 is a definite match--don't even ask the user--and 0 is a generic match to be used only if there no other matches.  All other possible matches will be presented to the user with the highest ranked (ie 9) listed first.  Description is a short description for the user.
<p>Each of the attributes, as defined in the Attribute table in pluto_media, is listed, where X is the ID of the attribute.  Item tags represent the individual tracks or chapters, where X is the numeric ID, like 1, 2, 3 for tracks 1, 2 and 3.  When the user wants to jump to a particular item the Jump to Position in Playlist command will be sent with the ID.</p>
+
<p>PK_AttributeType tags within an Item tag are associated with the item, those outside an Item tag with the disc.  The Filename and Picture tags are optional.  If a filename tag exists within an Item tag, then the Item, if saved, will be saved under that filename.  This is useful for tracks in a CD.  If a Filename tag is specified outside an item tag, then the entire disc will be saved under that file, such as a DVD.  Picture tags can be within the tags Possibility, Filename, or Item.  The picture will be assocated with whatever tag it is within.  The contents of the picture, ie X, should be the picture UU encoded.</p>
+
  
 +
Each of the attributes, as defined in the Attribute table in pluto_media, is listed, where X is the ID of the attribute.  Item tags represent the individual tracks or chapters, where X is the numeric ID, like 1, 2, 3 for tracks 1, 2 and 3.  When the user wants to jump to a particular item the Jump to Position in Playlist command will be sent with the ID.
 +
 +
PK_AttributeType tags within an Item tag are associated with the item, those outside an Item tag with the disc.  The Filename and Picture tags are optional.  If a filename tag exists within an Item tag, then the Item, if saved, will be saved under that filename.  This is useful for tracks in a CD.  If a Filename tag is specified outside an item tag, then the entire disc will be saved under that file, such as a DVD.  Picture tags can be within the tags Possibility, Filename, or Item.  The picture will be associated with whatever tag it is within.  The contents of the picture, ie X, should be the picture UUencoded.
 +
 +
[[Category: Programmer's Guide]]

Latest revision as of 21:34, 17 May 2010

Whenever media is detected, the Media_Plugin will send an "Identify Media" command to all devices with the category "Media Identifier" on the same computer as the drive that detected the media. The device must respond by filling in the out parameter "ID" with an XML document describing the media.

The XML file must have the following tags:

<?xml version="1.0" encoding="ISO-8859-1" ?> 
  <Possibility="X">Description
<Filename>X</Filename> <Picture format="jpg">X</Picture> <PK_AttributeType="X">Value of attribute</PK_Attribute>
<Item="X">
<PK_AttributeType="X">Value of attribute</PK_Attribute>
</Item> </Possibility></p> </xml>

If the device has only detected 1 possible match for the media, "Possibility" is an optional tag. Otherwise, X should be a ranking of 0-10 on the likelihood of a positive match, where 10 is a definite match--don't even ask the user--and 0 is a generic match to be used only if there no other matches. All other possible matches will be presented to the user with the highest ranked (ie 9) listed first. Description is a short description for the user.

Each of the attributes, as defined in the Attribute table in pluto_media, is listed, where X is the ID of the attribute. Item tags represent the individual tracks or chapters, where X is the numeric ID, like 1, 2, 3 for tracks 1, 2 and 3. When the user wants to jump to a particular item the Jump to Position in Playlist command will be sent with the ID.

PK_AttributeType tags within an Item tag are associated with the item, those outside an Item tag with the disc. The Filename and Picture tags are optional. If a filename tag exists within an Item tag, then the Item, if saved, will be saved under that filename. This is useful for tracks in a CD. If a Filename tag is specified outside an item tag, then the entire disc will be saved under that file, such as a DVD. Picture tags can be within the tags Possibility, Filename, or Item. The picture will be associated with whatever tag it is within. The contents of the picture, ie X, should be the picture UUencoded.