Changeset 383 for branches/streaming-rework/src/libstreaming/IsoStream.cpp
- Timestamp:
- 01/28/07 09:36:11 (17 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/streaming-rework/src/libstreaming/IsoStream.cpp
r244 r383 39 39 enum raw1394_iso_disposition 40 40 IsoStream::putPacket(unsigned char *data, unsigned int length, 41 42 41 unsigned char channel, unsigned char tag, unsigned char sy, 42 unsigned int cycle, unsigned int dropped) { 43 43 44 45 46 44 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, 45 "received packet: length=%d, channel=%d, cycle=%d\n", 46 length, channel, cycle ); 47 47 48 48 return RAW1394_ISO_OK; 49 49 } 50 50 51 51 enum raw1394_iso_disposition 52 52 IsoStream::getPacket(unsigned char *data, unsigned int *length, 53 54 55 56 57 53 unsigned char *tag, unsigned char *sy, 54 int cycle, unsigned int dropped, unsigned int max_length) { 55 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, 56 "sending packet: length=%d, cycle=%d\n", 57 *length, cycle ); 58 58 59 60 61 62 59 memcpy(data,&cycle,sizeof(cycle)); 60 *length=sizeof(cycle); 61 *tag = 1; 62 *sy = 0; 63 63 64 64 65 65 return RAW1394_ISO_OK; 66 66 } 67 67 68 68 int IsoStream::getNodeId() { 69 70 71 72 69 if (m_handler) { 70 return m_handler->getLocalNodeId(); 71 } 72 return -1; 73 73 } 74 74 … … 77 77 { 78 78 79 80 81 82 83 79 debugOutputShort( DEBUG_LEVEL_NORMAL, " Address : %p\n",this); 80 debugOutputShort( DEBUG_LEVEL_NORMAL, " Stream type : %s\n", 81 (this->getType()==EST_Receive ? "Receive" : "Transmit")); 82 debugOutputShort( DEBUG_LEVEL_NORMAL, " Port, Channel : %d, %d\n", 83 m_port, m_channel); 84 84 85 85 }; 86 86 87 87 bool IsoStream::setChannel(int c) { 88 88 debugOutput( DEBUG_LEVEL_VERBOSE, "setting channel to %d\n",c); 89 89 90 91 90 m_channel=c; 91 return true; 92 92 } 93 93 94 94 95 95 bool IsoStream::reset() { 96 97 96 debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n"); 97 return true; 98 98 } 99 99 100 100 bool IsoStream::prepare() { 101 102 101 debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n"); 102 return true; 103 103 } 104 104 105 105 bool IsoStream::init() { 106 107 106 debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n"); 107 return true; 108 108 109 109 } 110 110 111 111 void IsoStream::setHandler(IsoHandler *h) { 112 113 112 debugOutput( DEBUG_LEVEL_VERBOSE, "setting handler of isostream %p to %p\n", this,h); 113 m_handler=h; 114 114 } 115 115 116 116 void IsoStream::clearHandler() { 117 117 debugOutput( DEBUG_LEVEL_VERBOSE, "clearing handler of isostream %p\n", this); 118 118 119 119 m_handler=0;