VLC 0.8.6i plays in new window

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
(*)
New Cone
New Cone
Posts: 5
Joined: 11 May 2008 21:36

VLC 0.8.6i plays in new window

Postby (*) » 14 Jul 2008 22:59

Hi,

I get the picture in external window with title "VLC (hardware YUV DirectX output)". This is in a custom program which worked fine with previous versions.
Is this some bug in version 8.6i or maybe some option is necessary to play in the correct window (specified with VLC_VariableSet ... "drawable")?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: VLC 0.8.6i plays in new window

Postby VLC_help » 15 Jul 2008 22:46

Maybe Direct3D output works better? Some files also spawn multiple outputs, like some MOV and VCD files (BIN images mostly).

(*)
New Cone
New Cone
Posts: 5
Joined: 11 May 2008 21:36

Re: VLC 0.8.6i plays in new window

Postby (*) » 16 Jul 2008 19:56

No difference. Only the title is "VLC (Direct3D output)" and the output is in a new window again. All this happen in version 8.6i and not in previous versions (8.6h, 8.6d and earlier). I think that some option is not correctly read from config file or something of this kind. This is exactly like "--no-wx-embed" option but "wx-embed" is interpreted by VLC user interface program and don't work for external programs using libvlc.dll

(*)
New Cone
New Cone
Posts: 5
Joined: 11 May 2008 21:36

Re: VLC 0.8.6i plays in new window

Postby (*) » 17 Jul 2008 12:33

The problem is in "VLC_VariableSet" function. In version 8.6i it cannot be used to assign the hWnd to "drawable" variable and I am not sure is there an alternative way to do this?

basos
Blank Cone
Blank Cone
Posts: 24
Joined: 17 Jul 2008 14:19

Re: VLC 0.8.6i plays in new window

Postby basos » 17 Jul 2008 18:02

Seems like libvlc is going heavy changes.... FOR the thing you are asking

Code: Select all

/** * Embedding support: Set/change the default parent drawable for video outputs * \param p_instance libvlc instance * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32) * \param p_exception an initialized exception */ void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
(libvlc.h is your only friend)

And 2 questions i have :
- I;m trying to get libvlc play something these days and i cant. it blows up a command window telling that "the command line options could not be loaded"...
Can you post the initialization commands you are using at your externat program?
- Also please post the way you imported the lib into the program. I used the RunTime dynamic loading capability (which has ALOT of redeclerations of library prototypes). Is there a way to link against a lib file to account for the dlib linking stuff?


thanks
basos

(*)
New Cone
New Cone
Posts: 5
Joined: 11 May 2008 21:36

Re: VLC 0.8.6i plays in new window

Postby (*) » 18 Jul 2008 12:24

Hello,

Thanks for your help. It seems this new API (libvlc_*) is exactly I was trying to find.

See the samples in this thread - currently I use libvlc in the same way:
viewtopic.php?t=27112

You need only one command line option with the pathname to VLC directory + additional "\vlc" at the end. I am not sure why is necessary the extra "\vlc" but without it the function fails.

You can generate .lib file from the .dll and use static linking but I do not recommend it for 2 reasons: 1) You will need to put your program in VLC directory or include VLC dir to PATH environment var - otherwise the OS can't find it; 2) If there is no VLC installation or the path is not set your program will not start and the user will not know what is the reason. With dynamic linking you can show error message "Cannot find or load libvlc.dll"...

basos
Blank Cone
Blank Cone
Posts: 24
Joined: 17 Jul 2008 14:19

Re: VLC 0.8.6i plays in new window

Postby basos » 19 Jul 2008 14:42

I managed to play something..
The trick? No need for something usefull as a first parameter to libvlc_new(). Just use the usefull parameters.
e.g.

Code: Select all

char * const vlc_args[] = { "-I", "dummy", // Don't use any interface "--no-dummy-quiet", // do not use a dos box //"--module-path=/set/your/path/to/libvlc/module/if/you/are/on/windows/or/macosx" };
The important thing is to copy libvlc.dll AS WELL AS the plugins directory in the new application directory.

As for the library issues you have a point on the error handling. But there are a lot of declarations. And the library API is not so stable yet. Anyway if i manage sthing with static link i will post.

Thanks
Last edited by basos on 20 Jul 2008 22:43, edited 1 time in total.

(*)
New Cone
New Cone
Posts: 5
Joined: 11 May 2008 21:36

Re: VLC 0.8.6i plays in new window

Postby (*) » 19 Jul 2008 15:30

Hi,

I am not sure for the first param of "libvlc_new()". If you ask for the "old api" function VLC_Init() you can use ""c:\\Program Files\\VideoLAN\\VLC\\vlc" and it has to work. It is better to get the real vlc location from the registry and add "\vlc" to the end instead of this constant path. I agree that declarations for dynamic link are long list but you can find all necessary in this example: http://wiki.videolan.org/LibVLC_Visual_C


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 14 guests