[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11055: migrated stubs for microphon
From: |
Ben Limmer |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11055: migrated stubs for microphone and camera to new hierarchy |
Date: |
Tue, 09 Jun 2009 16:00:57 -0600 |
User-agent: |
Bazaar (1.13.1) |
------------------------------------------------------------
revno: 11055
committer: Ben Limmer <address@hidden>
branch nick: trunk
timestamp: Tue 2009-06-09 16:00:57 -0600
message:
migrated stubs for microphone and camera to new hierarchy
removed:
libcore/asobj/Camera.cpp
libcore/asobj/Camera.h
libcore/asobj/Microphone.cpp
libcore/asobj/Microphone.h
modified:
libcore/ClassHierarchy.cpp
libcore/asobj/Global.cpp
libcore/asobj/flash.am
libcore/asobj/flash/media/media.am
------------------------------------------------------------
revno: 11053.1.1
committer: Ben Limmer <address@hidden>
branch nick: branch_7
timestamp: Tue 2009-06-09 15:58:09 -0600
message:
migrated stubs for microphone and camera to new hierarchy
removed:
libcore/asobj/Camera.cpp
libcore/asobj/Camera.h
libcore/asobj/Microphone.cpp
libcore/asobj/Microphone.h
modified:
libcore/ClassHierarchy.cpp
libcore/asobj/Global.cpp
libcore/asobj/flash.am
libcore/asobj/flash/media/media.am
=== modified file 'libcore/ClassHierarchy.cpp'
--- a/libcore/ClassHierarchy.cpp 2009-06-09 19:00:20 +0000
+++ b/libcore/ClassHierarchy.cpp 2009-06-09 21:58:09 +0000
@@ -24,7 +24,7 @@
#include "AsBroadcaster.h"
#include "flash/accessibility/Accessibility_as.h"
#include "Boolean_as.h"
-#include "Camera.h"
+#include "flash/media/Camera_as.h"
#include "Color_as.h"
#include "ContextMenu.h"
#include "CustomActions.h"
@@ -36,7 +36,7 @@
#include "flash/ui/Keyboard_as.h"
#include "LoadVars_as.h"
#include "LocalConnection_as.h"
-#include "Microphone.h"
+#include "flash/media/Microphone_as.h"
#include "Number_as.h"
#include "Object.h"
#include "Math_as.h"
=== removed file 'libcore/asobj/Camera.cpp'
--- a/libcore/asobj/Camera.cpp 2009-02-25 22:33:03 +0000
+++ b/libcore/asobj/Camera.cpp 1970-01-01 00:00:00 +0000
@@ -1,125 +0,0 @@
-// Camera.cpp: ActionScript class for video cameras, for Gnash.
-//
-// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-//
-
-#ifdef HAVE_CONFIG_H
-#include "gnashconfig.h"
-#endif
-
-#include "Camera.h"
-#include "as_object.h" // for inheritance
-#include "log.h"
-#include "fn_call.h"
-#include "smart_ptr.h" // for boost intrusive_ptr
-#include "builtin_function.h" // need builtin_function
-#include "Object.h" // for getObjectInterface
-
-namespace gnash {
-
-as_value camera_get(const fn_call& fn);
-as_value camera_setmode(const fn_call& fn);
-as_value camera_setmotionlevel(const fn_call& fn);
-as_value camera_setquality(const fn_call& fn);
-as_value camera_ctor(const fn_call& fn);
-
-static void
-attachCameraInterface(as_object& o)
-{
- o.init_member("get", new builtin_function(camera_get));
- o.init_member("setmode", new builtin_function(camera_setmode));
- o.init_member("setmotionlevel", new
builtin_function(camera_setmotionlevel));
- o.init_member("setquality", new builtin_function(camera_setquality));
-}
-
-static as_object*
-getCameraInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o )
- {
- o = new as_object(getObjectInterface());
- attachCameraInterface(*o);
- }
- return o.get();
-}
-
-class camera_as_object: public as_object
-{
-
-public:
-
- camera_as_object()
- :
- as_object(getCameraInterface())
- {}
-
- // override from as_object ?
- //const char* get_text_value() const { return "Camera"; }
-
- // override from as_object ?
- //double get_numeric_value() const { return 0; }
-};
-
-as_value camera_get(const fn_call& /*fn*/) {
- log_unimpl (__FUNCTION__);
- return as_value();
-}
-as_value camera_setmode(const fn_call& /*fn*/) {
- log_unimpl (__FUNCTION__);
- return as_value();
-}
-as_value camera_setmotionlevel(const fn_call& /*fn*/) {
- log_unimpl (__FUNCTION__);
- return as_value();
-}
-as_value camera_setquality(const fn_call& /*fn*/) {
- log_unimpl (__FUNCTION__);
-
- return as_value();
-}
-
-as_value
-camera_ctor(const fn_call& /* fn */)
-{
- boost::intrusive_ptr<as_object> obj = new camera_as_object;
-
- return as_value(obj.get()); // will keep alive
-}
-
-// extern (used by Global.cpp)
-void camera_class_init(as_object& global)
-{
- // This is going to be the global Camera "class"/"function"
- static boost::intrusive_ptr<builtin_function> cl;
-
- if ( cl == NULL )
- {
- cl=new builtin_function(&camera_ctor, getCameraInterface());
- // replicate all interface to class, to be able to access
- // all methods as static functions
- attachCameraInterface(*cl);
-
- }
-
- // Register _global.Camera
- global.init_member("Camera", cl.get());
-
-}
-
-
-} // end of gnash namespace
=== removed file 'libcore/asobj/Camera.h'
--- a/libcore/asobj/Camera.h 2009-02-25 22:33:03 +0000
+++ b/libcore/asobj/Camera.h 1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
-//
-// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-//
-
-#ifndef __GNASH_ASOBJ_CAMERA_H__
-#define __GNASH_ASOBJ_CAMERA_H__
-
-#include <memory> // for auto_ptr
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global Camera class
-void camera_class_init(as_object& global);
-
-/// Return a Camera instance (in case the core lib needs it)
-//std::auto_ptr<as_object> init_camera_instance();
-
-} // end of gnash namespace
-
-// __GNASH_ASOBJ_CAMERA_H__
-#endif
-
=== modified file 'libcore/asobj/Global.cpp'
--- a/libcore/asobj/Global.cpp 2009-06-09 19:00:20 +0000
+++ b/libcore/asobj/Global.cpp 2009-06-09 21:58:09 +0000
@@ -29,7 +29,7 @@
#include "Array_as.h"
#include "AsBroadcaster.h"
#include "Boolean_as.h"
-#include "Camera.h"
+#include "flash/media/Camera_as.h"
#include "Color_as.h"
#include "ContextMenu.h"
#include "CustomActions.h"
@@ -39,7 +39,7 @@
#include "String_as.h"
#include "flash/ui/Keyboard_as.h"
#include "Selection_as.h"
-#include "Microphone.h"
+#include "flash/media/Microphone_as.h"
#include "flash/media/Sound_as.h"
#include "Number_as.h"
#include "Object.h"
=== removed file 'libcore/asobj/Microphone.cpp'
--- a/libcore/asobj/Microphone.cpp 2009-02-25 22:33:03 +0000
+++ b/libcore/asobj/Microphone.cpp 1970-01-01 00:00:00 +0000
@@ -1,130 +0,0 @@
-// Microphone.cpp: ActionScript "Microphone" input class, for Gnash.
-//
-// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-//
-
-#ifdef HAVE_CONFIG_H
-#include "gnashconfig.h"
-#endif
-
-#include "Microphone.h"
-#include "as_object.h" // for inheritance
-#include "log.h"
-#include "fn_call.h"
-#include "smart_ptr.h" // for boost intrusive_ptr
-#include "builtin_function.h" // need builtin_function
-#include "Object.h" // for getObjectInterface
-
-namespace gnash {
-
-as_value microphone_get(const fn_call& fn);
-as_value microphone_setgain(const fn_call& fn);
-as_value microphone_setrate(const fn_call& fn);
-as_value microphone_setsilencelevel(const fn_call& fn);
-as_value microphone_setuseechosuppression(const fn_call& fn);
-as_value microphone_ctor(const fn_call& fn);
-
-static void
-attachMicrophoneInterface(as_object& o)
-{
- o.init_member("get", new builtin_function(microphone_get));
- o.init_member("setGain", new builtin_function(microphone_setgain));
- o.init_member("setRate", new builtin_function(microphone_setrate));
- o.init_member("setSilenceLevel", new
builtin_function(microphone_setsilencelevel));
- o.init_member("setUseEchoSuppression", new
builtin_function(microphone_setuseechosuppression));
-}
-
-static as_object*
-getMicrophoneInterface()
-{
- static boost::intrusive_ptr<as_object> o;
- if ( ! o )
- {
- o = new as_object(getObjectInterface());
- attachMicrophoneInterface(*o);
- }
- return o.get();
-}
-
-class microphone_as_object: public as_object
-{
-
-public:
-
- microphone_as_object()
- :
- as_object(getMicrophoneInterface())
- {}
-
- // override from as_object ?
- //std::string get_text_value() const { return "Microphone"; }
-
- // override from as_object ?
- //double get_numeric_value() const { return 0; }
-};
-
-as_value microphone_get(const fn_call& /*fn*/) {
- log_unimpl (__FUNCTION__);
- return as_value();
-}
-as_value microphone_setgain(const fn_call& /*fn*/) {
- log_unimpl (__FUNCTION__);
- return as_value();
-}
-as_value microphone_setrate(const fn_call& /*fn*/) {
- log_unimpl (__FUNCTION__);
- return as_value();
-}
-as_value microphone_setsilencelevel(const fn_call& /*fn*/) {
- log_unimpl (__FUNCTION__);
- return as_value();
-}
-as_value microphone_setuseechosuppression(const fn_call& /*fn*/) {
- log_unimpl (__FUNCTION__);
- return as_value();
-}
-
-as_value
-microphone_ctor(const fn_call& /* fn */)
-{
- boost::intrusive_ptr<as_object> obj = new microphone_as_object;
-
- return as_value(obj.get()); // will keep alive
-}
-
-// extern (used by Global.cpp)
-void microphone_class_init(as_object& global)
-{
- // This is going to be the global Microphone "class"/"function"
- static boost::intrusive_ptr<builtin_function> cl;
-
- if ( cl == NULL )
- {
- cl=new builtin_function(µphone_ctor,
getMicrophoneInterface());
- // replicate all interface to class, to be able to access
- // all methods as static functions
- attachMicrophoneInterface(*cl);
-
- }
-
- // Register _global.Microphone
- global.init_member("Microphone", cl.get());
-
-}
-
-
-} // end of gnash namespace
=== removed file 'libcore/asobj/Microphone.h'
--- a/libcore/asobj/Microphone.h 2009-02-25 22:33:03 +0000
+++ b/libcore/asobj/Microphone.h 1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
-//
-// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-//
-
-#ifndef __GNASH_ASOBJ_MICROPHONE_H__
-#define __GNASH_ASOBJ_MICROPHONE_H__
-
-#include <memory> // for auto_ptr
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global Microphone class
-void microphone_class_init(as_object& global);
-
-/// Return a Microphone instance (in case the core lib needs it)
-//std::auto_ptr<as_object> init_microphone_instance();
-
-} // end of gnash namespace
-
-// __GNASH_ASOBJ_MICROPHONE_H__
-#endif
-
=== modified file 'libcore/asobj/flash.am'
--- a/libcore/asobj/flash.am 2009-06-09 21:07:10 +0000
+++ b/libcore/asobj/flash.am 2009-06-09 22:00:57 +0000
@@ -29,7 +29,6 @@
asobj/AsBroadcaster.cpp \
asobj/Array_as.cpp \
asobj/Boolean_as.cpp \
- asobj/Camera.cpp \
asobj/Color_as.cpp \
asobj/ContextMenu.cpp \
asobj/CustomActions.cpp\
@@ -39,7 +38,6 @@
asobj/int_as.cpp \
asobj/LoadVars_as.cpp \
asobj/Math_as.cpp \
- asobj/Microphone.cpp \
asobj/NetConnection_as.cpp \
asobj/NetStream_as.cpp \
asobj/Number_as.cpp \
@@ -57,7 +55,6 @@
noinst_HEADERS += \
asobj/AsBroadcaster.h \
asobj/Boolean_as.h \
- asobj/Camera.h \
asobj/Color_as.h \
asobj/ContextMenu.h \
asobj/CustomActions.h \
@@ -67,7 +64,6 @@
asobj/Global.h\
asobj/int_as.h \
asobj/LoadVars_as.h \
- asobj/Microphone.h \
asobj/MovieClipLoader.h \
asobj/NetConnection_as.h \
asobj/NetStream_as.h \
=== modified file 'libcore/asobj/flash/media/media.am'
--- a/libcore/asobj/flash/media/media.am 2009-06-09 17:32:44 +0000
+++ b/libcore/asobj/flash/media/media.am 2009-06-09 21:58:09 +0000
@@ -22,7 +22,7 @@
# FIXME: already exists
if BUILD_CAMERA_AS3
-# MEDIA_SOURCES += asobj/flash/media/Camera_as.cpp
+MEDIA_SOURCES += asobj/flash/media/Camera_as.cpp
MEDIA_HEADERS += asobj/flash/media/Camera_as.h
endif
@@ -33,7 +33,7 @@
# FIXME: already exists
if BUILD_MICROPHONE_AS3
-# MEDIA_SOURCES += asobj/flash/media/Microphone_as.cpp
+MEDIA_SOURCES += asobj/flash/media/Microphone_as.cpp
MEDIA_HEADERS += asobj/flash/media/Microphone_as.h
endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11055: migrated stubs for microphone and camera to new hierarchy,
Ben Limmer <=