hello Sir! I have made an application using live media 555 library. In this application I'm receiving video stream from my live media streamer application. Which in turns get stream from a dvd player. In my server application I'm creating rtsp server in my main program. And in same program I'm handling messages from anther client application which sends me START_STREAM and STOP_STREAM messages. As per client applications messages my server application creates a session to receive stream from streamer application and also to send same stream to client application. For first time START and STOP_STREAM works fine but when client sends START_STREAM next time, session is created by my server application but stream is not received by client application. My application shows following messages on screen.
MultiFramedRTPSource::doGetNextFrame1(): The total received frame size exceeds the client's buffer size (40). 1276 bytes of trailing data will be dropped! sendRTPOverTCP: 1328 bytes over channel 0 (socket 932) sendRTPOverTCP: completed MultiFramedRTPSource::doGetNextFrame1(): The total received frame size exceeds the client's buffer size (19). 1297 bytes of trailing data will be dropped! when I go though MultiFramedRTPSource::doGetNextFrame1() function in MultiFramedRTPSource.cpp file I come to know that in this function "fNumTruncatedBytes" variable holds Truncated Bytes and comes into feature Second time when creating session. I dont know how to handle this error. Can anybody help? Code is given below. int StartRtspServer() { // Begin by setting up our usage environment: TaskScheduler* scheduler = BasicTaskScheduler::createNew(); env = BasicUsageEnvironment::createNew(*scheduler); UserAuthenticationDatabase* authDB = NULL; #ifdef ACCESS_CONTROL // To implement client access control to the RTSP server, do the following: authDB = new UserAuthenticationDatabase; authDB->addUserRecord("username1", "password1"); // replace these with real strings // Repeat the above with each <username>, <password> that you wish to allow // access to the server. #endif // Create the RTSP server: wLog->WriteInfoLog("Creating RTSP server.."); *env << "Creating RTSP server.."<<"\n."; portNumBits rtspServerPortNum = 554; rtspServer = RTSPServer::createNew(*env,rtspServerPortNum, authDB); if (rtspServer == NULL) { *env << "Failed to create RTSP server: " <<env->getResultMsg()<<"\n"; return 0; } else { *env << "Created RTSP server.."<<"\n."; } } { case START_STREAM: Th1 = CreateThread(NULL,0, (LPTHREAD_START_ROUTINE)StartStreamingThread,0, 0, &Tid1); if(Th1 == NULL) { cout<<"Error while creating MessageReplyThread .\n"; } Sleep(1000); break; case STOP_STREAM: if( Th1) { // Terminate rtsp server thread cout<<"\nRemoving Server Media Session\n"; rtspServer->removeServerMediaSession(sms); sms=NULL; cout<<"\nClosing live media server Thread\n"; BOOL bVal =TerminateThread(Th1, 0); if ( bVal ) { cout<<"\nClosing thread handle..\n"; CloseHandle(ThreadHandle[0]); } Th1 = NULL; } Sleep(2000); break; } DWORD WINAPI StartStreamingThread(void) { *env <<"Entering in StartStreamingThread()\n"; char const* streamName = "stream1"; char const* inputAddressStr = MulticastIp; portNumBits const inputPortNum = StreamerPort; Boolean const inputStreamIsRawUDP = False; sms = ServerMediaSession::createNew(*env, streamName, streamName,descriptionString); sms->addSubsession(MPEG2TransportUDPServerMediaSubsession::createNew(*env, inputAddressStr, inputPortNum, inputStreamIsRawUDP)); rtspServer->addServerMediaSession(sms); char* url = rtspServer->rtspURL(sms); *env << "\n\"" << streamName << "\" stream, from a UDP Transport Stream input source \n\t("; if (inputAddressStr != NULL) { *env << "IP multicast address " << inputAddressStr << ","; } else { *env << "unicast;"; } *env << " port " << inputPortNum << ")\n"; *env << "Play this stream using the URL \"" << url << "\"\n"; delete[] url; if (rtspServer->setUpTunnelingOverHTTP(TunnelingPort) || rtspServer->setUpTunnelingOverHTTP(TunnelingPort) || rtspServer->setUpTunnelingOverHTTP(TunnelingPort)) { *env << "\n(We use port " << rtspServer->httpServerPortNum() << " for optional RTSP-over-HTTP tunneling.)\n"; } else { *env << "\n(RTSP-over-HTTP tunneling is not available.)\n"; } env->taskScheduler().doEventLoop(); // does not return return 0; // only to prevent compiler warning }
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel