[xiph-cvs] cvs commit: ogg/src mutex.c mutex.h ogginternal.h sync.c Makefile.am bitwise.c
Monty
xiphmont at xiph.org
Mon Dec 30 17:18:07 PST 2002
xiphmont 02/12/30 20:18:05
Modified: include/ogg Tag: libogg2-zerocopy ogg.h
src Tag: libogg2-zerocopy Makefile.am bitwise.c
Added: src Tag: libogg2-zerocopy mutex.c mutex.h ogginternal.h
sync.c
Log:
Checkpoint of in-progress libogg 2 work.
Revision Changes Path
No revision
<p>No revision
<p>1.19.2.1 +36 -79 ogg/include/ogg/ogg.h
Index: ogg.h
===================================================================
RCS file: /usr/local/cvsroot/ogg/include/ogg/ogg.h,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -r1.19 -r1.19.2.1
--- ogg.h 15 Sep 2002 23:48:02 -0000 1.19
+++ ogg.h 31 Dec 2002 01:18:00 -0000 1.19.2.1
@@ -11,7 +11,7 @@
********************************************************************
function: toplevel libogg include
- last mod: $Id: ogg.h,v 1.19 2002/09/15 23:48:02 xiphmont Exp $
+ last mod: $Id: ogg.h,v 1.19.2.1 2002/12/31 01:18:00 xiphmont Exp $
********************************************************************/
#ifndef _OGG_H
@@ -20,69 +20,17 @@
#ifdef __cplusplus
extern "C" {
#endif
-
+
#include <ogg/os_types.h>
-
-typedef struct {
- long endbyte;
- int endbit;
-
- unsigned char *buffer;
- unsigned char *ptr;
- long storage;
-} oggpack_buffer;
-
-/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/
-
-typedef struct {
- unsigned char *header;
- long header_len;
- unsigned char *body;
- long body_len;
-} ogg_page;
-
-/* ogg_stream_state contains the current encode/decode state of a logical
- Ogg bitstream **********************************************************/
-
-typedef struct {
- unsigned char *body_data; /* bytes from packet bodies */
- long body_storage; /* storage elements allocated */
- long body_fill; /* elements stored; fill mark */
- long body_returned; /* elements of fill returned */
-
-
- int *lacing_vals; /* The values that will go to the segment table */
- ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact
- this way, but it is simple coupled to the
- lacing fifo */
- long lacing_storage;
- long lacing_fill;
- long lacing_packet;
- long lacing_returned;
-
- unsigned char header[282]; /* working space for header encode */
- int header_fill;
-
- int e_o_s; /* set when we have buffered the last packet in the
- logical bitstream */
- int b_o_s; /* set after we've written the initial page
- of a logical bitstream */
- long serialno;
- long pageno;
- ogg_int64_t packetno; /* sequence number for decode; the framing
- knows where there's a hole in the data,
- but we need coupling so that the codec
- (which is in a seperate abstraction
- layer) also knows about the gap */
- ogg_int64_t granulepos;
-
-} ogg_stream_state;
-
-/* ogg_packet is used to encapsulate the data and metadata belonging
- to a single raw Ogg/Vorbis packet *************************************/
-
+
+typedef struct ogg_lbuffer {
+ unsigned char *data;
+ int used;
+ struct ogg_lbuffer *next;
+} ogg_lbuffer;
+
typedef struct {
- unsigned char *packet;
+ ogg_lbuffer packet;
long bytes;
long b_o_s;
long e_o_s;
@@ -90,22 +38,31 @@
ogg_int64_t granulepos;
ogg_int64_t packetno; /* sequence number for decode; the framing
- knows where there's a hole in the data,
- but we need coupling so that the codec
- (which is in a seperate abstraction
- layer) also knows about the gap */
+ knows where there's a hole in the data,
+ but we need coupling so that the codec
+ (which is in a seperate abstraction
+ layer) also knows about the gap */
} ogg_packet;
typedef struct {
- unsigned char *data;
- int storage;
- int fill;
- int returned;
-
- int unsynced;
- int headerbytes;
- int bodybytes;
-} ogg_sync_state;
+ long endbyte;
+ int endbit;
+
+ ogg_lbuffer buffer; /* local storage for current fragment */
+ ogg_lbuffer *ptr; /* linked list of fragments */
+} oggpack_buffer;
+
+typedef struct {
+ ogg_lbuffer header;
+ int header_len;
+ ogg_lbuffer body;
+ int body_len;
+} ogg_page;
+
+#ifndef _OGGI_H
+typedef void * ogg_sync_state;
+typedef void * ogg_stream_state;
+#endif
/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/
@@ -156,9 +113,8 @@
extern int ogg_sync_init(ogg_sync_state *oy);
extern int ogg_sync_clear(ogg_sync_state *oy);
extern int ogg_sync_reset(ogg_sync_state *oy);
-extern int ogg_sync_destroy(ogg_sync_state *oy);
-extern char *ogg_sync_buffer(ogg_sync_state *oy, long size);
+extern unsigned char *ogg_sync_buffer(ogg_sync_state *oy, long size);
extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes);
extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og);
extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og);
@@ -182,9 +138,10 @@
extern int ogg_page_bos(ogg_page *og);
extern int ogg_page_eos(ogg_page *og);
extern ogg_int64_t ogg_page_granulepos(ogg_page *og);
-extern int ogg_page_serialno(ogg_page *og);
-extern long ogg_page_pageno(ogg_page *og);
+extern ogg_uint32_t ogg_page_serialno(ogg_page *og);
+extern ogg_uint32_t ogg_page_pageno(ogg_page *og);
extern int ogg_page_packets(ogg_page *og);
+extern int ogg_page_getbuffer(ogg_page *og, unsigned char **buffer);
extern void ogg_packet_clear(ogg_packet *op);
<p><p>No revision
<p>No revision
<p>1.5.2.1 +1 -1 ogg/src/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ogg/src/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- Makefile.am 11 Jul 2002 21:22:00 -0000 1.5
+++ Makefile.am 31 Dec 2002 01:18:02 -0000 1.5.2.1
@@ -6,7 +6,7 @@
lib_LTLIBRARIES = libogg.la
-libogg_la_SOURCES = framing.c bitwise.c
+libogg_la_SOURCES = sync.c stream.c bitwise.c
libogg_la_LDFLAGS = -version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@
debug:
<p><p>1.14.2.1 +6 -4 ogg/src/bitwise.c
Index: bitwise.c
===================================================================
RCS file: /usr/local/cvsroot/ogg/src/bitwise.c,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -r1.14 -r1.14.2.1
--- bitwise.c 15 Sep 2002 23:48:03 -0000 1.14
+++ bitwise.c 31 Dec 2002 01:18:02 -0000 1.14.2.1
@@ -5,18 +5,20 @@
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: packing variable sized words into an octet stream
- last mod: $Id: bitwise.c,v 1.14 2002/09/15 23:48:03 xiphmont Exp $
+ last mod: $Id: bitwise.c,v 1.14.2.1 2002/12/31 01:18:02 xiphmont Exp $
********************************************************************/
-/* We're 'LSb' endian; if we write a word but read individual bits,
- then we'll read the lsb first */
+/* the 'oggpack_xxx functions are 'LSb' endian; if we write a word but
+ read individual bits, then we'll read the lsb first */
+/* the 'oggpackB_xxx functions are 'MSb' endian; if we write a word but
+ read individual bits, then we'll read the msb first */
#include <string.h>
#include <stdlib.h>
<p><p>No revision
<p>No revision
<p>1.1.2.1 +48 -0 ogg/src/Attic/mutex.c
<p><p><p>1.1.2.1 +54 -0 ogg/src/Attic/mutex.h
<p><p><p>1.1.2.1 +98 -0 ogg/src/Attic/ogginternal.h
<p><p><p>1.1.2.1 +688 -0 ogg/src/Attic/sync.c
<p><p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list