Displaying 2 results from an estimated 2 matches for "unit_target".
Did you mean:
init_targets
2009 May 15
0
[PATCH] oggz: limit seeking to specified range
...der (OGGZ * oggz, void * target);
* \param oggz An OGGZ handle previously opened for reading
* \param offset The offset of the start of data
* \returns 0 on success, -1 on failure.
*/
int oggz_set_data_start (OGGZ * oggz, oggz_off_t offset);
/** \}
*/
+/**
+ * Seeks Oggz to time unit_target, but with the bounds of the offset range
+ * [offset_begin, offset_end]. This is useful when seeking in network streams
+ * where only parts of a media are buffered, and retrieving unbuffered
+ * parts is expensive.
+ * \param oggz An OGGZ handle previously opened for reading
+ * \param unit_target...
2009 May 04
1
[PATCH] oggz: inefficient seeking
...uot;
fi
dnl The following configured variables are written into the public header
diff --git a/src/liboggz/oggz_seek.c b/src/liboggz/oggz_seek.c
index c46f0ab..a8c1476 100644
--- a/src/liboggz/oggz_seek.c
+++ b/src/liboggz/oggz_seek.c
@@ -506,9 +506,15 @@ guess (ogg_int64_t unit_at, ogg_int64_t unit_target,
if (unit_at == unit_begin) return offset_begin;
- guess_ratio =
- GUESS_MULTIPLIER * (unit_target - unit_begin) /
- (unit_at - unit_begin);
+ if (unit_end != -1) {
+ guess_ratio =
+ GUESS_MULTIPLIER * (unit_target - unit_begin) /
+ (unit_end - unit_begin);
+ } else {
+...