gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash/libmedia gst/AudioDecoderGst.cpp gst/Audi...


From: Zou Lunkai
Subject: [Gnash-commit] gnash/libmedia gst/AudioDecoderGst.cpp gst/Audi...
Date: Wed, 12 Dec 2007 10:23:07 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/12/12 10:23:07

Modified files:
        libmedia/gst   : AudioDecoderGst.cpp AudioDecoderGst.h 
                         VideoDecoderGst.cpp VideoDecoderGst.h 
                         sound_handler_gst.cpp sound_handler_gst.h 
        libmedia/sdl   : AudioDecoderFfmpeg.cpp AudioDecoderFfmpeg.h 
                         AudioDecoderMad.cpp AudioDecoderMad.h 
                         MediaParserFfmpeg.cpp MediaParserFfmpeg.h 
                         VideoDecoderFfmpeg.cpp VideoDecoderFfmpeg.h 
                         sound_handler_sdl.cpp sound_handler_sdl.h 

Log message:
        remaining uint8_t-->boost::uint8_t.  Don't mix use global typedefs(if 
any) with boost typedefs.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/gst/AudioDecoderGst.cpp?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/gst/AudioDecoderGst.h?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/gst/VideoDecoderGst.cpp?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/gst/VideoDecoderGst.h?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/gst/sound_handler_gst.cpp?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/gst/sound_handler_gst.h?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/sdl/AudioDecoderFfmpeg.cpp?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/sdl/AudioDecoderFfmpeg.h?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/sdl/AudioDecoderMad.cpp?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/sdl/AudioDecoderMad.h?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/sdl/MediaParserFfmpeg.cpp?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/sdl/MediaParserFfmpeg.h?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/sdl/VideoDecoderFfmpeg.cpp?cvsroot=gnash&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/sdl/VideoDecoderFfmpeg.h?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/sdl/sound_handler_sdl.cpp?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/sdl/sound_handler_sdl.h?cvsroot=gnash&r1=1.7&r2=1.8

Patches:
Index: gst/AudioDecoderGst.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/gst/AudioDecoderGst.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- gst/AudioDecoderGst.cpp     4 Dec 2007 11:45:26 -0000       1.2
+++ gst/AudioDecoderGst.cpp     12 Dec 2007 10:23:06 -0000      1.3
@@ -16,7 +16,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// $Id: AudioDecoderGst.cpp,v 1.2 2007/12/04 11:45:26 strk Exp $
+// $Id: AudioDecoderGst.cpp,v 1.3 2007/12/12 10:23:06 zoulunkai Exp $
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -145,7 +145,7 @@
 
 }
 
-uint8_t* AudioDecoderGst::decode(uint8_t* input, boost::uint32_t inputSize, 
boost::uint32_t& outputSize, boost::uint32_t& decodedData, bool /*parse*/)
+boost::uint8_t* AudioDecoderGst::decode(boost::uint8_t* input, boost::uint32_t 
inputSize, boost::uint32_t& outputSize, boost::uint32_t& decodedData, bool 
/*parse*/)
 {
        // If there is nothing to decode in the new data we return NULL
        if (input == NULL || inputSize == 0 || !_decoder)

Index: gst/AudioDecoderGst.h
===================================================================
RCS file: /sources/gnash/gnash/libmedia/gst/AudioDecoderGst.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- gst/AudioDecoderGst.h       4 Dec 2007 11:45:26 -0000       1.2
+++ gst/AudioDecoderGst.h       12 Dec 2007 10:23:06 -0000      1.3
@@ -16,7 +16,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// $Id: AudioDecoderGst.h,v 1.2 2007/12/04 11:45:26 strk Exp $
+// $Id: AudioDecoderGst.h,v 1.3 2007/12/12 10:23:06 zoulunkai Exp $
 
 #ifndef __AUDIODECODERGST_H__
 #define __AUDIODECODERGST_H__
@@ -46,7 +46,7 @@
 
        bool setup(AudioInfo* info);
 
-       uint8_t* decode(uint8_t* /*input*/, boost::uint32_t /*inputSize*/, 
boost::uint32_t& /*outputSize*/, boost::uint32_t& /*decodedData*/, bool 
/*parse*/);
+       boost::uint8_t* decode(boost::uint8_t* /*input*/, boost::uint32_t 
/*inputSize*/, boost::uint32_t& /*outputSize*/, boost::uint32_t& 
/*decodedData*/, bool /*parse*/);
 
        static void callback_handoff (GstElement * /*c*/, GstBuffer *buffer, 
GstPad* /*pad*/, gpointer user_data);
        static void callback_output (GstElement * /*c*/, GstBuffer *buffer, 
GstPad* /*pad*/, gpointer user_data);
@@ -81,10 +81,10 @@
        volatile bool _stop;
 
        boost::uint32_t _undecodedDataSize;
-       uint8_t* _undecodedData;
+       boost::uint8_t* _undecodedData;
 
        boost::uint32_t _decodedDataSize;
-       uint8_t* _decodedData;
+       boost::uint8_t* _decodedData;
 
 };
 

Index: gst/VideoDecoderGst.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/gst/VideoDecoderGst.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- gst/VideoDecoderGst.cpp     4 Dec 2007 11:45:26 -0000       1.7
+++ gst/VideoDecoderGst.cpp     12 Dec 2007 10:23:06 -0000      1.8
@@ -16,7 +16,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// $Id: VideoDecoderGst.cpp,v 1.7 2007/12/04 11:45:26 strk Exp $
+// $Id: VideoDecoderGst.cpp,v 1.8 2007/12/12 10:23:06 zoulunkai Exp $
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -192,7 +192,7 @@
 
 // gnash calls this when it wants you to decode the given videoframe
 std::auto_ptr<image::image_base>
-VideoDecoderGst::decodeToImage(uint8_t* data, boost::uint32_t size)
+VideoDecoderGst::decodeToImage(boost::uint8_t* data, boost::uint32_t size)
 {
 
        std::auto_ptr<image::image_base> ret_image(new image::rgb(width, 
height));

Index: gst/VideoDecoderGst.h
===================================================================
RCS file: /sources/gnash/gnash/libmedia/gst/VideoDecoderGst.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- gst/VideoDecoderGst.h       4 Dec 2007 11:45:26 -0000       1.9
+++ gst/VideoDecoderGst.h       12 Dec 2007 10:23:06 -0000      1.10
@@ -16,7 +16,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// $Id: VideoDecoderGst.h,v 1.9 2007/12/04 11:45:26 strk Exp $
+// $Id: VideoDecoderGst.h,v 1.10 2007/12/12 10:23:06 zoulunkai Exp $
 
 #ifndef __VIDEODECODERGST_H__
 #define __VIDEODECODERGST_H__
@@ -54,9 +54,9 @@
                videoCodecType /*format*/,
                int /*outputFormat*/);
 
-       //uint8_t* decode(uint8_t* input, boost::uint32_t inputSize, 
boost::uint32_t& outputSize);
+       //boost::uint8_t* decode(boost::uint8_t* input, boost::uint32_t 
inputSize, boost::uint32_t& outputSize);
 
-       std::auto_ptr<image::image_base> decodeToImage(uint8_t* /*input*/, 
boost::uint32_t /*inputSize*/);
+       std::auto_ptr<image::image_base> decodeToImage(boost::uint8_t* 
/*input*/, boost::uint32_t /*inputSize*/);
 
        static void callback_handoff (GstElement * /*c*/, GstBuffer *buffer, 
GstPad* /*pad*/, gpointer user_data);
        static void callback_output (GstElement * /*c*/, GstBuffer *buffer, 
GstPad* /*pad*/, gpointer user_data);
@@ -90,7 +90,7 @@
        int outputFormat;
 
        /// Input data and size for current frame
-       uint8_t* frame;
+       boost::uint8_t* frame;
        int frameSize;
        
        /// Last decoded frame

Index: gst/sound_handler_gst.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/gst/sound_handler_gst.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- gst/sound_handler_gst.cpp   4 Dec 2007 11:45:26 -0000       1.8
+++ gst/sound_handler_gst.cpp   12 Dec 2007 10:23:06 -0000      1.9
@@ -20,7 +20,7 @@
 // Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003
 // which has been donated to the Public Domain.
 
-/* $Id: sound_handler_gst.cpp,v 1.8 2007/12/04 11:45:26 strk Exp $ */
+/* $Id: sound_handler_gst.cpp,v 1.9 2007/12/12 10:23:06 zoulunkai Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -867,13 +867,13 @@
 }
 
 // Pointer handling and checking functions
-const uint8_t* gst_elements::get_data_ptr(unsigned long int pos)
+const boost::uint8_t* gst_elements::get_data_ptr(unsigned long int pos)
 {
        assert(data_size > pos);
        return data + pos;
 }
 
-void gst_elements::set_data(const uint8_t* idata) {
+void gst_elements::set_data(const boost::uint8_t* idata) {
        data = idata;
 }
 

Index: gst/sound_handler_gst.h
===================================================================
RCS file: /sources/gnash/gnash/libmedia/gst/sound_handler_gst.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- gst/sound_handler_gst.h     1 Dec 2007 21:07:20 -0000       1.6
+++ gst/sound_handler_gst.h     12 Dec 2007 10:23:06 -0000      1.7
@@ -14,7 +14,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// $Id: sound_handler_gst.h,v 1.6 2007/12/01 21:07:20 strk Exp $
+// $Id: sound_handler_gst.h,v 1.7 2007/12/12 10:23:06 zoulunkai Exp $
 
 #ifndef SOUND_HANDLER_GST_H
 #define SOUND_HANDLER_GST_H
@@ -74,10 +74,10 @@
 
        /// Returns the data pointer in the undecoded datastream
        /// for the given position. Boundaries are checked.
-       const uint8_t* get_data_ptr(unsigned long int pos);
+       const boost::uint8_t* get_data_ptr(unsigned long int pos);
 
        /// Set the undecoded data pointer
-       void set_data(const uint8_t*);
+       void set_data(const boost::uint8_t*);
 
        /// The owner of the audio data this element will get data from.
        /// Only used when getting data from NetStream or Sound.
@@ -118,7 +118,7 @@
        size_t dataSize() const { return _data.size(); }
 
        /// Return data buffer
-       const uint8_t* data() { return _data.data(); }
+       const boost::uint8_t* data() { return _data.data(); }
 
        // Object holding information about the sound
        std::auto_ptr<SoundInfo> soundinfo;

Index: sdl/AudioDecoderFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/sdl/AudioDecoderFfmpeg.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- sdl/AudioDecoderFfmpeg.cpp  4 Dec 2007 11:45:26 -0000       1.10
+++ sdl/AudioDecoderFfmpeg.cpp  12 Dec 2007 10:23:06 -0000      1.11
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-// $Id: AudioDecoderFfmpeg.cpp,v 1.10 2007/12/04 11:45:26 strk Exp $
+// $Id: AudioDecoderFfmpeg.cpp,v 1.11 2007/12/12 10:23:06 zoulunkai Exp $
 
 #include "AudioDecoderFfmpeg.h"
 
@@ -176,12 +176,12 @@
        return true;
 }
 
-uint8_t* AudioDecoderFfmpeg::decode(uint8_t* input, boost::uint32_t inputSize, 
boost::uint32_t& outputSize, boost::uint32_t& decodedBytes, bool parse)
+boost::uint8_t* AudioDecoderFfmpeg::decode(boost::uint8_t* input, 
boost::uint32_t inputSize, boost::uint32_t& outputSize, boost::uint32_t& 
decodedBytes, bool parse)
 {
 
        long bytes_decoded = 0;
        int bufsize = (AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2;
-       uint8_t* output = new uint8_t[bufsize];
+       boost::uint8_t* output = new boost::uint8_t[bufsize];
        boost::uint32_t orgbufsize = bufsize;
        decodedBytes = 0;
 
@@ -196,7 +196,7 @@
        
                bufsize = 0;
                while (bufsize == 0 && decodedBytes < inputSize) {
-                       uint8_t* frame;
+                       boost::uint8_t* frame;
                        int framesize;
 
                        bytes_decoded = av_parser_parse(_parser, 
_audioCodecCtx, &frame, &framesize, input+decodedBytes, inputSize-decodedBytes, 
0, 0); //the last 2 is pts & dts
@@ -259,20 +259,20 @@
                bool stereo = _audioCodecCtx->channels > 1 ? true : false;
                int samples = stereo ? bufsize >> 2 : bufsize >> 1;
 
-               uint8_t* tmp = new uint8_t[orgbufsize];
+               boost::uint8_t* tmp = new boost::uint8_t[orgbufsize];
                        
                samples = 
_resampler.resample(reinterpret_cast<boost::int16_t*>(output),
                                                 
reinterpret_cast<boost::int16_t*>(tmp),
                                                 samples);
                outputSize = samples *2 *2; // the resampled audio has 
samplesize 2, and is stereo
-               uint8_t* ret = new uint8_t[outputSize];
+               boost::uint8_t* ret = new boost::uint8_t[outputSize];
                memcpy(ret, tmp, outputSize);
                delete [] tmp;
                delete [] output;
                return ret;
        } else {
                outputSize = bufsize;
-               uint8_t* ret = new uint8_t[outputSize];
+               boost::uint8_t* ret = new boost::uint8_t[outputSize];
                memcpy(ret, output, outputSize);
                delete [] output;
                return ret;             

Index: sdl/AudioDecoderFfmpeg.h
===================================================================
RCS file: /sources/gnash/gnash/libmedia/sdl/AudioDecoderFfmpeg.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- sdl/AudioDecoderFfmpeg.h    4 Dec 2007 11:45:27 -0000       1.5
+++ sdl/AudioDecoderFfmpeg.h    12 Dec 2007 10:23:06 -0000      1.6
@@ -16,7 +16,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// $Id: AudioDecoderFfmpeg.h,v 1.5 2007/12/04 11:45:27 strk Exp $
+// $Id: AudioDecoderFfmpeg.h,v 1.6 2007/12/12 10:23:06 zoulunkai Exp $
 
 #ifndef __AUDIODECODERFFMPEG_H__
 #define __AUDIODECODERFFMPEG_H__
@@ -99,7 +99,7 @@
        bool setup(AudioInfo* info);
        bool setup(SoundInfo* info);
 
-       uint8_t* decode(uint8_t* input, boost::uint32_t inputSize, 
boost::uint32_t& outputSize, boost::uint32_t& decodedBytes, bool parse);
+       boost::uint8_t* decode(boost::uint8_t* input, boost::uint32_t 
inputSize, boost::uint32_t& outputSize, boost::uint32_t& decodedBytes, bool 
parse);
 
 private:
 

Index: sdl/AudioDecoderMad.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/sdl/AudioDecoderMad.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- sdl/AudioDecoderMad.cpp     4 Dec 2007 11:45:27 -0000       1.6
+++ sdl/AudioDecoderMad.cpp     12 Dec 2007 10:23:06 -0000      1.7
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-// $Id: AudioDecoderMad.cpp,v 1.6 2007/12/04 11:45:27 strk Exp $
+// $Id: AudioDecoderMad.cpp,v 1.7 2007/12/12 10:23:06 zoulunkai Exp $
 
 #include "AudioDecoderMad.h"
 #include "utility.h"
@@ -64,7 +64,7 @@
        }
 }
 
-uint8_t* AudioDecoderMad::decode(uint8_t* input, boost::uint32_t inputSize, 
boost::uint32_t& outputSize, boost::uint32_t& decodedBytes, bool parse)
+boost::uint8_t* AudioDecoderMad::decode(boost::uint8_t* input, boost::uint32_t 
inputSize, boost::uint32_t& outputSize, boost::uint32_t& decodedBytes, bool 
parse)
 {
        // Setup the mad decoder
        mad_stream_buffer(&_stream, input, inputSize);
@@ -107,7 +107,7 @@
        
        boost::uint32_t outsize = _synth.pcm.length * _synth.pcm.channels * 2;
 
-       uint8_t* tmp_raw_buffer = new uint8_t[outsize];
+       boost::uint8_t* tmp_raw_buffer = new boost::uint8_t[outsize];
        boost::uint32_t tmp_raw_buffer_size = 0;
        int sample;
        
@@ -160,7 +160,7 @@
 
                // Move the new data to the sound-struct
                delete[] tmp_raw_buffer;
-               tmp_raw_buffer = reinterpret_cast<uint8_t*>(adjusted_data);
+               tmp_raw_buffer = 
reinterpret_cast<boost::uint8_t*>(adjusted_data);
                tmp_raw_buffer_size = adjusted_size;
 
        } else {

Index: sdl/AudioDecoderMad.h
===================================================================
RCS file: /sources/gnash/gnash/libmedia/sdl/AudioDecoderMad.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- sdl/AudioDecoderMad.h       4 Dec 2007 11:45:27 -0000       1.5
+++ sdl/AudioDecoderMad.h       12 Dec 2007 10:23:06 -0000      1.6
@@ -16,7 +16,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// $Id: AudioDecoderMad.h,v 1.5 2007/12/04 11:45:27 strk Exp $
+// $Id: AudioDecoderMad.h,v 1.6 2007/12/12 10:23:06 zoulunkai Exp $
 
 #ifndef __AUDIODECODERMAD_H__
 #define __AUDIODECODERMAD_H__
@@ -39,7 +39,7 @@
        bool setup(AudioInfo* info);
        bool setup(SoundInfo* info);
 
-       uint8_t* decode(uint8_t* input, boost::uint32_t inputSize, 
boost::uint32_t& outputSize, boost::uint32_t& decodedBytes, bool parse);
+       boost::uint8_t* decode(boost::uint8_t* input, boost::uint32_t 
inputSize, boost::uint32_t& outputSize, boost::uint32_t& decodedBytes, bool 
parse);
 
 private:
 

Index: sdl/MediaParserFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/sdl/MediaParserFfmpeg.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- sdl/MediaParserFfmpeg.cpp   4 Dec 2007 11:45:27 -0000       1.9
+++ sdl/MediaParserFfmpeg.cpp   12 Dec 2007 10:23:06 -0000      1.10
@@ -16,7 +16,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// $Id: MediaParserFfmpeg.cpp,v 1.9 2007/12/04 11:45:27 strk Exp $
+// $Id: MediaParserFfmpeg.cpp,v 1.10 2007/12/12 10:23:06 zoulunkai Exp $
 
 #include "MediaParserFfmpeg.h"
 #include "log.h"
@@ -57,7 +57,7 @@
 static AVInputFormat*
 probeStream(tu_file* stream)
 {
-       boost::scoped_array<uint8_t> buffer(new uint8_t[4096]);
+       boost::scoped_array<boost::uint8_t> buffer(new boost::uint8_t[4096]);
 
        // Probe the file to detect the format
        AVProbeData probe_data;
@@ -97,7 +97,7 @@
 
        // Setup the filereader/seeker mechanism. 7th argument (NULL) is the 
writer function,
        // which isn't needed.
-       init_put_byte(&_byteIOCxt, new uint8_t[500000], 500000, 0, this, 
MediaParserFfmpeg::readPacket, NULL, MediaParserFfmpeg::seekMedia);
+       init_put_byte(&_byteIOCxt, new boost::uint8_t[500000], 500000, 0, this, 
MediaParserFfmpeg::readPacket, NULL, MediaParserFfmpeg::seekMedia);
        _byteIOCxt.is_streamed = 1;
 
        _formatCtx = av_alloc_format_context();
@@ -215,7 +215,7 @@
                // "The input buffer must be FF_INPUT_BUFFER_PADDING_SIZE
                // larger than the actual read bytes because some optimized 
bitstream
                // readers read 32 or 64 bits at once and could read over the 
end."
-               ret->data = new uint8_t[packet.size + 
FF_INPUT_BUFFER_PADDING_SIZE];
+               ret->data = new boost::uint8_t[packet.size + 
FF_INPUT_BUFFER_PADDING_SIZE];
                
                memcpy(ret->data, packet.data, packet.size);
                
@@ -360,7 +360,7 @@
 
 // ffmpeg callback function
 int 
-MediaParserFfmpeg::readPacket(void* opaque, uint8_t* buf, int buf_size)
+MediaParserFfmpeg::readPacket(void* opaque, boost::uint8_t* buf, int buf_size)
 {
 
        MediaParserFfmpeg* decoder = static_cast<MediaParserFfmpeg*>(opaque);

Index: sdl/MediaParserFfmpeg.h
===================================================================
RCS file: /sources/gnash/gnash/libmedia/sdl/MediaParserFfmpeg.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- sdl/MediaParserFfmpeg.h     4 Dec 2007 11:45:27 -0000       1.7
+++ sdl/MediaParserFfmpeg.h     12 Dec 2007 10:23:06 -0000      1.8
@@ -16,7 +16,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// $Id: MediaParserFfmpeg.h,v 1.7 2007/12/04 11:45:27 strk Exp $
+// $Id: MediaParserFfmpeg.h,v 1.8 2007/12/12 10:23:06 zoulunkai Exp $
 
 #ifndef __MEDIAPARSERFFMPEG_H__
 #define __MEDIAPARSERFFMPEG_H__
@@ -73,7 +73,7 @@
        std::auto_ptr<AudioInfo> getAudioInfo();
 
        // Used for ffmpeg data read and seek callbacks
-       static int readPacket(void* opaque, uint8_t* buf, int buf_size);
+       static int readPacket(void* opaque, boost::uint8_t* buf, int buf_size);
 
        // Used for ffmpeg data read and seek callbacks
        static offset_t seekMedia(void *opaque, offset_t offset, int whence);

Index: sdl/VideoDecoderFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/sdl/VideoDecoderFfmpeg.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- sdl/VideoDecoderFfmpeg.cpp  6 Dec 2007 12:50:24 -0000       1.11
+++ sdl/VideoDecoderFfmpeg.cpp  12 Dec 2007 10:23:06 -0000      1.12
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-// $Id: VideoDecoderFfmpeg.cpp,v 1.11 2007/12/06 12:50:24 bwy Exp $
+// $Id: VideoDecoderFfmpeg.cpp,v 1.12 2007/12/12 10:23:06 zoulunkai Exp $
 
 #include "VideoDecoderFfmpeg.h"
 
@@ -168,7 +168,7 @@
        return true;
 }
 
-uint8_t*
+boost::uint8_t*
 VideoDecoderFfmpeg::convertRGB24(AVCodecContext* srcCtx, AVFrame* srcFrame)
 {
        int width = srcCtx->width, height = srcCtx->height;
@@ -178,7 +178,7 @@
                return NULL;
        }
 
-       uint8_t* buffer = new uint8_t[bufsize];
+       boost::uint8_t* buffer = new boost::uint8_t[bufsize];
        if (!buffer) {
                return NULL;
        }
@@ -222,7 +222,7 @@
        return buffer;
 }
 
-uint8_t* VideoDecoderFfmpeg::decode(uint8_t* input,
+boost::uint8_t* VideoDecoderFfmpeg::decode(boost::uint8_t* input,
                                boost::uint32_t inputSize,
                                boost::uint32_t& outputSize)
 {
@@ -240,7 +240,7 @@
        
        if (got)
        {
-               boost::scoped_array<uint8_t> buffer;
+               boost::scoped_array<boost::uint8_t> buffer;
                
                // Set to the next multiple of four. Some videos have
                // padding bytes, so that the source width is more than three 
times
@@ -249,15 +249,15 @@
                // Have found no documenation on this.
                unsigned int srcwidth = (_videoCodecCtx->width * 3 + 3) &~ 3; 
 
-               uint8_t* decodedData = new uint8_t[srcwidth * 
_videoCodecCtx->height];
+               boost::uint8_t* decodedData = new boost::uint8_t[srcwidth * 
_videoCodecCtx->height];
                buffer.reset(convertRGB24(_videoCodecCtx, frame));
 
                // Copy the data to the buffer in the correct RGB format
-               uint8_t* srcptr = frame->data[0];
-               uint8_t* srcend = frame->data[0]
+               boost::uint8_t* srcptr = frame->data[0];
+               boost::uint8_t* srcend = frame->data[0]
                                        + frame->linesize[0]
                                        * _videoCodecCtx->height;
-               uint8_t* dstptr = decodedData;
+               boost::uint8_t* dstptr = decodedData;
 
                outputSize = 0;
 
@@ -287,9 +287,9 @@
                raw_mediadata_t* video = new raw_mediadata_t;
                if (_videoFrameFormat == YUV) {
                        abort(); // See image.cpp to see what yuv size is
-                       //video->m_data = new 
uint8_t[static_cast<image::yuv*>(m_imageframe)->size()];
+                       //video->m_data = new 
boost::uint8_t[static_cast<image::yuv*>(m_imageframe)->size()];
                } else if (_videoFrameFormat == RGB) {
-                       video->m_data = new uint8_t[_videoCodecCtx->width * 
_videoCodecCtx->height * 3];
+                       video->m_data = new 
boost::uint8_t[_videoCodecCtx->width * _videoCodecCtx->height * 3];
                //}
 
                video->m_ptr = video->m_data;
@@ -302,11 +302,11 @@
                if (_videoFrameFormat == YUV) {
                        //image::yuv* yuvframe = 
static_cast<image::yuv*>(_imageframe);
                        int copied = 0;
-                       uint8_t* ptr = video->m_data;
+                       boost::uint8_t* ptr = video->m_data;
                        for (int i = 0; i < 3 ; i++)
                        {
                                int shift = (i == 0 ? 0 : 1);
-                               uint8_t* yuv_factor = _frame->data[i];
+                               boost::uint8_t* yuv_factor = _frame->data[i];
                                int h = _videoCodecCtx->height >> shift;
                                int w = _videoCodecCtx->width >> shift;
                                for (int j = 0; j < h; j++)
@@ -321,9 +321,9 @@
                        video->m_size = copied;
                } else if (_videoFrameFormat == RGB) {
 
-                       uint8_t* srcptr = _frame->data[0];
-                       uint8_t* srcend = _frame->data[0] + _frame->linesize[0] 
* _videoCodecCtx->height;
-                       uint8_t* dstptr = video->m_data;
+                       boost::uint8_t* srcptr = _frame->data[0];
+                       boost::uint8_t* srcend = _frame->data[0] + 
_frame->linesize[0] * _videoCodecCtx->height;
+                       boost::uint8_t* dstptr = video->m_data;
                        unsigned int srcwidth = _videoCodecCtx->width * 3;
 
                        video->m_size = 0;
@@ -346,10 +346,10 @@
 }
 
 std::auto_ptr<image::image_base>
-VideoDecoderFfmpeg::decodeToImage(uint8_t* input, boost::uint32_t inputSize)
+VideoDecoderFfmpeg::decodeToImage(boost::uint8_t* input, boost::uint32_t 
inputSize)
 {
        boost::uint32_t outputSize = 0;
-       uint8_t* decodedData = decode(input, inputSize, outputSize);
+       boost::uint8_t* decodedData = decode(input, inputSize, outputSize);
 
        if (!decodedData || outputSize == 0)
        {

Index: sdl/VideoDecoderFfmpeg.h
===================================================================
RCS file: /sources/gnash/gnash/libmedia/sdl/VideoDecoderFfmpeg.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- sdl/VideoDecoderFfmpeg.h    4 Dec 2007 11:45:27 -0000       1.9
+++ sdl/VideoDecoderFfmpeg.h    12 Dec 2007 10:23:07 -0000      1.10
@@ -16,7 +16,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// $Id: VideoDecoderFfmpeg.h,v 1.9 2007/12/04 11:45:27 strk Exp $
+// $Id: VideoDecoderFfmpeg.h,v 1.10 2007/12/12 10:23:07 zoulunkai Exp $
 
 #ifndef __VIDEODECODERFFMPEG_H__
 #define __VIDEODECODERFFMPEG_H__
@@ -55,11 +55,11 @@
                videoCodecType /*format*/,
                int /*outputFormat*/);
 
-       uint8_t* decode(uint8_t* input, boost::uint32_t inputSize, 
boost::uint32_t& outputSize);
+       boost::uint8_t* decode(boost::uint8_t* input, boost::uint32_t 
inputSize, boost::uint32_t& outputSize);
 
-       std::auto_ptr<image::image_base> decodeToImage(uint8_t* /*input*/, 
boost::uint32_t /*inputSize*/);
+       std::auto_ptr<image::image_base> decodeToImage(boost::uint8_t* 
/*input*/, boost::uint32_t /*inputSize*/);
 
-       static uint8_t* convertRGB24(AVCodecContext* srcCtx, AVFrame* srcFrame);
+       static boost::uint8_t* convertRGB24(AVCodecContext* srcCtx, AVFrame* 
srcFrame);
 
 private:
 

Index: sdl/sound_handler_sdl.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/sdl/sound_handler_sdl.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- sdl/sound_handler_sdl.cpp   4 Dec 2007 11:45:27 -0000       1.8
+++ sdl/sound_handler_sdl.cpp   12 Dec 2007 10:23:07 -0000      1.9
@@ -20,7 +20,7 @@
 // Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003
 // which has been donated to the Public Domain.
 
-// $Id: sound_handler_sdl.cpp,v 1.8 2007/12/04 11:45:27 strk Exp $
+// $Id: sound_handler_sdl.cpp,v 1.9 2007/12/12 10:23:07 zoulunkai Exp $
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -99,14 +99,14 @@
                return -1;
 #endif
 #endif
-               sounddata->append(reinterpret_cast<uint8_t*>(data), data_bytes);
+               sounddata->append(reinterpret_cast<boost::uint8_t*>(data), 
data_bytes);
                break;
 
        case AUDIO_CODEC_RAW:
        case AUDIO_CODEC_ADPCM:
        case AUDIO_CODEC_UNCOMPRESSED:
        case AUDIO_CODEC_NELLYMOSER:
-               sounddata->append(reinterpret_cast<uint8_t*>(data), data_bytes);
+               sounddata->append(reinterpret_cast<boost::uint8_t*>(data), 
data_bytes);
                break;
 
        default:
@@ -144,7 +144,7 @@
 
        // Handling of the sound data
        size_t start_size = sounddata->size();
-       sounddata->append(reinterpret_cast<uint8_t*>(data), data_bytes);
+       sounddata->append(reinterpret_cast<boost::uint8_t*>(data), data_bytes);
 
        return start_size;
 }
@@ -500,7 +500,7 @@
 }
 
 // Pointer handling and checking functions
-uint8_t*
+boost::uint8_t*
 active_sound::get_raw_data_ptr(unsigned long int pos)
 {
        if ( _decodedData.get() )
@@ -510,7 +510,7 @@
        else return 0;
 }
 
-uint8_t*
+boost::uint8_t*
 active_sound::get_data_ptr(unsigned long int pos)
 {
        assert(_undecodedData);
@@ -651,7 +651,7 @@
        // call NetStream or Sound audio callbacks
        if ( !handler->m_aux_streamer.empty() )
        {
-               boost::scoped_array<uint8_t> buf ( new uint8_t[buffer_length] );
+               boost::scoped_array<boost::uint8_t> buf ( new 
boost::uint8_t[buffer_length] );
 
                // Loop through the attached sounds
                CallbacksMap::iterator it = handler->m_aux_streamer.begin();

Index: sdl/sound_handler_sdl.h
===================================================================
RCS file: /sources/gnash/gnash/libmedia/sdl/sound_handler_sdl.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- sdl/sound_handler_sdl.h     4 Dec 2007 11:45:27 -0000       1.7
+++ sdl/sound_handler_sdl.h     12 Dec 2007 10:23:07 -0000      1.8
@@ -16,7 +16,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// $Id: sound_handler_sdl.h,v 1.7 2007/12/04 11:45:27 strk Exp $
+// $Id: sound_handler_sdl.h,v 1.8 2007/12/12 10:23:07 zoulunkai Exp $
 
 #ifndef SOUND_HANDLER_SDL_H
 #define SOUND_HANDLER_SDL_H
@@ -74,7 +74,7 @@
        /// @param size
        ///     Size of the 'data' buffer.
        ///
-       void append(uint8_t* data, unsigned int size)
+       void append(boost::uint8_t* data, unsigned int size)
        {
                _buf.append(data, size);
        }
@@ -86,12 +86,12 @@
        }
 
        /// Return a pointer to the underlying buffer
-       const uint8_t* data() const {
+       const boost::uint8_t* data() const {
                return _buf.data();
        }
 
        /// Return a pointer to the underlying buffer
-       uint8_t* data() {
+       boost::uint8_t* data() {
                return _buf.data();
        }
 
@@ -100,7 +100,7 @@
        /// @param pos The offset value.
        ///     An assertion will fail if pos > size()
        ///
-       const uint8_t* data(size_t pos) const {
+       const boost::uint8_t* data(size_t pos) const {
                return _buf.data(pos);
        }
 
@@ -109,7 +109,7 @@
        /// @param pos The offset value.
        ///     An assertion will fail if pos > size()
        ///
-       uint8_t* data(size_t pos) {
+       boost::uint8_t* data(size_t pos) {
                return _buf.data(pos);
        }
 
@@ -191,11 +191,11 @@
 
        /// Returns the data pointer in the undecoded datastream
        /// for the given position. Boundaries are checked.
-       uint8_t* get_data_ptr(unsigned long int pos);
+       boost::uint8_t* get_data_ptr(unsigned long int pos);
 
        /// Returns the data pointer in the decoded datastream
        /// for the given position. Boundaries are checked.
-       uint8_t* get_raw_data_ptr(unsigned long int pos);
+       boost::uint8_t* get_raw_data_ptr(unsigned long int pos);
 
        /// Release resources associated with decoded data, if any.
        //
@@ -213,7 +213,7 @@
        /// @param size
        ///     Size of the 'data' buffer.
        ///
-       void appendDecodedData(uint8_t* data, unsigned int size)
+       void appendDecodedData(boost::uint8_t* data, unsigned int size)
        {
                if ( ! _decodedData.get() )
                {
@@ -231,7 +231,7 @@
        /// @param size
        ///     Size of the 'data' buffer.
        ///
-       void setDecodedData(uint8_t* data, unsigned int size)
+       void setDecodedData(boost::uint8_t* data, unsigned int size)
        {
                if ( ! _decodedData.get() )
                {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]