[xiph-commits] r3322 - in liboggz/trunk: include/oggz src/liboggz
conrad at svn.annodex.net
conrad at svn.annodex.net
Mon Jan 7 16:46:10 PST 2008
Author: conrad
Date: 2008-01-07 16:46:09 -0800 (Mon, 07 Jan 2008)
New Revision: 3322
Modified:
liboggz/trunk/include/oggz/oggz_constants.h
liboggz/trunk/src/liboggz/Makefile.am
liboggz/trunk/src/liboggz/oggz.c
liboggz/trunk/src/liboggz/oggz_private.h
liboggz/trunk/src/liboggz/oggz_read.c
Log:
revert broken commit r3320. That code has been branched into:
http://svn.annodex.net/liboggz/branches/read-skeleton
Modified: liboggz/trunk/include/oggz/oggz_constants.h
===================================================================
--- liboggz/trunk/include/oggz/oggz_constants.h 2008-01-08 00:37:31 UTC (rev 3321)
+++ liboggz/trunk/include/oggz/oggz_constants.h 2008-01-08 00:46:09 UTC (rev 3322)
@@ -70,21 +70,8 @@
/**
* Suffix
*/
- OGGZ_SUFFIX = 0x80,
+ OGGZ_SUFFIX = 0x80
- /**
- * Construct skeleton packets if none are present in the stream. This
- * operates as a filter both on reading existing streams and on writing
- * new streams.
- */
- OGGZ_CONSTRUCT_SKELETON = 0x100,
-
- /**
- * Correct skeleton packets if they are present (but incorrect) in the
- * stream. This operates as a filter both on reading existing streams and
- * on writing new streams.
- */
- OGGZ_CORRECT_SKELETON = 0x200
};
enum OggzStopCtl {
Modified: liboggz/trunk/src/liboggz/Makefile.am
===================================================================
--- liboggz/trunk/src/liboggz/Makefile.am 2008-01-08 00:37:31 UTC (rev 3321)
+++ liboggz/trunk/src/liboggz/Makefile.am 2008-01-08 00:46:09 UTC (rev 3322)
@@ -19,7 +19,6 @@
oggz_table.c \
oggz_vector.c oggz_vector.h \
oggz_dlist.c oggz_dlist.h \
- oggz_skeleton.c oggz_skeleton.h \
metric_internal.c
liboggz_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ @SHLIB_VERSION_ARG@
Modified: liboggz/trunk/src/liboggz/oggz.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz.c 2008-01-08 00:37:31 UTC (rev 3321)
+++ liboggz/trunk/src/liboggz/oggz.c 2008-01-08 00:46:09 UTC (rev 3322)
@@ -82,14 +82,6 @@
if (oggz == NULL) return NULL;
oggz->flags = flags;
- /** DEBUGGING HACK SGS **/
- // oggz->flags |= OGGZ_CONSTRUCT_SKELETON;
- /** END DEBUGGING HACK **/
-
- /* need auto-identify to construct skeleton */
- if (oggz->flags & OGGZ_CONSTRUCT_SKELETON) {
- oggz->flags |= OGGZ_AUTO;
- }
oggz->file = NULL;
oggz->io = NULL;
@@ -109,17 +101,8 @@
oggz->order = NULL;
oggz->order_user_data = NULL;
- if (oggz->flags & OGGZ_AUTO) {
- oggz->packet_buffer = oggz_dlist_new ();
- }
+ oggz->packet_buffer = oggz_dlist_new ();
- if (oggz->flags & OGGZ_CONSTRUCT_SKELETON) {
- oggz->bos_buffer = oggz_dlist_new ();
- }
-
- oggz->non_bos_encountered = 0;
- oggz->skeleton_seen = 0;
-
if (OGGZ_CONFIG_WRITE && (oggz->flags & OGGZ_WRITE)) {
oggz_write_init (oggz);
} else if (OGGZ_CONFIG_READ) {
@@ -333,19 +316,6 @@
{
oggz_stream_t * stream;
- /*
- * if we're trying to construct a skeleton and we have encountered an
- * out-of-order bos packet then we can't really continue as we've already
- * output the skeleton EOS
- */
- if
- (
- oggz->non_bos_encountered == 1 && (oggz->flags & OGGZ_CONSTRUCT_SKELETON)
- )
- {
- return NULL;
- }
-
stream = oggz_malloc (sizeof (oggz_stream_t));
if (stream == NULL) return NULL;
Modified: liboggz/trunk/src/liboggz/oggz_private.h
===================================================================
--- liboggz/trunk/src/liboggz/oggz_private.h 2008-01-08 00:37:31 UTC (rev 3321)
+++ liboggz/trunk/src/liboggz/oggz_private.h 2008-01-08 00:46:09 UTC (rev 3322)
@@ -230,10 +230,6 @@
OggzVector * streams;
int all_at_eos; /* all streams are at eos */
- int non_bos_encountered; /* a non-bos packet has been seen */
- int skeleton_seen;
- long skeleton_serialno;
- int skeleton_packetno;
OggzMetric metric;
void * metric_user_data;
@@ -248,7 +244,6 @@
} x;
OggzDList * packet_buffer;
- OggzDList * bos_buffer;
};
OGGZ * oggz_read_init (OGGZ * oggz);
Modified: liboggz/trunk/src/liboggz/oggz_read.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_read.c 2008-01-08 00:37:31 UTC (rev 3321)
+++ liboggz/trunk/src/liboggz/oggz_read.c 2008-01-08 00:46:09 UTC (rev 3322)
@@ -59,7 +59,6 @@
#include "oggz_compat.h"
#include "oggz_private.h"
-#include "oggz_skeleton.h"
/* #define DEBUG */
/* #define DEBUG_VERBOSE */
@@ -329,31 +328,6 @@
return DLIST_ITER_CONTINUE;
}
-OggzDListIterResponse
-oggz_read_create_fisbone(void *elem) {
-
- OggzBufferedPacket *p = (OggzBufferedPacket *)elem;
-
- int packets;
-
- ogg_packet *op = oggz_skeleton_create_fisbone(p->serialno, p->stream->content,
- p->stream->granulerate_n, p->stream->granulerate_d,
- p->stream->basegranule, p->stream->granuleshift,
- &packets, (p->oggz->skeleton_packetno)++);
-
- if (p->stream->read_packet) {
- p->stream->read_packet(p->oggz, op, p->oggz->skeleton_serialno,
- p->stream->read_user_data);
- } else if (p->reader->read_packet) {
- p->reader->read_packet(p->oggz, op, p->oggz->skeleton_serialno,
- p->reader->read_user_data);
- }
-
- oggz_skeleton_destroy_packet(op);
-
- return DLIST_ITER_CONTINUE;
-}
-
static int
oggz_read_sync (OGGZ * oggz)
{
@@ -389,13 +363,11 @@
if (stream == NULL) {
/* new stream ... check bos etc. */
- assert(!"there should be no new streams here!\n");
if ((stream = oggz_add_stream (oggz, serialno)) == NULL) {
/* error -- could not add stream */
return -7;
}
}
-
os = &stream->ogg_stream;
result = ogg_stream_packetout(os, op);
@@ -429,7 +401,7 @@
granulepos = op->granulepos;
content = oggz_stream_get_content(oggz, serialno);
-
+
/*
* if we have no metrics for this stream yet, then generate them
*/
@@ -470,46 +442,7 @@
if (stream->packetno == 1) {
oggz_auto_read_comments (oggz, stream, serialno, op);
}
-
- /*
- * don't emit BOS packets until there's a non-BOS packet or
- * until a Skeleton BOS has been seen
- */
- if (oggz->flags & OGGZ_CONSTRUCT_SKELETON) {
-
- if (content == OGGZ_CONTENT_SKELETON) {
- oggz->skeleton_seen = 1;
- oggz->skeleton_serialno = serialno;
- }
-
- if (!(oggz->non_bos_encountered || oggz->skeleton_seen)) {
- OggzBufferedPacket *p = oggz_read_new_pbuffer_entry(
- oggz, &packet, reader->current_granulepos,
- serialno, stream, reader);
- oggz_dlist_append(oggz->bos_buffer, p);
- continue;
- }
-
- if (!oggz_dlist_is_empty(oggz->bos_buffer)) {
- ogg_packet *op = oggz_skeleton_create_bos(0, 1000, 0, 1000);
- if (stream->read_packet) {
- cb_ret = stream->read_packet (oggz, op, serialno,
- stream->read_user_data);
- } else if (reader->read_packet) {
- cb_ret = reader->read_packet (oggz, op, serialno,
- reader->read_user_data);
- }
- oggz_skeleton_destroy_packet(op);
- oggz_dlist_iter(oggz->bos_buffer, oggz_read_deliver_packet);
- oggz->skeleton_packetno = 1;
- oggz_dlist_iter(oggz->bos_buffer, oggz_read_create_fisbone);
- oggz_dlist_delete(oggz->bos_buffer);
- oggz->bos_buffer = oggz_dlist_new();
-
- }
-
- }
-
+
if (oggz->flags & OGGZ_AUTO) {
/*
@@ -580,16 +513,13 @@
stream = oggz_get_stream (oggz, serialno);
- if (stream != NULL) {
- oggz->non_bos_encountered = 1;
- }
-
if (stream == NULL) {
/* new stream ... check bos etc. */
if ((stream = oggz_add_stream (oggz, serialno)) == NULL) {
/* error -- could not add stream */
return -7;
}
+
/* identify stream type */
oggz_auto_identify(oggz, &og, serialno);
}
More information about the commits
mailing list