Which DLL contains the snapshot feature?

This forum is about all development around libVLC.
fractal-1
New Cone
New Cone
Posts: 9
Joined: 15 Sep 2024 02:34

Which DLL contains the snapshot feature?

Postby fractal-1 » 28 Oct 2024 01:44

I'm building my WinForms x64 app and I included these LibVLC files:

Code: Select all

<ItemGroup> <VlcWindowsX64IncludeFiles Include="libvlc.dll" /> <VlcWindowsX64IncludeFiles Include="libvlccore.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\access\libimem_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\access\libfilesystem_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\audio_mixer\%2A" /> <VlcWindowsX64IncludeFiles Include="plugins\audio_output\libdirectsound_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\audio_output\libwasapi_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\audio_output\libwaveout_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\codec\libavcodec_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\codec\libd3d11va_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\video_output\libdirect3d9_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\video_output\libdirect3d11_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\video_output\libdrawable_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\video_output\libvmem_plugin.dll" /> </ItemGroup>
The problem is that the snapshot/screenshot feature doesn't work. Which DLL should I include to make it work?

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: Which DLL contains the snapshot feature?

Postby mfkl » 06 Nov 2024 03:12

does it work when you include all DLLs?
what do the logs say?
https://mfkl.github.io

fractal-1
New Cone
New Cone
Posts: 9
Joined: 15 Sep 2024 02:34

Re: Which DLL contains the snapshot feature?

Postby fractal-1 » 10 Nov 2024 23:50

does it work when you include all DLLs?
what do the logs say?
Yes, it works with all DLLs. I'd like to keep as few DLLs as possible to make the app as small as possible.

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: Which DLL contains the snapshot feature?

Postby mfkl » 12 Nov 2024 09:21

You can either look into the code and see which file is handling the feature and make sure the resulting binary is included, or disable/enable DLLs until you find the right ones to include.

You're probably missing (at least) plugins\video_filter\libscene_plugin.dll.
https://mfkl.github.io

fractal-1
New Cone
New Cone
Posts: 9
Joined: 15 Sep 2024 02:34

Re: Which DLL contains the snapshot feature?

Postby fractal-1 » 13 Nov 2024 00:43

You can either look into the code and see which file is handling the feature and make sure the resulting binary is included, or disable/enable DLLs until you find the right ones to include.

You're probably missing (at least) plugins\video_filter\libscene_plugin.dll.
That's the thing: I don't know which DLLs are handling that screenshot feature since the resulting app doesn't generate an error for missing DLLs. I added libscene_plugin.dll and it still doesn't work. I'm using TakeSnapshot method and I see that deep down it's called LibVLCVideoTakeSnapshot. Basically which DLLs include all code needed for this function?
Last edited by fractal-1 on 13 Nov 2024 01:45, edited 1 time in total.

fractal-1
New Cone
New Cone
Posts: 9
Joined: 15 Sep 2024 02:34

Re: Which DLL contains the snapshot feature?

Postby fractal-1 » 13 Nov 2024 01:40

Update: I finally found the right combination through trial and error. These folders are needed in addition to the files and folders I originally posted:

Code: Select all

<VlcWindowsX64IncludeFiles Include="plugins\d3d11\%2A" /> <VlcWindowsX64IncludeFiles Include="plugins\text_renderer\%2A" /> <VlcWindowsX64IncludeFiles Include="plugins\video_chroma\%2A" />
For future reference, the include code for a basic media player + screenshot feature is:

Code: Select all

<ItemGroup> <VlcWindowsX64IncludeFiles Include="libvlc.dll" /> <VlcWindowsX64IncludeFiles Include="libvlccore.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\access\libfilesystem_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\access\libimem_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\audio_mixer\%2A" /> <VlcWindowsX64IncludeFiles Include="plugins\audio_output\libdirectsound_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\audio_output\libwasapi_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\audio_output\libwaveout_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\codec\libavcodec_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\codec\libd3d11va_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\d3d11\%2A" /> <VlcWindowsX64IncludeFiles Include="plugins\text_renderer\%2A" /> <VlcWindowsX64IncludeFiles Include="plugins\video_chroma\%2A" /> <VlcWindowsX64IncludeFiles Include="plugins\video_output\libdirect3d11_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\video_output\libdirect3d9_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\video_output\libdrawable_plugin.dll" /> <VlcWindowsX64IncludeFiles Include="plugins\video_output\libvmem_plugin.dll" /> </ItemGroup>
In total, this plugins folders has only 22.9MB, much smaller than the full package.

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: Which DLL contains the snapshot feature?

Postby mfkl » 13 Nov 2024 07:06

Glad you found it. Trial and error is one way to go.

For the other method, you need to gain an understanding of how libvlc works, which functions are needed and in which dlls they are located. This requires going through the libvlc code (not libvlcsharp).
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 6 guests