Dual rendering video on Windows.

This forum is about all development around libVLC.
theonlylawislove
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Sep 2015 16:29

Dual rendering video on Windows.

Postby theonlylawislove » 17 Sep 2015 16:39

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?

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Dual rendering video on Windows.

Postby Rémi Denis-Courmont » 17 Sep 2015 16:54

You can add your own plugin.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

theonlylawislove
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Sep 2015 16:29

Re: Dual rendering video on Windows.

Postby theonlylawislove » 17 Sep 2015 17:25

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?

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Dual rendering video on Windows.

Postby Rémi Denis-Courmont » 17 Sep 2015 17:31

libfoo_plugin.dll
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

theonlylawislove
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Sep 2015 16:29

Re: Dual rendering video on Windows.

Postby theonlylawislove » 17 Sep 2015 17:51

Ah! Didn't realize the naming was important. Thanks!


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 10 guests