<div>I finally managed to get VLC render in a Qt widget. ^_^</div>
<div> </div>
<div>One problem remains though. As the mouse pass over the widget rendering the video or the vizualization for audio file, the libVLC instance automagically gain the focus and respond to keyboard events for example. In the application program I'm developing it can cause quite a real mess out there if the user can do whatever his / her want to using VLC built-in keyboard accelerators. Moreover, if the VLC rendering zone gets focus, my application can't handle keyboard events anymore while the mouse cursor is over the rendering zone, and I really need to process them. I would be glad if someone could give me a way or even an idea to explore for me to be able to overcome my problem.
</div>
<div> </div>
<div>PS : I do the rendering ala netscape plugin method : I get a Handle / X11 window ID / Whatever and do a VLC_SetVariable(instance, "drawable", what_i_got). It would probably be a solution to change my way to render the video but the only available way I know to do this, is to write a special video out (vout) plugin for it to be directly interfaced with the VLC core and my app. Please tell me if I'm wrong, but I think it would be a very complex and time-consuming task.
</div>
<div> </div>
<div>Anyway, any help is greatly appreciated ;-)</div>
<div> </div>
<div>Thanks</div>
<div> </div>
<div>Guillaume<br><br> </div>
<div><span class="gmail_quote">On 4/11/06, <b class="gmail_sendername">lastrainson</b> <<a href="mailto:lastrainson@gmail.com">lastrainson@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="DIRECTION: ltr">Hey again !<br><br>After digging into the vlc mozilla plugin code, I managed to get a mini C libvlc player that uses alsa + xv for rendering. I didn't manage to learn how to render inside a widget or anything else than a standalone vout_plugin window though.
<br>When looking inside the NPP_SetWindow function inside vlcshell.cpp, it seems that vlc is told to render inside the browser using these two lines :<br><br> value.i_int = (int) (ptrdiff_t) (void *) window->window;
<br> VLC_VariableSet( p_plugin->i_vlc, "drawable", value );<br><br>The fact is that I don't really understand what is actually passed to libVLC. the window variable is a NPWindow* and window->window is a platform-dependant value that corresponds to the window ID under X11, HWND under win32 and NP_PORT under OSX. Does that mean that to render inside a widget, i have to find this window unique ID so that libvlc renders directly into the application window? If true, what are the variables I should set using VLC_VariableSet under each platform to actually get the rendering working?
<br><br>Thanks again.</div>
<div style="DIRECTION: ltr"><span class="e" id="q_10a8970bc73af1e9_1"><br><br>
<div><span class="gmail_quote">On 3/23/06, <b class="gmail_sendername">Benjamin Pracht</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:bigben+spam@videolan.org" target="_blank"> bigben+spam@videolan.org
</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Le jeudi 23 mars 2006 à 08:57 +0100, lastrainson a écrit :<br>> Hello everyone.<br>><br>
> This is my first post here, therefore I hope I'm posting at the right<br>> place.<br>><br>> I would like to write an application program which would embed the VLC <br>> library for embedded video playing and that would be written in Qt. I
<br>> looked into the VLC code but I must admit that I'm a little confused<br>> about how and what I should work with to have my video playing inside <br>> a QWidget for example. What I'd like is to code my own Qt widget that
<br>> would draw itself by calling what should render the video inside the<br>> VLC code.<br>><br><br>Well, this is possible using libvlc... You may want to have al look at <br>the code of the mozilla plugin to have an instance of how to use the
<br>API. Don't hesitate to ask any further question.<br><br>--<br>BigBen<br><br>--<br>This is the vlc-devel mailing-list, see <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.videolan.org/vlc/" target="_blank">
http://www.videolan.org/vlc/</a><br>To unsubscribe, please read <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://developers.videolan.org/lists.html" target="_blank">http://developers.videolan.org/lists.html
</a><br><br></blockquote></div><br></span></div></blockquote></div><br>