public MediaDirsTest() throws Exception {
MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory();
MediaDiscoverer videoMediaDiscoverer = mediaPlayerFactory.newMediaDiscoverer("video_dir");
Thread.sleep(500); // FIXME not acceptable
MediaList videoFileList = videoMediaDiscoverer.getMediaList();
// videoFileList.addMediaListEventListener(this);
List<MediaListItem> videoFiles = videoFileList.items();
System.out.println("Video Files:");
dumpItems(videoFiles, 1);
System.out.println();
MediaDiscoverer audioMediaDiscoverer = mediaPlayerFactory.newMediaDiscoverer("audio_dir");
Thread.sleep(500); // FIXME not acceptable
MediaList audioFileList = audioMediaDiscoverer.getMediaList();
// audioFileList.addMediaListEventListener(this);
List<MediaListItem> audioFiles = audioFileList.items();
System.out.println("Audio Files:");
dumpItems(audioFiles, 1);
System.out.println();
MediaDiscoverer pictureMediaDiscoverer = mediaPlayerFactory.newMediaDiscoverer("picture_dir");
Thread.sleep(500); // FIXME not acceptable
MediaList pictureFileList = pictureMediaDiscoverer.getMediaList();
// pictureFileList.addMediaListEventListener(this);
List<MediaListItem> pictureFiles = pictureFileList.items();
System.out.println("Picture Files:");
dumpItems(pictureFiles, 1);
System.out.println("DONE!");