コード例 #1
0
ファイル: MediaDirsTest.java プロジェクト: Rviper001/vlcj
  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!");

    //        Thread.currentThread().join();
    //        System.exit(0);
  }
コード例 #2
0
 @Override
 protected final void onBeforeRelease() {
   onBeforeReleaseComponent();
   mediaListPlayer.release();
   mediaList.release();
 }
コード例 #3
0
ファイル: MediaDirsTest.java プロジェクト: Rviper001/vlcj
 @Override
 public void mediaListItemDeleted(MediaList mediaList, libvlc_media_t mediaInstance, int index) {
   System.out.println("ITEM DELETED: " + index + " -> " + mediaList.items());
 }