Improve handling of MultimediaManager to make it a bit easier to make a 'basic' build

git-svn-id: https://zxing.googlecode.com/svn/trunk@822 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2009-01-10 14:05:37 +00:00
parent 1c4f85ee24
commit 6a9910a9b2
2 changed files with 8 additions and 4 deletions

View file

@ -43,7 +43,7 @@ final class SnapshotThread implements Runnable {
this.zXingMIDlet = zXingMIDlet;
waitLock = new Object();
done = false;
multimediaManager = new DefaultMultimediaManager();
multimediaManager = ZXingMIDlet.buildMultimediaManager();
}
void continueRun() {

View file

@ -67,13 +67,17 @@ public final class ZXingMIDlet extends MIDlet {
return videoControl;
}
static MultimediaManager buildMultimediaManager() {
return new AdvancedMultimediaManager();
// Comment line above / uncomment below to make the basic version
// return new DefaultMultimediaManager();
}
protected void startApp() throws MIDletStateChangeException {
try {
player = createPlayer();
player.realize();
MultimediaManager multimediaManager = new AdvancedMultimediaManager();
// Comment line above / uncomment below to make the basic version
//MultimediaManager multimediaManager = new DefaultMultimediaManager();
MultimediaManager multimediaManager = buildMultimediaManager();
multimediaManager.setZoom(player);
multimediaManager.setExposure(player);
videoControl = (VideoControl) player.getControl("VideoControl");