CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/12/03 08:35:34
Modified files: . : ChangeLog libbase : BitsReader.h libmedia : AudioDecoderSimple.cpp Log message: renamed BitsReader::got_bits to gotBits (style). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5061&r2=1.5062 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/BitsReader.h?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/AudioDecoderSimple.cpp?cvsroot=gnash&r1=1.8&r2=1.9 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.5061 retrieving revision 1.5062 diff -u -b -r1.5061 -r1.5062 --- ChangeLog 3 Dec 2007 08:15:45 -0000 1.5061 +++ ChangeLog 3 Dec 2007 08:35:34 -0000 1.5062 @@ -1,5 +1,7 @@ 2007-12-03 Sandro Santilli <[EMAIL PROTECTED]> + * libbase/BitsReader.h, libmedia/AudioDecoderSimple.cpp: renamed + BitsReader::got_bits to gotBits (style). * testsuite/swfdec/PASSING: countdown.swf succeeds after zou commit (unload event related). Index: libbase/BitsReader.h =================================================================== RCS file: /sources/gnash/gnash/libbase/BitsReader.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- libbase/BitsReader.h 1 Dec 2007 00:14:58 -0000 1.4 +++ libbase/BitsReader.h 3 Dec 2007 08:35:34 -0000 1.5 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -// $Id: BitsReader.h,v 1.4 2007/12/01 00:14:58 strk Exp $ +// $Id: BitsReader.h,v 1.5 2007/12/03 08:35:34 strk Exp $ #ifndef BITSREADER_H #define BITSREADER_H @@ -58,6 +58,11 @@ ~BitsReader() {} + size_t size() const + { + return end-start; + } + /// Set a new buffer to work with void setBuffer(byte* input, size_t len) { @@ -139,7 +144,7 @@ } /// Checks if the stream contains X bits - bool got_bits(uint32_t nbits) + bool gotBits(uint32_t nbits) { uint32_t gotbits = 8-usedBits +8*(end-ptr-1); if (gotbits > nbits) return true; Index: libmedia/AudioDecoderSimple.cpp =================================================================== RCS file: /sources/gnash/gnash/libmedia/AudioDecoderSimple.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- libmedia/AudioDecoderSimple.cpp 2 Dec 2007 14:54:33 -0000 1.8 +++ libmedia/AudioDecoderSimple.cpp 3 Dec 2007 08:35:34 -0000 1.9 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -// $Id: AudioDecoderSimple.cpp,v 1.8 2007/12/02 14:54:33 strk Exp $ +// $Id: AudioDecoderSimple.cpp,v 1.9 2007/12/03 08:35:34 strk Exp $ #include "AudioDecoderSimple.h" #include "utility.h" @@ -97,7 +97,7 @@ uint32_t sample_count = 1; *(*out_data)++ = (int16_t) sample; - while (sample_count < 4096 && in->got_bits(n_bits)) + while (sample_count < 4096 && in->gotBits(n_bits)) { int raw_code = in->read_uint(n_bits); doSample(n_bits, sample, stepsize_index, raw_code); /* sample & stepsize_index are in/out params */ @@ -125,7 +125,7 @@ *(*out_data)++ = (int16_t) left_sample; *(*out_data)++ = (int16_t) right_sample; - while (sample_count < 4096 && in->got_bits(n_bits*2)) + while (sample_count < 4096 && in->gotBits(n_bits*2)) { int left_raw_code = in->read_uint(n_bits); doSample(n_bits, left_sample, left_stepsize_index, left_raw_code); @@ -160,7 +160,7 @@ uint32_t sample_count = 0; - while (/*sample_count && !in->overread()*/in->got_bits(22)) + while (/*sample_count && !in->overread()*/in->gotBits(22)) { // Read initial sample & index values. _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit