[xiph-cvs] cvs commit: ogg/include/ogg2 ogg.h
Monty
xiphmont at xiph.org
Tue Mar 25 23:35:38 PST 2003
xiphmont 03/03/26 02:35:38
Modified: include Tag: libogg2-zerocopy Makefile.am
include/ogg2 Tag: libogg2-zerocopy ogg.h
Log:
Incremental; don't lose work
Revision Changes Path
No revision
<p>No revision
<p>1.1.1.1.6.1 +1 -1 ogg/include/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ogg/include/Makefile.am,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.6.1
diff -u -r1.1.1.1 -r1.1.1.1.6.1
--- Makefile.am 3 Sep 2000 05:54:27 -0000 1.1.1.1
+++ Makefile.am 26 Mar 2003 07:35:38 -0000 1.1.1.1.6.1
@@ -2,4 +2,4 @@
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = ogg
+SUBDIRS = ogg2
<p><p>No revision
<p>No revision
<p>1.1.2.2 +32 -27 ogg/include/ogg2/Attic/ogg.h
Index: ogg.h
===================================================================
RCS file: /usr/local/cvsroot/ogg/include/ogg2/Attic/ogg.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- ogg.h 6 Mar 2003 23:12:28 -0000 1.1.2.1
+++ ogg.h 26 Mar 2003 07:35:38 -0000 1.1.2.2
@@ -11,7 +11,7 @@
********************************************************************
function: toplevel libogg include
- last mod: $Id: ogg.h,v 1.1.2.1 2003/03/06 23:12:28 xiphmont Exp $
+ last mod: $Id: ogg.h,v 1.1.2.2 2003/03/26 07:35:38 xiphmont Exp $
********************************************************************/
#ifndef _OGG_H
@@ -21,52 +21,47 @@
extern "C" {
#endif
-#include <ogg/os_types.h>
+#include <ogg2/os_types.h>
struct ogg_buffer;
+struct ogg_reference;
struct ogg_buffer_state;
struct ogg_sync_state;
struct ogg_stream_state;
struct oggpack_buffer;
typedef struct ogg_buffer ogg_buffer;
+typedef struct ogg_reference ogg_reference;
typedef struct ogg_buffer_state ogg_buffer_state;
typedef struct ogg_sync_state ogg_sync_state;
typedef struct ogg_stream_state ogg_stream_state;
typedef struct oggpack_buffer oggpack_buffer;
-typedef struct ogg_buffer_reference {
- ogg_buffer *buffer;
- int begin;
- int length;
- ogg_buffer_state *owner;
-} ogg_buffer_reference;
-
typedef struct {
- ogg_buffer_reference packet;
+ ogg_reference *packet;
- long b_o_s;
- long e_o_s;
- 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 */
+ long b_o_s;
+ long e_o_s;
+ 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 */
} ogg_packet;
typedef struct {
- ogg_buffer_reference header;
- ogg_buffer_reference body;
+ ogg_reference *header;
+ ogg_reference *body;
} ogg_page;
/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/
extern void oggpack_writeinit(oggpack_buffer *b,ogg_buffer_state *bs);
-extern void oggpack_writebuffer(oggpack_buffer *b,ogg_buffer_reference *r);
+extern ogg_reference *oggpack_writebuffer(oggpack_buffer *b);
extern void oggpack_writealign(oggpack_buffer *b);
extern void oggpack_writeclear(oggpack_buffer *b);
-extern void oggpack_readinit(oggpack_buffer *b,ogg_buffer_reference *r);
+extern void oggpack_readinit(oggpack_buffer *b,ogg_reference *r);
extern void oggpack_write(oggpack_buffer *b,unsigned long value,int bits);
extern int oggpack_look(oggpack_buffer *b,int bits,unsigned long *ret);
extern long oggpack_look1(oggpack_buffer *b);
@@ -78,10 +73,10 @@
extern long oggpack_bits(oggpack_buffer *b);
extern void oggpackB_writeinit(oggpack_buffer *b,ogg_buffer_state *bs);
-extern void oggpackB_writebuffer(oggpack_buffer *b,ogg_buffer_reference *r);
+extern ogg_reference *oggpackB_writebuffer(oggpack_buffer *b);
extern void oggpackB_writealign(oggpack_buffer *b);
extern void oggpackB_writeclear(oggpack_buffer *b);
-extern void oggpackB_readinit(oggpack_buffer *b,ogg_buffer_reference *r);
+extern void oggpackB_readinit(oggpack_buffer *b,ogg_reference *r);
extern void oggpackB_write(oggpack_buffer *b,unsigned long value,int bits);
extern int oggpackB_look(oggpack_buffer *b,int bits,unsigned long *ret);
extern long oggpackB_look1(oggpack_buffer *b);
@@ -114,11 +109,10 @@
/* Ogg BITSTREAM PRIMITIVES: general ***************************/
-extern int ogg_stream_init(ogg_stream_state *os,int serialno);
-extern int ogg_stream_clear(ogg_stream_state *os);
+extern ogg_stream_state *ogg_stream_create(int serialno);
+extern void ogg_stream_destroy(ogg_stream_state *os);
extern int ogg_stream_reset(ogg_stream_state *os);
extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno);
-extern int ogg_stream_destroy(ogg_stream_state *os);
extern int ogg_stream_eos(ogg_stream_state *os);
extern void ogg_page_checksum_set(ogg_page *og);
@@ -134,6 +128,17 @@
extern int ogg_page_getbuffer(ogg_page *og, unsigned char **buffer);
extern void ogg_packet_clear(ogg_packet *op);
+
+/* Ogg BITSTREAM PRIMITIVES: return codes ***************************/
+
+#define OGG_SUCCESS 0
+
+#define OGG_HOLE -10
+#define OGG_SPAN -11
+#define OGG_EVERSION -12
+#define OGG_ESERIAL -13
+#define OGG_EINVAL -14
+#define OGG_EEOS -15
#ifdef __cplusplus
<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