Update of /cvsroot/playerstage/code/player/libplayercore
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12968/libplayercore

Modified Files:
        driver.cc driver.h message.h 
Log Message:
applied patches 
[ 1892298 ] camera1394: pass messages without copy
[ 1891487 ] allow message publication without copy


Index: driver.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayercore/driver.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** driver.h    21 Sep 2007 03:31:50 -0000      1.23
--- driver.h    15 Feb 2008 08:16:48 -0000      1.24
***************
*** 178,182 ****
      @param deprecated Used to be the length of the message this is now 
calculated
      @param timestamp Timestamp for the message body (if NULL, then the
!     current time will be filled in) */
      void Publish(player_devaddr_t addr,
                   QueuePointer &queue,
--- 178,183 ----
      @param deprecated Used to be the length of the message this is now 
calculated
      @param timestamp Timestamp for the message body (if NULL, then the
!     current time will be filled in)
!     @param copy if set to false the data will be claimed and the caller 
should no longer use or free it */
      void Publish(player_devaddr_t addr,
                   QueuePointer &queue,
***************
*** 185,189 ****
                   void* src=NULL,
                   size_t deprecated=0,
!                  double* timestamp=NULL);
  
       /** @brief Publish a message via one of this driver's interfaces.
--- 186,191 ----
                   void* src=NULL,
                   size_t deprecated=0,
!                  double* timestamp=NULL,
!                  bool copy=true);
  
       /** @brief Publish a message via one of this driver's interfaces.
***************
*** 198,202 ****
       @param deprecated Used to be the length of the message this is now 
calculated
       @param timestamp Timestamp for the message body (if NULL, then the
!      current time will be filled in) */
       void Publish(player_devaddr_t addr, 
                    uint8_t type, 
--- 200,205 ----
       @param deprecated Used to be the length of the message this is now 
calculated
       @param timestamp Timestamp for the message body (if NULL, then the
!      current time will be filled in)
!      @param copy if set to false the data will be claimed and the caller 
should no longer use or free it */
       void Publish(player_devaddr_t addr, 
                    uint8_t type, 
***************
*** 204,208 ****
                    void* src=NULL, 
                    size_t deprecated=0,
!                   double* timestamp=NULL);
   
   
--- 207,212 ----
                    void* src=NULL, 
                    size_t deprecated=0,
!                   double* timestamp=NULL,
!                   bool copy=true);
   
   

Index: message.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayercore/message.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** message.h   9 Feb 2008 02:52:29 -0000       1.24
--- message.h   15 Feb 2008 08:16:48 -0000      1.25
***************
*** 51,58 ****
  #include <libplayercore/player.h>
  
- // TODO:
- //   - Add support for stealing the data pointer when creating a message.
- //     That would save one allocation & copy in some situations.
- 
  class MessageQueue;
  
--- 51,54 ----

Index: driver.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayercore/driver.cc,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** driver.cc   18 Dec 2007 02:10:42 -0000      1.35
--- driver.cc   15 Feb 2008 08:16:48 -0000      1.36
***************
*** 138,142 ****
                  void* src, bool copy)
  {
!   Message msg(*hdr,src);
    // push onto the given queue, which provides its own locking
    if(!queue->Push(msg))
--- 138,142 ----
                  void* src, bool copy)
  {
!   Message msg(*hdr,src,copy);
    // push onto the given queue, which provides its own locking
    if(!queue->Push(msg))
***************
*** 154,158 ****
    Device* dev;
  
!   Message msg(*hdr,src);
    // lock here, because we're accessing our device's queue list
    this->Lock();
--- 154,158 ----
    Device* dev;
  
!   Message msg(*hdr,src,copy);
    // lock here, because we're accessing our device's queue list
    this->Lock();
***************
*** 190,194 ****
                  void* src,
                  size_t deprecated,
!                 double* timestamp)
  {
    double t;
--- 190,195 ----
                  void* src,
                  size_t deprecated,
!                 double* timestamp,
!                 bool copy)
  {
    double t;
***************
*** 208,212 ****
    hdr.size = 0;
  
!   this->Publish(queue, &hdr, src);
  }
  
--- 209,213 ----
    hdr.size = 0;
  
!   this->Publish(queue, &hdr, src, copy);
  }
  
***************
*** 217,221 ****
                  void* src, 
                  size_t deprecated,
!                 double* timestamp)
  {
    double t;
--- 218,223 ----
                  void* src, 
                  size_t deprecated,
!                 double* timestamp,
!                 bool copy)
  {
    double t;
***************
*** 235,239 ****
    hdr.size = 0;
  
!   this->Publish(&hdr, src);
  }
  
--- 237,241 ----
    hdr.size = 0;
  
!   this->Publish(&hdr, src, copy);
  }
  


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to