Created
August 9, 2012 13:49
-
-
Save adamnew123456/3304342 to your computer and use it in GitHub Desktop.
GST Inspector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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