gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/rtmp r9969: don't use a reference to a cla


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/rtmp r9969: don't use a reference to a class in a std::map, older versions of g++ don't like it.
Date: Wed, 04 Feb 2009 14:20:09 -0700
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9969
committer: address@hidden
branch nick: rtmp
timestamp: Wed 2009-02-04 14:20:09 -0700
message:
  don't use a reference to a class in a std::map, older versions of g++ don't 
like it.
modified:
  libnet/rtmp.cpp
  libnet/rtmp.h
  libnet/rtmp_msg.cpp
  libnet/rtmp_msg.h
=== modified file 'libnet/rtmp.cpp'
--- a/libnet/rtmp.cpp   2009-01-18 07:00:33 +0000
+++ b/libnet/rtmp.cpp   2009-02-04 21:20:09 +0000
@@ -230,7 +230,7 @@
 {
 //    GNASH_REPORT_FUNCTION;
 //    return _properties[name.c_str()];
-    map<const char *, amf::Element &>::iterator it;
+    map<const char *, amf::Element>::iterator it;
     for (it = _properties.begin(); it != _properties.end(); it++) {
        const char *title = it->first;
        amf::Element &el = it->second;
@@ -512,15 +512,15 @@
 RTMP::dump()
 {
     cerr << "RTMP packet contains " << _properties.size() << " variables." << 
endl;
-    map<const char *, amf::Element &>::iterator it;
+    map<const char *, amf::Element>::iterator it;
     for (it = _properties.begin(); it != _properties.end(); it++) {
 //     const char *name = it->first;
-       amf::Element &el = it->second;
+       amf::Element el = it->second;
        el.dump();
     }
 }
 
-// A Ping packet has two parameters that ae always specified, and 2 that are 
optional.
+// A Ping packet has two parameters that are always specified, and 2 that are 
optional.
 // The first two bytes are the ping type, as in rtmp_ping_e, the second is the 
ping
 // target, which is always zero as far as we can tell.
 //
@@ -649,8 +649,11 @@
     // automatically deallocated.
     RTMPMsg *msg = new RTMPMsg;
 //    memset(msg, 0, sizeof(RTMPMsg));
+
+    if (name->to_string() != 0) {
+       msg->setMethodName(name->to_string());
+    }
     
-    msg->setMethodName(name->to_string());
     double swapped = streamid->to_number();
 //     swapBytes(&swapped, amf::AMF0_NUMBER_SIZE);
     msg->setStreamID(swapped);

=== modified file 'libnet/rtmp.h'
--- a/libnet/rtmp.h     2009-01-05 05:26:50 +0000
+++ b/libnet/rtmp.h     2009-02-04 21:20:09 +0000
@@ -299,7 +299,7 @@
     CQue &operator[] (size_t x) { return _queues[x]; }
     void dump();
   protected:
-    std::map<const char *, amf::Element &> _properties;
+    std::map<const char *, amf::Element> _properties;
     amf::Buffer        *_handshake;
     Handler    *_handler;
     rtmp_head_t        _header;

=== modified file 'libnet/rtmp_msg.cpp'
--- a/libnet/rtmp_msg.cpp       2008-12-28 23:53:10 +0000
+++ b/libnet/rtmp_msg.cpp       2009-02-04 21:20:09 +0000
@@ -50,7 +50,7 @@
     : _routing(FROM_SERVER),
       _status(APP_SHUTDOWN),
       _streamid(0),
-      _channel(9)
+      _channel(0)
 {
 //    GNASH_REPORT_FUNCTION;
 //     _inbytes = 0;
@@ -250,6 +250,12 @@
     return _status;
 }
 
+// void
+// RTMPMsg::setHeaderData(RTMP::rtmp_head_t &qhead)
+// {
+    
+// }
+
 boost::shared_ptr<amf::Element>
 RTMPMsg::operator[](size_t index)
 {

=== modified file 'libnet/rtmp_msg.h'
--- a/libnet/rtmp_msg.h 2008-12-28 23:53:10 +0000
+++ b/libnet/rtmp_msg.h 2009-02-04 21:20:09 +0000
@@ -116,6 +116,8 @@
     /// @return A smart pointer to the Element for this property.
     boost::shared_ptr<amf::Element> findProperty(const std::string &name);
 
+//    void setHeaderData(RTMP::rtmp_head_t &qhead);
+                       
 // Dump internal status to the terminal
     void dump();
     


reply via email to

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