Skip to content

Instantly share code, notes, and snippets.

@adamnew123456
Created August 9, 2012 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamnew123456/3304342 to your computer and use it in GitHub Desktop.
Save adamnew123456/3304342 to your computer and use it in GitHub Desktop.
GST Inspector
#!/usr/bin/tclsh
# A simple gstreamer plugin browser.
package require Tk
pack [entry .searchbox] -fill x
pack [listbox .searchlist] -expand true -fill both
pack [text .detailbox] -expand true -fill both
proc dosearch {} {
.searchlist delete 0 end
.detailbox delete 0.0 end
# Search using gst-inspect to get a list of all plugins
catch {
foreach opt [split [exec gst-inspect-0.10 | grep [.searchbox get] | grep -o { .*:} ] "\n"] {
.searchlist insert end [string trim $opt " :"]
}
}
}
proc dodetails {} {
.detailbox delete 0.0 end
if {![string equal [.searchlist curselection] ""]} {
set name [.searchlist get [lindex [.searchlist curselection] 0]]
.detailbox insert end [exec gst-inspect-0.10 $name]
}
}
bind .searchbox <Return> dosearch
bind .searchlist <Double-1> dodetails
wm title . "GST Inspector"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment