Hi guys,<br><br>I'm trying to use the java bindings, to play a file
inside a GUI, but when the playback starts, a "jvlc hardware yuv
directx output" opens with the video.<br>I need the video embeded in my application, inside a JPanel... Please, any help would be greatly appreciated!!! ;-)<br>
<br>That is my code:<br><br>******************************<div id="1fjq" class="ArwC7c ckChnd">******************<br><br>import javax.swing.BoxLayout;<br>import javax.swing.JFrame;<br>import javax.swing.JPanel;<br><br>import org.videolan.jvlc.JVLC;<br>
import org.videolan.jvlc.JVLCCanvas;<br>
import org.videolan.jvlc.VLCException;<br><br>public class JVLCTest extends JFrame {<br><br> private static final long serialVersionUID = 1L;<br><br> public JVLC jvlc;<br><br> public JVLCTest() {<br> initComponents();<br>
}<br><br> private void initComponents() {<br> getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.PAGE_AXIS));<br><br> JPanel panel = new JPanel();<br> panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));<br>
JVLCCanvas canvas = new JVLCCanvas(new String[] {}, 688, 464);<br> jvlc = canvas.getJVLC();<br> panel.add(canvas);<br> getContentPane().add(panel);<br> pack();<br> }<br><br> public void play() {<br>
try {<br> jvlc.playlist.add("E:\\MediaContent\\FG-dvd_mpeg2_comp.avi", "Video");<br> jvlc.playlist.play();<br> while (!jvlc.isInputPlaying());<br> System.out.println("playing");<br>
} catch (VLCException e) {<br> e.printStackTrace();<br> }<br> }<br><br> public static void main(String[] args) {<br> JVLCTest test = new JVLCTest();<br> test.setSize(800, 600);<br>
test.setVisible(true);<br> test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<br><br> test.play();<br> }<br>}<br><br>************************************************<br><br>I
was trying to use the JVLCPanel directly also, but I'm getting EXCEPTION_ACCESS_VIOLATION from the JVM when doing that, apparently
because the JVLCPanel tries to instanciate the JVLC passing no
arguments, and I only could make it work instanciating the JVLC passing
as argument an empty String array.<br>
<br>Any ideas? Thanks!<br><font color="#888888">Diego<br><br></font>ps. I
know that is not a bug to have the content playing in the overlay
window, but I need it embeded... I tried passing as argument the
--no-overlay option but get an EXCEPTION_ACCESS_VIOLATION from the JVM
(from the JNDI call)<br>ps2. I had everything working fine with the jvlc 0.86, but since this version doesn't have the get/setTime and get/setPosition functionalities, and I need them, I have to upgrade to the newest version...<br>
</div>