gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog backend/sound_handler_gst.cpp b...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog backend/sound_handler_gst.cpp b...
Date: Mon, 23 Jul 2007 22:22:25 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/07/23 22:22:25

Modified files:
        .              : ChangeLog 
        backend        : sound_handler_gst.cpp sound_handler_gst.h 
                         sound_handler_sdl.cpp sound_handler_sdl.h 

Log message:
                * backend/: sound_handler_gst.{cpp,h},
                  sound_handler_sdl.{cpp,h}:
                  Define sound handlers inside the gnash namespace.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3800&r2=1.3801
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_gst.cpp?cvsroot=gnash&r1=1.52&r2=1.53
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_gst.h?cvsroot=gnash&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.cpp?cvsroot=gnash&r1=1.74&r2=1.75
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.h?cvsroot=gnash&r1=1.29&r2=1.30

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3800
retrieving revision 1.3801
diff -u -b -r1.3800 -r1.3801
--- ChangeLog   23 Jul 2007 22:20:48 -0000      1.3800
+++ ChangeLog   23 Jul 2007 22:22:24 -0000      1.3801
@@ -1,5 +1,11 @@
 2007-07-23 Sandro Santilli <address@hidden>
 
+       * backend/: sound_handler_gst.{cpp,h},
+         sound_handler_sdl.{cpp,h}:
+         Define sound handlers inside the gnash namespace.
+
+2007-07-23 Sandro Santilli <address@hidden>
+
        * plugin/klash/Makefile.am: fix uninstall rule.
          Make distcheck works fine on gnashdev now.
 

Index: backend/sound_handler_gst.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_gst.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- backend/sound_handler_gst.cpp       23 Jul 2007 22:07:58 -0000      1.52
+++ backend/sound_handler_gst.cpp       23 Jul 2007 22:22:25 -0000      1.53
@@ -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.52 2007/07/23 22:07:58 strk Exp $ */
+/* $Id: sound_handler_gst.cpp,v 1.53 2007/07/23 22:22:25 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -34,6 +34,7 @@
 //
 
 #ifdef SOUND_GST
+
 #include "sound_handler_gst.h"
 #include "gnash.h"
 #include "container.h"
@@ -48,6 +49,8 @@
 
 using namespace boost;
 
+namespace gnash {
+
 GST_sound_handler::GST_sound_handler()
        : looping(false),
          muted(false)
@@ -617,8 +620,9 @@
        return new GST_sound_handler;
 }
 
+} // namespace gnash
 
-#endif
+#endif // SOUND_GST
 
 // Local Variables:
 // mode: C++

Index: backend/sound_handler_gst.h
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_gst.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- backend/sound_handler_gst.h 1 Jul 2007 10:53:48 -0000       1.11
+++ backend/sound_handler_gst.h 23 Jul 2007 22:22:25 -0000      1.12
@@ -29,6 +29,8 @@
 
 #define BUFFER_SIZE 5000
 
+namespace gnash {
+
 // forward declaration
 class GST_sound_handler;
 
@@ -179,5 +181,7 @@
        virtual void    detach_aux_streamer(void* owner);       //vv
 };
 
+} // namespace gnash
+
 #endif // SOUND_HANDLER_GST_H
 

Index: backend/sound_handler_sdl.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.cpp,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -b -r1.74 -r1.75
--- backend/sound_handler_sdl.cpp       23 Jul 2007 22:07:58 -0000      1.74
+++ backend/sound_handler_sdl.cpp       23 Jul 2007 22:22:25 -0000      1.75
@@ -18,7 +18,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.74 2007/07/23 22:07:58 strk Exp $
+// $Id: sound_handler_sdl.cpp,v 1.75 2007/07/23 22:22:25 strk Exp $
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -34,6 +34,8 @@
 
 using namespace boost;
 
+namespace gnash {
+
 SDL_sound_handler::SDL_sound_handler()
        : soundOpened(false),
                soundsPlaying(0),
@@ -72,7 +74,7 @@
 
        sound_data *sounddata = new sound_data;
        if (!sounddata) {
-               gnash::log_error(_("could not allocate memory for sound data"));
+               log_error(_("could not allocate memory for sound data"));
                return -1;
        }
 
@@ -96,7 +98,7 @@
                        convert_raw_data(&adjusted_data, &adjusted_size, data, 
sample_count, 2, sample_rate, stereo,
                                         audioSpec.freq, (audioSpec.channels == 
2 ? true : false));
                        if (!adjusted_data) {
-                               gnash::log_error(_("Some kind of error occurred 
with sound data"));
+                               log_error(_("Some kind of error occurred with 
sound data"));
                                return -1;
                        }
                        sounddata->data_size = adjusted_size;
@@ -107,13 +109,13 @@
        case FORMAT_MP3:
 #ifndef USE_FFMPEG
 #ifndef USE_MAD
-               gnash::log_error(_("gnash has not been compiled to handle mp3 
audio"));
+               log_error(_("gnash has not been compiled to handle mp3 audio"));
                return -1;
 #endif
 #endif
                sounddata->data = new Uint8[data_bytes];
                if (!sounddata->data) {
-                       gnash::log_error(_("could not allocate space for data 
in sound handler"));
+                       log_error(_("could not allocate space for data in sound 
handler"));
                        return -1;
                }
                memcpy(sounddata->data, data, data_bytes);
@@ -125,17 +127,17 @@
        case FORMAT_ADPCM:
        case FORMAT_UNCOMPRESSED:
                // These should have been converted to FORMAT_NATIVE16
-               gnash::log_error(_("Sound data format not properly converted"));
+               log_error(_("Sound data format not properly converted"));
                return -1;
                break;
 
        case FORMAT_NELLYMOSER:
-               gnash::log_unimpl("Nellymoser sound format requested, gnash 
does not handle it.");
+               log_unimpl("Nellymoser sound format requested, gnash does not 
handle it.");
                return -1;
 
        default:
                // Unhandled format.
-               gnash::log_error(_("unknown sound format %d requested; gnash 
does not handle it"), (int)format);
+               log_error(_("unknown sound format %d requested; gnash does not 
handle it"), (int)format);
                return -1; // Unhandled format, set to NULL.
        }
 
@@ -171,7 +173,7 @@
                                 sounddata->sample_rate, sounddata->stereo,
                                 audioSpec.freq, (audioSpec.channels == 2));
                if (!adjusted_data || adjusted_size < 1) {
-                       gnash::log_error(_("Some kind of error with resampling 
sound data"));
+                       log_error(_("Some kind of error with resampling sound 
data"));
                        return -1;
                }
 
@@ -219,7 +221,7 @@
            break;
 
        default:
-               gnash::log_error(_("Behavior for this audio codec %d is 
unknown.  Please send this SWF to the developers"), (int)(sounddata->format));
+               log_error(_("Behavior for this audio codec %d is unknown.  
Please send this SWF to the developers"), (int)(sounddata->format));
        }
 
        return start_size;
@@ -250,7 +252,7 @@
        // Make sure sound actually got some data
        if (sounddata->data_size < 1) {
                IF_VERBOSE_MALFORMED_SWF(
-                       gnash::log_swferror(_("Trying to play sound with size 
0"));
+                       log_swferror(_("Trying to play sound with size 0"));
                );
                return;
        }
@@ -288,7 +290,7 @@
                sound->parser = av_parser_init(CODEC_ID_MP3);
 
                if (!sound->codec) {
-                       gnash::log_error(_("Your FFMPEG can't decode MP3?!"));
+                       log_error(_("Your FFMPEG can't decode MP3?!"));
                        return;
                }
 
@@ -317,7 +319,7 @@
 
        if (!soundOpened) {
                if (SDL_OpenAudio(&audioSpec, NULL) < 0 ) {
-                       gnash::log_error(_("Unable to start SDL sound: %s"), 
SDL_GetError());
+                       log_error(_("Unable to start SDL sound: %s"), 
SDL_GetError());
                        return;
                }
                soundOpened = true;
@@ -512,7 +514,7 @@
 
        if (!soundOpened) {
                if (SDL_OpenAudio(&audioSpec, NULL) < 0 ) {
-                       gnash::log_error(_("Unable to start aux SDL sound: 
%s"), SDL_GetError());
+                       log_error(_("Unable to start aux SDL sound: %s"), 
SDL_GetError());
                        return;
                }
                soundOpened = true;
@@ -534,7 +536,8 @@
 }
 
 
-gnash::sound_handler*  gnash::create_sound_handler_sdl()
+sound_handler*
+create_sound_handler_sdl()
 // Factory.
 {
        return new SDL_sound_handler;
@@ -655,13 +658,13 @@
 {
        if ( buffer_length_in < 0 )
        {
-               gnash::log_error(_("Negative buffer length in 
sdl_audio_callback (%d)"), buffer_length_in);
+               log_error(_("Negative buffer length in sdl_audio_callback 
(%d)"), buffer_length_in);
                return;
        }
 
        if ( buffer_length_in == 0 )
        {
-               gnash::log_error(_("Zero buffer length in sdl_audio_callback"));
+               log_error(_("Zero buffer length in sdl_audio_callback"));
                return;
        }
 
@@ -689,8 +692,8 @@
                uint8_t* buf = new uint8_t[buffer_length];
 
                // Loop through the attached sounds
-               hash_wrapper< void*, gnash::sound_handler::aux_streamer_ptr 
>::iterator it = handler->m_aux_streamer.begin();
-               hash_wrapper< void*, gnash::sound_handler::aux_streamer_ptr 
>::iterator end = handler->m_aux_streamer.end();
+               hash_wrapper< void*, sound_handler::aux_streamer_ptr 
>::iterator it = handler->m_aux_streamer.begin();
+               hash_wrapper< void*, sound_handler::aux_streamer_ptr 
>::iterator end = handler->m_aux_streamer.end();
                while (it != end) {
                        memset(buf, 0, buffer_length);
 
@@ -795,7 +798,7 @@
 #endif
 
                                                if (bytes_decoded < 0 || tmp < 
0 || outsize < 0) {
-                                                       
gnash::log_error(_("Error while decoding MP3-stream.  Upgrading 
ffmpeg/libavcodec might fix this issue."));
+                                                       log_error(_("Error 
while decoding MP3-stream.  Upgrading ffmpeg/libavcodec might fix this 
issue."));
                                                        // Setting data 
position to data size will get the sound removed
                                                        // from the active 
sound list later on.
                                                        sound->position = 
sound->data_size;
@@ -825,7 +828,7 @@
                                                // Error handling is done by 
relooping (max. 8 times) and just hooping that it will work...
                                                if (loops > 8) break;
                                                if (ret == -1 && 
sound->stream.error != MAD_ERROR_BUFLEN && 
MAD_RECOVERABLE(sound->stream.error)) {
-                                                       
gnash::log_error(_("Recoverable error while decoding MP3-stream, MAD error: 
%s"), mad_stream_errorstr (&sound->stream));
+                                                       
log_error(_("Recoverable error while decoding MP3-stream, MAD error: %s"), 
mad_stream_errorstr (&sound->stream));
                                                        continue;
                                                }
                                                
@@ -833,7 +836,7 @@
                                        }
 
                                        if (ret == -1 && sound->stream.error != 
MAD_ERROR_BUFLEN) {
-                                               
gnash::log_error(_("Unrecoverable error while decoding MP3-stream, MAD error: 
%s"), mad_stream_errorstr (&sound->stream));
+                                               log_error(_("Unrecoverable 
error while decoding MP3-stream, MAD error: %s"), mad_stream_errorstr 
(&sound->stream));
                                                sound->position = 
sound->data_size;
                                                continue;
                                        } else if (ret == -1 && 
sound->stream.error == MAD_ERROR_BUFLEN) {
@@ -891,7 +894,7 @@
 
                                                // Hopefully this wont happen
                                                if (!adjusted_data) {
-                                                       
gnash::log_error(_("Error in sound sample conversion"));
+                                                       log_error(_("Error in 
sound sample conversion"));
                                                        continue;
                                                }
 
@@ -982,6 +985,8 @@
 
 }
 
+} // namespace gnash
+
 // Local Variables:
 // mode: C++
 // End:

Index: backend/sound_handler_sdl.h
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- backend/sound_handler_sdl.h 17 Jul 2007 22:05:03 -0000      1.29
+++ backend/sound_handler_sdl.h 23 Jul 2007 22:22:25 -0000      1.30
@@ -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_sdl.h,v 1.29 2007/07/17 22:05:03 nihilus Exp $
+// $Id: sound_handler_sdl.h,v 1.30 2007/07/23 22:22:25 strk Exp $
 
 #ifndef SOUND_HANDLER_SDL_H
 #define SOUND_HANDLER_SDL_H
@@ -40,6 +40,8 @@
 #include <boost/bind.hpp>
 #include <boost/thread/mutex.hpp>
 
+namespace gnash {
+
 /// Used to hold the info about active sounds
 class active_sound
 {
@@ -256,5 +258,6 @@
        static void sdl_audio_callback (void *udata, Uint8 *stream, int 
buffer_length_in);
 };
 
+} // namespace gnash
 
 #endif // SOUND_HANDLER_SDL_H




reply via email to

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