[cvs-annodex] commit (/annodex):
libannodex/trunk/src/importers/anx_import_anx.c
libannodex/trunk/src/importers/anx_import_ogg.c
conrad
nobody at lists.annodex.net
Tue Sep 14 20:57:09 EST 2004
Update of /annodex (new revision 572)
Modified files:
libannodex/trunk/src/importers/anx_import_anx.c
libannodex/trunk/src/importers/anx_import_ogg.c
Log Message:
check for seek_updates in packet lookahead in anx and ogg importers
Modified: libannodex/trunk/src/importers/anx_import_anx.c
===================================================================
--- libannodex/trunk/src/importers/anx_import_anx.c 2004-09-14 01:08:06 UTC (rev 571)
+++ libannodex/trunk/src/importers/anx_import_anx.c 2004-09-14 10:57:09 UTC (rev 572)
@@ -357,6 +357,24 @@
}
static long
+anxanx_read_update (AnxSource * media)
+{
+ AnxAnxData * aad = (AnxAnxData *)media->custom_data;
+
+ do_read:
+
+ while ((aad->media_packets == NULL) &&
+ (anx_read (aad->anx_reader, 1024)) > 0);
+
+ if (aad->need_seek && aad->nr_headers_remaining == 0) {
+ anxanx_seek_update (media);
+ goto do_read;
+ }
+
+ return 0;
+}
+
+static long
anxanx_read (AnxSource * media, char * buf, long n, long bound)
{
AnxAnxData * aad = (AnxAnxData *)media->custom_data;
@@ -370,6 +388,7 @@
return 0;
}
+#if 0
do_read:
while ((aad->media_packets == NULL) &&
@@ -379,6 +398,9 @@
anxanx_seek_update (media);
goto do_read;
}
+#else
+ anxanx_read_update (media);
+#endif
if (aad->media_packets == NULL) {
media->eos = 1;
@@ -408,8 +430,12 @@
aad->current_offset = 0;
+#if 0
while ((aad->media_packets == NULL) &&
(anx_read (aad->anx_reader, 1024)) > 0);
+#else
+ anxanx_read_update (media);
+#endif
if (aad->media_packets != NULL)
aam = (AnxAnxSource *)aad->media_packets->data;
Modified: libannodex/trunk/src/importers/anx_import_ogg.c
===================================================================
--- libannodex/trunk/src/importers/anx_import_ogg.c 2004-09-14 01:08:06 UTC (rev 571)
+++ libannodex/trunk/src/importers/anx_import_ogg.c 2004-09-14 10:57:09 UTC (rev 572)
@@ -338,6 +338,23 @@
}
static long
+anxogg_read_update (AnxSource * media)
+{
+ AnxOggData * aod = (AnxOggData *)media->custom_data;
+
+ do_read:
+
+ while ((aod->media_packets == NULL) && (oggz_read (aod->oggz, 1024)) != 0);
+
+ if (aod->need_seek && aod->nr_headers_remaining == 0) {
+ anxogg_seek_update (media);
+ goto do_read;
+ }
+
+ return 0;
+}
+
+static long
anxogg_read (AnxSource * media, char * buf, long n, long bound)
{
AnxOggData * aod = (AnxOggData *)media->custom_data;
@@ -346,6 +363,7 @@
if (aod->ignore_media) return -1;
+#if 0
do_read:
while ((aod->media_packets == NULL) && (oggz_read (aod->oggz, 1024)) != 0);
@@ -354,6 +372,9 @@
anxogg_seek_update (media);
goto do_read;
}
+#else
+ anxogg_read_update (media);
+#endif
if (aod->media_packets == NULL) {
media->eos = 1;
@@ -393,8 +414,12 @@
anx_free (aam);
aod->current_offset = 0;
-
+
+#if 0
while ((aod->media_packets == NULL) && (oggz_read (aod->oggz, 1024)) != 0);
+#else
+ anxogg_read_update (media);
+#endif
if (aod->media_packets != NULL)
aam = (AnxOggMedia *)aod->media_packets->data;
--
conrad
More information about the cvs-annodex
mailing list