Windows c# AXVLC.VLCPlugin2Class
Posted: 28 Jan 2016 23:31
I have been fighting all day to try to get VLC to cooperate with my c# form. Basically what I am needing to do is load multiple VLC targets and display them side by side inside my form. Although VLC is being created within my process id, the moment I start playing the target, a new DC window outside my form in it's own window is opened with the caption "VLC (Direct3d output)". I finally submitted to using FindWindow to locate this newly created window and SetParent to force it into a panel within my form but that to me seems cumbersome and I cannot help but think I am doing something wrong here. To me, the current method I am using is nothing short of a hack because the moment I hit play, I have to spawn a thread to wait for this window to be created, grab the handle then use SetParent to force this into my form.
I even attempted to set the vlc.Visible to "false" before calling play to see if I could convince the window to be created behind the scenes so I do not get the flicker between window creation and the time my thread realizes it and can SetParent. It appears even if visible is set to false, the moment you play, the window becomes visible and loaded at full screen.
I also attempted to use the "gui" control from the toolbox but get a message that it fails to create component. I have also tried installing 2.2.2 to see if maybe it was something wrong with the 2.2.1 version but still failed.
Can anyone point me in the right direction.
Code: Select all
AXVLC.VLCPlugin2Class vlc = new AXVLC.VLCPlugin2Class();
vlc.addTarget("rtsp://1.1.1.1:554/Streaming/Channels/1", null, AXVLC.VLCPlaylistMode.VLCPlayListInsert, 0);
vlc.play();
I also attempted to use the "gui" control from the toolbox but get a message that it fails to create component. I have also tried installing 2.2.2 to see if maybe it was something wrong with the 2.2.1 version but still failed.
Can anyone point me in the right direction.