Skip to content

Commit

Permalink
Let's show the AMF data where we can parse it.
Browse files Browse the repository at this point in the history
  • Loading branch information
threedaymonk committed Jun 28, 2008
1 parent c368119 commit c389388
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bin/analyze-capture
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby

require 'net/rtmp'
require 'pp'
DATATYPE_NAMES = Net::RTMP::DATATYPES.invert

def inspect_packet(packet)
Expand All @@ -27,6 +28,14 @@ def inspect_packet(packet)
end
puts display_row.gsub(/[^ -\x7e]/n, '.')
end
if packet.content_type == 0x14
begin
amf = Net::RTMP::AMF.new
amf.parse(packet.body)
pp amf.to_a
rescue NoMethodError
end
end
end

File.open(ARGV[0], 'rb') do |io|
Expand Down

0 comments on commit c389388

Please sign in to comment.