search for: oggz_seek_set

Displaying 2 results from an estimated 2 matches for "oggz_seek_set".

2009 May 15
0
[PATCH] oggz: limit seeking to specified range
...ndex a8c1476..faa08f0 100644 --- a/src/liboggz/oggz_seek.c +++ b/src/liboggz/oggz_seek.c @@ -604,205 +604,182 @@ oggz_offset_end (OGGZ * oggz) if (oggz_io_seek (oggz, offset_save, SEEK_SET) == -1) { return -1; /* fubar */ } } return offset_end; } -static ogg_int64_t -oggz_seek_set (OGGZ * oggz, ogg_int64_t unit_target) +ogg_int64_t +oggz_bounded_seek_set (OGGZ * oggz, + ogg_int64_t unit_target, + ogg_int64_t offset_begin, + ogg_int64_t offset_end) { OggzReader * reader; oggz_off_t offset_orig, offset...
2009 May 04
1
[PATCH] oggz: inefficient seeking
...- unit_begin) / + (unit_end - unit_begin); + } else { + guess_ratio = + GUESS_MULTIPLIER * (unit_target - unit_begin) / + (unit_at - unit_begin); + } #ifdef DEBUG printf ("oggz_seek::guess: guess_ratio %lld = (%lld - %lld) / (%lld - %lld)\n", @@ -657,7 +663,16 @@ oggz_seek_set (OGGZ * oggz, ogg_int64_t unit_target) unit_at = reader->current_unit; unit_begin = 0; - unit_end = -1; + + og = &oggz->current_page; + + if (oggz_seek_raw (oggz, 0, SEEK_END) >= 0) { + ogg_int64_t granulepos; + + if (oggz_get_prev_start_page (oggz, og, &granulepos...