spec/support/fake_rtsp_server.rb
#allowing the order of things to be mucked with
allowing the order of things to be mucked with
allowing the order of things to be mucked with
def describe
    message = "RTSP/1.0 200 OK\r\n"
    message << "CSeq: #{@cseq}\r\n"
    message << "Server: DSS/5.5 (Build/489.7; Platform/Linux; Release/Darwin; )\r\n"
    message << "Cache-Control: no-cache\r\n"
    message << "Content-length: 380\r\n"
    message << "Date: Tue, 15 Mar 2011 01:28:57 GMT\r\n"
    message << "Expires: Tue, 15 Mar 2011 01:28:57 GMT\r\n"
    message << "Content-Type: application/sdp\r\n"
    message << "x-Accept-Retransmit: our-retransmit\r\n"
    message << "x-Accept-Dynamic-Rate: 1\r\n"
    message << "Content-Base: rtsp://64.202.98.91:554/sa.sdp/\r\n"
    message << "\r\n"
    message << "v=\r\n"
    message << "o=- 1905836198 1274535354 IN IP4 127.0.0.1\r\n"
    message << "s=Secret Agent from SomaFM\r\n"
    message << "i=Downtempo Spy Lounge\r\n"
    message << "c=IN IP4 0.0.0.0\r\n"
    message << "t=0 0\r\n"
    message << "a=x-qt-text-cmt:Orban Opticodec-PC\r\n"
    message << "a=x-qt-text-nam:Secret Agent from SomaFM\r\n"
    message << "a=x-qt-text-inf:Downtempo Spy Lounge\r\n"
    message << "a=control:*\r\n"
    message << "m=audio 0 RTP/AVP 96\r\n"
    message << "b=AS:40\r\n"
    message << "a=rtpmap:96 MP4A-LATM/44100/2\r\n"
    message << "a=fmtp:96 cpresent=0;config=400027200000\r\n"
    message << "a=control:trackID=1\r\n"
    message << "\r\n"
  end
def describe message = "RTSP/1.0 200 OK\r\n" message << "CSeq: #{@cseq}\r\n" message << "Server: DSS/5.5 (Build/489.7; Platform/Linux; Release/Darwin; )\r\n" message << "Cache-Control: no-cache\r\n" message << "Content-length: 380\r\n" message << "Date: Tue, 15 Mar 2011 01:28:57 GMT\r\n" message << "Expires: Tue, 15 Mar 2011 01:28:57 GMT\r\n" message << "Content-Type: application/sdp\r\n" message << "x-Accept-Retransmit: our-retransmit\r\n" message << "x-Accept-Dynamic-Rate: 1\r\n" message << "Content-Base: rtsp://64.202.98.91:554/sa.sdp/\r\n" message << "\r\n" message << "v=\r\n" message << "o=- 1905836198 1274535354 IN IP4 127.0.0.1\r\n" message << "s=Secret Agent from SomaFM\r\n" message << "i=Downtempo Spy Lounge\r\n" message << "c=IN IP4 0.0.0.0\r\n" message << "t=0 0\r\n" message << "a=x-qt-text-cmt:Orban Opticodec-PC\r\n" message << "a=x-qt-text-nam:Secret Agent from SomaFM\r\n" message << "a=x-qt-text-inf:Downtempo Spy Lounge\r\n" message << "a=control:*\r\n" message << "m=audio 0 RTP/AVP 96\r\n" message << "b=AS:40\r\n" message << "a=rtpmap:96 MP4A-LATM/44100/2\r\n" message << "a=fmtp:96 cpresent=0;config=400027200000\r\n" message << "a=control:trackID=1\r\n" message << "\r\n" end
allowing the order of things to be mucked with
allowing the order of things to be mucked with