for (String s : args) {
System.out.println("Leftover arg=" + s);
}
player = new PlayBin2("Example Player");
player.setInputFile(new File(args[0]));
Bus bus = player.getBus();
tags = new TagList();
bus.connect(new Bus.TAG() {
public void tagsFound(GstObject source, TagList tagList) {
System.out.println("Got TAG event");
for (String tag : tagList.getTagNames()) {
System.out.println("Tag " + tag + " = " + tagList.getValue(tag, 0));
}
tags = tags.merge(tagList, TagMergeMode.APPEND);
}
});
bus.connect(new Bus.ERROR() {
public void errorMessage(GstObject source, int code, String message) {
System.out.println("Error: code=" + code + " message=" + message);
}
});