CVS: main/libmpdemux demux_rtp.cpp,1.14,1.15
Update of /cvsroot/mplayer/main/libmpdemux In directory mail:/var/tmp.root/cvs-serv18804 Modified Files: demux_rtp.cpp Log Message: Access-controlled RTSP sessions can now be played, if the user uses the "-user" and "-passwd" options. Index: demux_rtp.cpp =================================================================== RCS file: /cvsroot/mplayer/main/libmpdemux/demux_rtp.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- demux_rtp.cpp 2 Apr 2003 01:38:07 -0000 1.14 +++ demux_rtp.cpp 11 Apr 2003 02:35:01 -0000 1.15 @@ -94,6 +94,8 @@ struct timeval firstSyncTime; }; +extern "C" char* network_username; +extern "C" char* network_password; int rtspStreamOverTCP = 0; extern "C" void demux_open_rtp(demuxer_t* demuxer) { @@ -124,7 +126,15 @@ break; } - sdpDescription = rtspClient->describeURL(url); + // If we were given a user name (and optional password), then use them: + if (network_username != NULL) { + char const* password + = network_password == NULL ? "" : network_password; + sdpDescription + = rtspClient->describeWithPassword(url, network_username, password); + } else { + sdpDescription = rtspClient->describeURL(url); + } if (sdpDescription == NULL) { fprintf(stderr, "Failed to get a SDP description from URL \"%s\": %s\n", url, env->getResultMsg()); @@ -306,6 +316,7 @@ dp->len = dataLen; dp->pts = 0; bufferQueue->savePendingBuffer(dp); + return True; } static void teardownRTSPSession(RTPState* rtpState); // forward
participants (1)
-
Ross Finlayson CVS