diff --git a/ambed/ccontroller.cpp b/ambed/ccontroller.cpp index d6039e8..597d18c 100644 --- a/ambed/ccontroller.cpp +++ b/ambed/ccontroller.cpp @@ -134,7 +134,7 @@ void CController::Task(void) // crack packet if ( IsValidOpenstreamPacket(Buffer, &Callsign, &CodecIn, &CodecOut) ) { - std::cout << "Stream Open from " << Callsign << std::endl; + std::cout << "Stream Open from " << Callsign << " at " << Ip << std::endl; // try create the stream Stream = OpenStream(Callsign, Ip, CodecIn, CodecOut); diff --git a/ambed/cstream.cpp b/ambed/cstream.cpp index 6a4a94b..b9bfd16 100644 --- a/ambed/cstream.cpp +++ b/ambed/cstream.cpp @@ -126,7 +126,7 @@ bool CStream::Init(uint16 uiPort) } else { - std::cout << "Error opening socket on port UDP" << uiPort << " on ip " << m_Ip << std::endl; + std::cout << "Error opening socket on port UDP" << uiPort << " on ip " << g_AmbeServer.GetListenIp() << std::endl; } // done @@ -174,7 +174,7 @@ void CStream::Thread(CStream *This) void CStream::Task(void) { CBuffer Buffer; - static CIp Ip; + CIp Ip; uint8 uiPid; uint8 Ambe[AMBE_FRAME_SIZE]; CAmbePacket *packet; @@ -207,7 +207,7 @@ void CStream::Task(void) queue->pop(); // send it to client EncodeDvFramePacket(&Buffer, packet->GetPid(), packet->GetAmbe()); - m_Socket.Send(Buffer, Ip, m_uiPort); + m_Socket.Send(Buffer, m_Ip, m_uiPort); // and done delete packet; } diff --git a/ambed/cusb3xxxinterface.cpp b/ambed/cusb3xxxinterface.cpp index 77fb7ee..a27bc2b 100644 --- a/ambed/cusb3xxxinterface.cpp +++ b/ambed/cusb3xxxinterface.cpp @@ -402,7 +402,12 @@ bool CUsb3xxxInterface::ReadDeviceVersion(void) ok = (len > 0); //we succeed in reading a packet, print it out std::cout << "ReadDeviceVersion : "; - for ( i = 4; i < len+4 ; i++ ) + for ( i = 5; (i < len+4) && (rxpacket[i] != 0x00); i++ ) + { + std::cout << (char)(rxpacket[i] & 0x00ff); + } + std::cout << " "; + for ( i = i+2; (i < len+4) && (rxpacket[i] != 0x00); i++ ) { std::cout << (char)(rxpacket[i] & 0x00ff); } diff --git a/ambed/cvocodecchannel.cpp b/ambed/cvocodecchannel.cpp index 7a10d41..29a6fbd 100644 --- a/ambed/cvocodecchannel.cpp +++ b/ambed/cvocodecchannel.cpp @@ -62,8 +62,8 @@ bool CVocodecChannel::Open(void) ok = true; PurgeAllQueues(); std::cout << "Vocodec channel " << - m_InterfaceIn->GetName() << ":" << (int)m_iChannelIn << " -> " << - m_InterfaceOut->GetName() << ":" << (int)m_iChannelOut << " open" << std::endl; + m_InterfaceIn->GetName() << ":" << m_InterfaceIn->GetSerial() << ":" << (int)m_iChannelIn << " -> " << + m_InterfaceOut->GetName() << ":" << m_InterfaceOut->GetSerial() << ":" << (int)m_iChannelOut << " open" << std::endl; } return ok; } @@ -75,8 +75,8 @@ void CVocodecChannel::Close(void) m_bOpen = false; PurgeAllQueues(); std::cout << "Vocodec channel " << - m_InterfaceIn->GetName() << ":" << (int)m_iChannelIn << " -> " << - m_InterfaceOut->GetName() << ":" << (int)m_iChannelOut << " closed" << std::endl; + m_InterfaceIn->GetName() << ":" << m_InterfaceIn->GetSerial() << ":" << (int)m_iChannelIn << " -> " << + m_InterfaceOut->GetName() << ":" << m_InterfaceOut->GetSerial() << ":" << (int)m_iChannelOut << " closed" << std::endl; } } diff --git a/ambed/cvocodecinterface.h b/ambed/cvocodecinterface.h index 66f8fbb..18484d3 100644 --- a/ambed/cvocodecinterface.h +++ b/ambed/cvocodecinterface.h @@ -46,6 +46,7 @@ public: // get virtual const char *GetName(void) const { return ""; } + virtual const char *GetSerial(void) const { return ""; } // manage channels virtual int GetNbChannels(void) const { return 0; } diff --git a/ambed/cvocodecs.cpp b/ambed/cvocodecs.cpp index c89e416..c9e4643 100644 --- a/ambed/cvocodecs.cpp +++ b/ambed/cvocodecs.cpp @@ -289,6 +289,7 @@ bool CVocodecs::DiscoverFtdiDevices(void) list[i].Description, list[i].SerialNumber); m_FtdiDeviceDescrs.push_back(descr); } + std::cout << std::endl; } else { diff --git a/ambed/main.h b/ambed/main.h index 364bb93..118dcfb 100644 --- a/ambed/main.h +++ b/ambed/main.h @@ -59,8 +59,6 @@ // Transcoder server -------------------------------------------- #define TRANSCODER_PORT 10100 // UDP port -#define TRANSCODER_KEEPALIVE_PERIOD 5 // in seconds -#define TRANSCODER_KEEPALIVE_TIMEOUT 30 // in seconds // Codecs ------------------------------------------------------- #define CODEC_NONE 0