lib/rtsp/response.rb
# Reads through each line of the RTSP response body and parses it if
# needed.  Returns a SDP::Description if the Content-Type is
# 'application/sdp', otherwise returns the String that was passed in.
#
# @param [String] body
# @return [SDP::Description,String]
Reads through each line of the RTSP response body and parses it if
needed.  Returns a SDP::Description if the Content-Type is
'application/sdp', otherwise returns the String that was passed in.
Reads through each line of the RTSP response body and parses it if needed . Returns a SDP :: Description if the Content - Type is ' application / sdp ' otherwise returns the String that was passed in .
def parse_body body
      if body =~ /^(\r\n|\n)/
        body.gsub!(/^(\r\n|\n)/, '')
      end
      if @content_type == "application/sdp"
        SDP.parse body
      else
        body
      end
    end
def parse_body body if body =~ / ^( \r \n | \n ) / body . gsub! ( / ^( \r \n | \n ) / , '' ) end if @content_type == "application/sdp" SDP . parse body else body end end
Reads through each line of the RTSP response body and parses it if
needed.
Reads through each line of the RTSP response body and parses it if needed .
None
SDP::Description,String
body
None