gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. 15f1a99f4745977e74b6


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 15f1a99f4745977e74b66882def0b5fab770cbb8
Date: Mon, 22 Nov 2010 10:52:30 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  15f1a99f4745977e74b66882def0b5fab770cbb8 (commit)
       via  cd0a943529ebc4db3d64801fdd7be12e08417750 (commit)
       via  1a540fc69705ef4e06232f6f3d9ef36f181f5ee3 (commit)
       via  0b1eaa3481733bde37fdf95d5bdc5171b58389f1 (commit)
      from  0b9d7d2227f52a18af246e50f8e0422ddf0d6c4c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=15f1a99f4745977e74b66882def0b5fab770cbb8


commit 15f1a99f4745977e74b66882def0b5fab770cbb8
Merge: cd0a943 0b9d7d2
Author: Benjamin Wolsey <address@hidden>
Date:   Mon Nov 22 11:11:01 2010 +0100

    Merge branch 'master' of git.sv.gnu.org:/srv/git/gnash


http://git.savannah.gnu.org/cgit//commit/?id=cd0a943529ebc4db3d64801fdd7be12e08417750


commit cd0a943529ebc4db3d64801fdd7be12e08417750
Author: Benjamin Wolsey <address@hidden>
Date:   Mon Nov 22 09:58:18 2010 +0100

    Store the licence in a string, and drop commented out code.

diff --git a/gui/gtk/gtk.cpp b/gui/gtk/gtk.cpp
index c5ab60e..484785c 100644
--- a/gui/gtk/gtk.cpp
+++ b/gui/gtk/gtk.cpp
@@ -1772,11 +1772,24 @@ GtkGui::showAboutDialog()
         NULL
     };
 
-    std::string comments =
-        _("Gnash is the GNU SWF Player based on GameSWF.");
+       const std::string license = 
+        _("This program is free software; you can redistribute it and/or 
modify\n"
+         "it under the terms of the GNU General Public License as published 
by\n"
+         "the Free Software Foundation; either version 3 of the License, or\n"
+         "(at your option) any later version.\n\n"
+         "This program is distributed in the hope that it will be useful,\n"
+         "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+         "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
+         "GNU General Public License for more details.\n"
+         "You should have received a copy of the GNU General Public License\n"
+         "along with this program; if not, write to the Free Software\n"
+         "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301\n"
+         "USA or visit http://www.gnu.org/licenses/.";);
 
     media::MediaHandler* m = _runResources.mediaHandler();
 
+    std::string comments =
+        _("Gnash is the GNU SWF Player based on GameSWF.");
     comments.append(_("\nRenderer: "));
     comments.append(_renderer->description());
     comments.append(_("\nHardware Acceleration: "));
@@ -1786,13 +1799,11 @@ GtkGui::showAboutDialog()
     comments.append(_("\nMedia: "));
     comments.append(m ? m->description() : "no media handler");
 
-    GdkPixbuf *logo_pixbuf = createPixbuf("GnashG.png");
+    GdkPixbuf* logo_pixbuf = createPixbuf("GnashG.png");
 
-#if 1
     // gtk-2.8.20 (Debian 4.0) doesn't work fine with 
     // the gtk_show_about_dialog() call [ omits info ].
     // See bug #24426.
-
     GtkWidget* aboutWidget = gtk_about_dialog_new();
     addGnashIcon(GTK_WINDOW(aboutWidget)); 
     GtkAboutDialog* about = GTK_ABOUT_DIALOG(aboutWidget);
@@ -1807,20 +1818,7 @@ GtkGui::showAboutDialog()
     gtk_about_dialog_set_artists(about, artists);
     gtk_about_dialog_set_translator_credits(about, _("translator-credits"));
     gtk_about_dialog_set_logo(about, logo_pixbuf);
-    gtk_about_dialog_set_license(about, 
-        "This program is free software; you can redistribute it and/or 
modify\n"
-        "it under the terms of the GNU General Public License as published 
by\n"
-        "the Free Software Foundation; either version 3 of the License, or\n"
-        "(at your option) any later version.\n\n"
-        "This program is distributed in the hope that it will be useful,\n"
-        "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
-        "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
-        "GNU General Public License for more details.\n"
-        "You should have received a copy of the GNU General Public License\n"
-        "along with this program; if not, write to the Free Software\n"
-        "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
"
-        "USA"
-    );
+    gtk_about_dialog_set_license(about, license.c_str());
     gtk_about_dialog_set_website(about, "http://www.gnu.org/software/gnash/";);
 
     // Destroy the dialogue box when 'close' is clicked.
@@ -1829,39 +1827,7 @@ GtkGui::showAboutDialog()
 
     gtk_widget_show (aboutWidget);
 
-#else
-
-
-    gtk_show_about_dialog (
-        NULL,
-        "program-name", _("Gnash"), 
-        "version", VERSION,
-        "copyright", "Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 "
-                     "The Free Software Foundation",
-        "comments", comments.c_str(),
-        "authors", authors,
-        "documenters", documentors,
-        "artists", artists,
-        "translator-credits", _("translator-credits"),
-        "logo", logo_pixbuf,
-        "license", 
-        "This program is free software; you can redistribute it and/or 
modify\n"
-        "it under the terms of the GNU General Public License as published 
by\n"
-        "the Free Software Foundation; either version 3 of the License, or\n"
-        "(at your option) any later version.\n\n"
-        "This program is distributed in the hope that it will be useful,\n"
-        "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
-        "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
-        "GNU General Public License for more details.\n"
-        "You should have received a copy of the GNU General Public License\n"
-        "along with this program; if not, write to the Free Software\n"
-        "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301"
-        "  USA",
-        "website", "http://www.gnu.org/software/gnash/";,
-        NULL);
-#endif
-    if (logo_pixbuf)
-        gdk_pixbuf_unref(logo_pixbuf);
+    if (logo_pixbuf) gdk_pixbuf_unref(logo_pixbuf);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -2305,7 +2271,7 @@ void
 addPixmapDirectory(const gchar* directory)
 {
     pixmaps_directories = 
-        g_list_prepend(pixmaps_directories, g_strdup (directory));
+        g_list_prepend(pixmaps_directories, g_strdup(directory));
 }
 
 
@@ -2318,7 +2284,7 @@ findPixmapFile(const gchar* filename)
     /* We step through each of the pixmaps directory to find it. */
     elem = pixmaps_directories;
     while (elem) {
-        gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
+        gchar *pathname = g_strdup_printf("%s%s%s", (gchar*)elem->data,
                 G_DIR_SEPARATOR_S, filename);
         if (g_file_test (pathname, G_FILE_TEST_EXISTS))
             return pathname;

http://git.savannah.gnu.org/cgit//commit/?id=1a540fc69705ef4e06232f6f3d9ef36f181f5ee3


commit 1a540fc69705ef4e06232f6f3d9ef36f181f5ee3
Author: Benjamin Wolsey <address@hidden>
Date:   Sun Nov 21 10:10:57 2010 +0100

    Don't store the vector size; vector does that.

diff --git a/libmedia/gst/AudioInputGst.cpp b/libmedia/gst/AudioInputGst.cpp
index d3bbadb..acf7230 100644
--- a/libmedia/gst/AudioInputGst.cpp
+++ b/libmedia/gst/AudioInputGst.cpp
@@ -89,7 +89,6 @@ AudioInputGst::~AudioInputGst()
 void
 AudioInputGst::findAudioDevs() 
 {
-    _numdevs = 0;
     
     //enumerate audio test sources
     GstElement *element;
@@ -98,13 +97,11 @@ AudioInputGst::findAudioDevs()
     if (element == NULL) {
         log_error("%s: Could not create audio test source", __FUNCTION__);
         _audioVect.push_back(NULL);
-        _numdevs += 1;
     } else {
         _audioVect.push_back(new GnashAudio);
-        _audioVect[_numdevs]->setElementPtr(element);
-        _audioVect[_numdevs]->setGstreamerSrc(g_strdup_printf("audiotestsrc"));
-        _audioVect[_numdevs]->setProductName(g_strdup_printf("audiotest"));
-        _numdevs += 1;
+        _audioVect.back()->setElementPtr(element);
+        _audioVect.back()->setGstreamerSrc(g_strdup_printf("audiotestsrc"));
+        _audioVect.back()->setProductName(g_strdup_printf("audiotest"));
     }
     
 #ifdef HAS_GSTREAMER_PLUGINS_BASE
@@ -131,14 +128,13 @@ AudioInputGst::findAudioDevs()
         }
         else { 
             _audioVect.push_back(new GnashAudio);
-            _audioVect[_numdevs]->setElementPtr(element);
-            _audioVect[_numdevs]->setGstreamerSrc(g_strdup_printf("pulsesrc"));
-            _audioVect[_numdevs]->setProductName(dev_name);
+            _audioVect.back()->setElementPtr(element);
+            _audioVect.back()->setGstreamerSrc(g_strdup_printf("pulsesrc"));
+            _audioVect.back()->setProductName(dev_name);
             
             gchar *location;
             g_object_get (element, "device", &location , NULL);
-            _audioVect[_numdevs]->setDevLocation(location);
-            _numdevs += 1;
+            _audioVect.back()->setDevLocation(location);
         }
     }
     if (devarr) {
diff --git a/libmedia/gst/AudioInputGst.h b/libmedia/gst/AudioInputGst.h
index 12485fc..626a52e 100644
--- a/libmedia/gst/AudioInputGst.h
+++ b/libmedia/gst/AudioInputGst.h
@@ -496,13 +496,7 @@ private:
     /// \brief Function returns the total number of devices detected (useful in
     ///  iterating through the _audioVect vector.
     /// @return The _numdevs private variable from the AudioInputGst class.
-    int getNumdevs() {return _numdevs;}
-    
-    /// \brief Function sets the private _numdevs variable in the AudioInputGst
-    /// class.
-    /// @param n The integer value representing the desired value to set 
_numdevs
-    /// to.
-    void setNumdevs(int n) {_numdevs = n;}
+    int getNumdevs() const { return _audioVect.size(); }
     
     /// \brief Function returns a pointer to the private _audioVect element 
from
     ///  AudioInputGst class.
@@ -514,10 +508,6 @@ private:
     
     
 private:
-    /// \var _numdevs
-    /// \brief Contains an integer value representing the number of devices 
found
-    /// on the machine.
-    int _numdevs;
     
     /// \var _audioVect
     /// \brief A vector of GnashAudio pointers. This is used when storing 
information
@@ -538,4 +528,4 @@ private:
 } // gnash.media namespace 
 } // gnash namespace
 
-#endif // __AUDIOINPUT_H__
+#endif

http://git.savannah.gnu.org/cgit//commit/?id=0b1eaa3481733bde37fdf95d5bdc5171b58389f1


commit 0b1eaa3481733bde37fdf95d5bdc5171b58389f1
Author: Benjamin Wolsey <address@hidden>
Date:   Sun Nov 21 10:10:47 2010 +0100

    Don't leak inputs.

diff --git a/libcore/asobj/Camera_as.cpp b/libcore/asobj/Camera_as.cpp
index c4d1341..c2bbcac 100644
--- a/libcore/asobj/Camera_as.cpp
+++ b/libcore/asobj/Camera_as.cpp
@@ -19,6 +19,11 @@
 
 
 #include "Camera_as.h"
+
+#include <sstream>
+#include <boost/scoped_ptr.hpp>
+#include <memory>
+
 #include "as_object.h" // for inheritance
 #include "log.h"
 #include "fn_call.h"
@@ -30,9 +35,7 @@
 #include "VideoInput.h"
 #include "RunResources.h"
 #include "Object.h"
-
 #include "namedStrings.h"
-#include <sstream>
 
 
 namespace gnash {
@@ -156,12 +159,12 @@ class Camera_as: public Relay
 {
 public:
 
-    Camera_as(media::VideoInput* input)
+    Camera_as(std::auto_ptr<media::VideoInput> input)
         :
-        _input(input),
+        _input(input.release()),
         _loopback(false)
     {
-        assert(input);
+        assert(_input.get());
     }
 
     bool muted() const {
@@ -232,7 +235,7 @@ public:
 
 private:
 
-    media::VideoInput* _input;
+    boost::scoped_ptr<media::VideoInput> _input;
 
     // TODO: see whether this should be handled in the VideoInput class
     bool _loopback;
@@ -262,14 +265,13 @@ camera_get(const fn_call& fn)
         log_error(_("No MediaHandler exists! Cannot create a Camera object"));
         return as_value();
     }
-    media::VideoInput* input = handler->getVideoInput(0);
+    std::auto_ptr<media::VideoInput> input(handler->getVideoInput(0));
 
-    if (!input) {
+    if (!input.get()) {
         // TODO: what should happen if the index is not available?
         return as_value();
     }
 
-
     const size_t nargs = fn.nargs;
     if (nargs > 0) {
         log_debug("%s: the camera is automatically chosen from gnashrc",
diff --git a/libcore/asobj/Microphone_as.cpp b/libcore/asobj/Microphone_as.cpp
index 4daf648..cb7cb71 100644
--- a/libcore/asobj/Microphone_as.cpp
+++ b/libcore/asobj/Microphone_as.cpp
@@ -19,6 +19,11 @@
 
 
 #include "Microphone_as.h"
+
+#include <algorithm>
+#include <boost/scoped_ptr.hpp>
+#include <memory>
+
 #include "as_object.h" // for inheritance
 #include "log.h"
 #include "fn_call.h"
@@ -34,7 +39,6 @@
 #include "RunResources.h"
 #include "namedStrings.h"
 
-#include <algorithm>
 
 namespace gnash {
 
@@ -145,11 +149,11 @@ class Microphone_as : public Relay
 
 public:
 
-    Microphone_as(media::AudioInput* input)
+    Microphone_as(std::auto_ptr<media::AudioInput> input)
         :
-        _input(input)
+        _input(input.release())
     {
-        assert(_input);
+        assert(_input.get());
     }
 
     /// Takes a value from 0..100
@@ -227,7 +231,7 @@ public:
     }
 
 private:
-    media::AudioInput* _input;
+    boost::scoped_ptr<media::AudioInput> _input;
 
 };
 
@@ -262,9 +266,9 @@ microphone_get(const fn_call& fn)
                     "object"));
         return as_value();
     }
-    media::AudioInput* input = handler->getAudioInput(0);
+    std::auto_ptr<media::AudioInput> input(handler->getAudioInput(0));
 
-    if (!input) {
+    if (!input.get()) {
         // TODO: what should happen if the index is not available?
         return as_value();
     }

-----------------------------------------------------------------------

Summary of changes:
 gui/gtk/gtk.cpp                 |   74 ++++++++++----------------------------
 libcore/asobj/Camera_as.cpp     |   20 ++++++-----
 libcore/asobj/Microphone_as.cpp |   18 ++++++----
 libmedia/gst/AudioInputGst.cpp  |   18 ++++------
 libmedia/gst/AudioInputGst.h    |   14 +------
 5 files changed, 51 insertions(+), 93 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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