1 /*****************************************************************************
2 * VLM.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 org.videolan.jvlc.internal.LibVlc.libvlc_exception_t;
36 private volatile boolean released;
43 public void addBroadcast(String name, String input, String output, String[] options, boolean enabled, boolean loop)
45 libvlc_exception_t exception = new libvlc_exception_t();
46 jvlc.getLibvlc().libvlc_vlm_add_broadcast(
51 options == null ? 0 : options.length,
58 public void addVod(String name, String input, String[] options, boolean enabled, String muxer)
60 libvlc_exception_t exception = new libvlc_exception_t();
61 jvlc.getLibvlc().libvlc_vlm_add_vod(
65 options == null ? 0 : options.length,
72 public void deleteMedia(String name)
74 libvlc_exception_t exception = new libvlc_exception_t();
75 jvlc.getLibvlc().libvlc_vlm_del_media(jvlc.getInstance(), name, exception);
78 public void enableMedia(String name)
80 libvlc_exception_t exception = new libvlc_exception_t();
81 jvlc.getLibvlc().libvlc_vlm_set_enabled(jvlc.getInstance(), name, 1, exception);
84 public void disableMedia(String name)
86 libvlc_exception_t exception = new libvlc_exception_t();
87 jvlc.getLibvlc().libvlc_vlm_set_enabled(jvlc.getInstance(), name, 0, exception);
90 public void setMediaOutput(String name, String output)
92 libvlc_exception_t exception = new libvlc_exception_t();
93 jvlc.getLibvlc().libvlc_vlm_set_output(jvlc.getInstance(), name, output, exception);
96 public void setMediaInput(String name, String input)
98 libvlc_exception_t exception = new libvlc_exception_t();
99 jvlc.getLibvlc().libvlc_vlm_set_input(jvlc.getInstance(), name, input, exception);
102 public void addMediaInput(String name, String input)
104 libvlc_exception_t exception = new libvlc_exception_t();
105 jvlc.getLibvlc().libvlc_vlm_add_input(jvlc.getInstance(), name, input, exception);
108 public void setMux(String name, String muxer)
110 libvlc_exception_t exception = new libvlc_exception_t();
111 jvlc.getLibvlc().libvlc_vlm_set_mux(jvlc.getInstance(), name, muxer, exception);
114 public void setMediaLoop(String media, boolean loop)
116 libvlc_exception_t exception = new libvlc_exception_t();
117 jvlc.getLibvlc().libvlc_vlm_set_loop(jvlc.getInstance(), media, loop ? 1 : 0, exception);
120 public void changeMedia(String name, String input, String output, String[] options, boolean enabled, boolean loop)
122 libvlc_exception_t exception = new libvlc_exception_t();
123 jvlc.getLibvlc().libvlc_vlm_change_media(
128 options == null ? 0 : options.length,
135 public void playMedia(String name)
137 libvlc_exception_t exception = new libvlc_exception_t();
138 jvlc.getLibvlc().libvlc_vlm_play_media(jvlc.getInstance(), name, exception);
141 public void stopMedia(String name)
143 libvlc_exception_t exception = new libvlc_exception_t();
144 jvlc.getLibvlc().libvlc_vlm_stop_media(jvlc.getInstance(), name, exception);
147 public void pauseMedia(String name)
149 libvlc_exception_t exception = new libvlc_exception_t();
150 jvlc.getLibvlc().libvlc_vlm_pause_media(jvlc.getInstance(), name, exception);
153 public void seekMedia(String name, float percentage)
155 libvlc_exception_t exception = new libvlc_exception_t();
156 jvlc.getLibvlc().libvlc_vlm_seek_media(jvlc.getInstance(), name, percentage, exception);
159 public void showMedia(String name)
161 libvlc_exception_t exception = new libvlc_exception_t();
162 jvlc.getLibvlc().libvlc_vlm_show_media(jvlc.getInstance(), name, exception);
166 * Releases native resources related to VLM.
168 public void release()
175 libvlc_exception_t exception = new libvlc_exception_t();
176 jvlc.getLibvlc().libvlc_vlm_release(jvlc.getInstance(), exception);
183 protected void finalize() throws Throwable