Logo Search packages:      
Sourcecode: vcdimager version File versions

uint16_t vcdinfo_lid_get_itemid ( const vcdinfo_obj_t *  obj,
lid_t  lid 
)

Get the item id for a given list ID. VCDINFO_REJECTED_MASK is returned on error or if obj is NULL.

Get the itemid for a given list ID. VCDINFO_REJECTED_MASK is returned on error or if obj is NULL.

Definition at line 813 of file info.c.

References vcdinf_psd_get_itemid(), vcdinfo_lid_get_itemid(), vcdinfo_lid_get_pxd(), and VCDINFO_REJECTED_MASK.

Referenced by vcdinfo_lid_get_itemid().

{
  PsdListDescriptor_t pxd;

  if (obj == NULL) return VCDINFO_REJECTED_MASK;
  vcdinfo_lid_get_pxd(obj, &pxd, lid);
  switch (pxd.descriptor_type) {
  case PSD_TYPE_SELECTION_LIST:
  case PSD_TYPE_EXT_SELECTION_LIST:
    if (pxd.psd == NULL) return VCDINFO_REJECTED_MASK;
    return vcdinf_psd_get_itemid(pxd.psd);
    break;
  case PSD_TYPE_PLAY_LIST:
    /* FIXME: There is an array of items */
  case PSD_TYPE_END_LIST:
  case PSD_TYPE_COMMAND_LIST:
    return VCDINFO_REJECTED_MASK;
  }

  return VCDINFO_REJECTED_MASK;

}


Generated by  Doxygen 1.6.0   Back to index