Page 1 of 1

VLC error when closing the MFC dialog application

Posted: 21 Jul 2008 11:35
by sriguru
Hi all,
I am using VLCPlugin2 in my MFC dialog application. I am able to embed the VLC player and also able to play video files. But when i close the application, it throws some error. I saw few postings on this topic. But I couldnt find any solution for this. Anyone solved this problem? Kindly help pls...

In VLCPlugin2, add(LPCTSTR uri, const VARIANT& name, const VARIANT& options) function, what is right parameter for name and options? Currently i am just declaring one dummy variable and using for both name and options. example, VARIANT u; u.vt = VT_EMPTY;

In VLCPlugin1 function "addTarget(LPCTSTR uri, const VARIANT& options, long mode, long Position);" we have option to add and play the recently added file. for example, if we set "addTarget(file,u,12, -666);", it will add the file and play the same. How to do the same kind of operation using VLCPlugin2?

Thanks in advance ...

Re: VLC error when closing the MFC dialog application

Posted: 21 Jul 2008 13:38
by corvusvideo
To prevent problems with activex control I found you need to catch the ON_CLOSE of the window that holds the control and make sure to stop the player and then sleep the thread until the player's state goes to none. You can then continue closing.

Re: VLC error when closing the MFC dialog application

Posted: 22 Jul 2008 08:52
by sriguru
Hi,
Thanks a lot for the reply. I tried the same way. But couldnt solve the problem. I may be doing something wrong. PLs kindly post some sample code to solve this problem. need ur help on this.

Thanks in advance.