<br><br><div><span class="gmail_quote">On 6/12/07, <b class="gmail_sendername">Tony Anecito</b> <<a href="mailto:adanecito@yahoo.com">adanecito@yahoo.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hi Sherman,</div> <div> </div> <div>Yes I can do that. There is a set of java classes (JVLC.class, input.class, vlm.class, video.class, playlist.class) that I use. The main thing as was mentioned by Remi was not to try to reuse the same instance. What I do is the
JVLC.class makes a call the the libvlc.dll through a wrapper class jvlc.dll to create an instance. when creating an instance the libvlc.dll can be passed a window handle to an existing window which is created for a canvas class. In return a instance handle (integer) is passed back to the
jvlc.class for use in makeing calls by video, input, playlist audio, vlm classes.</div> <div> </div> <div>You can look at the class source to see how they in turn make calls to the dll(s) which will help. But the main thing is to never ever try to reuse the same instance for another video when you want two videos running at the same time. Also I discovered for java at least there are times when the window
tied to a canvas class get destroyed by the java runtime engine (jre) such as repainting when moving a window to the top of the zorder. When that happens you need to destroy the instance of vlc tied to the java canvas otherwise you get segment faults. The same thing also happens where the window gets destroyed when a window get turned into an icon.
</div> <div>This required destroying of a window may even effect a C application because I discovered there was a windows call used by the jre to restack the windows during a zorder call which may also happen in C but the instance was destroyed by the jre. If I overode the method to destroy the window handle vlc crashed.
</div> <div> </div> <div>There might be other things I ran into but the very interesting thing I discovered is you need to specify when doing an install the path to the vlc dlls because if you do not do that vlc may not find them in the default directory structure it hopes to find. There is an
option to do this which I have to use since the java deployment method (java web start) I use puts the jars containing the main method and the dlls are in a jar that can end up in any folder in the cache folder structure but may not end up in the same folder together. So I had to write code to get the dlls out of the jar and put them into a folder where I can pass to the vlc instance the folder location.
</div> <div> </div> <div>I have been able to get the reading of video files on the disk to work but the streaming is intermittantly working on different PC's running Windows XP. I am hoping it is a dll issue or a config issue where the options need to be just so in order for me to use the dlls. The
vlc.exe sets certain options by default and sometimes it is really important to understand them.</div> <div> </div> <div>A lot of effort but I believe I am the only one who has gotten this far with the java bindings. I still need to work with the registration for
event notification which is very new but resolves things like notification of a video finishing without the dreaded polling in a separate thread.</div> <div> </div> <div>I know this may not be the answer you are looking for but maybe it gives you a starting point at least.
</div> <div> </div> <div>Regards,</div> <div>Tony Anecito</div> <div>Founder,</div> <div>MyUniPortal</div> <div><a href="http://www.myuniportal.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.myuniportal.com</a></div></blockquote><div><br>Thanks. <br><br>I am trying to call libvlc_new() using this code:<br><br>libvlc_exception_t exception;<br>libvlc_exception_init( &exception );<br>libvlc_instance_t *p_i1 = libvlc_new( i_argc , ppsz_argv2, &exception );
<br><br>
if (p_i1 == NULL) {<br> printf ("Instance creation failed" ); // I don't see this gets print, so I assume it works. <br>} else {<br><br>}<br><br>This is my argument to libvlc_new:<br><br> char *ppsz_argv2[] = { "./vlc" ,
<br> "-I"<br> "dummy",<br> "test.flv",<br> "--sout",<br> "#transcode{vcodec=mp4v,vb<div id="mb_3">=400}:rtp{dst=
<a href="http://135.23.52.1/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
135.23.52.1</a>,port-video=3342, ,sdp=file:///usr/local/movies/test2.sdp}" }<br><br>I don't see the file 'test2.sdp' get generated but the old way works.<br><br>The above argument works for my 'old' way,
i.e. this:<span class="q"><br><br>int i_ret = VLC_Create(); <br>i_ret = VLC_Init( 0, i_argc, ppsz_argv2 );
<br> i_ret = VLC_AddIntf( 0, NULL, VLC_TRUE, VLC_TRUE );<br><br></span>Thank you for any help.</div><br><br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><span class="e" id="q_1132345937aebb0a_1"><div><b><i>Herman Schultz <<a href="mailto:herman.schultz@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">herman.schultz@gmail.com</a>>
</i></b> wrote:</div> <blockquote style="border-left: 2px solid rgb(16, 16, 255); padding-left: 5px; margin-left: 5px;">Can you please share how you run vlc using the vlc libraries? I can't see to get that to work.<br>
<br> <div><span class="gmail_quote">On 6/12/07, <b class="gmail_sendername">Tony Anecito</b> <<a href="mailto:adanecito@yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> adanecito@yahoo.com
</a>> wrote:</span> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div>Actually I am trying to get multiple child windows running videos using the vlc libraries right now. I am using the latest builds and the jvlc bindings. I am trying to work through understanding how to get the right options setup like for streaming (I left and email for the vlc team today) but otherwise it appears to work fine but I need to get streaming working so I and my testers can get back to testing vlc.
</div> <div> </div> <div>Regards,</div> <div>-Tony Anecito</div> <div>Founder,</div> <div>MyUniportal</div> <div><a href="http://www.myuniportal.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.myuniportal.com</a></div><span> <div><br><br><b><i>Rémi Denis-Courmont <<a href="mailto:rem@videolan.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rem@videolan.org</a> ></i>
</b>
wrote:</div></span> <div><span> <blockquote style="border-left: 2px solid rgb(16, 16, 255); padding-left: 5px; margin-left: 5px;">Hello,<br><br>Le mardi 12 juin 2007, Herman Schultz a écrit : <br>> I am trying to embed&invoke VLC in my c application.
<br>><br>> I invoke VLC like this:<br>> // i_argc is an int<br>> // ppsz_argv2 is char* ppsz_argv2[]<br>><br>> int i_ret = VLC_Create();<br>> i_ret = VLC_Init( 0, i_argc, ppsz_argv2 );<br>> i_ret = VLC_AddIntf( 0, NULL, VLC_TRUE, VLC_TRUE );
<br>> <br>> It works the first time when I do this.<br>> But when I do that the same i_argc, ppsz_arg2[] the second time, I<br>> get an segmentation inside VLC_Init().<br>><br>> Can you please tell me why is there? Or if that is the right way to
<br>> embed/invoke VLC in my own application.<br><br>There are two reasons why they crashes:<br>The bad reason is that VLC 0.8.6 is not quite multi-instance-safe yet;
<br>we are trying to solve this in upcoming version 0.9.0 but we would need <br>people to test this seriously.<br><br>The good reason is that the "VLC" API (as used in src/vlc.c) uses main <br>VLC object number "0". Given object numbers are shared across a
<br>process, there cannot be two VLC instance using object number 0. In <br>other word, without some changes, the "VLC" API cannot be used to spawn <br>more than one instance at a time.<br><br>*However*, as Pierre pointed out, the newer LibVLC media control API
<br>should work fine.<br><br>-- <br>Rémi Denis-Courmont<br><a href="http://www.remlab.net/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.remlab.net/</a><br></blockquote><br></span></div>
<span> <div></div> <hr size="1"> Luggage? GPS? Comic books? <br>Check out fitting <a href="http://us.rd.yahoo.com/evt=48249/*http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
gifts for grads </a>at Yahoo! Search. <div></div></span></blockquote></div><br></blockquote><br></span></div><span class="ad"><p>
</p><hr size="1">Yahoo! oneSearch: Finally, <a href="http://us.rd.yahoo.com/evt=48252/*http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
mobile search
that gives answers</a>, not web links.
<p></p></span></blockquote></div><br>