# File gstreamer/sample/gst-inspect.rb, line 83
def print_pad(p)
    dir = case p.direction
        when Gst::Pad::SRC  then "SRC"
        when Gst::Pad::SINK then "SINK"
        else "UNKNOWN"
    end
    puts dir + ": " + p.name
    puts "Pad Template: " + p.pad_template.name if p.pad_template
    prefix do
        puts "Implementation:"
        if p.provides_formats? 
            prefix do
                puts "Provides seeking/conversion/query formats:"
                prefix { p.each_format { |f| print_format(f) } }
            end
        end
        if p.provides_event_masks?
            prefix do
                puts "Provides event masks:"
                prefix { p.each_event_mask { |m| print_event_mask(m) } }
            end
        end
        if p.provides_query_types?
            prefix do
                puts "Provides query types:"
                prefix { p.each_query_type { |q| print_query(q) } }
            end
        end
    end
end