Logo Search packages:      
Sourcecode: vcdimager version File versions

void vcdinfo_classify_itemid ( uint16_t  itemid_num,
vcdinfo_itemid_t *  itemid 
)

Classify itemid_num into the kind of item it is: track #, entry #, segment #.

Parameters:
itemid is set to contain this classifcation an the converted entry number.
Classify itemid_num into the kind of item it is: track #, entry #, segment #.

Parameters:
itemid is set to contain this classification an the converted entry number.

Definition at line 319 of file info.c.

References vcdinfo_classify_itemid().

Referenced by vcdinfo_classify_itemid(), and vcdinfo_get_multi_default_offset().

{

  itemid->num = itemid_num;
  if (itemid_num < 2) 
    itemid->type = VCDINFO_ITEM_TYPE_NOTFOUND;
  else if (itemid_num < MIN_ENCODED_TRACK_NUM) {
    itemid->type = VCDINFO_ITEM_TYPE_TRACK;
    itemid->num--;
  } else if (itemid_num < 600) {
    itemid->type = VCDINFO_ITEM_TYPE_ENTRY;
    itemid->num -= MIN_ENCODED_TRACK_NUM;
  } else if (itemid_num < MIN_ENCODED_SEGMENT_NUM)
    itemid->type = VCDINFO_ITEM_TYPE_LID;
  else if (itemid_num <= MAX_ENCODED_SEGMENT_NUM) {
    itemid->type = VCDINFO_ITEM_TYPE_SEGMENT;
    itemid->num -= (MIN_ENCODED_SEGMENT_NUM);
  } else 
    itemid->type = VCDINFO_ITEM_TYPE_SPAREID2;
}


Generated by  Doxygen 1.6.0   Back to index