[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r10058: add method for creating the R
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r10058: add method for creating the Red5 echo Requests. |
Date: |
Thu, 26 Mar 2009 21:49:20 -0600 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10058
committer: address@hidden
branch nick: rtmp
timestamp: Thu 2009-03-26 21:49:20 -0600
message:
add method for creating the Red5 echo Requests.
modified:
libnet/rtmp_client.cpp
libnet/rtmp_client.h
=== modified file 'libnet/rtmp_client.cpp'
--- a/libnet/rtmp_client.cpp 2009-03-27 00:39:34 +0000
+++ b/libnet/rtmp_client.cpp 2009-03-27 03:49:20 +0000
@@ -170,6 +170,38 @@
return buf;
}
+boost::shared_ptr<amf::Buffer>
+RTMPClient::encodeEchoRequest(const std::string &method, double id,
amf::Element &el)
+{
+// GNASH_REPORT_FUNCTION;
+ boost::shared_ptr<amf::Element> str(new amf::Element);
+ str->makeString(method);
+ boost::shared_ptr<Buffer> strobj = str->encode();
+
+ // Encod ethe stream ID
+ boost::shared_ptr<amf::Element> num(new amf::Element);
+ num->makeNumber(id);
+ boost::shared_ptr<Buffer> numobj = num->encode();
+
+ // Set the NULL object element that follows the stream ID
+ boost::shared_ptr<amf::Element> null(new amf::Element);
+ null->makeNull();
+ boost::shared_ptr<Buffer> nullobj = null->encode();
+
+ boost::shared_ptr<Buffer> elobj = el.encode();
+
+ size_t totalsize = strobj->size() + numobj->size() + nullobj->size() +
elobj->size();
+
+ boost::shared_ptr<Buffer> buf(new Buffer(totalsize));
+
+ *buf += strobj;
+ *buf += numobj;
+ *buf += nullobj;
+ *buf += elobj;
+
+ return buf;
+}
+
// 43 00 1a 21 00 00 19 14 02 00 0c 63 72 65 61 74 C..!.......creat
// 65 53 74 72 65 61 6d 00 40 08 00 00 00 00 00 00 address@hidden
// 05 .
=== modified file 'libnet/rtmp_client.h'
--- a/libnet/rtmp_client.h 2009-03-27 00:39:34 +0000
+++ b/libnet/rtmp_client.h 2009-03-27 03:49:20 +0000
@@ -64,6 +64,8 @@
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);
+
void dump();
private:
std::string _path;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r10058: add method for creating the Red5 echo Requests.,
rob <=