[xiph-commits] r16392 - in trunk/xiph-qt: . OggImport/src
arek at svn.xiph.org
arek at svn.xiph.org
Sat Aug 1 16:37:40 PDT 2009
Author: arek
Date: 2009-08-01 16:37:40 -0700 (Sat, 01 Aug 2009)
New Revision: 16392
Modified:
trunk/xiph-qt/ChangeLog
trunk/xiph-qt/OggImport/src/stream_flac.c
trunk/xiph-qt/OggImport/src/stream_speex.c
Log:
* OggImport/src/stream_flac.c:
* OggImport/src/stream_speex.c:
Add minimal stub code for Speex and FLAC to not block group base
discovery if used with other streams.
Modified: trunk/xiph-qt/ChangeLog
===================================================================
--- trunk/xiph-qt/ChangeLog 2009-08-01 23:35:30 UTC (rev 16391)
+++ trunk/xiph-qt/ChangeLog 2009-08-01 23:37:40 UTC (rev 16392)
@@ -1,5 +1,12 @@
2009-08-02 Arek Korbik <arkadini at gmail.com>
+ * OggImport/src/stream_flac.c:
+ * OggImport/src/stream_speex.c:
+ Add minimal stub code for Speex and FLAC to not block group base
+ discovery if used with other streams.
+
+2009-08-02 Arek Korbik <arkadini at gmail.com>
+
* OggImport/src/stream_theora.c:
* OggImport/src/stream_vorbis.c:
Use track-based offset as much as possible; add some older Theora
Modified: trunk/xiph-qt/OggImport/src/stream_flac.c
===================================================================
--- trunk/xiph-qt/OggImport/src/stream_flac.c 2009-08-01 23:35:30 UTC (rev 16391)
+++ trunk/xiph-qt/OggImport/src/stream_flac.c 2009-08-01 23:37:40 UTC (rev 16392)
@@ -309,6 +309,7 @@
case kFStateReadingFirstPacket:
// what to do with this one? is it needed at all??
+ // in case with used with video we'll need to calculate page duration like in Theora and Vorbis case - maybe one day...
if (ogg_page_pageno(opg) > 2 && false) {
si->lastGranulePos = ogg_page_granulepos(opg);
dbg_printf("----==< skipping: %llx, %lx\n", si->lastGranulePos, ogg_page_pageno(opg));
@@ -317,6 +318,11 @@
if (si->lastGranulePos < 0)
si->lastGranulePos = 0;
}
+
+ si->baseGranulePos = si->lastGranulePos;
+ si->baseGranulePosFound = true;
+ gp_to_time_subsec(si->rate, si->baseGranulePos, &si->baseGranuleTime, &si->baseGranuleTimeSubSecond);
+
si->si_flac.state = kFStateReadingPackets;
break;
Modified: trunk/xiph-qt/OggImport/src/stream_speex.c
===================================================================
--- trunk/xiph-qt/OggImport/src/stream_speex.c 2009-08-01 23:35:30 UTC (rev 16391)
+++ trunk/xiph-qt/OggImport/src/stream_speex.c 2009-08-01 23:37:40 UTC (rev 16392)
@@ -259,6 +259,7 @@
break;
case kSStateReadingFirstPacket:
+ // FIXME: calculate page duration like in Theora and Vorbis case, one day...
if (ogg_page_pageno(opg) > 2) {
si->lastGranulePos = ogg_page_granulepos(opg);
dbg_printf("----==< skipping: %llx, %lx\n", si->lastGranulePos, ogg_page_pageno(opg));
@@ -267,6 +268,11 @@
if (si->lastGranulePos < 0)
si->lastGranulePos = 0;
}
+
+ si->baseGranulePos = si->lastGranulePos;
+ si->baseGranulePosFound = true;
+ gp_to_time_subsec(si->rate, si->baseGranulePos, &si->baseGranuleTime, &si->baseGranuleTimeSubSecond);
+
si->si_speex.state = kSStateReadingPackets;
break;
More information about the commits
mailing list