Changeset 712

Show
Ignore:
Timestamp:
2005-01-23 18:14:31 (4 years ago)
Author:
conrad
Message:

add oggz_set_metric_zero function, to mark header streams more cleanly

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • liboggz/trunk/include/oggz/oggz_seek.h

    r692 r712  
    192192 
    193193/** 
     194 * Specify that a logical bitstream has a constant zero metric. This is used 
     195 * for header bitstreams and signifies that all packets are always at unit 0. 
     196 * \param oggz An OGGZ handle 
     197 * \param serialno Identify the logical bitstream in \a oggz to attach 
     198 * this linear metric to. A value of -1 indicates that the metric should 
     199 * be attached to all unattached logical bitstreams in \a oggz. 
     200 * \returns 0 Success 
     201 * \retval OGGZ_ERR_BAD_SERIALNO \a serialno does not identify an existing 
     202 * logical bitstream in \a oggz. 
     203 * \retval OGGZ_ERR_BAD_OGGZ \a oggz does not refer to an existing OGGZ 
     204 */ 
     205int oggz_set_metric_zero (OGGZ * oggz, long serialno); 
     206 
     207/** 
    194208 * Specify that a logical bitstream has a linear metric 
    195209 * \param oggz An OGGZ handle 
  • liboggz/trunk/src/liboggz/oggz.c

    r710 r712  
    452452} 
    453453 
     454int 
     455oggz_set_metric_zero (OGGZ * oggz, long serialno) 
     456{ 
     457  return oggz_set_metric_linear (oggz, serialno, 0, 1); 
     458} 
     459 
    454460/* 
    455461 * Check if a stream in an oggz has a metric 
  • liboggz/trunk/src/liboggz/oggz_auto.c

    r711 r712  
    200200  if (!op->b_o_s) return 0; 
    201201 
    202   /* Yeah ... set it up with a "linear" metric with numerator 0 :) */ 
    203   oggz_set_metric_linear (oggz, serialno, 0, 1); 
     202  /* Apply a zero metric */ 
     203  oggz_set_metric_zero (oggz, serialno); 
    204204 
    205205  return 1; 
     
    293293 
    294294    /* Finished processing the skeleton; apply a zero metric */ 
    295     oggz_set_metric_linear (oggz, serialno, 0, 1); 
     295    oggz_set_metric_zero (oggz, serialno); 
    296296  } 
    297297