Page 1 of 1

Dual rendering video on Windows.

Posted: 17 Sep 2015 16:39
by theonlylawislove
I am trying to display the same decoded H.264 stream (on Windows) in two separate controls.

I took a look at the direct3d module. I would like to develop my own module that manages to separate HWND instances.

Can I develop my own module (without recompiling libvlc.dll/libvlccore.dll), provided that my dll is in the correct location, and has the correct exports?

For example, if I create a .dll with the following...

Code: Select all

#define D3D_HELP ("Renders two displays") #define HW_BLENDING_TEXT ("Use hardware blending support") #define HW_BLENDING_LONGTEXT ("Try to use hardware acceleration for subtitle/OSD blending.") vlc_module_begin() set_shortname("Dual Direct3D") set_description("Dual Direct3D video output") set_help(D3D_HELP) set_category(CAT_VIDEO) set_subcategory(SUBCAT_VIDEO_VOUT) add_bool("direct3d-hw-blending", true, HW_BLENDING_TEXT, HW_BLENDING_LONGTEXT, true) set_capability("vout display", 240) add_shortcut("dualdirect3d") set_callbacks(Open, Close) vlc_module_end()
...is it enough to just include this .dll in the "VLC_PLUGIN_PATH"? One a windows install, this location is at "C:\Program Files (x86)\VideoLAN\VLC\plugins". Can I just add my .dll there, and use the "dualdirect3d vout"?

Or, is there a better way to display video in two separate HWND instances that I am unware of?

Re: Dual rendering video on Windows.

Posted: 17 Sep 2015 16:54
by Rémi Denis-Courmont
You can add your own plugin.

Re: Dual rendering video on Windows.

Posted: 17 Sep 2015 17:25
by theonlylawislove
When you say, "plugin", you mean "module", right? They are the same thing?

I built a custom dll with the previous post's "vlc_module_begin". After adding it to the plugins directory, it did not show up under Tools > Plugins and extensions > Plugins.

I renamed my dll to have the same name of an existing plugin, in this case "video_output\libdirect3d_plugin.dll". After doing this, my plugin finally showed up (and Open/Close is called!). Why doesn't my plugin show up automatically when I name it "VLCRenderPlugin.dll", but it does when I rename it to be a name of an existing plugin?

Re: Dual rendering video on Windows.

Posted: 17 Sep 2015 17:31
by Rémi Denis-Courmont
libfoo_plugin.dll

Re: Dual rendering video on Windows.

Posted: 17 Sep 2015 17:51
by theonlylawislove
Ah! Didn't realize the naming was important. Thanks!