<div dir="ltr">Hi Tony,<br><br><div class="gmail_quote">2008/8/11 Tony Anecito <span dir="ltr"><<a href="mailto:adanecito@yahoo.com">adanecito@yahoo.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You need to add the canvas to the JFrame content pane.<br>
<br>
so add:<br>
frame.getContentPane().add(canvas);</blockquote><div><br>I've tried this with no success, I get the same exception.<br><br>...<br>JFrame frame = new JFrame("VLCExample");<br>frame.setPreferredSize(new Dimension(225, 285));<br>
frame.setResizable(false);<br>frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<br> <br>Canvas canvas = new Canvas();<br>frame.setLayout(new FlowLayout());<br>frame.getContentPane().add(canvas); // Added<br> <br>
JVLC jvlc = new JVLC(args);<br>jvlc.setVideoOutput(canvas); // Error here<br> <br>frame.pack();<br>frame.setVisible(true);<br>...<br><br>However, note that the error appears when I try to set the JVLC output to the canvas and I am forced to use a Canvas object so, as it has already been created and added to the content pane, why does it fail with a "must be a displayable component error"?<br>
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
Also, are you using the MediaPlayer class or the deprecated playlist class to play your video? I have had issues with support for the different video formats using the MediaPlayer class and wondering if others using that class are also having issues. Playlist works great for the different video formats but it is going away in the future.<br>
</blockquote><div><br>I'm using the new MediaPlayer class. I have launched the VLC Example added in the Java bindings branch of the VLC 0.9.0 test 3 version that uses this class with no errors with a MPEG-1 and a H.264 videos. Hope this helps.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Good luck.<br>
-Tony<br>
</blockquote><div><br>Thank you for your time,<br>Javi <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
<br>
--- On Sun, 8/10/08, Javier Gálvez Guerrero <<a href="mailto:javier.galvez.guerrero@gmail.com">javier.galvez.guerrero@gmail.com</a>> wrote:<br>
<br>
> From: Javier Gálvez Guerrero <<a href="mailto:javier.galvez.guerrero@gmail.com">javier.galvez.guerrero@gmail.com</a>><br>
<div class="Ih2E3d">> Subject: Re: [vlc] JVLC testing...<br>
> To: "Mailing list for VLC media player users" <<a href="mailto:vlc@videolan.org">vlc@videolan.org</a>><br>
</div>> Date: Sunday, August 10, 2008, 4:45 PM<br>
<div><div></div><div class="Wj3C7c">> Thanks, Keith. Now I'm able to launch a stand-alone VLC<br>
> window and play a<br>
> video.<br>
><br>
> Now I'm trying to embed it into a Java Swing<br>
> application but it launches an<br>
> exception that I can't understand:<br>
><br>
> ...<br>
><br>
> JFrame frame = new JFrame("VLCExample");<br>
> frame.setPreferredSize(new Dimension(225, 285));<br>
> frame.setResizable(false);<br>
><br>
> frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<br>
><br>
> Container cner = frame.getContentPane();<br>
> cner.setLayout(new BoxLayout(cner,<br>
> BoxLayout.Y_AXIS));<br>
><br>
> JPanel panel = new JPanel();<br>
> Canvas canvas = new Canvas();<br>
> frame.setLayout(new FlowLayout());<br>
> JVLC jvlc = new JVLC(args);<br>
> jvlc.setVideoOutput(canvas); ---> // Exception<br>
> in thread "main"<br>
> java.lang.IllegalStateException: Component must be<br>
> displayable<br>
> panel.add(canvas); // at<br>
> com.sun.jna.Native.getComponentID(Native.java:159)<br>
> cner.add(panel); // at<br>
> org.videolan.jvlc.JVLC.setVideoOutput(JVLC.java:90)<br>
> // at<br>
> test.JVLCTest.main(JVLCTest.java:47)<br>
> frame.pack();<br>
> frame.setVisible(true);<br>
><br>
> ...<br>
><br>
> Any idea or sample to guess how to embed a JVLC window in a<br>
> Java Swing<br>
> application?<br>
><br>
><br>
> By the way, now that the 0.9.0 version of VLC is to come in<br>
> following days,<br>
> is going to appear any kind of documentation like a Javadoc<br>
> in JVLC site?<br>
><br>
> And, as VLM setup has changed quite a lot since it seems<br>
> that there's no<br>
> need of interact with the telnet interface anymore (with a<br>
> lot of new<br>
> improvements I suppose), will the VLC official<br>
> documentation be updated in<br>
> the following weeks due to this new version release?<br>
><br>
><br>
> Thank you a lot,<br>
> Javi<br>
><br>
><br>
><br>
> 2008/8/7 Keith Kyzivat <<a href="mailto:kkyzivat@tripleplayint.com">kkyzivat@tripleplayint.com</a>><br>
><br>
> > I checked this out only a few weeks ago, and unless<br>
> things radically<br>
> > changed, the latest JVLC code is present there.<br>
> ><br>
> > Ahh, I see, you're looking at<br>
> ><br>
> bindings/java/samples/client/src/main/java/VlcClient.java .<br>
> I never tried<br>
> > that one.<br>
> ><br>
> > Give the example that exists in the core heirarchy a<br>
> try:<br>
> ><br>
> bindings/java/core/src/main/java/org/videolan/jvlc/example/VLCExample.java<br>
> ><br>
> > Just make sure you either change the path to the file<br>
> that it's looking<br>
> > for, or make the path it is looking for and stick a<br>
> media file there:<br>
> > /home/carone/apps/a.avi<br>
> ><br>
> > And for the record, jvlc-core-<version>.jar,<br>
> along with jna-3.0.2.jar are<br>
> > indeed needed in order for JVLC to work -- No longer<br>
> is jvlc.dll needed (I<br>
> > think that's what it was..) -- which were the old<br>
> JNI-based bindings.<br>
> ><br>
> > I have a co-worker who is working on some JVLC code,<br>
> but outside of my<br>
> > preliminary work to get JVLC building and the example<br>
> (and a nicer fixed up<br>
> > version) running properly, I have not used JVLC<br>
> extensively.<br>
> ><br>
> ><br>
> ><br>
> > On Thu, Aug 7, 2008 at 6:22 AM, Javier Gálvez<br>
> Guerrero <<br>
> > <a href="mailto:javier.galvez.guerrero@gmail.com">javier.galvez.guerrero@gmail.com</a>> wrote:<br>
> ><br>
> >> Thank you for your answer, Keith, but the sample<br>
> in this git directory<br>
> >> (VlcClient.java) is the same I tried out before,<br>
> which uses deprecated<br>
> >> classes and methods from old VLC libraries and<br>
> doesn't work properly (it<br>
> >> hangs while trying to start playing a video file).<br>
> >><br>
> >> That's why asked for any code written by any<br>
> user who used the new library<br>
> >> so I could guess how to implement my own<br>
> application based on JVLC.<br>
> >><br>
> >><br>
> >> Any help would be much appreciated.<br>
> >> Javi<br>
> >><br>
> >><br>
> >> 2008/8/6 Keith Kyzivat<br>
> <<a href="mailto:kkyzivat@tripleplayint.com">kkyzivat@tripleplayint.com</a>><br>
> >><br>
> >> Check out the VLC source from git using the<br>
> following URL: git://<br>
> >>> <a href="http://git.videolan.org/vlc.git" target="_blank">git.videolan.org/vlc.git</a><br>
> >>><br>
> >>> In there you will find a bindings/java<br>
> directory -- That is where the<br>
> >>> jvlc code is (it's an Apache Maven<br>
> project), In there you'll find some<br>
> >>> examples.<br>
> >>><br>
> >>> More info on checking out the source can be<br>
> had here:<br>
> >>><br>
> >>> <a href="http://wiki.videolan.org/GetTheSource" target="_blank">http://wiki.videolan.org/GetTheSource</a><br>
> >>><br>
> >>><br>
> >>> On Wed, Aug 6, 2008 at 9:49 AM, Javier Gálvez<br>
> Guerrero <<br>
> >>> <a href="mailto:javier.galvez.guerrero@gmail.com">javier.galvez.guerrero@gmail.com</a>> wrote:<br>
> >>><br>
> >>>> Hi,<br>
> >>>><br>
> >>>> Thank you for your answer, Gregor. It<br>
> worked properly with the nightlies<br>
> >>>> VLC version.<br>
> >>>><br>
> >>>> By the way, could anyone provide me with<br>
> any little sample code in order<br>
> >>>> to guess how to use the JVLC methods to be<br>
> able to embed a video playing<br>
> >>>> frame into a Java JFrame or a similar<br>
> Swing component? I have tried to do it<br>
> >>>> with the sample code included in JVLC site<br>
> but it uses the deprecated<br>
> >>>> methods from old JVLC libraries.<br>
> >>>><br>
> >>>> Thank you so much,<br>
> >>>> Javi<br>
> >>>><br>
> >>>><br>
> >>>> 2008/8/5 Gregor Fuis<br>
> <<a href="mailto:gujs.lists@gmail.com">gujs.lists@gmail.com</a>><br>
> >>>><br>
> >>>>> You have to use vlc 0.9.0-test3 for<br>
> using this jvlc jar. Look at this<br>
> >>>>> site how to install it:<br>
> >>>>> <a href="http://nightlies.videolan.org/" target="_blank">http://nightlies.videolan.org/</a><br>
> >>>>><br>
> >>>>> You<br>
> >>>>><br>
> >>>>><br>
> ______________________________________________________<br>
> >>>>> vlc mailing list<br>
> >>>>> To unsubscribe or modify your<br>
> subscription options:<br>
> >>>>><br>
> <a href="http://mailman.videolan.org/listinfo/vlc" target="_blank">http://mailman.videolan.org/listinfo/vlc</a><br>
> >>>>><br>
> >>>>><br>
> >>>><br>
> >>>><br>
> ______________________________________________________<br>
> >>>> vlc mailing list<br>
> >>>> To unsubscribe or modify your subscription<br>
> options:<br>
> >>>> <a href="http://mailman.videolan.org/listinfo/vlc" target="_blank">http://mailman.videolan.org/listinfo/vlc</a><br>
> >>>><br>
> >>>><br>
> >>><br>
> >>><br>
> >>> --<br>
> >>> Keith Kyzivat<br>
> >>><br>
> >>> SIPez LLC.<br>
> >>> SIP VoIP, IM and Presence Consulting<br>
> >>> <a href="http://www.SIPez.com" target="_blank">http://www.SIPez.com</a><br>
> >>> tel: +1 (617) 273-4000<br>
> >>><br>
> >>><br>
> ______________________________________________________<br>
> >>> vlc mailing list<br>
> >>> To unsubscribe or modify your subscription<br>
> options:<br>
> >>> <a href="http://mailman.videolan.org/listinfo/vlc" target="_blank">http://mailman.videolan.org/listinfo/vlc</a><br>
> >>><br>
> >>><br>
> >><br>
> >><br>
> ______________________________________________________<br>
> >> vlc mailing list<br>
> >> To unsubscribe or modify your subscription<br>
> options:<br>
> >> <a href="http://mailman.videolan.org/listinfo/vlc" target="_blank">http://mailman.videolan.org/listinfo/vlc</a><br>
> >><br>
> >><br>
> ><br>
> ><br>
> > --<br>
> > Keith Kyzivat<br>
> ><br>
> > SIPez LLC.<br>
> > SIP VoIP, IM and Presence Consulting<br>
> > <a href="http://www.SIPez.com" target="_blank">http://www.SIPez.com</a><br>
> > tel: +1 (617) 273-4000<br>
> ><br>
> > ______________________________________________________<br>
> > vlc mailing list<br>
> > To unsubscribe or modify your subscription options:<br>
> > <a href="http://mailman.videolan.org/listinfo/vlc" target="_blank">http://mailman.videolan.org/listinfo/vlc</a><br>
> ><br>
> ><br>
> ______________________________________________________<br>
> vlc mailing list<br>
> To unsubscribe or modify your subscription options:<br>
> <a href="http://mailman.videolan.org/listinfo/vlc" target="_blank">http://mailman.videolan.org/listinfo/vlc</a><br>
<br>
<br>
<br>
______________________________________________________<br>
vlc mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc" target="_blank">http://mailman.videolan.org/listinfo/vlc</a><br>
</div></div></blockquote></div><br></div>