[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp |
Date: |
Sat, 05 May 2007 13:16:10 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/05/05 13:16:09
Modified files:
. : ChangeLog
server/asobj : NetStream.cpp
Log message:
* server/asobj/NetStream.cpp: stubbed missing methods and
properties.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3103&r2=1.3104
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.cpp?cvsroot=gnash&r1=1.39&r2=1.40
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3103
retrieving revision 1.3104
diff -u -b -r1.3103 -r1.3104
--- ChangeLog 5 May 2007 12:21:12 -0000 1.3103
+++ ChangeLog 5 May 2007 13:16:09 -0000 1.3104
@@ -1,5 +1,7 @@
2007-05-04 Sandro Santilli <address@hidden>
+ * server/asobj/NetStream.cpp: stubbed missing methods and
+ properties.
* libbase/tu_file.cpp (std_get_stream_size_func): use fstat to
get stream size. (other funx for filesystem access): add some
assertions
to prevent seeking past the end of the stream.
Index: server/asobj/NetStream.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStream.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- server/asobj/NetStream.cpp 4 May 2007 15:21:00 -0000 1.39
+++ server/asobj/NetStream.cpp 5 May 2007 13:16:09 -0000 1.40
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: NetStream.cpp,v 1.39 2007/05/04 15:21:00 strk Exp $ */
+/* $Id: NetStream.cpp,v 1.40 2007/05/05 13:16:09 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -48,6 +48,14 @@
static as_value netstream_seek(const fn_call& fn);
static as_value netstream_setbuffertime(const fn_call& fn);
static as_value netstream_time(const fn_call& fn);
+
+static as_value netstream_attachAudio(const fn_call& fn);
+static as_value netstream_attachVideo(const fn_call& fn);
+static as_value netstream_publish(const fn_call& fn);
+static as_value netstream_receiveAudio(const fn_call& fn);
+static as_value netstream_receiveVideo(const fn_call& fn);
+static as_value netstream_send(const fn_call& fn);
+
static as_object* getNetStreamInterface();
NetStream::NetStream()
@@ -161,6 +169,60 @@
return as_value();
}
+static as_value netstream_attachAudio(const fn_call& fn)
+{
+ boost::intrusive_ptr<NetStream> ns = ensureType<NetStream>(fn.this_ptr);
+ UNUSED(ns);
+
+ log_unimpl("NetStream.attachAudio");
+ return as_value();
+}
+
+static as_value netstream_attachVideo(const fn_call& fn)
+{
+ boost::intrusive_ptr<NetStream> ns = ensureType<NetStream>(fn.this_ptr);
+ UNUSED(ns);
+
+ log_unimpl("NetStream.attachVideo");
+ return as_value();
+}
+
+static as_value netstream_publish(const fn_call& fn)
+{
+ boost::intrusive_ptr<NetStream> ns = ensureType<NetStream>(fn.this_ptr);
+ UNUSED(ns);
+
+ log_unimpl("NetStream.publish");
+ return as_value();
+}
+
+static as_value netstream_receiveAudio(const fn_call& fn)
+{
+ boost::intrusive_ptr<NetStream> ns = ensureType<NetStream>(fn.this_ptr);
+ UNUSED(ns);
+
+ log_unimpl("NetStream.receiveAudio");
+ return as_value();
+}
+
+static as_value netstream_receiveVideo(const fn_call& fn)
+{
+ boost::intrusive_ptr<NetStream> ns = ensureType<NetStream>(fn.this_ptr);
+ UNUSED(ns);
+
+ log_unimpl("NetStream.receiveVideo");
+ return as_value();
+}
+
+static as_value netstream_send(const fn_call& fn)
+{
+ boost::intrusive_ptr<NetStream> ns = ensureType<NetStream>(fn.this_ptr);
+ UNUSED(ns);
+
+ log_unimpl("NetStream.send");
+ return as_value();
+}
+
// Both a getter and a (do-nothing) setter for time
static as_value
netstream_time(const fn_call& fn)
@@ -191,6 +253,78 @@
return as_value(int(ns->bytesTotal()));
}
+// Both a getter and a (do-nothing) setter for currentFPS
+static as_value
+netstream_currentFPS(const fn_call& fn)
+{
+ boost::intrusive_ptr<NetStream> ns = ensureType<NetStream>(fn.this_ptr);
+
+ if ( fn.nargs == 0 ) // getter
+ {
+ log_unimpl("NetStream.currentFPS get");
+ return as_value();
+ }
+ else // setter
+ {
+ log_unimpl("NetStream.currentFPS set");
+ return as_value();
+ }
+}
+
+// Both a getter and a (do-nothing) setter for bufferLength
+static as_value
+netstream_bufferLength(const fn_call& fn)
+{
+ boost::intrusive_ptr<NetStream> ns = ensureType<NetStream>(fn.this_ptr);
+
+ if ( fn.nargs == 0 ) // getter
+ {
+ log_unimpl("NetStream.bufferLength get");
+ return as_value();
+ }
+ else // setter
+ {
+ log_unimpl("NetStream.bufferLength set");
+ return as_value();
+ }
+}
+
+// Both a getter and a (do-nothing) setter for bufferTime
+static as_value
+netstream_bufferTime(const fn_call& fn)
+{
+ boost::intrusive_ptr<NetStream> ns = ensureType<NetStream>(fn.this_ptr);
+
+ if ( fn.nargs == 0 ) // getter
+ {
+ log_unimpl("NetStream.bufferTime get");
+ return as_value();
+ }
+ else // setter
+ {
+ log_unimpl("NetStream.bufferTime set");
+ return as_value();
+ }
+}
+
+// Both a getter and a (do-nothing) setter for liveDelay
+static as_value
+netstream_liveDelay(const fn_call& fn)
+{
+ boost::intrusive_ptr<NetStream> ns = ensureType<NetStream>(fn.this_ptr);
+
+ if ( fn.nargs == 0 ) // getter
+ {
+ log_unimpl("NetStream.liveDelay get");
+ return as_value();
+ }
+ else // setter
+ {
+ log_unimpl("NetStream.liveDelay set");
+ return as_value();
+ }
+}
+
void
attachNetStreamInterface(as_object& o)
{
@@ -201,8 +335,15 @@
o.init_member("seek", new builtin_function(netstream_seek));
o.init_member("setBufferTime", new
builtin_function(netstream_setbuffertime));
+ o.init_member("attachAudio", new
builtin_function(netstream_attachAudio));
+ o.init_member("attachVideo", new
builtin_function(netstream_attachVideo));
+ o.init_member("publish", new builtin_function(netstream_publish));
+ o.init_member("receiveAudio", new
builtin_function(netstream_receiveAudio));
+ o.init_member("receiveVideo", new
builtin_function(netstream_receiveVideo));
+ o.init_member("send", new builtin_function(netstream_send));
// Properties
+ // TODO: attach to each instance rather then to the class ? check it ..
boost::intrusive_ptr<builtin_function> gettersetter;
@@ -215,6 +356,18 @@
gettersetter = new builtin_function(&netstream_bytestotal, NULL);
o.init_readonly_property("bytesTotal", *gettersetter);
+ gettersetter = new builtin_function(&netstream_currentFPS, NULL);
+ o.init_readonly_property("currentFPS", *gettersetter);
+
+ gettersetter = new builtin_function(&netstream_bufferLength, NULL);
+ o.init_readonly_property("bufferLength", *gettersetter);
+
+ gettersetter = new builtin_function(&netstream_bufferTime, NULL);
+ o.init_readonly_property("bufferTime", *gettersetter);
+
+ gettersetter = new builtin_function(&netstream_liveDelay, NULL);
+ o.init_readonly_property("liveDelay", *gettersetter);
+
}
static as_object*
- [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp,
Sandro Santilli <=