[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r10080: merge from savannah
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r10080: merge from savannah |
Date: |
Tue, 31 Mar 2009 11:36:51 -0600 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10080
committer: address@hidden
branch nick: rtmp
timestamp: Tue 2009-03-31 11:36:51 -0600
message:
merge from savannah
modified:
cygnal/http_server.h
cygnal/proc.h
libamf/amf_msg.cpp
libnet/rtmp_client.h
testsuite/misc-ming.all/Makefile.am
utilities/rtmpget.cpp
------------------------------------------------------------
revno: 10079.1.1
committer: Markus Gothe <address@hidden>
branch nick: rtmp
timestamp: Tue 2009-03-31 02:31:07 +0200
message:
Added DSOEXPORT-attribute
modified:
libnet/rtmp_client.h
------------------------------------------------------------
revno: 10079.1.2
committer: Markus Gothe <address@hidden>
branch nick: rtmp
timestamp: Tue 2009-03-31 02:53:35 +0200
message:
Added DSOEXPORT-attribute
modified:
cygnal/http_server.h
cygnal/proc.h
libnet/rtmp_client.h
=== modified file 'cygnal/http_server.h'
--- a/cygnal/http_server.h 2009-03-20 00:00:54 +0000
+++ b/cygnal/http_server.h 2009-03-31 00:53:35 +0000
@@ -103,7 +103,7 @@
// This is the thread for all incoming HTTP connections
extern "C" {
- bool http_handler(gnash::Network::thread_params_t *args);
+ DSOEXPORT bool http_handler(gnash::Network::thread_params_t *args);
}
} // end of gnash namespace
=== modified file 'cygnal/proc.h'
--- a/cygnal/proc.h 2009-02-22 00:41:45 +0000
+++ b/cygnal/proc.h 2009-03-31 00:53:35 +0000
@@ -26,14 +26,15 @@
#include <boost/thread/condition.hpp>
#include "network.h"
+#include "dsodefs.h"
namespace cygnal
{
class Proc : public gnash::Network {
public:
- Proc (void);
- ~Proc (void);
+ DSOEXPORT Proc (void);
+ DSOEXPORT ~Proc (void);
static Proc& getDefaultInstance();
// These flags control whether the stdout of the child process gets
displayed
=== modified file 'libamf/amf_msg.cpp'
--- a/libamf/amf_msg.cpp 2009-03-26 16:46:43 +0000
+++ b/libamf/amf_msg.cpp 2009-03-31 17:36:51 +0000
@@ -43,9 +43,15 @@
size_t size = sizeof(AMF_msg::context_header_t);
boost::shared_ptr<amf::Buffer> buf (new amf::Buffer(size));
- *buf = htons(version);
- *buf += htons(headers);
- *buf += htons(messages);
+ // use a short as a temporary, as it turns out htons() returns a 32bit int
+ // instead when compiling with -O2. This forces appending bytes to get the
+ // right size.
+ boost::uint16_t swapped = htons(version);
+ *buf = swapped;
+ swapped = htons(headers);
+ *buf += swapped;
+ swapped = htons(messages);
+ *buf += swapped;
return buf;
}
@@ -154,7 +160,7 @@
string str2(reinterpret_cast<const char *>(tmpptr), length);
msg->response = str2;
tmpptr += length;
- if ((tmpptr - data) > size) {
+ if ((tmpptr - data) > static_cast<int>(size)) {
boost::format msg("Trying to read past the end of data! Wants %1%
bytes, given %2% bytes");
msg % length % size;
throw GnashException(msg.str());
@@ -227,6 +233,7 @@
AMF_msg::encodeAMFPacket(const std::string & /* target */,
const std::string & /*response */, size_t /* size */)
{
+ return encodeAMFPacket();
}
boost::shared_ptr<amf::Buffer>
=== modified file 'libnet/rtmp_client.h'
--- a/libnet/rtmp_client.h 2009-03-27 03:49:20 +0000
+++ b/libnet/rtmp_client.h 2009-03-31 00:53:35 +0000
@@ -38,25 +38,25 @@
class RTMPClient : public RTMP
{
public:
- RTMPClient();
- ~RTMPClient();
+ DSOEXPORT RTMPClient();
+ DSOEXPORT ~RTMPClient();
bool handShakeWait();
// bool handShakeResponse();
bool clientFinish();
- bool clientFinish(amf::Buffer &data);
- bool handShakeRequest();
+ DSOEXPORT bool clientFinish(amf::Buffer &data);
+ DSOEXPORT bool handShakeRequest();
// These are used for creating the primary objects
// Create the initial object sent to the server, which is
NetConnection::connect()
- boost::shared_ptr<amf::Buffer> encodeConnect(const char *app, const char
*swfUrl, const char *tcUrl,
+ DSOEXPORT boost::shared_ptr<amf::Buffer> encodeConnect(const char *app,
const char *swfUrl, const char *tcUrl,
double audioCodecs, double videoCodecs,
double videoFunction,
const char *pageUrl);
// Create the second object sent to the server, which is
NetStream():;NetStream()
- boost::shared_ptr<amf::Buffer> encodeStream(double id);
+ DSOEXPORT boost::shared_ptr<amf::Buffer> encodeStream(double id);
boost::shared_ptr<amf::Buffer> encodeStreamOp(double id, rtmp_op_e op,
bool flag);
boost::shared_ptr<amf::Buffer> encodeStreamOp(double id, rtmp_op_e op,
bool flag, double pos);
- boost::shared_ptr<amf::Buffer> encodeStreamOp(double id, rtmp_op_e op,
bool flag, const std::string &name);
+ DSOEXPORT boost::shared_ptr<amf::Buffer> encodeStreamOp(double id,
rtmp_op_e op, bool flag, const std::string &name);
boost::shared_ptr<amf::Buffer> encodeStreamOp(double id, rtmp_op_e op,
bool flag, const std::string &name, double pos);
bool isConnected() { return _connected; };
@@ -64,7 +64,7 @@
std::string &getPath() { return _path; };
void setPath(std::string &x) { _path = x; };
- boost::shared_ptr<amf::Buffer> encodeEchoRequest(const std::string
&method, double id, amf::Element &el);
+ DSOEXPORT boost::shared_ptr<amf::Buffer> encodeEchoRequest(const
std::string &method, double id, amf::Element &el);
void dump();
private:
=== modified file 'testsuite/misc-ming.all/Makefile.am'
--- a/testsuite/misc-ming.all/Makefile.am 2009-03-05 15:47:09 +0000
+++ b/testsuite/misc-ming.all/Makefile.am 2009-03-31 17:36:51 +0000
@@ -35,6 +35,7 @@
DragDropTest.as \
remoting.as \
red5test.as \
+ netstream.as \
remoting.php \
gotoFrame2Test.as \
DrawingApiTest.as \
@@ -319,6 +320,8 @@
endif
endif
+check_SCRIPTS += netstreamTestRunner
+
if MING_VERSION_0_4
check_SCRIPTS += \
opcode_guard_testrunner \
@@ -1754,7 +1757,14 @@
red5testRunner: $(srcdir)/../generic-testrunner.sh red5test.swf
sh $< $(top_builddir) red5test.swf > $@
chmod 755 $@
-
+
+netstream.swf: $(srcdir)/netstream.as Dejagnu.swf Makefile
../actionscript.all/check.as ../actionscript.all/utils.as
+ $(MAKESWF) -n network -r12 -o $@ -v7 -DRED5_HOST='\"$(RED5_HOST)\"'
-DUSE_DEJAGNU_MODULE -DOUTPUT_VERSION=7 Dejagnu.swf $(srcdir)/netstream.as
$(srcdir)/../actionscript.all/dejagnu_so_fini.as
+
+netstreamRunner: $(srcdir)/../generic-testrunner.sh netstream.swf
+ sh $< $(top_builddir) netstream.swf > $@
+ chmod 755 $@
+
DragDropTest.swf: $(srcdir)/DragDropTest.as Dejagnu.swf DragDropTestLoaded.swf
Makefile ../actionscript.all/check.as ../actionscript.all/utils.as
$(MAKESWF) -r12 -o $@ -v6 -DUSE_DEJAGNU_MODULE -DOUTPUT_VERSION=6
Dejagnu.swf $(srcdir)/DragDropTest.as
=== modified file 'utilities/rtmpget.cpp'
--- a/utilities/rtmpget.cpp 2009-03-29 00:26:51 +0000
+++ b/utilities/rtmpget.cpp 2009-03-31 17:36:51 +0000
@@ -697,20 +697,6 @@
close(fd);
}
-#if 0
- // Write the packet to disk so we can anaylze it with other tools
- int fd = open("outbuf.raw",O_WRONLY|O_CREAT, S_IRWXU);
- if (fd < 0) {
- perror("open");
- }
- cout << "Writing packet to disk: \"outbuf.raw\"" << endl;
-// write(fd, out, 12);
-// write(fd, outbuf.begin(), amf_obj.totalsize());
- write(fd, buf2->reference(), buf2->size());
- write(fd, buf3->reference(), buf3->size());
- close(fd);
-#endif
-
exit(0);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r10080: merge from savannah,
rob <=