[xiph-commits] r3261 - in liboggplay/trunk: include/oggplay
src/liboggplay
shans at svn.annodex.net
shans at svn.annodex.net
Sun Oct 28 21:38:37 PDT 2007
Author: shans
Date: 2007-10-28 21:38:36 -0700 (Sun, 28 Oct 2007)
New Revision: 3261
Modified:
liboggplay/trunk/include/oggplay/oggplay_reader.h
liboggplay/trunk/src/liboggplay/oggplay_file_reader.c
liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c
Log:
added finished_retrieving functions to file reader, tcp reader and interface
Modified: liboggplay/trunk/include/oggplay/oggplay_reader.h
===================================================================
--- liboggplay/trunk/include/oggplay/oggplay_reader.h 2007-10-29 00:08:25 UTC (rev 3260)
+++ liboggplay/trunk/include/oggplay/oggplay_reader.h 2007-10-29 04:38:36 UTC (rev 3261)
@@ -55,6 +55,7 @@
ogg_int64_t current_bytes,
ogg_int64_t current_time);
int (*duration)(struct _OggPlayReader *me);
+ int (*finished_retrieving)(struct _OggPlayReader *me);
/* low-level io functions for oggz */
size_t (*io_read)(void *user_handle, void *buf, size_t n);
Modified: liboggplay/trunk/src/liboggplay/oggplay_file_reader.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_file_reader.c 2007-10-29 00:08:25 UTC (rev 3260)
+++ liboggplay/trunk/src/liboggplay/oggplay_file_reader.c 2007-10-29 04:38:36 UTC (rev 3261)
@@ -90,6 +90,14 @@
}
+int
+oggplay_file_reader_finished_retrieving(OggPlayReader *opr) {
+
+ return 1;
+
+}
+
+
static size_t
oggplay_file_reader_io_read(void * user_handle, void * buf, size_t n) {
@@ -136,6 +144,7 @@
me->functions.initialise = &oggplay_file_reader_initialise;
me->functions.destroy = &oggplay_file_reader_destroy;
me->functions.available = &oggplay_file_reader_available;
+ me->functions.finished_retrieving = &oggplay_file_reader_finished_retrieving;
me->functions.seek = NULL;
me->functions.io_read = &oggplay_file_reader_io_read;
me->functions.io_seek = &oggplay_file_reader_io_seek;
Modified: liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c 2007-10-29 00:08:25 UTC (rev 3260)
+++ liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c 2007-10-29 04:38:36 UTC (rev 3261)
@@ -624,6 +624,13 @@
return len;
}
+int
+oggplay_tcp_reader_finished_retrieving(OggPlayReader *opr) {
+ OggPlayTCPReader *me = (OggPlayTCPReader *)opr;
+ return (me->socket == INVALID_SOCKET);
+}
+
+
static int
oggplay_tcp_reader_io_seek(void * user_handle, long offset, int whence) {
@@ -670,6 +677,7 @@
me->functions.seek = NULL;
me->functions.available = &oggplay_tcp_reader_available;
me->functions.duration = &oggplay_tcp_reader_duration;
+ me->functions.finished_retrieving = &oggplay_tcp_reader_finished_retrieving;
me->functions.io_read = &oggplay_tcp_reader_io_read;
me->functions.io_seek = &oggplay_tcp_reader_io_seek;
me->functions.io_tell = &oggplay_tcp_reader_io_tell;
More information about the commits
mailing list