1 /*****************************************************************************
2 * VLMTest.java: VLC Java Bindings
3 *****************************************************************************
4 * Copyright (C) 1998-2008 the VideoLAN team
6 * Authors: Filippo Carone <filippo@carone.org>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
24 *****************************************************************************/
26 package org.videolan.jvlc;
28 import junit.framework.Assert;
30 import org.junit.Test;
33 public class VLMTest extends AbstractJVLCTest
35 private String mediaName = "test";
38 public void testVLMInit()
40 VLM vlm = jvlc.getVLM();
41 Assert.assertNotNull(vlm);
45 public void testAddBroadcast()
47 VLM vlm = jvlc.getVLM();
48 vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
52 public void testShowMedia()
54 VLM vlm = jvlc.getVLM();
55 vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
56 vlm.showMedia(mediaName);
60 public void testDisableMedia()
62 VLM vlm = jvlc.getVLM();
63 vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
64 vlm.disableMedia(mediaName);
69 public void testPauseMedia()
71 VLM vlm = jvlc.getVLM();
72 vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
73 vlm.playMedia(mediaName);
74 vlm.pauseMedia(mediaName);
75 vlm.stopMedia(mediaName);
79 public void testStopMedia()
81 VLM vlm = jvlc.getVLM();
82 vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
83 vlm.playMedia(mediaName);
84 vlm.stopMedia(mediaName);
88 public void testSeekMedia()
90 VLM vlm = jvlc.getVLM();
91 vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
92 vlm.playMedia(mediaName);
93 vlm.seekMedia(mediaName, 0.3f);
94 vlm.stopMedia(mediaName);
98 public void testAddMediaInput()
100 VLM vlm = jvlc.getVLM();
101 vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
102 vlm.addMediaInput(mediaName, "file://" + mrl);
106 public void testEnableMedia()
108 VLM vlm = jvlc.getVLM();
109 vlm.addBroadcast(mediaName, "file://" + mrl, "", null, false, false);
110 vlm.enableMedia(mediaName);
114 public void testDeleteMedia()
116 VLM vlm = jvlc.getVLM();
117 vlm.addBroadcast(mediaName, "file://" + mrl, "", null, false, false);
118 vlm.deleteMedia(mediaName);
122 public void testMediaLoop()
124 VLM vlm = jvlc.getVLM();
125 vlm.addBroadcast(mediaName, "file://" + mrl, "", null, false, false);
126 vlm.setMediaLoop(mediaName, true);