You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(14) |
Dec
(33) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(68) |
Feb
(19) |
Mar
(6) |
Apr
(97) |
May
(15) |
Jun
(28) |
Jul
(83) |
Aug
(21) |
Sep
(67) |
Oct
(16) |
Nov
|
Dec
(22) |
| 2003 |
Jan
(47) |
Feb
(17) |
Mar
(5) |
Apr
|
May
(5) |
Jun
(106) |
Jul
(25) |
Aug
|
Sep
(14) |
Oct
(7) |
Nov
(24) |
Dec
(5) |
| 2004 |
Jan
(54) |
Feb
(19) |
Mar
|
Apr
(33) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(153) |
Dec
(6) |
| 2005 |
Jan
(178) |
Feb
(17) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
(2) |
Feb
(173) |
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(12) |
Dec
(14) |
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(29) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
(29) |
Feb
(3) |
Mar
(5) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2013 |
Jan
(7) |
Feb
|
Mar
(18) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Matthias P. <pfi...@us...> - 2005-02-05 18:58:15
|
Update of /cvsroot/tritonus/tritonus/src/lib/pvorbis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5577/lib/pvorbis Modified Files: Makefile.in framing.c org_tritonus_lowlevel_pogg_Packet.c Removed Files: org_tritonus_lowlevel_pogg_StreamState.c Log Message: moved page decoding to pure java; changed some method signatures Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/Makefile.in http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/framing.c http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_Packet.c http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_StreamState.c Index: Makefile.in =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/Makefile.in,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Makefile.in 21 Jan 2005 14:00:44 -0000 1.4 --- Makefile.in 5 Feb 2005 18:58:04 -0000 1.5 *************** *** 61,65 **** org_tritonus_lowlevel_pogg_Packet.o \ org_tritonus_lowlevel_pogg_Page.o \ - org_tritonus_lowlevel_pogg_StreamState.o \ org_tritonus_lowlevel_pvorbis_Block.o \ org_tritonus_lowlevel_pvorbis_DspState.o \ --- 61,64 ---- *************** *** 78,82 **** Packet.class \ Page.class \ - StreamState.class \ Block.class \ DspState.class \ --- 77,80 ---- *************** *** 87,91 **** org.tritonus.lowlevel.pogg.Packet \ org.tritonus.lowlevel.pogg.Page \ - org.tritonus.lowlevel.pogg.StreamState \ org.tritonus.lowlevel.pvorbis.Block \ org.tritonus.lowlevel.pvorbis.DspState \ --- 85,88 ---- Index: framing.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/framing.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** framing.c 3 Feb 2005 16:35:48 -0000 1.3 --- framing.c 5 Feb 2005 18:58:04 -0000 1.4 *************** *** 184,243 **** 0xbcb4666d,0xb8757bda,0xb5365d03,0xb1f740b4}; - /* init the encode/decode logical stream state */ - int ogg_stream_init(ogg_stream_state *os,int serialno){ - if(os){ - memset(os,0,sizeof(*os)); - os->body_storage=16*1024; - os->body_data=_ogg_malloc(os->body_storage*sizeof(*os->body_data)); - - os->lacing_storage=1024; - os->lacing_vals=_ogg_malloc(os->lacing_storage*sizeof(*os->lacing_vals)); - os->granule_vals=_ogg_malloc(os->lacing_storage*sizeof(*os->granule_vals)); - - os->serialno=serialno; - - return(0); - } - return(-1); - } - - /* _clear does not free os, only the non-flat storage within */ - int ogg_stream_clear(ogg_stream_state *os){ - if(os){ - if(os->body_data)_ogg_free(os->body_data); - if(os->lacing_vals)_ogg_free(os->lacing_vals); - if(os->granule_vals)_ogg_free(os->granule_vals); - - memset(os,0,sizeof(*os)); - } - return(0); - } - - int ogg_stream_destroy(ogg_stream_state *os){ - if(os){ - ogg_stream_clear(os); - _ogg_free(os); - } - return(0); - } - - /* Helpers for ogg_stream_encode; this keeps the structure and - what's happening fairly clear */ - - static void _os_body_expand(ogg_stream_state *os,int needed){ - if(os->body_storage<=os->body_fill+needed){ - os->body_storage+=(needed+1024); - os->body_data=_ogg_realloc(os->body_data,os->body_storage*sizeof(*os->body_data)); - } - } - - static void _os_lacing_expand(ogg_stream_state *os,int needed){ - if(os->lacing_storage<=os->lacing_fill+needed){ - os->lacing_storage+=(needed+32); - os->lacing_vals=_ogg_realloc(os->lacing_vals,os->lacing_storage*sizeof(*os->lacing_vals)); - os->granule_vals=_ogg_realloc(os->granule_vals,os->lacing_storage*sizeof(*os->granule_vals)); - } - } /* checksum the page */ --- 184,188 ---- *************** *** 268,274 **** } - int ogg_stream_eos(ogg_stream_state *os){ - return os->e_o_s; - } /* DECODING PRIMITIVES: packet streaming layer **********************/ --- 213,216 ---- *************** *** 289,505 **** - /* add the incoming page to the stream state; we decompose the page - into packet segments here as well. */ - - int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){ - unsigned char *header=og->header; - unsigned char *body=og->body; - long bodysize=og->body_len; - int segptr=0; - - int version=ogg_page_version(og); - int continued=ogg_page_continued(og); - int bos=ogg_page_bos(og); - int eos=ogg_page_eos(og); - ogg_int64_t granulepos=ogg_page_granulepos(og); - int serialno=ogg_page_serialno(og); - long pageno=ogg_page_pageno(og); - int segments=header[26]; - - /* clean up 'returned data' */ - { - long lr=os->lacing_returned; - long br=os->body_returned; - - /* body data */ - if(br){ - os->body_fill-=br; - if(os->body_fill) - memmove(os->body_data,os->body_data+br,os->body_fill); - os->body_returned=0; - } - - if(lr){ - /* segment table */ - if(os->lacing_fill-lr){ - memmove(os->lacing_vals,os->lacing_vals+lr, - (os->lacing_fill-lr)*sizeof(*os->lacing_vals)); - memmove(os->granule_vals,os->granule_vals+lr, - (os->lacing_fill-lr)*sizeof(*os->granule_vals)); - } - os->lacing_fill-=lr; - os->lacing_packet-=lr; - os->lacing_returned=0; - } - } - /* check the serial number */ - if(serialno!=os->serialno)return(-1); - if(version>0)return(-1); - - _os_lacing_expand(os,segments+1); - - /* are we in sequence? */ - if(pageno!=os->pageno){ - int i; - - /* unroll previous partial packet (if any) */ - for(i=os->lacing_packet;i<os->lacing_fill;i++) - os->body_fill-=os->lacing_vals[i]&0xff; - os->lacing_fill=os->lacing_packet; - - /* make a note of dropped data in segment table */ - if(os->pageno!=-1){ - os->lacing_vals[os->lacing_fill++]=0x400; - os->lacing_packet++; - } - - /* are we a 'continued packet' page? If so, we'll need to skip - some segments */ - if(continued){ - bos=0; - for(;segptr<segments;segptr++){ - int val=header[27+segptr]; - body+=val; - bodysize-=val; - if(val<255){ - segptr++; - break; - } - } - } - } - - if(bodysize){ - _os_body_expand(os,bodysize); - memcpy(os->body_data+os->body_fill,body,bodysize); - os->body_fill+=bodysize; - } - - { - int saved=-1; - while(segptr<segments){ - int val=header[27+segptr]; - os->lacing_vals[os->lacing_fill]=val; - os->granule_vals[os->lacing_fill]=-1; - - if(bos){ - os->lacing_vals[os->lacing_fill]|=0x100; - bos=0; - } - - if(val<255)saved=os->lacing_fill; - - os->lacing_fill++; - segptr++; - - if(val<255)os->lacing_packet=os->lacing_fill; - } - - /* set the granulepos on the last granuleval of the last full packet */ - if(saved!=-1){ - os->granule_vals[saved]=granulepos; - } - - } - - if(eos){ - os->e_o_s=1; - if(os->lacing_fill>0) - os->lacing_vals[os->lacing_fill-1]|=0x200; - } - - os->pageno=pageno+1; - - return(0); - } - - - int ogg_stream_reset(ogg_stream_state *os){ - os->body_fill=0; - os->body_returned=0; - - os->lacing_fill=0; - os->lacing_packet=0; - os->lacing_returned=0; - - os->header_fill=0; - - os->e_o_s=0; - os->b_o_s=0; - os->pageno=-1; - os->packetno=0; - os->granulepos=0; - - return(0); - } - - int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno){ - ogg_stream_reset(os); - os->serialno=serialno; - return(0); - } - - static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){ - - /* The last part of decode. We have the stream broken into packet - segments. Now we need to group them into packets (or return the - out of sync markers) */ - - int ptr=os->lacing_returned; - - if(os->lacing_packet<=ptr)return(0); - - if(os->lacing_vals[ptr]&0x400){ - /* we need to tell the codec there's a gap; it might need to - handle previous packet dependencies. */ - os->lacing_returned++; - os->packetno++; - return(-1); - } - - if(!op && !adv)return(1); /* just using peek as an inexpensive way - to ask if there's a whole packet - waiting */ - - /* Gather the whole packet. We'll have no holes or a partial packet */ - { - int size=os->lacing_vals[ptr]&0xff; - int bytes=size; - int eos=os->lacing_vals[ptr]&0x200; /* last packet of the stream? */ - int bos=os->lacing_vals[ptr]&0x100; /* first packet of the stream? */ - - while(size==255){ - int val=os->lacing_vals[++ptr]; - size=val&0xff; - if(val&0x200)eos=0x200; - bytes+=size; - } - - if(op){ - op->e_o_s=eos; - op->b_o_s=bos; - op->packet=os->body_data+os->body_returned; - op->packetno=os->packetno; - op->granulepos=os->granule_vals[ptr]; - op->bytes=bytes; - } - - if(adv){ - os->body_returned+=bytes; - os->lacing_returned=ptr+1; - os->packetno++; - } - } - return(1); - } - - int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op){ - return _packetout(os,op,1); - } - - int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op){ - return _packetout(os,op,0); - } void ogg_packet_clear(ogg_packet *op) { --- 231,235 ---- Index: org_tritonus_lowlevel_pogg_Packet.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_Packet.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** org_tritonus_lowlevel_pogg_Packet.c 2 Feb 2005 16:32:45 -0000 1.3 --- org_tritonus_lowlevel_pogg_Packet.c 5 Feb 2005 18:58:04 -0000 1.4 *************** *** 204,208 **** JNIEXPORT void JNICALL Java_org_tritonus_lowlevel_pogg_Packet_setData ! (JNIEnv* env, jobject obj, jbyteArray abData, jint nLength) { ogg_packet* handle; --- 204,208 ---- JNIEXPORT void JNICALL Java_org_tritonus_lowlevel_pogg_Packet_setData ! (JNIEnv* env, jobject obj, jbyteArray abData, jint nOffset, jint nLength) { ogg_packet* handle; *************** *** 215,219 **** * a memory leak here. */ handle->packet = malloc(nLength); ! (void) memcpy(handle->packet, data, nLength); (*env)->ReleaseByteArrayElements(env, abData, data, JNI_ABORT); handle->bytes = nLength; --- 215,219 ---- * a memory leak here. */ handle->packet = malloc(nLength); ! (void) memcpy(handle->packet, data + nOffset, nLength); (*env)->ReleaseByteArrayElements(env, abData, data, JNI_ABORT); handle->bytes = nLength; *************** *** 229,233 **** JNIEXPORT void JNICALL Java_org_tritonus_lowlevel_pogg_Packet_setFlags ! (JNIEnv* env, jobject obj, jboolean bBos, jboolean bEos, jlong lGranulePos) { ogg_packet* handle; --- 229,234 ---- JNIEXPORT void JNICALL Java_org_tritonus_lowlevel_pogg_Packet_setFlags ! (JNIEnv* env, jobject obj, jboolean bBos, jboolean bEos, jlong lGranulePos, ! jlong lPacketNo) { ogg_packet* handle; *************** *** 238,241 **** --- 239,243 ---- handle->e_o_s = bEos; handle->granulepos = lGranulePos; + handle->packetno = lPacketNo; if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Packet_setFlags(): end\n"); } } --- org_tritonus_lowlevel_pogg_StreamState.c DELETED --- |
|
From: Matthias P. <pfi...@us...> - 2005-02-05 18:58:15
|
Update of /cvsroot/tritonus/tritonus/src/lib/pvorbis/ogg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5577/lib/pvorbis/ogg Modified Files: ogg.h Log Message: moved page decoding to pure java; changed some method signatures Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/ogg/ogg.h Index: ogg.h =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/ogg/ogg.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ogg.h 3 Feb 2005 16:35:48 -0000 1.4 --- ogg.h 5 Feb 2005 18:58:04 -0000 1.5 *************** *** 42,81 **** } 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 --- 42,45 ---- *************** *** 136,153 **** extern unsigned char *oggpackB_get_buffer(oggpack_buffer *b); - /* Ogg BITSTREAM PRIMITIVES: decoding **************************/ - - extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); - extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); - extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op); - - /* 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 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); --- 100,103 ---- |
|
From: Matthias P. <pfi...@us...> - 2005-02-03 16:36:06
|
Update of /cvsroot/tritonus/tritonus/src/lib/pvorbis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4514/lib/pvorbis Modified Files: framing.c org_tritonus_lowlevel_pogg_StreamState.c Log Message: moved encoding part of streamstate to pure java Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/framing.c http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_StreamState.c Index: framing.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/framing.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** framing.c 21 Jan 2005 14:07:06 -0000 1.2 --- framing.c 3 Feb 2005 16:35:48 -0000 1.3 *************** *** 268,461 **** } - /* submit data to the internal buffer of the framing engine */ - int ogg_stream_packetin(ogg_stream_state *os,ogg_packet *op){ - int lacing_vals=op->bytes/255+1,i; - - if(os->body_returned){ - /* advance packet data according to the body_returned pointer. We - had to keep it around to return a pointer into the buffer last - call */ - - os->body_fill-=os->body_returned; - if(os->body_fill) - memmove(os->body_data,os->body_data+os->body_returned, - os->body_fill); - os->body_returned=0; - } - - /* make sure we have the buffer storage */ - _os_body_expand(os,op->bytes); - _os_lacing_expand(os,lacing_vals); - - /* Copy in the submitted packet. Yes, the copy is a waste; this is - the liability of overly clean abstraction for the time being. It - will actually be fairly easy to eliminate the extra copy in the - future */ - - memcpy(os->body_data+os->body_fill,op->packet,op->bytes); - os->body_fill+=op->bytes; - - /* Store lacing vals for this packet */ - for(i=0;i<lacing_vals-1;i++){ - os->lacing_vals[os->lacing_fill+i]=255; - os->granule_vals[os->lacing_fill+i]=os->granulepos; - } - os->lacing_vals[os->lacing_fill+i]=(op->bytes)%255; - os->granulepos=os->granule_vals[os->lacing_fill+i]=op->granulepos; - - /* flag the first segment as the beginning of the packet */ - os->lacing_vals[os->lacing_fill]|= 0x100; - - os->lacing_fill+=lacing_vals; - - /* for the sake of completeness */ - os->packetno++; - - if(op->e_o_s)os->e_o_s=1; - - return(0); - } - - /* This will flush remaining packets into a page (returning nonzero), - even if there is not enough data to trigger a flush normally - (undersized page). If there are no packets or partial packets to - flush, ogg_stream_flush returns 0. Note that ogg_stream_flush will - try to flush a normal sized page like ogg_stream_pageout; a call to - ogg_stream_flush does not guarantee that all packets have flushed. - Only a return value of 0 from ogg_stream_flush indicates all packet - data is flushed into pages. - - since ogg_stream_flush will flush the last page in a stream even if - it's undersized, you almost certainly want to use ogg_stream_pageout - (and *not* ogg_stream_flush) unless you specifically need to flush - an page regardless of size in the middle of a stream. */ - - int ogg_stream_flush(ogg_stream_state *os,ogg_page *og){ - int i; - int vals=0; - int maxvals=(os->lacing_fill>255?255:os->lacing_fill); - int bytes=0; - long acc=0; - ogg_int64_t granule_pos=os->granule_vals[0]; - - if(maxvals==0)return(0); - - /* construct a page */ - /* decide how many segments to include */ - - /* If this is the initial header case, the first page must only include - the initial header packet */ - if(os->b_o_s==0){ /* 'initial header page' case */ - granule_pos=0; - for(vals=0;vals<maxvals;vals++){ - if((os->lacing_vals[vals]&0x0ff)<255){ - vals++; - break; - } - } - }else{ - for(vals=0;vals<maxvals;vals++){ - if(acc>4096)break; - acc+=os->lacing_vals[vals]&0x0ff; - granule_pos=os->granule_vals[vals]; - } - } - - /* construct the header in temp storage */ - memcpy(os->header,"OggS",4); - - /* stream structure version */ - os->header[4]=0x00; - - /* continued packet flag? */ - os->header[5]=0x00; - if((os->lacing_vals[0]&0x100)==0)os->header[5]|=0x01; - /* first page flag? */ - if(os->b_o_s==0)os->header[5]|=0x02; - /* last page flag? */ - if(os->e_o_s && os->lacing_fill==vals)os->header[5]|=0x04; - os->b_o_s=1; - - /* 64 bits of PCM position */ - for(i=6;i<14;i++){ - os->header[i]=(granule_pos&0xff); - granule_pos>>=8; - } - - /* 32 bits of stream serial number */ - { - long serialno=os->serialno; - for(i=14;i<18;i++){ - os->header[i]=(serialno&0xff); - serialno>>=8; - } - } - - /* 32 bits of page counter (we have both counter and page header - because this val can roll over) */ - if(os->pageno==-1)os->pageno=0; /* because someone called - stream_reset; this would be a - strange thing to do in an - encode stream, but it has - plausible uses */ - { - long pageno=os->pageno++; - for(i=18;i<22;i++){ - os->header[i]=(pageno&0xff); - pageno>>=8; - } - } - - /* zero for computation; filled in later */ - os->header[22]=0; - os->header[23]=0; - os->header[24]=0; - os->header[25]=0; - - /* segment table */ - os->header[26]=vals&0xff; - for(i=0;i<vals;i++) - bytes+=os->header[i+27]=(os->lacing_vals[i]&0xff); - - /* set pointers in the ogg_page struct */ - og->header=os->header; - og->header_len=os->header_fill=vals+27; - og->body=os->body_data+os->body_returned; - og->body_len=bytes; - - /* advance the lacing data and set the body_returned pointer */ - - os->lacing_fill-=vals; - memmove(os->lacing_vals,os->lacing_vals+vals,os->lacing_fill*sizeof(*os->lacing_vals)); - memmove(os->granule_vals,os->granule_vals+vals,os->lacing_fill*sizeof(*os->granule_vals)); - os->body_returned+=bytes; - - /* calculate the checksum */ - - ogg_page_checksum_set(og); - - /* done */ - return(1); - } - - - /* This constructs pages from buffered packet segments. The pointers - returned are to static buffers; do not free. The returned buffers are - good only until the next call (using the same ogg_stream_state) */ - - int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og){ - - if((os->e_o_s&&os->lacing_fill) || /* 'were done, now flush' case */ - os->body_fill-os->body_returned > 4096 ||/* 'page nominal size' case */ - os->lacing_fill>=255 || /* 'segment table full' case */ - (os->lacing_fill&&!os->b_o_s)){ /* 'initial header page' case */ - - return(ogg_stream_flush(os,og)); - } - - /* not enough data to construct a page and not end of stream */ - return(0); - } - int ogg_stream_eos(ogg_stream_state *os){ return os->e_o_s; --- 268,271 ---- Index: org_tritonus_lowlevel_pogg_StreamState.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_StreamState.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** org_tritonus_lowlevel_pogg_StreamState.c 2 Feb 2005 16:32:46 -0000 1.2 --- org_tritonus_lowlevel_pogg_StreamState.c 3 Feb 2005 16:35:48 -0000 1.3 *************** *** 185,257 **** /* * Class: org_tritonus_lowlevel_pogg_StreamState - * Method: packetIn - * Signature: (Lorg/tritonus/lowlevel/ogg/Packet;)I - */ - JNIEXPORT jint JNICALL - Java_org_tritonus_lowlevel_pogg_StreamState_packetIn_1native - (JNIEnv* env, jobject obj, jobject packet) - { - ogg_stream_state* handle; - ogg_packet* packetHandle; - int nReturn; - - if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_StreamState_packetIn(): begin\n"); } - handle = getHandle(env, obj); - packetHandle = getPacketNativeHandle(env, packet); - nReturn = ogg_stream_packetin(handle, packetHandle); - if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_StreamState_packetIn(): end\n"); } - return nReturn; - } - - - - /* - * Class: org_tritonus_lowlevel_pogg_StreamState - * Method: pageOut - * Signature: (Lorg/tritonus/lowlevel/ogg/Page;)I - */ - JNIEXPORT jint JNICALL - Java_org_tritonus_lowlevel_pogg_StreamState_pageOut_1native - (JNIEnv* env, jobject obj, jobject page) - { - ogg_stream_state* handle; - ogg_page* pageHandle; - int nReturn; - - if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_StreamState_pageOut(): begin\n"); } - handle = getHandle(env, obj); - pageHandle = getPageNativeHandle(env, page); - nReturn = ogg_stream_pageout(handle, pageHandle); - if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_StreamState_pageOut(): end\n"); } - return nReturn; - } - - - - /* - * Class: org_tritonus_lowlevel_pogg_StreamState - * Method: flush - * Signature: (Lorg/tritonus/lowlevel/ogg/Page;)I - */ - JNIEXPORT jint JNICALL - Java_org_tritonus_lowlevel_pogg_StreamState_flush_1native - (JNIEnv* env, jobject obj, jobject page) - { - ogg_stream_state* handle; - ogg_page* pageHandle; - int nReturn; - - if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_StreamState_flush(): begin\n"); } - handle = getHandle(env, obj); - pageHandle = getPageNativeHandle(env, page); - nReturn = ogg_stream_flush(handle, pageHandle); - if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_StreamState_flush(): end\n"); } - return nReturn; - } - - - - /* - * Class: org_tritonus_lowlevel_pogg_StreamState * Method: pageIn * Signature: (Lorg/tritonus/lowlevel/ogg/Page;)I --- 185,188 ---- |
|
From: Matthias P. <pfi...@us...> - 2005-02-03 16:36:05
|
Update of /cvsroot/tritonus/tritonus/src/lib/pvorbis/ogg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4514/lib/pvorbis/ogg Modified Files: ogg.h Log Message: moved encoding part of streamstate to pure java Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/ogg/ogg.h Index: ogg.h =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/ogg/ogg.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ogg.h 21 Jan 2005 14:09:14 -0000 1.3 --- ogg.h 3 Feb 2005 16:35:48 -0000 1.4 *************** *** 136,145 **** extern unsigned char *oggpackB_get_buffer(oggpack_buffer *b); - /* Ogg BITSTREAM PRIMITIVES: encoding **************************/ - - extern int ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op); - extern int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og); - extern int ogg_stream_flush(ogg_stream_state *os, ogg_page *og); - /* Ogg BITSTREAM PRIMITIVES: decoding **************************/ --- 136,139 ---- |
|
From: Matthias P. <pfi...@us...> - 2005-02-03 16:36:05
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4514/classes/org/tritonus/lowlevel/pogg Modified Files: StreamState.java Log Message: moved encoding part of streamstate to pure java Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg/StreamState.java Index: StreamState.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg/StreamState.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** StreamState.java 2 Feb 2005 16:32:45 -0000 1.2 --- StreamState.java 3 Feb 2005 16:35:47 -0000 1.3 *************** *** 36,48 **** public class StreamState { ! static ! { ! Ogg.loadNativeLibrary(); ! if (TDebug.TraceOggNative) ! { ! setTrace(true); ! } ! } /** --- 36,50 ---- public class StreamState { ! static ! { ! Ogg.loadNativeLibrary(); ! if (TDebug.TraceOggNative) ! { ! setTrace(true); ! } ! } + private static final int INITIAL_BODY_DATA_SIZE = 16 * 1024; + private static final int INITIAL_LACING_VALUES_SIZE = 1024; /** *************** *** 55,61 **** /** The serial number of the stream. This is set by init(). ! */ private int m_nSerialNo; --- 57,97 ---- /** The serial number of the stream. This is set by init(). ! */ private int m_nSerialNo; + /** Storage for packet bodies. + */ + private byte[] m_abBodyData; + + /** Number of bytes used in te body storage. + */ + private int m_nBodyFill; + + /** Number of bytes aready returned (as pages) from the body storage. + */ + private int m_nBodyReturned; + + /** Lacing values. + */ + private int[] m_anLacingValues; + + /** Granule values. + */ + private long[] m_alGranuleValues; + + private int m_nLacingFill; + private int m_nLacingPacket; + private int m_nLacingReturned; + + private byte[] m_abHeader; + + private int m_nHeaderFill; + + private boolean m_bBos; + private boolean m_bEos; + private int m_nPageNo; + private long m_lPacketNo; + private long m_lGranulePos; + *************** *** 92,95 **** --- 128,159 ---- { m_nSerialNo = nSerialNo; + m_abBodyData = new byte[INITIAL_BODY_DATA_SIZE]; + m_nBodyFill = 0; + m_nBodyReturned = 0; + m_anLacingValues = new int[INITIAL_LACING_VALUES_SIZE]; + m_alGranuleValues = new long[INITIAL_LACING_VALUES_SIZE]; + m_nLacingFill = 0; + m_nLacingPacket = 0; + m_nLacingReturned = 0; + + m_abHeader = new byte[282]; + m_nHeaderFill = 0; + + m_bBos = false; + m_bEos = false; + m_nPageNo = 0; + m_lPacketNo = 0; + m_lGranulePos = 0; + + // TODO: necessary? + for(int i = 0; i < m_abBodyData.length; i++) + m_abBodyData[i] = 0; + for(int i = 0; i < m_anLacingValues.length; i++) + m_anLacingValues[i] = 0; + for(int i = 0; i < m_alGranuleValues.length; i++) + m_alGranuleValues[i] = 0; + + // TODO: remove return value + // return 0; return init_native(nSerialNo); } *************** *** 104,107 **** --- 168,192 ---- public int clear() { + m_nSerialNo = 0; + m_abBodyData = null; + m_nBodyFill = 0; + m_nBodyReturned = 0; + m_anLacingValues = null; + m_alGranuleValues = null; + m_nLacingFill = 0; + m_nLacingPacket = 0; + m_nLacingReturned = 0; + + m_abHeader = null; + m_nHeaderFill = 0; + + m_bBos = false; + m_bEos = false; + m_nPageNo = 0; + m_lPacketNo = 0; + m_lGranulePos = 0; + + // TODO: remove return value + // return 0; return clear_native(); } *************** *** 126,131 **** --- 211,218 ---- /** Calls ogg_stream_destroy(). */ + // TODO: remove calls to this method public int destroy() { + clear(); return destroy_native(); } *************** *** 140,143 **** --- 227,231 ---- public boolean isEOSReached() { + // return m_bEos; return isEOSReached_native(); } *************** *** 151,189 **** /** Calls ogg_stream_packetin(). */ public int packetIn(Packet packet) { ! return packetIn_native(packet); ! } - /** Calls ogg_stream_packetin(). - */ - private native int packetIn_native(Packet packet); /** Calls ogg_stream_pageout(). */ public int pageOut(Page page) { ! return pageOut_native(page); } - /** Calls ogg_stream_pageout(). - */ - private native int pageOut_native(Page page); - /** Calls ogg_stream_flush(). */ public int flush(Page page) { ! return flush_native(page); ! } - /** Calls ogg_stream_flush(). - */ - private native int flush_native(Page page); --- 239,467 ---- /** Calls ogg_stream_packetin(). */ + /* submit data to the internal buffer of the framing engine */ public int packetIn(Packet packet) { ! int i; ! byte[] abPacketData = packet.getData(); ! int lacing_vals = abPacketData.length / 255 + 1; + if (m_nBodyReturned > 0) + { + /* advance packet data according to the body_returned pointer. We + had to keep it around to return a pointer into the buffer last + call */ + m_nBodyFill -= m_nBodyReturned; + if (m_nBodyFill > 0) + { + System.arraycopy(m_abBodyData, m_nBodyReturned, + m_abBodyData, 0, m_nBodyFill); + } + m_nBodyReturned = 0; + } + + /* make sure we have the buffer storage */ + assureBodyDataCapacity(abPacketData.length); + assureLacingValuesCapacity(lacing_vals); + + /* Copy in the submitted packet. Yes, the copy is a waste; + this is the liability of overly clean abstraction for the + time being. It will actually be fairly easy to eliminate + the extra copy in the future */ + System.arraycopy(abPacketData, 0, m_abBodyData, m_nBodyFill, + abPacketData.length); + m_nBodyFill += abPacketData.length; + + /* Store lacing vals for this packet */ + for (i = 0; i < lacing_vals - 1; i++) + { + m_anLacingValues[m_nLacingFill + i] = 255; + m_alGranuleValues[m_nLacingFill + i] = m_lGranulePos; + } + m_anLacingValues[m_nLacingFill + i] = abPacketData.length % 255; + m_alGranuleValues[m_nLacingFill + i] = packet.getGranulePos(); + m_lGranulePos = packet.getGranulePos(); + + /* flag the first segment as the beginning of the packet */ + m_anLacingValues[m_nLacingFill] |= 0x100; + + m_nLacingFill += lacing_vals; + + /* for the sake of completeness */ + m_lPacketNo++; + + if(packet.isEos()) + m_bEos = true; + return 0; + } /** Calls ogg_stream_pageout(). */ + /* This constructs pages from buffered packet segments. The pointers + returned are to static buffers; do not free. The returned buffers are + good only until the next call (using the same ogg_stream_state) */ public int pageOut(Page page) { ! if ((m_bEos && m_nLacingFill > 0) || /* 'were done, now flush' */ ! m_nBodyFill - m_nBodyReturned > 4096 || /* 'page nominal size' */ ! m_nLacingFill >= 255 || /* 'segment table full' */ ! (m_nLacingFill > 0 && ! m_bBos)) /* 'initial header page' */ ! { ! return flush(page); ! } ! /* not enough data to construct a page and not end of stream */ ! return 0; } /** Calls ogg_stream_flush(). */ + /* This will flush remaining packets into a page (returning nonzero), + even if there is not enough data to trigger a flush normally + (undersized page). If there are no packets or partial packets to + flush, ogg_stream_flush returns 0. Note that ogg_stream_flush will + try to flush a normal sized page like ogg_stream_pageout; a call to + ogg_stream_flush does not guarantee that all packets have flushed. + Only a return value of 0 from ogg_stream_flush indicates all packet + data is flushed into pages. + + since ogg_stream_flush will flush the last page in a stream even if + it's undersized, you almost certainly want to use ogg_stream_pageout + (and *not* ogg_stream_flush) unless you specifically need to flush + an page regardless of size in the middle of a stream. + */ public int flush(Page page) { ! int i; ! int vals = 0; ! int maxvals = Math.min(m_nLacingFill, 255); ! int bytes = 0; ! int acc = 0; ! long granule_pos = m_alGranuleValues[0]; + if (maxvals == 0) + { + return 0; + } + + /* construct a page */ + /* decide how many segments to include */ + + /* If this is the initial header case, the first page must + only include the initial header packet */ + if (! m_bBos) + { /* 'initial header page' case */ + granule_pos = 0; + for (vals = 0; vals < maxvals; vals++) + { + if ((m_anLacingValues[vals] & 0x0FF) < 255) + { + vals++; + break; + } + } + } + else + { + for (vals = 0; vals < maxvals; vals++) + { + if (acc > 4096) + break; + acc += (m_anLacingValues[vals] & 0x0FF); + granule_pos = m_alGranuleValues[vals]; + } + } + + /* construct the header in temp storage */ + m_abHeader[0] = (byte) 'O'; + m_abHeader[1] = (byte) 'g'; + m_abHeader[2] = (byte) 'g'; + m_abHeader[3] = (byte) 'S'; + + /* stream structure version */ + m_abHeader[4] = 0; + + m_abHeader[5] = 0x00; + /* continued packet flag? */ + if ((m_anLacingValues[0] & 0x100) == 0) + m_abHeader[5] |= 0x01; + /* first page flag? */ + if (! m_bBos) + m_abHeader[5] |= 0x02; + /* last page flag? */ + if (m_bEos && m_nLacingFill == vals) + m_abHeader[5] |= 0x04; + m_bBos = true; + + /* 64 bits of PCM position */ + for (i = 6; i < 14; i++) + { + m_abHeader[i] = (byte) (granule_pos & 0xFF); + granule_pos >>>= 8; + } + + /* 32 bits of stream serial number */ + int serialno = m_nSerialNo; + for (i = 14; i < 18; i++) + { + m_abHeader[i] = (byte) (serialno & 0xFF); + serialno >>>= 8; + } + + /* 32 bits of page counter (we have both counter and page header + because this val can roll over) */ + if (m_nPageNo == -1) + { + m_nPageNo = 0; /* because someone called + stream_reset; this would be a + strange thing to do in an + encode stream, but it has + plausible uses */ + } + int pageno = m_nPageNo++; + for (i = 18; i < 22; i++) + { + m_abHeader[i] = (byte) (pageno & 0xFF); + pageno >>>= 8; + } + + /* zero for computation; filled in later */ + m_abHeader[22] = 0; + m_abHeader[23] = 0; + m_abHeader[24] = 0; + m_abHeader[25] = 0; + + /* segment table */ + m_abHeader[26] = (byte) (vals & 0xFF); + for (i = 0; i < vals; i++) + { + m_abHeader[i + 27] = (byte) (m_anLacingValues[i] & 0xFF); + bytes += (m_anLacingValues[i] & 0xFF); + } + + /* set pointers in the ogg_page struct */ + page.setData(m_abHeader, 0, vals + 27, + m_abBodyData, m_nBodyReturned, bytes); + m_nHeaderFill = vals + 27; + + /* advance the lacing data and set the body_returned pointer */ + + m_nLacingFill -= vals; + System.arraycopy(m_anLacingValues, vals, m_anLacingValues, 0, + m_nLacingFill); + System.arraycopy(m_alGranuleValues, vals, m_alGranuleValues, 0, + m_nLacingFill); + m_nBodyReturned += bytes; + + /* calculate the checksum */ + + page.setChecksum(); + + /* done */ + return 1; + } *************** *** 227,230 **** --- 505,540 ---- + private void assureBodyDataCapacity(int needed) + { + if (m_abBodyData.length <= m_nBodyFill + needed) + { + int nNewSize = m_abBodyData.length + needed + 1024; + byte[] abNewBodyData = new byte[nNewSize]; + System.arraycopy(m_abBodyData, 0, abNewBodyData, 0, + m_abBodyData.length); + m_abBodyData = abNewBodyData; + } + } + + + + private void assureLacingValuesCapacity(int needed) + { + if (m_anLacingValues.length <= m_nLacingFill + needed) + { + int nNewSize = m_anLacingValues.length + needed + 32; + int[] anNewLacingValues = new int[nNewSize]; + System.arraycopy(m_anLacingValues, 0, anNewLacingValues, 0, + m_anLacingValues.length); + m_anLacingValues = anNewLacingValues; + long[] alNewGranuleValues = new long[nNewSize]; + System.arraycopy(m_alGranuleValues, 0, alNewGranuleValues, 0, + m_alGranuleValues.length); + m_alGranuleValues = alNewGranuleValues; + } + } + + + private static native void setTrace(boolean bTrace); } |
|
From: Matthias P. <pfi...@us...> - 2005-02-02 21:39:52
|
Update of /cvsroot/tritonus/tritonus/test/suite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13335 Modified Files: build.xml Log Message: added test cases for pure-java ogg handling Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/test/suite/build.xml Index: build.xml =================================================================== RCS file: /cvsroot/tritonus/tritonus/test/suite/build.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** build.xml 25 Apr 2004 08:55:42 -0000 1.23 --- build.xml 2 Feb 2005 21:39:30 -0000 1.24 *************** *** 379,382 **** --- 379,394 ---- </target> + <target name="test-pogg" + depends="compile-tritonus"> + <junit fork="no" printsummary="yes"> + <classpath refid="run.classpath"/> + <formatter type="plain" /> + <test name="org.tritonus.test.tritonus.lowlevel.pogg.BufferTestCase"/> + <test name="org.tritonus.test.tritonus.lowlevel.pogg.PacketTestCase"/> + <test name="org.tritonus.test.tritonus.lowlevel.pogg.PageTestCase"/> + <test name="org.tritonus.test.tritonus.lowlevel.pogg.FramingTestCase"/> + </junit> + </target> + |
|
From: Matthias P. <pfi...@us...> - 2005-02-02 21:38:02
|
Update of /cvsroot/tritonus/tritonus/test/suite/src/classes/org/tritonus/test/tritonus/lowlevel/pogg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12564/src/classes/org/tritonus/test/tritonus/lowlevel/pogg Log Message: Directory /cvsroot/tritonus/tritonus/test/suite/src/classes/org/tritonus/test/tritonus/lowlevel/pogg added to the repository Direct links to online-CVS: |
|
From: Matthias P. <pfi...@us...> - 2005-02-02 21:37:38
|
Update of /cvsroot/tritonus/tritonus/test/suite/src/classes/org/tritonus/test/tritonus/lowlevel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12512/src/classes/org/tritonus/test/tritonus/lowlevel Log Message: Directory /cvsroot/tritonus/tritonus/test/suite/src/classes/org/tritonus/test/tritonus/lowlevel added to the repository Direct links to online-CVS: |
|
From: Matthias P. <pfi...@us...> - 2005-02-02 16:33:17
|
Update of /cvsroot/tritonus/tritonus/src/lib/pvorbis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4443/lib/pvorbis Modified Files: org_tritonus_lowlevel_pogg_Packet.c org_tritonus_lowlevel_pogg_Page.c org_tritonus_lowlevel_pogg_StreamState.c Log Message: added methods; prepared for transition to pure java; fixed crashes Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_Packet.c http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_Page.c http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_StreamState.c Index: org_tritonus_lowlevel_pogg_Packet.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_Packet.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** org_tritonus_lowlevel_pogg_Packet.c 11 Jan 2005 15:24:38 -0000 1.2 --- org_tritonus_lowlevel_pogg_Packet.c 2 Feb 2005 16:32:45 -0000 1.3 *************** *** 53,56 **** --- 53,58 ---- handle = malloc(sizeof(ogg_packet)); if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Packet_malloc(): handle: %p\n", handle); } + if (handle != NULL) + memset(handle, 0, sizeof(*handle)); setHandle(env, obj, handle); nReturn = (handle == NULL) ? -1 : 0; *************** *** 113,116 **** --- 115,120 ---- if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Packet_getData(): begin\n"); } handle = getHandle(env, obj); + if (handle->packet == NULL) + return 0; abData = (*env)->NewByteArray(env, handle->bytes); (*env)->SetByteArrayRegion(env, abData, 0, handle->bytes, handle->packet); *************** *** 165,168 **** --- 169,202 ---- /* * Class: org_tritonus_lowlevel_pogg_Packet + * Method: getGranulePos + * Signature: ()J + */ + JNIEXPORT jlong JNICALL + Java_org_tritonus_lowlevel_pogg_Packet_getGranulePos + (JNIEnv *env, jobject obj) + { + ogg_packet* handle = getHandle(env, obj); + return handle->granulepos; + } + + + + /* + * Class: org_tritonus_lowlevel_pogg_Packet + * Method: getPacketNo + * Signature: ()J + */ + JNIEXPORT jlong JNICALL + Java_org_tritonus_lowlevel_pogg_Packet_getPacketNo + (JNIEnv *env, jobject obj) + { + ogg_packet* handle = getHandle(env, obj); + return handle->packetno; + } + + + + /* + * Class: org_tritonus_lowlevel_pogg_Packet * Method: setData * Signature: ([BI)V Index: org_tritonus_lowlevel_pogg_Page.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_Page.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** org_tritonus_lowlevel_pogg_Page.c 21 Jan 2005 14:00:44 -0000 1.2 --- org_tritonus_lowlevel_pogg_Page.c 2 Feb 2005 16:32:46 -0000 1.3 *************** *** 55,60 **** if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_malloc(): handle: %p\n", handle); } setHandle(env, obj, handle); ! handle->header = NULL; ! handle->body = NULL; nReturn = (handle == NULL) ? -1 : 0; if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_malloc(): end\n"); } --- 55,63 ---- if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_malloc(): handle: %p\n", handle); } setHandle(env, obj, handle); ! if (handle) ! { ! handle->header = NULL; ! handle->body = NULL; ! } nReturn = (handle == NULL) ? -1 : 0; if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_malloc(): end\n"); } *************** *** 123,126 **** --- 126,138 ---- } + static int getPackets(ogg_page* og) + { + int i; + int n=og->header[26]; + int count=0; + for(i=0;i<n;i++) + if(og->header[27+i]<255)count++; + return(count); + } *************** *** 139,143 **** if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_getPackets(): begin\n"); } handle = getHandle(env, obj); ! nReturn = ogg_page_packets(handle); if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_getPackets(): end\n"); } return nReturn; --- 151,156 ---- if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_getPackets(): begin\n"); } handle = getHandle(env, obj); ! nReturn = getPackets(handle); ! //nReturn = ogg_page_packets(handle); if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_getPackets(): end\n"); } return nReturn; *************** *** 323,327 **** { ogg_page* handle; - //jbyteArray byteArray; if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_setData(): begin\n"); } --- 336,339 ---- *************** *** 329,342 **** /* ATTENTION! The storage allocated here is never freed! We have a memory hole! */ handle->header_len = nHeaderLength; ! if (handle->header != NULL) ! { ! free(handle->header); ! } handle->header = malloc(nHeaderLength); handle->body_len = nBodyLength; ! if (handle->body != NULL) ! { ! free(handle->body); ! } handle->body = malloc(nBodyLength); (*env)->GetByteArrayRegion(env, abHeader, nHeaderOffset, nHeaderLength, handle->header); --- 341,354 ---- /* ATTENTION! The storage allocated here is never freed! We have a memory hole! */ handle->header_len = nHeaderLength; ! /* if (handle->header != NULL) */ ! /* { */ ! /* free(handle->header); */ ! /* } */ handle->header = malloc(nHeaderLength); handle->body_len = nBodyLength; ! /* if (handle->body != NULL) */ ! /* { */ ! /* free(handle->body); */ ! /* } */ handle->body = malloc(nBodyLength); (*env)->GetByteArrayRegion(env, abHeader, nHeaderOffset, nHeaderLength, handle->header); Index: org_tritonus_lowlevel_pogg_StreamState.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_StreamState.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** org_tritonus_lowlevel_pogg_StreamState.c 5 Jan 2005 21:01:52 -0000 1.1 --- org_tritonus_lowlevel_pogg_StreamState.c 2 Feb 2005 16:32:46 -0000 1.2 *************** *** 84,88 **** */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_init (JNIEnv* env, jobject obj, jint nSerialNo) { --- 84,88 ---- */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_init_1native (JNIEnv* env, jobject obj, jint nSerialNo) { *************** *** 105,109 **** */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_clear (JNIEnv* env, jobject obj) { --- 105,109 ---- */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_clear_1native (JNIEnv* env, jobject obj) { *************** *** 126,130 **** */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_reset (JNIEnv* env, jobject obj) { --- 126,130 ---- */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_reset_1native (JNIEnv* env, jobject obj) { *************** *** 147,151 **** */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_destroy (JNIEnv* env, jobject obj) { --- 147,151 ---- */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_destroy_1native (JNIEnv* env, jobject obj) { *************** *** 168,172 **** */ JNIEXPORT jboolean JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_isEOSReached (JNIEnv* env, jobject obj) { --- 168,172 ---- */ JNIEXPORT jboolean JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_isEOSReached_1native (JNIEnv* env, jobject obj) { *************** *** 189,193 **** */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_packetIn (JNIEnv* env, jobject obj, jobject packet) { --- 189,193 ---- */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_packetIn_1native (JNIEnv* env, jobject obj, jobject packet) { *************** *** 212,216 **** */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_pageOut (JNIEnv* env, jobject obj, jobject page) { --- 212,216 ---- */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_pageOut_1native (JNIEnv* env, jobject obj, jobject page) { *************** *** 235,239 **** */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_flush (JNIEnv* env, jobject obj, jobject page) { --- 235,239 ---- */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_flush_1native (JNIEnv* env, jobject obj, jobject page) { *************** *** 258,262 **** */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_pageIn (JNIEnv* env, jobject obj, jobject page) { --- 258,262 ---- */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_pageIn_1native (JNIEnv* env, jobject obj, jobject page) { *************** *** 281,285 **** */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_packetOut (JNIEnv* env, jobject obj, jobject packet) { --- 281,285 ---- */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_packetOut_1native (JNIEnv* env, jobject obj, jobject packet) { *************** *** 304,317 **** */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_packetPeek (JNIEnv* env, jobject obj, jobject packet) { ogg_stream_state* handle; ! ogg_packet* packetHandle; int nReturn; if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_StreamState_packetPeek(): begin\n"); } handle = getHandle(env, obj); ! packetHandle = getPacketNativeHandle(env, packet); nReturn = ogg_stream_packetpeek(handle, packetHandle); if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_StreamState_packetPeek(): end\n"); } --- 304,320 ---- */ JNIEXPORT jint JNICALL ! Java_org_tritonus_lowlevel_pogg_StreamState_packetPeek_1native (JNIEnv* env, jobject obj, jobject packet) { ogg_stream_state* handle; ! ogg_packet* packetHandle = NULL; int nReturn; if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_StreamState_packetPeek(): begin\n"); } handle = getHandle(env, obj); ! if (packet != NULL) ! { ! packetHandle = getPacketNativeHandle(env, packet); ! } nReturn = ogg_stream_packetpeek(handle, packetHandle); if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_StreamState_packetPeek(): end\n"); } |
|
From: Matthias P. <pfi...@us...> - 2005-02-02 16:33:05
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4443/classes/org/tritonus/lowlevel/pogg Modified Files: Packet.java StreamState.java Log Message: added methods; prepared for transition to pure java; fixed crashes Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg/Packet.java http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg/StreamState.java Index: Packet.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg/Packet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Packet.java 11 Jan 2005 15:24:20 -0000 1.2 --- Packet.java 2 Feb 2005 16:32:44 -0000 1.3 *************** *** 104,107 **** --- 104,113 ---- + public native long getGranulePos(); + + + public native long getPacketNo(); + + /** Sets the data in the packet. */ Index: StreamState.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg/StreamState.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** StreamState.java 5 Jan 2005 20:35:51 -0000 1.1 --- StreamState.java 2 Feb 2005 16:32:45 -0000 1.2 *************** *** 6,10 **** /* ! * Copyright (c) 2000 - 2001 by Matthias Pfisterer * * This program is free software; you can redistribute it and/or modify --- 6,10 ---- /* ! * Copyright (c) 2000 - 2005 by Matthias Pfisterer * * This program is free software; you can redistribute it and/or modify *************** *** 53,56 **** --- 53,61 ---- private long m_lNativeHandle; + /** The serial number of the stream. + This is set by init(). + */ + private int m_nSerialNo; + *************** *** 84,104 **** /** Calls ogg_stream_init(). */ ! public native int init(int nSerialNo); /** Calls ogg_stream_clear(). */ ! public native int clear(); /** Calls ogg_stream_reset(). */ ! public native int reset(); /** Calls ogg_stream_destroy(). */ ! public native int destroy(); /** Calls ogg_stream_eos(). */ ! public native boolean isEOSReached(); --- 89,149 ---- /** Calls ogg_stream_init(). */ ! public int init(int nSerialNo) ! { ! m_nSerialNo = nSerialNo; ! return init_native(nSerialNo); ! } ! ! /** Calls ogg_stream_init(). ! */ ! private native int init_native(int nSerialNo); ! /** Calls ogg_stream_clear(). */ ! public int clear() ! { ! return clear_native(); ! } ! ! /** Calls ogg_stream_clear(). ! */ ! private native int clear_native(); ! ! ! /** Calls ogg_stream_reset(). ! */ ! public int reset() ! { ! return reset_native(); ! } /** Calls ogg_stream_reset(). */ ! private native int reset_native(); ! /** Calls ogg_stream_destroy(). */ ! public int destroy() ! { ! return destroy_native(); ! } ! ! /** Calls ogg_stream_destroy(). ! */ ! private native int destroy_native(); ! /** Calls ogg_stream_eos(). */ ! public boolean isEOSReached() ! { ! return isEOSReached_native(); ! } ! ! /** Calls ogg_stream_eos(). ! */ ! private native boolean isEOSReached_native(); *************** *** 106,135 **** /** Calls ogg_stream_packetin(). */ ! public native int packetIn(Packet packet); /** Calls ogg_stream_pageout(). */ ! public native int pageOut(Page page); /** Calls ogg_stream_flush(). */ ! public native int flush(Page page); /** Calls ogg_stream_pagein(). */ ! public native int pageIn(Page page); /** Calls ogg_stream_packetout(). */ ! public native int packetOut(Packet packet); /** Calls ogg_stream_packetpeek(). */ ! public native int packetPeek(Packet packet); --- 151,228 ---- /** Calls ogg_stream_packetin(). */ ! public int packetIn(Packet packet) ! { ! return packetIn_native(packet); ! } ! ! ! /** Calls ogg_stream_packetin(). ! */ ! private native int packetIn_native(Packet packet); ! ! ! /** Calls ogg_stream_pageout(). ! */ ! public int pageOut(Page page) ! { ! return pageOut_native(page); ! } /** Calls ogg_stream_pageout(). */ ! private native int pageOut_native(Page page); /** Calls ogg_stream_flush(). */ ! public int flush(Page page) ! { ! return flush_native(page); ! } ! ! ! /** Calls ogg_stream_flush(). ! */ ! private native int flush_native(Page page); /** Calls ogg_stream_pagein(). */ ! public int pageIn(Page page) ! { ! return pageIn_native(page); ! } ! ! ! /** Calls ogg_stream_pagein(). ! */ ! private native int pageIn_native(Page page); ! ! ! /** Calls ogg_stream_packetout(). ! */ ! public int packetOut(Packet packet) ! { ! return packetOut_native(packet); ! } /** Calls ogg_stream_packetout(). */ ! private native int packetOut_native(Packet packet); ! ! ! /** Calls ogg_stream_packetpeek(). ! */ ! public int packetPeek(Packet packet) ! { ! return packetPeek_native(packet); ! } /** Calls ogg_stream_packetpeek(). */ ! private native int packetPeek_native(Packet packet); |
|
From: Matthias P. <pfi...@us...> - 2005-01-21 14:09:27
|
Update of /cvsroot/tritonus/tritonus/src/lib/pvorbis/ogg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22011/src/lib/pvorbis/ogg Modified Files: ogg.h Log Message: removed obsolete sync_state functions Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/ogg/ogg.h Index: ogg.h =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/ogg/ogg.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ogg.h 21 Jan 2005 14:07:07 -0000 1.2 --- ogg.h 21 Jan 2005 14:09:14 -0000 1.3 *************** *** 97,110 **** } ogg_packet; - /* typedef struct { */ - /* unsigned char *data; */ - /* int storage; */ - /* int fill; */ - /* int returned; */ - - /* int unsynced; */ - /* int headerbytes; */ - /* int bodybytes; */ - /* } ogg_sync_state; */ /* Ogg BITSTREAM PRIMITIVES: bitstream ************************/ --- 97,100 ---- *************** *** 154,166 **** /* Ogg BITSTREAM PRIMITIVES: decoding **************************/ - /* 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 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); */ extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); --- 144,147 ---- |
|
From: Matthias P. <pfi...@us...> - 2005-01-21 14:07:16
|
Update of /cvsroot/tritonus/tritonus/src/lib/pvorbis/ogg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21551/src/lib/pvorbis/ogg Modified Files: ogg.h Log Message: removed obsolete sync_state functions Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/ogg/ogg.h Index: ogg.h =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/ogg/ogg.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ogg.h 12 Jan 2005 16:54:48 -0000 1.1 --- ogg.h 21 Jan 2005 14:07:07 -0000 1.2 *************** *** 97,110 **** } ogg_packet; ! typedef struct { ! unsigned char *data; ! int storage; ! int fill; ! int returned; ! ! int unsynced; ! int headerbytes; ! int bodybytes; ! } ogg_sync_state; /* Ogg BITSTREAM PRIMITIVES: bitstream ************************/ --- 97,110 ---- } ogg_packet; ! /* typedef struct { */ ! /* unsigned char *data; */ ! /* int storage; */ ! /* int fill; */ ! /* int returned; */ ! ! /* int unsynced; */ ! /* int headerbytes; */ ! /* int bodybytes; */ ! /* } ogg_sync_state; */ /* Ogg BITSTREAM PRIMITIVES: bitstream ************************/ *************** *** 154,166 **** /* Ogg BITSTREAM PRIMITIVES: decoding **************************/ ! 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 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); extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); --- 154,166 ---- /* Ogg BITSTREAM PRIMITIVES: decoding **************************/ ! /* 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 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); */ extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); |
|
From: Matthias P. <pfi...@us...> - 2005-01-21 14:07:16
|
Update of /cvsroot/tritonus/tritonus/src/lib/pvorbis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21551/src/lib/pvorbis Modified Files: framing.c Log Message: removed obsolete sync_state functions Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/framing.c Index: framing.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/framing.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** framing.c 12 Jan 2005 16:54:48 -0000 1.1 --- framing.c 21 Jan 2005 14:07:06 -0000 1.2 *************** *** 478,670 **** example code. */ - /* initialize the struct to a known state */ - int ogg_sync_init(ogg_sync_state *oy){ - if(oy){ - memset(oy,0,sizeof(*oy)); - } - return(0); - } - - /* clear non-flat storage within */ - int ogg_sync_clear(ogg_sync_state *oy){ - if(oy){ - if(oy->data)_ogg_free(oy->data); - ogg_sync_init(oy); - } - return(0); - } - - int ogg_sync_destroy(ogg_sync_state *oy){ - if(oy){ - ogg_sync_clear(oy); - _ogg_free(oy); - } - return(0); - } - - char *ogg_sync_buffer(ogg_sync_state *oy, long size){ - - /* first, clear out any space that has been previously returned */ - if(oy->returned){ - oy->fill-=oy->returned; - if(oy->fill>0) - memmove(oy->data,oy->data+oy->returned,oy->fill); - oy->returned=0; - } - - if(size>oy->storage-oy->fill){ - /* We need to extend the internal buffer */ - long newsize=size+oy->fill+4096; /* an extra page to be nice */ - - if(oy->data) - oy->data=_ogg_realloc(oy->data,newsize); - else - oy->data=_ogg_malloc(newsize); - oy->storage=newsize; - } - - /* expose a segment at least as large as requested at the fill mark */ - return((char *)oy->data+oy->fill); - } - - int ogg_sync_wrote(ogg_sync_state *oy, long bytes){ - if(oy->fill+bytes>oy->storage)return(-1); - oy->fill+=bytes; - return(0); - } - - /* sync the stream. This is meant to be useful for finding page - boundaries. - - return values for this: - -n) skipped n bytes - 0) page not ready; more data (no bytes skipped) - n) page synced at current location; page length n bytes - - */ - - long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og){ - unsigned char *page=oy->data+oy->returned; - unsigned char *next; - long bytes=oy->fill-oy->returned; - - if(oy->headerbytes==0){ - int headerbytes,i; - if(bytes<27)return(0); /* not enough for a header */ - - /* verify capture pattern */ - if(memcmp(page,"OggS",4))goto sync_fail; - - headerbytes=page[26]+27; - if(bytes<headerbytes)return(0); /* not enough for header + seg table */ - - /* count up body length in the segment table */ - - for(i=0;i<page[26];i++) - oy->bodybytes+=page[27+i]; - oy->headerbytes=headerbytes; - } - - if(oy->bodybytes+oy->headerbytes>bytes)return(0); - - /* The whole test page is buffered. Verify the checksum */ - { - /* Grab the checksum bytes, set the header field to zero */ - char chksum[4]; - ogg_page log; - - memcpy(chksum,page+22,4); - memset(page+22,0,4); - - /* set up a temp page struct and recompute the checksum */ - log.header=page; - log.header_len=oy->headerbytes; - log.body=page+oy->headerbytes; - log.body_len=oy->bodybytes; - ogg_page_checksum_set(&log); - - /* Compare */ - if(memcmp(chksum,page+22,4)){ - /* D'oh. Mismatch! Corrupt page (or miscapture and not a page - at all) */ - /* replace the computed checksum with the one actually read in */ - memcpy(page+22,chksum,4); - - /* Bad checksum. Lose sync */ - goto sync_fail; - } - } - - /* yes, have a whole page all ready to go */ - { - unsigned char *page=oy->data+oy->returned; - long bytes; - - if(og){ - og->header=page; - og->header_len=oy->headerbytes; - og->body=page+oy->headerbytes; - og->body_len=oy->bodybytes; - } - - oy->unsynced=0; - oy->returned+=(bytes=oy->headerbytes+oy->bodybytes); - oy->headerbytes=0; - oy->bodybytes=0; - return(bytes); - } - - sync_fail: - - oy->headerbytes=0; - oy->bodybytes=0; - - /* search for possible capture */ - next=memchr(page+1,'O',bytes-1); - if(!next) - next=oy->data+oy->fill; - - oy->returned=next-oy->data; - return(-(next-page)); - } - - /* sync the stream and get a page. Keep trying until we find a page. - Supress 'sync errors' after reporting the first. - - return values: - -1) recapture (hole in data) - 0) need more data - 1) page returned - - Returns pointers into buffered data; invalidated by next call to - _stream, _clear, _init, or _buffer */ - - int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og){ - - /* all we need to do is verify a page at the head of the stream - buffer. If it doesn't verify, we look for the next potential - frame */ - - while(1){ - long ret=ogg_sync_pageseek(oy,og); - if(ret>0){ - /* have a page */ - return(1); - } - if(ret==0){ - /* need more data */ - return(0); - } - - /* head did not start a synced page... skipped some bytes */ - if(!oy->unsynced){ - oy->unsynced=1; - return(-1); - } - - /* loop. keep looking */ - - } - } /* add the incoming page to the stream state; we decompose the page --- 478,481 ---- *************** *** 794,806 **** } - /* clear things to an initial state. Good to call, eg, before seeking */ - int ogg_sync_reset(ogg_sync_state *oy){ - oy->fill=0; - oy->returned=0; - oy->unsynced=0; - oy->headerbytes=0; - oy->bodybytes=0; - return(0); - } int ogg_stream_reset(ogg_stream_state *os){ --- 605,608 ---- |
|
From: Matthias P. <pfi...@us...> - 2005-01-21 14:00:54
|
Update of /cvsroot/tritonus/tritonus/src/lib/pvorbis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20071/src/lib/pvorbis Modified Files: Makefile.in org_tritonus_lowlevel_pogg_Page.c Removed Files: org_tritonus_lowlevel_pogg_SyncState.c Log Message: ported SyncState to pure java Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/Makefile.in http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_Page.c http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_SyncState.c Index: Makefile.in =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/Makefile.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Makefile.in 12 Jan 2005 19:12:53 -0000 1.3 --- Makefile.in 21 Jan 2005 14:00:44 -0000 1.4 *************** *** 62,66 **** org_tritonus_lowlevel_pogg_Page.o \ org_tritonus_lowlevel_pogg_StreamState.o \ - org_tritonus_lowlevel_pogg_SyncState.o \ org_tritonus_lowlevel_pvorbis_Block.o \ org_tritonus_lowlevel_pvorbis_DspState.o \ --- 62,65 ---- *************** *** 80,84 **** Page.class \ StreamState.class \ - SyncState.class \ Block.class \ DspState.class \ --- 79,82 ---- *************** *** 90,94 **** org.tritonus.lowlevel.pogg.Page \ org.tritonus.lowlevel.pogg.StreamState \ - org.tritonus.lowlevel.pogg.SyncState \ org.tritonus.lowlevel.pvorbis.Block \ org.tritonus.lowlevel.pvorbis.DspState \ --- 88,91 ---- Index: org_tritonus_lowlevel_pogg_Page.c =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/lib/pvorbis/org_tritonus_lowlevel_pogg_Page.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** org_tritonus_lowlevel_pogg_Page.c 5 Jan 2005 21:01:52 -0000 1.1 --- org_tritonus_lowlevel_pogg_Page.c 21 Jan 2005 14:00:44 -0000 1.2 *************** *** 55,58 **** --- 55,60 ---- if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_malloc(): handle: %p\n", handle); } setHandle(env, obj, handle); + handle->header = NULL; + handle->body = NULL; nReturn = (handle == NULL) ? -1 : 0; if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_malloc(): end\n"); } *************** *** 311,314 **** --- 313,348 ---- + /* + * Class: org_tritonus_lowlevel_pogg_Page + * Method: setData + * Signature: ([BII[BII)V + */ + JNIEXPORT void JNICALL + Java_org_tritonus_lowlevel_pogg_Page_setData + (JNIEnv* env, jobject obj, jbyteArray abHeader, jint nHeaderOffset, jint nHeaderLength, jbyteArray abBody, jint nBodyOffset, jint nBodyLength) + { + ogg_page* handle; + //jbyteArray byteArray; + + if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_setData(): begin\n"); } + handle = getHandle(env, obj); + /* ATTENTION! The storage allocated here is never freed! We have a memory hole! */ + handle->header_len = nHeaderLength; + if (handle->header != NULL) + { + free(handle->header); + } + handle->header = malloc(nHeaderLength); + handle->body_len = nBodyLength; + if (handle->body != NULL) + { + free(handle->body); + } + handle->body = malloc(nBodyLength); + (*env)->GetByteArrayRegion(env, abHeader, nHeaderOffset, nHeaderLength, handle->header); + (*env)->GetByteArrayRegion(env, abBody, nBodyOffset, nBodyLength, handle->body); + if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_pogg_Page_setData(): end\n"); } + } + /* --- org_tritonus_lowlevel_pogg_SyncState.c DELETED --- |
|
From: Matthias P. <pfi...@us...> - 2005-01-21 14:00:53
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20071/src/classes/org/tritonus/lowlevel/pogg Modified Files: Page.java SyncState.java Log Message: ported SyncState to pure java Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg/Page.java http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg/SyncState.java Index: Page.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg/Page.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Page.java 5 Jan 2005 20:35:51 -0000 1.1 --- Page.java 21 Jan 2005 14:00:43 -0000 1.2 *************** *** 121,124 **** --- 121,128 ---- public native byte[] getBody(); + public native void setData(byte[] abHeader, int nHeaderOffset, + int nHeaderLength, + byte[] abBody, int nBodyOffset, + int nBodyLength); private static native void setTrace(boolean bTrace); Index: SyncState.java =================================================================== RCS file: /cvsroot/tritonus/tritonus/src/classes/org/tritonus/lowlevel/pogg/SyncState.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** SyncState.java 5 Jan 2005 20:35:51 -0000 1.1 --- SyncState.java 21 Jan 2005 14:00:43 -0000 1.2 *************** *** 6,10 **** /* ! * Copyright (c) 2000 - 2001 by Matthias Pfisterer * * This program is free software; you can redistribute it and/or modify --- 6,10 ---- /* ! * Copyright (c) 2000 - 2005 by Matthias Pfisterer * * This program is free software; you can redistribute it and/or modify *************** *** 36,56 **** public class SyncState { ! static ! { ! Ogg.loadNativeLibrary(); ! if (TDebug.TraceOggNative) ! { ! setTrace(true); ! } ! } /** - * Holds the pointer to ogg_sync_state - * for the native code. - * This must be long to be 64bit-clean. */ ! private long m_lNativeHandle; --- 36,77 ---- public class SyncState { ! /** The stream buffer. ! This points to a buffer that holds the incoming data from a stream ! until the data is emitted in form of a page. ! */ ! private byte[] m_abData; ! ! /** The number of bytes in the stream buffer that are used. This ! always counts from the beginning of the buffer. So ! m_abData[m_nFill] is the first free byte in the buffer. ! */ ! private int m_nFill; + /** Number of bytes that have been used to construct a returned + page. This is counted from the beginning of the + buffer. m_abData[m_nReturned] is the first valid byte in the + buffer. + */ + private int m_nReturned; /** */ ! private boolean m_bUnsynced; + /** + */ + private int m_nHeaderBytes; + + /** + */ + private int m_nBodyBytes; + + /** Page object for re-calculating the checksum. + */ + private Page m_tmpPage; + + /** Storage for the checksum saved from the page. + */ + private byte[] m_abChecksum; *************** *** 58,122 **** { if (TDebug.TraceOggNative) { TDebug.out("SyncState.<init>(): begin"); } ! int nReturn = malloc(); ! if (nReturn < 0) ! { ! throw new RuntimeException("malloc of ogg_sync_state failed"); ! } if (TDebug.TraceOggNative) { TDebug.out("SyncState.<init>(): end"); } } ! ! public void finalize() { - // TODO: call free() - // call super.finalize() first or last? - // and introduce a flag if free() has already been called? } - private native int malloc(); - public native void free(); - - - /** Calls ogg_sync_init(). */ ! public native void init(); /** Calls ogg_sync_clear(). */ ! public native void clear(); /** Calls ogg_sync_reset(). */ ! public native void reset(); ! /** Calls ogg_sync_destroy(). */ ! public native void destroy(); ! /** Calls ogg_sync_buffer() ! and ogg_sync_wrote(). ! */ ! public native int write(byte[] abBuffer, int nBytes); ! /** Calls ogg_sync_pageseek(). */ ! public native int pageseek(Page page); ! /** Calls ogg_sync_pageout(). */ ! public native int pageOut(Page page); ! private static native void setTrace(boolean bTrace); } --- 79,334 ---- { if (TDebug.TraceOggNative) { TDebug.out("SyncState.<init>(): begin"); } ! m_tmpPage = new Page(); ! m_abChecksum = new byte[4]; if (TDebug.TraceOggNative) { TDebug.out("SyncState.<init>(): end"); } } ! // TODO: remove calls to this method ! public void free() { } /** Calls ogg_sync_init(). */ ! public void init() ! { ! m_abData = null; ! m_nFill = 0; ! m_nReturned = 0; ! m_bUnsynced = false; ! m_nHeaderBytes = 0; ! m_nBodyBytes = 0; ! } /** Calls ogg_sync_clear(). */ ! public void clear() ! { ! init(); ! } /** Calls ogg_sync_reset(). */ ! public void reset() ! { ! m_nFill = 0; ! m_nReturned = 0; ! m_bUnsynced = false; ! m_nHeaderBytes = 0; ! m_nBodyBytes = 0; ! } ! /** Writes to the stream buffer. */ ! public int write(byte[] abBuffer, int nBytes) ! { ! /* Clear out space that has been previously returned. */ ! if (m_nReturned > 0) ! { ! m_nFill -= m_nReturned; ! if (m_nFill > 0) ! { ! System.arraycopy(m_abData, m_nReturned, ! m_abData, 0, ! m_nFill); ! } ! m_nReturned = 0; ! } + /* Check for enough space in the stream buffer and if it is + * allocated at all. If there isn't sufficient space, extend + * the buffer. */ + if (m_abData == null || nBytes > m_abData.length - m_nFill) + { + int nNewSize = nBytes + m_nFill + 4096; + byte[] abOldBuffer = m_abData; + m_abData = new byte[nNewSize]; + if (abOldBuffer != null) + { + System.arraycopy(abOldBuffer, 0, m_abData, 0, m_nFill); + } + } ! /* Now finally fill with the new data. */ ! System.arraycopy(abBuffer, 0, m_abData, m_nFill, nBytes); ! m_nFill += nBytes; ! return 0; ! } ! /** Synchronizes the stream. This method looks if there is a ! complete, valid page in the stream buffer. If a page is found, ! it is returned in the passed Page object. ! ! @param page The Page to store the result of the page search ! in. The content is only changed if the return value is > 0. ! ! @return if a page has been found at the current location, the ! length of the page in bytes is returned. If not enough data ! for a page is available in the stream buffer, 0 is ! returned. If data in the stream buffer has been skipped ! because there is no page at the current position, the skip ! amount in bytes is returned as a negative number. */ ! public int pageseek(Page page) ! { ! int nPage = m_nReturned; ! int nBytes = m_nFill - m_nReturned; ! ! if (m_nHeaderBytes == 0) ! { ! if (nBytes < 27) ! { ! /* Not enough data for a header. */ ! return 0; ! } ! /* Verify capture pattern. */ ! if (m_abData[nPage] != (byte) 'O' || ! m_abData[nPage + 1] != (byte) 'g' || ! m_abData[nPage + 2] != (byte) 'g' || ! m_abData[nPage + 3] != (byte) 'S') ! { ! TDebug.out("wrong capture pattern"); ! return syncFailure(); ! } ! int nHeaderBytes = (m_abData[nPage + 26] & 0xFF) + 27; ! if (nBytes < nHeaderBytes) ! { ! /* Not enough data for header + segment table. */ ! return 0; ! } ! /* Count up body length in the segment table. */ ! for (int i = 0; i < (m_abData[nPage + 26] & 0xFF); i++) ! { ! m_nBodyBytes += (m_abData[nPage + 27 + i] & 0xFF); ! } ! m_nHeaderBytes = nHeaderBytes; ! } + if (m_nBodyBytes + m_nHeaderBytes > nBytes) + { + /* Not enough data for the whole packet. */ + return 0; + } ! /* Save the original checksum, set it to zero and recalculate it. */ ! System.arraycopy(m_abData, nPage + 22, m_abChecksum, 0, 4); ! m_abData[nPage + 22] = 0; ! m_abData[nPage + 23] = 0; ! m_abData[nPage + 24] = 0; ! m_abData[nPage + 25] = 0; ! ! m_tmpPage.setData(m_abData, nPage, m_nHeaderBytes, ! m_abData, nPage + m_nHeaderBytes, m_nBodyBytes); ! // TDebug.out("temporary page:"); ! // byte[] abHeader = m_tmpPage.getHeader(); ! // TDebug.out("H0:" + m_abData[nPage + 0] + " - " + abHeader[0]); ! // TDebug.out("H1:" + m_abData[nPage + 1] + " - " + abHeader[1]); ! // TDebug.out("H2:" + m_abData[nPage + 2] + " - " + abHeader[2]); ! // TDebug.out("H3:" + m_abData[nPage + 3] + " - " + abHeader[3]); ! // TDebug.out("" + m_abChecksum[0] + " - " + abHeader[22]); ! // TDebug.out("" + m_abChecksum[1] + " - " + abHeader[23]); ! // TDebug.out("" + m_abChecksum[2] + " - " + abHeader[24]); ! // TDebug.out("" + m_abChecksum[3] + " - " + abHeader[25]); ! m_tmpPage.setChecksum(); ! byte[] abHeader = m_tmpPage.getHeader(); ! //m_tmpPage.free(); ! if (abHeader[22] != m_abChecksum[0] || ! abHeader[23] != m_abChecksum[1] || ! abHeader[24] != m_abChecksum[2] || ! abHeader[25] != m_abChecksum[3]) ! { ! TDebug.out("wrong checksum"); ! TDebug.out("" + m_abChecksum[0] + " - " + abHeader[22]); ! TDebug.out("" + m_abChecksum[1] + " - " + abHeader[23]); ! TDebug.out("" + m_abChecksum[2] + " - " + abHeader[24]); ! TDebug.out("" + m_abChecksum[3] + " - " + abHeader[25]); ! /* Copy back the saved checksum. */ ! System.arraycopy(m_abChecksum, 0, m_abData, nPage + 22, 4); ! return syncFailure(); ! } ! ! /* Ok, we have a correct page to emit. */ ! page.setData(m_abData, nPage, m_nHeaderBytes, ! m_abData, nPage + m_nHeaderBytes, m_nBodyBytes); ! m_bUnsynced = false; ! nBytes = m_nHeaderBytes + m_nBodyBytes; ! m_nReturned += nBytes; ! m_nHeaderBytes = 0; ! m_nBodyBytes = 0; ! return nBytes; ! } ! ! ! /** Auxiliary method for pageseek(). */ ! private int syncFailure() ! { ! int nPage = m_nReturned; ! int nBytes = m_nFill - m_nReturned; ! m_nHeaderBytes = 0; ! m_nBodyBytes = 0; ! int nNext = -1; ! for (int i = 0; i < nBytes - 1; i++) ! { ! if (m_abData[nPage + 1 + i] == (byte) 'O') ! { ! nNext = nPage + 1 + i; ! break; ! } ! } ! if (nNext == -1) ! { ! nNext = m_nFill; ! } ! m_nReturned = nNext; ! return -(nNext - nPage); ! } ! ! ! /** Returns a page from the stream buffer, if possible. This ! method searches the current data in the stream buffer for the ! beginning of a page. If there is one, it is returned in the ! passed Page object. A synchronization error is signaled by a ! return value of -1. However, only the first synchronization ! error is reported. Consecutive sync errors are suppressed. ! ! @param page The Page to store the result of the page search ! in. The content is only changed if the return value is 1. ! ! @return 1 if a page has been found, 0 if there is not enough ! data, -1 if a synchronization error occured. ! */ ! public int pageOut(Page page) ! { ! while (true) ! { ! int nReturn = pageseek(page); ! if (nReturn > 0) ! { ! return 1; ! } ! else if (nReturn == 0) ! { ! return 0; ! } ! else // nReturn < 0 ! { ! if (! m_bUnsynced) ! { ! m_bUnsynced = true; ! return -1; ! } ! } ! } ! } } |
|
From: Matthias P. <pfi...@us...> - 2005-01-20 20:00:17
|
Update of /cvsroot/tritonus/tritonus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11168 Modified Files: build.xml Log Message: updated for changed directory structure Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/build.xml Index: build.xml =================================================================== RCS file: /cvsroot/tritonus/tritonus/build.xml,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -r1.49 -r1.50 *** build.xml 20 Jan 2005 08:32:51 -0000 1.49 --- build.xml 20 Jan 2005 20:00:08 -0000 1.50 *************** *** 22,26 **** --- 22,28 ---- <compilerarg value="-Xlint:unchecked"/> <include name="org/tritonus/" /> + <exclude name="org/tritonus/sampled/cdda/" /> <exclude name="org/tritonus/sampled/convert/javalayer/" /> + <exclude name="org/tritonus/sampled/file/mpeg/" /> <exclude name="org/tritonus/midi/device/midishare/" /> <!-- necessary for kaffe --> |
|
From: Matthias P. <pfi...@us...> - 2005-01-20 19:56:37
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/sampled/file/mpeg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9706/classes/org/tritonus/sampled/file/mpeg Added Files: MpegAudioFileWriter.java package.html Log Message: changed directory structure Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/sampled/file/mpeg/MpegAudioFileWriter.java http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/sampled/file/mpeg/package.html --- NEW FILE: MpegAudioFileWriter.java --- --- NEW FILE: package.html --- |
|
From: Matthias P. <pfi...@us...> - 2005-01-20 19:56:03
|
Update of /cvsroot/tritonus/tritonus/src/org/tritonus/sampled/file/mpeg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9514/org/tritonus/sampled/file/mpeg Removed Files: MpegAudioFileWriter.java package.html Log Message: changed directory structure Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/org/tritonus/sampled/file/mpeg/MpegAudioFileWriter.java http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/org/tritonus/sampled/file/mpeg/package.html --- MpegAudioFileWriter.java DELETED --- --- package.html DELETED --- |
|
From: Matthias P. <pfi...@us...> - 2005-01-20 19:51:45
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/sampled/file/mpeg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8313/file/mpeg Log Message: Directory /cvsroot/tritonus/tritonus/src/classes/org/tritonus/sampled/file/mpeg added to the repository Direct links to online-CVS: |
|
From: Matthias P. <pfi...@us...> - 2005-01-20 19:50:45
|
Update of /cvsroot/tritonus/tritonus/src/org/tritonus/sampled/convert/lame In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8156/org/tritonus/sampled/convert/lame Removed Files: Mp3LameFormatConversionProvider.java package.html Log Message: changed directory structure Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/org/tritonus/sampled/convert/lame/Mp3LameFormatConversionProvider.java http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/org/tritonus/sampled/convert/lame/package.html --- Mp3LameFormatConversionProvider.java DELETED --- --- package.html DELETED --- |
|
From: Matthias P. <pfi...@us...> - 2005-01-20 19:48:51
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/sampled/convert/lame In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7601/classes/org/tritonus/sampled/convert/lame Added Files: Mp3LameFormatConversionProvider.java package.html Log Message: changed directory structure Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/sampled/convert/lame/Mp3LameFormatConversionProvider.java http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/src/classes/org/tritonus/sampled/convert/lame/package.html --- NEW FILE: Mp3LameFormatConversionProvider.java --- --- NEW FILE: package.html --- |
|
From: Matthias P. <pfi...@us...> - 2005-01-20 19:46:19
|
Update of /cvsroot/tritonus/tritonus/src/classes/org/tritonus/sampled/convert/lame In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7011/lame Log Message: Directory /cvsroot/tritonus/tritonus/src/classes/org/tritonus/sampled/convert/lame added to the repository Direct links to online-CVS: |
|
From: Matthias P. <pfi...@us...> - 2005-01-20 08:33:00
|
Update of /cvsroot/tritonus/tritonus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29731 Modified Files: build.xml Log Message: updated for changed directory structure Direct links to online-CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tritonus/tritonus/build.xml Index: build.xml =================================================================== RCS file: /cvsroot/tritonus/tritonus/build.xml,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -r1.48 -r1.49 *** build.xml 18 Jan 2005 18:52:33 -0000 1.48 --- build.xml 20 Jan 2005 08:32:51 -0000 1.49 *************** *** 21,30 **** <compilerarg compiler="kjc" value="-generic"/> <compilerarg value="-Xlint:unchecked"/> - <!--compilerarg value="-Xlint:unchecked"/--> - <include name="javax/sound/" /> <include name="org/tritonus/" /> <exclude name="org/tritonus/sampled/convert/javalayer/" /> <exclude name="org/tritonus/midi/device/midishare/" /> - <exclude name="org/tritonus/debug/" /> <!-- necessary for kaffe --> <!--exclude name="org/tritonus/midi/device/java/SunMiscPerfClock.java" /--> --- 21,27 ---- *************** *** 34,45 **** source="${source}" destdir="${build}" > <compilerarg value="-Xlint:unchecked"/> ! <include name="org/tritonus/lowlevel/dsp/" /> ! <include name="org/tritonus/dsp/" /> ! <include name="org/tritonus/lowlevel/pogg/" /> ! <include name="org/tritonus/lowlevel/pvorbis/" /> ! <include name="org/tritonus/sampled/" /> <exclude name="org/tritonus/sampled/convert/jorbis/" /> <exclude name="org/tritonus/sampled/file/jorbis/" /> </javac> </target> --- 31,44 ---- source="${source}" destdir="${build}" > + <compilerarg compiler="kjc" value="-generic"/> <compilerarg value="-Xlint:unchecked"/> ! <include name="javax/sound/" /> ! <include name="org/tritonus/" /> <exclude name="org/tritonus/sampled/convert/jorbis/" /> <exclude name="org/tritonus/sampled/file/jorbis/" /> + <exclude name="org/tritonus/saol/" /> + <exclude name="org/tritonus/debug/" /> + <!-- necessary for kaffe --> + <!--exclude name="org/tritonus/midi/device/java/SunMiscPerfClock.java" /--> </javac> </target> |