//from CChannelHandler void CMediaSourceServerProfile::onBufferReceived(const iviLink::Channel::tChannelId channel, iviLink::Buffer const& buffer) { LOG4CPLUS_TRACE_METHOD(msLogger, __PRETTY_FUNCTION__ ); if (mChannelID != channel) { LOG4CPLUS_ERROR(msLogger, "mChannelID != channel_id"); return; } else { LOG4CPLUS_INFO(msLogger, "mChannelID == channel_id"); } UInt8 *incomingData = buffer.getBuffer(); int read_size = buffer.getSize(); LOG4CPLUS_INFO(msLogger, "Procedure ID = " + convertIntegerToString(incomingData[0])); if(incomingData[0] == REQUESTTRACKLIST) { LOG4CPLUS_INFO(msLogger, "case REQUESTTRACKLIST"); mpAppCallbacks->onRequestTrackList(true); } else { LOG4CPLUS_INFO(msLogger, "unknown procedure ID"); } }
void CMediaStreamingClientProfile::onBufferReceived(const iviLink::Channel::tChannelId channel, iviLink::Buffer const& buffer) { LOG4CPLUS_TRACE_METHOD(msLogger, __PRETTY_FUNCTION__); if (mChannelID != channel) { LOG4CPLUS_INFO(msLogger, "mChannelID != channel_id"); return; } else { LOG4CPLUS_INFO(msLogger, "mChannelID == channel_id"); } UInt8 *incomingData = buffer.getBuffer(); int read_size = buffer.getSize(); LOG4CPLUS_INFO(msLogger, "Procedure ID = " + convertIntegerToString(incomingData[0])); if(incomingData[0] == SENDSTREAMINGINFO) { LOG4CPLUS_INFO(msLogger, "case SENDSTREAMINGINFO"); std::string info((char*)(incomingData + 1), read_size - 1); LOG4CPLUS_INFO(msLogger, "info = " + info); procInfo(info); } else { LOG4CPLUS_INFO(msLogger, "unknown procedure ID"); } }
void CMediaStreamingServerProfile::onBufferReceived(const iviLink::Channel::tChannelId channel, iviLink::Buffer const& buffer) { LOG4CPLUS_TRACE_METHOD(msLogger, __PRETTY_FUNCTION__); if (mChannelID != channel) { LOG4CPLUS_INFO(msLogger, "mChannelID != channel_id"); return; } else { LOG4CPLUS_INFO(msLogger, "mChannelID == channel_id"); } UInt8 *incomingData = buffer.getBuffer(); LOG4CPLUS_INFO(msLogger, "Procedure ID = " + convertIntegerToString(incomingData[0])); if(incomingData[0] == STREAMINGACCEPTED) { LOG4CPLUS_INFO(msLogger, "case STREAMINGACCEPTED"); mpAppCallbacks->onStreamingServerAccepted(true); } else if(incomingData[0] == STREAMINGUNACCEPTED) { LOG4CPLUS_INFO(msLogger, "case STREAMINGUNACCEPTED"); mpAppCallbacks->onStreamingServerUnaccepted(true); } else { LOG4CPLUS_INFO(msLogger, "unknown procedure ID"); } }
void ChannelServer::onBufferReceived(const iviLink::Channel::tChannelId channel, iviLink::Buffer const& buffer) { LOG4CPLUS_INFO(logger, "buffer received!"); if (SMOKE_TEST_ID == currentTest) { UInt8 a, b, c; buffer.read(a); buffer.read(b); buffer.read(c); if(a == 1 && b==2 && c == 3) { LOG4CPLUS_INFO(logger, "smoke_test bufferReceived success"); mCliSyncSem.signal(); } else { LOG4CPLUS_INFO(logger, "smoke_test bufferReceived got corrupted data"); } } if (BIG_DATA_TEST_ID == currentTest) { UInt8 a; for(UInt32 i=0; i<getMaxBufSize(); i++) { buffer.read(a); if (1 != a) { LOG4CPLUS_INFO(logger, "send_big_data_test bufferReceived got corrupted data"); return; } } LOG4CPLUS_INFO(logger, "send_big_data_test bufferReceived success"); mCliSyncSem.signal(); } if (SEND_STRESS_TEST_ID == currentTest) { LOG4CPLUS_INFO(logger, "send_data_stress_test_with_confirmation confirming receiving of data"); mCliSyncSem.signal(); } }
void ReceiverProfile<T,I>::onBufferReceived(const iviLink::Channel::tChannelId channel, iviLink::Buffer const& buffer) { LOG4CPLUS_TRACE_METHOD((logger<T,I>()), __PRETTY_FUNCTION__ ); if (mChannelID != channel) { LOG4CPLUS_INFO((logger<T,I>()), "mChannelID != channel"); return; } else { LOG4CPLUS_INFO((logger<T,I>()), "mChannelID == channel"); } typename I::state_t st; if( st.deserialize(std::string((char*)buffer.getBuffer()) ) ) { receive( st ); } else LOG4CPLUS_ERROR( (logger<T,I>()), "Failed to deserialize state from buffer" ); }